h-entry indieweb implementation

This commit is contained in:
Wouter Groeneveld 2021-02-28 11:06:55 +01:00
parent 365129670b
commit 72b0f1af63
4 changed files with 49 additions and 27 deletions

View File

@ -1,13 +1,26 @@
@mixin block-960
width: calc(100% - -220px + 0px)
margin-left: -90px
@mixin block-1120
width: calc(100% - -260px + 0px)
margin-left: -130px
header
@media (min-width: 960px)
@include block-960
@media (min-width: 1120px)
@include block-1120
blockquote blockquote
font-family: $font-alt-stack font-family: $font-alt-stack
margin-left: 3rem margin-left: 3rem
@media (min-width: 960px) @media (min-width: 960px)
width: calc(100% - -220px + 0px) @include block-960
margin-left: -90px
@media (min-width: 1120px) @media (min-width: 1120px)
width: calc(100% - -260px + 0px) @include block-1120
margin-left: -130px
opacity: 0.8 opacity: 0.8
position: relative position: relative

View File

@ -73,8 +73,7 @@ pre
// fix FF letter float - https://stackoverflow.com/questions/6737175/firefox-specific-margin // fix FF letter float - https://stackoverflow.com/questions/6737175/firefox-specific-margin
@-moz-document url-prefix() @-moz-document url-prefix()
main main
&.post article > p:first-of-type::first-letter, &.post .content > p:first-of-type::first-letter
&.essays article > p:first-of-type::first-letter
margin-top: 10px margin-top: 10px
@ -90,6 +89,14 @@ main
@media (min-width: 1600px) @media (min-width: 1600px)
max-width: 930px !important max-width: 930px !important
&.post .content > p:first-of-type::first-letter
font-size: 3.05em
font-weight: bold
line-height: 1.1em
float: left
margin-right: 10px
article article
text-align: left text-align: left
margin-bottom: 1rem margin-bottom: 1rem
@ -102,13 +109,11 @@ main
a a
border-bottom: 1px solid var(--accent) border-bottom: 1px solid var(--accent)
&.post article > p:first-of-type::first-letter, &:link:hover, &:visited:hover
&.essays article > p:first-of-type::first-letter border-bottom: 1px solid white
font-size: 3.05em border-radius: 1px
font-weight: bold color: white
line-height: 1.1em background-color: var(--accent)
float: left
margin-right: 10px
footer footer
@ -128,9 +133,10 @@ main
text-decoration: none !important text-decoration: none !important
header header
text-align: center
margin: auto margin: auto
padding-top: 1rem padding-top: 1rem
padding-bottom: 1.5rem padding-bottom: 3rem
h1 h1
color: var(--accent) color: var(--accent)

View File

@ -2,20 +2,21 @@
{{ partial "bigimg" . }} {{ partial "bigimg" . }}
{{ partial "single-header" . }}
<a id="top"></a>
<main class="single {{ .Section }}"> <main class="single {{ .Section }}">
<br> <article class="h-entry">
<article> {{ partial "single-header" . }}
{{ .Content | safeHTML }} <a id="top"></a>
</article> <div class="e-content content">
{{ .Content | safeHTML }}
</div>
</article>
{{ partial "single-related" . }} {{ partial "single-related" . }}
{{ partial "single-comments" . }} {{ partial "single-comments" . }}
<footer> <footer>
<svg class='icon icon-text' width='24' height='24'><use xlink:href='#up'></use></svg><a href="#top">Top</a> <svg class='icon icon-text' width='24' height='24'><use xlink:href='#up'></use></svg><a href="#top">Top</a>
</footer> </footer>
</main> </main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -1,7 +1,7 @@
<header> <header>
{{ if .Title }} {{ if .Title }}
<h1> <h1 class="p-name">
{{ with .Params.icontag }} {{ with .Params.icontag }}
<svg class='icon'><use xlink:href='#{{ . }}'></use></svg> <svg class='icon'><use xlink:href='#{{ . }}'></use></svg>
{{ end }} {{ end }}
@ -16,11 +16,13 @@
{{ if isset .Params "date" }} {{ if isset .Params "date" }}
<h3> <h3>
{{ if isset .Params "date" }} {{ if isset .Params "date" }}
<time datetime='{{ .Date.Format "2006-01-02" }}'> <time datetime='{{ .Date.Format "2006-01-02" }}' class="dt-published">
<svg class='icon icon-text' width='24' height='24'> <svg class='icon icon-text' width='24' height='24'>
<use xlink:href='#cal1'></use> <use xlink:href='#cal1'></use>
</svg> </svg>
{{ .Date.Format (.Site.Params.dateFormat | default "2 January 2006") }} <a class="u-url" href="{{ .RelPermalink }}">
{{ .Date.Format (.Site.Params.dateFormat | default "2 January 2006") }}
</a>
</time> </time>
{{ end }} {{ end }}
{{ if isset .Params "categories" }} {{ if isset .Params "categories" }}
@ -30,7 +32,7 @@
<use xlink:href='#folder'></use> <use xlink:href='#folder'></use>
</svg> </svg>
{{ range .Params.categories }} {{ range .Params.categories }}
<a href="/categories/{{ . }}">{{ . }}</a> <a class="p-category u-url" href="/categories/{{ . }}">{{ . }}</a>
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}