diff --git a/src/css/_base.scss b/assets/css/_base.scss similarity index 100% rename from src/css/_base.scss rename to assets/css/_base.scss diff --git a/src/css/_common/_animation.scss b/assets/css/_common/_animation.scss similarity index 100% rename from src/css/_common/_animation.scss rename to assets/css/_common/_animation.scss diff --git a/src/css/_common/_normalize.scss b/assets/css/_common/_normalize.scss similarity index 100% rename from src/css/_common/_normalize.scss rename to assets/css/_common/_normalize.scss diff --git a/src/css/_common/_utils.scss b/assets/css/_common/_utils.scss similarity index 100% rename from src/css/_common/_utils.scss rename to assets/css/_common/_utils.scss diff --git a/src/css/_custom/_custom.scss b/assets/css/_custom/_custom.scss similarity index 100% rename from src/css/_custom/_custom.scss rename to assets/css/_custom/_custom.scss diff --git a/src/css/_iconfont.scss b/assets/css/_iconfont.scss similarity index 100% rename from src/css/_iconfont.scss rename to assets/css/_iconfont.scss diff --git a/src/css/_partial/_404.scss b/assets/css/_partial/_404.scss similarity index 100% rename from src/css/_partial/_404.scss rename to assets/css/_partial/_404.scss diff --git a/src/css/_partial/_archive.scss b/assets/css/_partial/_archive.scss similarity index 100% rename from src/css/_partial/_archive.scss rename to assets/css/_partial/_archive.scss diff --git a/src/css/_partial/_back-to-top.scss b/assets/css/_partial/_back-to-top.scss similarity index 100% rename from src/css/_partial/_back-to-top.scss rename to assets/css/_partial/_back-to-top.scss diff --git a/src/css/_partial/_footer.scss b/assets/css/_partial/_footer.scss similarity index 100% rename from src/css/_partial/_footer.scss rename to assets/css/_partial/_footer.scss diff --git a/src/css/_partial/_footer/_copyright.scss b/assets/css/_partial/_footer/_copyright.scss similarity index 100% rename from src/css/_partial/_footer/_copyright.scss rename to assets/css/_partial/_footer/_copyright.scss diff --git a/src/css/_partial/_footer/_social.scss b/assets/css/_partial/_footer/_social.scss similarity index 100% rename from src/css/_partial/_footer/_social.scss rename to assets/css/_partial/_footer/_social.scss diff --git a/src/css/_partial/_header.scss b/assets/css/_partial/_header.scss similarity index 100% rename from src/css/_partial/_header.scss rename to assets/css/_partial/_header.scss diff --git a/src/css/_partial/_header/_logo.scss b/assets/css/_partial/_header/_logo.scss similarity index 100% rename from src/css/_partial/_header/_logo.scss rename to assets/css/_partial/_header/_logo.scss diff --git a/src/css/_partial/_header/_menu.scss b/assets/css/_partial/_header/_menu.scss similarity index 100% rename from src/css/_partial/_header/_menu.scss rename to assets/css/_partial/_header/_menu.scss diff --git a/src/css/_partial/_mobile.scss b/assets/css/_partial/_mobile.scss similarity index 100% rename from src/css/_partial/_mobile.scss rename to assets/css/_partial/_mobile.scss diff --git a/src/css/_partial/_pagination.scss b/assets/css/_partial/_pagination.scss similarity index 100% rename from src/css/_partial/_pagination.scss rename to assets/css/_partial/_pagination.scss diff --git a/src/css/_partial/_post.scss b/assets/css/_partial/_post.scss similarity index 100% rename from src/css/_partial/_post.scss rename to assets/css/_partial/_post.scss diff --git a/src/css/_partial/_post/_admonition.scss b/assets/css/_partial/_post/_admonition.scss similarity index 100% rename from src/css/_partial/_post/_admonition.scss rename to assets/css/_partial/_post/_admonition.scss diff --git a/src/css/_partial/_post/_code.scss b/assets/css/_partial/_post/_code.scss similarity index 100% rename from src/css/_partial/_post/_code.scss rename to assets/css/_partial/_post/_code.scss diff --git a/src/css/_partial/_post/_content.scss b/assets/css/_partial/_post/_content.scss similarity index 99% rename from src/css/_partial/_post/_content.scss rename to assets/css/_partial/_post/_content.scss index 688a924d3..b21d3dff3 100644 --- a/src/css/_partial/_post/_content.scss +++ b/assets/css/_partial/_post/_content.scss @@ -23,6 +23,7 @@ .icon-link { visibility: hidden; font-size: 16px; + display: contents; &:before { vertical-align: middle; diff --git a/src/css/_partial/_post/_copyright.scss b/assets/css/_partial/_post/_copyright.scss similarity index 100% rename from src/css/_partial/_post/_copyright.scss rename to assets/css/_partial/_post/_copyright.scss diff --git a/src/css/_partial/_post/_footer.scss b/assets/css/_partial/_post/_footer.scss similarity index 100% rename from src/css/_partial/_post/_footer.scss rename to assets/css/_partial/_post/_footer.scss diff --git a/src/css/_partial/_post/_header.scss b/assets/css/_partial/_post/_header.scss similarity index 100% rename from src/css/_partial/_post/_header.scss rename to assets/css/_partial/_post/_header.scss diff --git a/src/css/_partial/_post/_outdated.scss b/assets/css/_partial/_post/_outdated.scss similarity index 100% rename from src/css/_partial/_post/_outdated.scss rename to assets/css/_partial/_post/_outdated.scss diff --git a/src/css/_partial/_post/_reward.scss b/assets/css/_partial/_post/_reward.scss similarity index 100% rename from src/css/_partial/_post/_reward.scss rename to assets/css/_partial/_post/_reward.scss diff --git a/src/css/_partial/_post/_toc.scss b/assets/css/_partial/_post/_toc.scss similarity index 100% rename from src/css/_partial/_post/_toc.scss rename to assets/css/_partial/_post/_toc.scss diff --git a/src/css/_partial/_slideout.scss b/assets/css/_partial/_slideout.scss similarity index 100% rename from src/css/_partial/_slideout.scss rename to assets/css/_partial/_slideout.scss diff --git a/src/css/_partial/_terms.scss b/assets/css/_partial/_terms.scss similarity index 100% rename from src/css/_partial/_terms.scss rename to assets/css/_partial/_terms.scss diff --git a/src/css/_variables.scss b/assets/css/_variables.scss similarity index 100% rename from src/css/_variables.scss rename to assets/css/_variables.scss diff --git a/src/css/style.scss b/assets/css/style.scss similarity index 100% rename from src/css/style.scss rename to assets/css/style.scss diff --git a/src/js/even.js b/assets/js/even.js similarity index 99% rename from src/js/even.js rename to assets/js/even.js index 8f8497aaf..6d648b4cf 100644 --- a/src/js/even.js +++ b/assets/js/even.js @@ -276,5 +276,3 @@ Even.responsiveTable = function() { wrapper.appendChild(table); } }; - -export {Even} diff --git a/src/js/main.js b/assets/js/main.js similarity index 81% rename from src/js/main.js rename to assets/js/main.js index 4554e6851..96db5dbef 100644 --- a/src/js/main.js +++ b/assets/js/main.js @@ -1,7 +1,3 @@ -import {Even} from './even.js' - -import '../css/style.scss' - $(document).ready(function () { Even.backToTop(); Even.mobileNavbar(); diff --git a/data/even/assets.json b/data/even/assets.json deleted file mode 100644 index 3175026d3..000000000 --- a/data/even/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "even": { - "css": "even.c2a46f00.min.css", - "js": "even.26188efa.min.js" - } -} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d60239061..bd53966bd 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -61,7 +61,9 @@ {{- end -}} - +{{ $style := resources.Get "css/style.scss" | toCSS | minify | fingerprint }} + + {{ if .Site.Params.publicCDN.enable -}} {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCSS | safeHTML }}{{ end }} {{- else -}} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index de3522993..e6d8d7a35 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -67,7 +67,11 @@ {{- end -}} {{- end }} - + +{{ $even := resources.Get "js/even.js" }} +{{ $main := resources.Get "js/main.js" }} +{{ $js := slice $even $main | resources.Concat "js/main.js" | fingerprint }} + {{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}