Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8

trim_trailing_whitespace = true
insert_final_newline = true

[*.css]
indent_style = tab
17 changes: 4 additions & 13 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
<!DOCTYPE html>
<html>

<html lang="en">
{{ partial "head.html" . }}

<body>

{{ partial "header.html" . }}

<div class="page-content">
<div class="wrapper">
{{ block "main" . }}{{ end }}
</div>
</div>

<main class="page-content wrapper">
{{- block "main" . -}}{{- end -}}
</main>
{{ partial "footer.html" . }}
{{ partial "custom_footer.html" . }}

</body>

</html>
21 changes: 10 additions & 11 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
{{ define "main" }}
{{ define "main" -}}
<div class="home h-feed">

{{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
<ul class="post-list">
{{ $paginator := .Paginate (where .Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
{{ range $paginator.Pages }}
{{ range $paginator.Pages -}}
<li class="h-entry">
{{ if .Title }}
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
{{ end }}
{{ with .Title -}}
<h1><a href="{{ .Permalink }}">{{ . }}</a></h1>
{{- end }}

<a href="{{ .Permalink }}" class="u-url"><span class="post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></span></a>
<a href="{{ .Permalink }}" class="u-url post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></a>

<div class="e-content">
{{ .Content }}
{{- .Content -}}
</div>
</li>
{{ end }}
{{- end }}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | absURL }}">via RSS</a></p>

</div>
{{ end }}
{{- end }}
21 changes: 10 additions & 11 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{{ define "main" }}
<div class="post">

{{ define "main" -}}
<article class="post h-entry">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
{{ with .Title -}}
<h1 class="p-name post-title">{{ . }}</h1>
{{- end }}
</header>

<article class="post-content">
{{ .Content }}
</article>

</div>
{{ end }}
<section class="post-content e-content">
{{- .Content -}}
</section>
</article>
{{- end }}
20 changes: 10 additions & 10 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{{ define "main" }}
{{ define "main" -}}
<div class="home h-feed">

<ul class="post-list">
{{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
{{ range $paginator.Pages }}
{{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
{{ range $paginator.Pages -}}
<li class="h-entry">
{{ if .Title }}
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
{{ end }}
{{ with .Title }}
<h1><a href="{{ .Permalink }}">{{ . }}</a></h1>
{{ end }}

<a href="{{ .Permalink }}" class="u-url"><span class="post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></span></a>
<a href="{{ .Permalink }}" class="u-url post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></a>

<div class="e-content">
{{ .Content }}
{{- .Content -}}
</div>
</li>
{{ end }}
{{- end }}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | absURL }}">via RSS</a></p>

</div>
{{ end }}
{{- end }}
57 changes: 33 additions & 24 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta name="viewport" content="width=device-width initial-scale=1">

<title>
{{ block "title" . }}
{{- block "title" . -}}
{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Site.Title }} - {{ .Title }}{{ end }}
{{ end }}
{{- end -}}
</title>

<meta name="description" content="{{ .Summary }}">
Expand All @@ -16,28 +16,37 @@
<link rel="stylesheet" href="{{ "custom.css" | relURL }}">
<link rel="canonical" href="{{ .Permalink }}">

{{ if .RSSLink -}}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ "podcast.xml" | absURL }}" rel="alternate" type="application/rss+xml" title="Podcast" />
<link rel="alternate" type="application/json" title="{{ .Site.Title }}" href="{{ "feed.json" | absURL }}" />
<link rel="EditURI" type="application/rsd+xml" href="{{ "rsd.xml" | absURL }}" />
{{ end -}}
{{ if .RSSLink -}}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ "podcast.xml" | absURL }}" rel="alternate" type="application/rss+xml" title="Podcast" />
<link rel="alternate" type="application/json" title="{{ .Site.Title }}" href="{{ "feed.json" | absURL }}" />
<link rel="EditURI" type="application/rsd+xml" href="{{ "rsd.xml" | absURL }}" />
{{- end }}

<link rel="me" href="https://micro.blog/{{ .Site.Author.username }}" />
{{ with .Site.Params.twitter_username }}
<link rel="me" href="https://twitter.com/{{ . }}" />
{{ end }}
{{ with .Site.Params.github_username }}
<link rel="me" href="https://github.com/{{ . }}" />
{{ end }}
{{ with .Site.Params.instagram_username }}
<link rel="me" href="https://instagram.com/{{ . }}" />
{{ end }}
<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" />
<link rel="token_endpoint" href="https://micro.blog/indieauth/token" />
<link rel="micropub" href="https://micro.blog/micropub" />
<link rel="microsub" href="https://micro.blog/microsub" />
<link rel="webmention" href="https://micro.blog/webmention" />
<link rel="subscribe" href="https://micro.blog/users/follow" />
<link rel="me" href="https://micro.blog/{{ .Site.Author.username }}" />
{{ with .Site.Params.twitter_username -}}
<link rel="me" href="https://twitter.com/{{ . }}" />
{{- end }}
{{ with .Site.Params.github_username -}}
<link rel="me" href="https://github.com/{{ . }}" />
{{- end }}
{{ with .Site.Params.instagram_username -}}
<link rel="me" href="https://instagram.com/{{ . }}" />
{{- end }}
<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" />
<link rel="token_endpoint" href="https://micro.blog/indieauth/token" />
<link rel="micropub" href="https://micro.blog/micropub" />
<link rel="microsub" href="https://micro.blog/microsub" />
<link rel="webmention" href="https://micro.blog/webmention" />
<link rel="subscribe" href="https://micro.blog/users/follow" />

{{ range .Site.Params.plugins_css -}}
<link rel="stylesheet" href="{{ . }}" />
{{ end }}
{{ range $filename := .Site.Params.plugins_html -}}
{{ partial $filename $ }}
{{ end }}
{{ range .Site.Params.plugins_js -}}
<script async="async" src="{{ . }}"></script>
{{ end }}
</head>
14 changes: 7 additions & 7 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
</a>

<div class="trigger">
{{ range .Site.Menus.main }}
{{ if .Page.Params.redirect }}
<a class="page-link" href="{{ .Page.Params.redirect }}">{{ .Name }}</a>
{{ else }}
<a class="page-link" href="{{ .URL | relLangURL | safeURL }}">{{ .Name }}</a>
{{ end }}
{{ end }}
{{ range .Site.Menus.main }}
{{ if .Page.Params.redirect }}
<a class="page-link" href="{{ .Page.Params.redirect }}">{{ .Name }}</a>
{{ else }}
<a class="page-link" href="{{ .URL | relLangURL | safeURL }}">{{ .Name }}</a>
{{ end }}
{{ end }}
</div>
</nav>

Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<nav id="post-nav">
{{ if $pag.HasPrev }}
<span class="prev">
<a href="{{ $pag.Prev.URL }}" title="Previous Page">
<span class="arrow">←</span> Newer Posts
</a>
<a href="{{ $pag.Prev.URL }}" title="Previous Page">
<span class="arrow">←</span> Newer Posts
</a>
</span>
{{ end }}
{{ if $pag.HasNext }}
Expand All @@ -15,4 +15,4 @@
</a>
</span>
{{ end }}
</nav>
</nav>
21 changes: 10 additions & 11 deletions layouts/post/single.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{{ define "main" }}
<div class="post h-entry">

{{ define "main" -}}
<article class="post h-entry">
<header class="post-header">
{{ if .Title }}
<h1 class="p-name">{{ .Title }}</h1>
{{ end }}
{{ with .Title -}}
<h1 class="p-name post-title">{{ . }}</h1>
{{- end }}
<p class="post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
</header>

<article class="post-content e-content">
{{ .Content }}
</article>
<section class="post-content e-content">
{{- .Content -}}
</section>

</div>
</article>

{{ if .Site.Params.include_conversation }}
<script type="text/javascript" src="https://micro.blog/conversation.js?url={{ .Permalink }}"></script>
{{ end }}

{{ end }}
{{- end }}
4 changes: 2 additions & 2 deletions layouts/section/replies.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ define "main" }}
{{ define "main" -}}
<div class="home h-feed">

<ul class="post-list">
Expand Down Expand Up @@ -39,4 +39,4 @@ <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | absURL }}">via RSS</a></p>

</div>
{{ end }}
{{- end }}