Browse Source

theme: Move inline css/js to files due to CSP

master
Chimo 1 month ago
parent
commit
42eb128bd9
No known key found for this signature in database

+ 4
- 0
themes/so-simple/assets/scss/chimo/_util.scss View File

@@ -9,6 +9,10 @@
display: block;
}

.mf2-hide {
display: none;
}

/**
* Hide permalink icon by default
*/

+ 1
- 3
themes/so-simple/layouts/partials/head.html View File

@@ -7,9 +7,7 @@

<title>{{ .Title }} | {{ .Site.Title }}</title>

<script>
document.querySelector("html").classList.replace("no-js", "js");
</script>
<script src="/js/js-support.js"></script>

<link rel="canonical" href="{{ .Permalink }}">
<link rel="self" href="{{ .Permalink }}">

+ 1
- 1
themes/so-simple/layouts/pictures/li.html View File

@@ -18,7 +18,7 @@
</a>

<!-- mf2 -->
<div style="display: none;">
<div class="mf2-hide">
<time class="dt-published"
datetime='{{ .Date.Format "2006-01-02T15:04:05-07:00" }}'>
{{ .Date.Format "2006-01-02T15:04:05-07:00" }}

+ 6
- 0
themes/so-simple/static/js/js-support.js View File

@@ -0,0 +1,6 @@
( function ( doc ) {
"use strict";

doc.querySelector( "html" ).classList.replace( "no-js", "js" );
}( document ) );


Loading…
Cancel
Save