Skip to content
Open
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
21 changes: 9 additions & 12 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<!DOCTYPE html>
<html lang="en">
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
<section id="wrapper" {{ if eq .File.Dir "about/" }} class="bio" {{ end }}>
{{ block "main" . }}{{ end }}
</section>
{{ partial "footer.html" . }}
{{ partial "custom_footer.html" . }}
{{ range .Site.Params.plugins_js }}
<script src="{{ . }}"></script>
{{ end }}
</body>
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
<main class="page-content wrapper {{ if eq .File.Dir "about/" }} bio {{ end }}">
{{- block "main" . -}}{{- end -}}
</main>
{{ partial "footer.html" . }}
{{ partial "custom_footer.html" . }}
</body>
</html>
30 changes: 16 additions & 14 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{{ define "main" }}
{{ define "main" -}}
<article class="h-entry post">
<header>
<h1 class="p-name">{{ .Title }}</h1>
<header class="post-header">
{{ with .Title -}}
<h1 class="p-name post-title">{{ . }}</h1>
{{- end }}
</header>
<section class="e-content post-body">
{{ .Content }}
{{- .Content -}}
</section>
<footer class="post-meta clearfix p-author h-card">
<a href="/">
<img class="u-photo avatar" src="{{ .Site.Author.avatar }}" width="96" height="96">
<div>
<span class="p-name dark">{{ .Site.Author.name }}</span>
<span><a rel="author" class="u-url" href="https://micro.blog/{{ .Site.Author.username }}">@{{ .Site.Author.username }}</a></span>
</div>
</a>
</footer>
</article>
<section id="post-meta" class="clearfix">
<a href="/">
<img class="u-photo avatar" src="{{ .Site.Author.avatar }}" width="96" height="96">
<div>
<span class="p-author h-card dark">{{ .Site.Author.name }}</span>
<span><a href="https://micro.blog/{{ .Site.Author.username }}">@{{ .Site.Author.username }}</a></span>
</div>
</a>
</section>
{{ end }}
{{- end }}
44 changes: 22 additions & 22 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{{ define "main" }}
{{ define "main" -}}

<ul id="post-list">

{{ if or .IsHome .Site.Params.paginate_categories }}
{{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") }}
{{ $list := $paginator.Pages }}
{{ range $list }}
{{ partial "post-item.html" . }}
{{ end }}
{{ else }}
{{ $list := where .Site.Pages.ByDate.Reverse "Type" "post" }}
{{ range $list }}
{{ partial "post-item.html" . }}
{{ end }}
{{ end }}
{{- if or .IsHome .Site.Params.paginate_categories }}
{{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") }}
{{ $list := $paginator.Pages }}
{{ range $list }}
{{ partial "post-item.html" . }}
{{ end }}
{{- else -}}
{{ $list := where .Site.Pages.ByDate.Reverse "Type" "post" }}
{{ range $list }}
{{ partial "post-item.html" . }}
{{ end }}
{{ end -}}

</ul>
</ul>

{{ if .IsHome }}
{{ if .Site.Params.paginate_home }}
{{ partial "pagination" . }}
{{ end }}
{{ else if .Site.Params.paginate_categories }}
{{ partial "pagination" . }}
{{ end }}
{{- if .IsHome }}
{{ if .Site.Params.paginate_home }}
{{ partial "pagination" . }}
{{ end }}
{{- else if .Site.Params.paginate_categories -}}
{{ partial "pagination" . }}
{{ end -}}

{{ end }}
{{- end }}
10 changes: 4 additions & 6 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<footer id="footer">

<section id="wrapper">
<ul>
<li><a href="/feed.xml">RSS</a></li>
<li><a href="/feed.json">JSON Feed</a></li>
<li><a href="https://micro.blog/{{ .Site.Author.username }}" rel="me">Micro.blog</a></li>
<!-- <li><a class="u-email" href="mailto:" rel="me">Email</a></li> -->
{{ with .Site.Author.email -}}
<li><a class="u-email" href="mailto:{{ . }}" rel="me">Email</a></li>
{{- end }}
</ul>
<form method="get" id="search" action="https://duckduckgo.com/">
<input type="hidden" name="sites" value="{{ "/" | absURL }}"/>
<input type="hidden" name="sites" value="{{ "/" | absURL }}" />
<input type="hidden" name="k8" value="#444444"/>
<input type="hidden" name="k9" value="#ee4792"/>
<input type="hidden" name="kt" value="h"/>
<input class="field" type="text" name="q" maxlength="255" placeholder="To search, type and hit Enter&hellip;"/>
<input type="submit" value="Search" style="display: none;" />
</form>
</section>

</footer>
88 changes: 46 additions & 42 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,51 +1,55 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="{{ .Site.Author.name }}" name="author">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="{{ .Site.Author.name }}" name="author" />

<title>
{{- block "title" . -}}
{{- .Site.Title -}}
{{- if and .Title (ne .Title .Site.Title) }}
- {{ .Title }}
{{- end -}}
{{- end -}}
{{- block "title" . -}}
{{- .Site.Title -}}
{{- if and .Title (ne .Title .Site.Title) }}
- {{ .Title }}
{{- end -}}
{{- end -}}
</title>

<link href="{{ "assets/css/style.css" | relURL }}?{{ .Site.Params.theme_seconds }}" rel="stylesheet">
<link href="{{ "assets/css/highlight.css" | relURL }}?{{ .Site.Params.theme_seconds }}" rel="stylesheet">
<link rel="stylesheet" href="{{ "custom.css" | relURL }}?{{ .Site.Params.theme_seconds }}">
<link href="{{ "assets/css/style.css" | relURL }}?{{ .Site.Params.theme_seconds }}" rel="stylesheet" />
<link href="{{ "assets/css/highlight.css" | relURL }}?{{ .Site.Params.theme_seconds }}" rel="stylesheet" />
<link rel="stylesheet" href="{{ "custom.css" | relURL }}?{{ .Site.Params.theme_seconds }}" />

<link rel="shortcut icon" href="https://micro.blog/{{ .Site.Author.username }}/favicon.png" type="image/x-icon" />
<link rel="shortcut icon" href="https://micro.blog/{{ .Site.Author.username }}/favicon.png" type="image/x-icon" />

{{ 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" />
{{ range .Site.Params.plugins_css }}
<link rel="stylesheet" href="{{ . }}" />
{{ end }}
{{ range $filename := .Site.Params.plugins_html }}
{{ partial $filename $ }}
{{ 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" />

{{ 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>
18 changes: 9 additions & 9 deletions layouts/partials/navigation.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<nav class="main-nav">
{{ if ne .IsHome true }}
{{ if ne .IsHome true -}}
<a class="normal" href="/"> <span class="arrow">←</span> Home</a>
{{ end }}
{{- end }}

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

<a class="cta" href="https://micro.blog/{{ .Site.Author.username }}" rel="me">Also on Micro.blog</a>
</nav>
16 changes: 8 additions & 8 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<nav class="pagination" role="navigation">
{{ if or $pag.HasPrev $pag.HasNext }}
{{ if $pag.HasPrev }}
<a class="newer-posts" href="{{ $pag.Prev.URL }}">&larr; Newer Posts</a>
{{ end }}
<span class="page-number">Page {{ $pag.PageNumber }} of {{ $pag.TotalPages }}</span>
{{ if $pag.HasNext }}
<a class="older-posts" href="{{ $pag.Next.URL }}">Older Posts &rarr;</a>
{{ end }}
{{ end }}
{{ if $pag.HasPrev }}
<a class="newer-posts" href="{{ $pag.Prev.URL }}">&larr; Newer Posts</a>
{{ end }}
<span class="page-number">Page {{ $pag.PageNumber }} of {{ $pag.TotalPages }}</span>
{{ if $pag.HasNext }}
<a class="older-posts" href="{{ $pag.Next.URL }}">Older Posts &rarr;</a>
{{ end }}
{{ end }}
</nav>
35 changes: 15 additions & 20 deletions layouts/partials/post-item.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<li>
<article>
{{ if .Title }}
<section class="post-body">
<header>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
<section class="post-body">
{{ .Content }}
</section>
</section>
{{ else }}
{{ .Content }}
{{ end }}
<a href="{{ .Permalink }}" class="u-url">
<aside class="dates">
<time datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}" class="dt-published">→ {{ .Date.Format "3:04 PM, Jan 2" }}</time>
</aside>
</a>
</article>
<article class="h-entry post">
<header>
{{ with .Title -}}
<h2 class="p-name"><a href="{{ .Permalink }}">{{ . }}</a></h2>
{{- end }}
</header>
<section class="e-content post-body">
{{- .Content -}}
</section>
<footer class="dates">
<a href="{{ .Permalink }}" class="u-url">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05-0700" }}" class="dt-published">→ {{ .Date.Format "3:04 PM, Jan 2" }}</time>
</a>
</footer>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
2 changes: 1 addition & 1 deletion layouts/partials/post-list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul id="post-list">
<ul id="post-list h-feed">

{{ if or .IsHome .Site.Params.paginate_categories }}
{{ $paginator := .Paginate (where .Pages.ByDate.Reverse "Type" "post") }}
Expand Down
20 changes: 9 additions & 11 deletions layouts/partials/profile.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<div class="profile">
<section id="wrapper">
<header class="h-card">
<a class="u-url" href="/about/">
<img id="avatar" class="u-photo" src="{{ .Site.Author.avatar }}" width="96" height="96" />
</a>
<h1 class="p-name" rel="me">{{ .Site.Author.name }}</h1>
<h4 class="p-role">{{ .Site.Params.description | safeHTML }}</h4>
</header>
</section>
</div>
<aside class="profile">
<header class="h-card">
<a class="u-url" href="/about">
<img id="avatar" class="u-photo avatar" src="{{ .Site.Author.avatar }}" width="96" height="96" alt="{{ .Site.Author.name }}" />
</a>
<h1 class="p-name" rel="me">{{ .Site.Author.name }}</h1>
<h4 class="p-role">{{ .Site.Params.description | safeHTML }}</h4>
</header>
</aside>
Loading