diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..23f277b --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,7 @@ + + + # + + + {{ .Text | safeHTML }} + diff --git a/static/css/style.css b/static/css/style.css index 8d28e80..a2f19f6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -40,24 +40,24 @@ p, ul, ol { } /******************* Links *******************/ -a { +a:not(.anchor) { text-decoration: none; color: var(--font-color); border-bottom: 1px dotted; transition: box-shadow 0.2s ease, outline-offset 0.2s ease, transform 0.2s ease, background 0.4s ease; } -a:visited { +a:not(.anchor):visited { color: var(--font-color); } -a:hover { +a:not(.anchor):hover { outline: 1px solid; outline-offset: .3em; border-bottom: 1px dashed; } -a:active { +a:not(.anchor):active { border-bottom: 1px solid; } -a:focus { +a.not(.anchor):focus { outline-offset: .3em; outline: 1px solid; } @@ -398,6 +398,7 @@ a:focus { /******************* Article Body *******************/ .article-body { margin-bottom: 2em; + position: relative; } .article-body img { max-width: 100%; @@ -453,6 +454,36 @@ a:focus { } } +.anchor { + content: '#'; + position: absolute; + opacity: 0%; + left: -1em; + width: 80%; + max-width: 600px; + border: none; + color: var(--font-color-em); + text-decoration: none; +} +@media only screen and (max-width: 500px) { + .anchor { + left: -0.8em; + } +} + +.anchor:hover { + opacity: 100%; + outline: none; + border: none; + cursor: pointer; +} + +@media only screen and (max-width: 320px) { + .anchor:hover { + opacity: 0%; + } +} + /******************* Article Footer *******************/ .article-footer { font-style: italic;