diff --git a/README.md b/README.md index c3e44d7..ce755c7 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad --- -## [LightHouse Report (100% ?)](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F) +## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/) --- diff --git a/assets/css/common/main.css b/assets/css/common/main.css index c47e300..50022ac 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -59,6 +59,7 @@ pre { border-radius: var(--radius); padding: 0 5px; font-size: 14px; + user-select: none; } div.highlight:hover .copy-code, diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index bc7f25e..79ccbec 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -366,6 +366,7 @@ h6:hover .anchor { color: var(--secondary); margin-inline-start: 8px; font-weight: 500; + user-select: none; } .post-content :not(table) ::-webkit-scrollbar-thumb { diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js index 586941b..ea11022 100644 --- a/assets/js/fastsearch.js +++ b/assets/js/fastsearch.js @@ -26,7 +26,21 @@ window.onload = function () { 'content' ] }; - if (params.fuseOpts) options = params.fuseOpts; + if (params.fuseOpts) { + options = { + isCaseSensitive: params.fuseOpts.iscasesensitive ? params.fuseOpts.iscasesensitive : false, + includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false, + includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false, + minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1, + shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true, + findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false, + keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'], + location: params.fuseOpts.location ? params.fuseOpts.location : 0, + threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4, + distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100, + ignoreLocation: params.fuseOpts.ignorelocation ? params.fuseOpts.ignorelocation : true + } + } fuse = new Fuse(data, options); // build the index from the json file } } else { diff --git a/i18n/da.yaml b/i18n/da.yaml new file mode 100644 index 0000000..03b0abe --- /dev/null +++ b/i18n/da.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "Forrige Side" + +- id: next_page + translation: "Næste Side" + +- id: read_time + translation: + one: "1 min" + other: "{{ .Count }} min" + +- id: toc + translation: "Indholdsfortegnelse" + +- id: translations + translation: "Oversættelser" + +- id: home + translation: "Start" + +- id: edit_post + translation: "Rediger" + +- id: code_copy + translation: "kopier" + +- id: code_copied + translation: "kopieret!" diff --git a/i18n/es.yaml b/i18n/es.yaml index 38d2239..0d3d69a 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -14,3 +14,12 @@ - id: translations translation: "Traducciones" + +- id: home + translation: "Inicio" + +- id: code_copy + translation: "copiar" + +- id: code_copied + translation: "¡copiado!" \ No newline at end of file diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 5ac2a24..2349587 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -21,7 +21,8 @@ diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f1a50fd..5bb8670 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -27,9 +27,11 @@