-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add new Hugo page layouts and partials
- Loading branch information
Showing
62 changed files
with
916 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ define "content" }} | ||
{{ partial "404.html" . }} | ||
{{ end }} |
7 changes: 7 additions & 0 deletions
7
themes/hugo-coder/layouts/_default/_markup/render-heading.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h{{ .Level }} id="{{ .Anchor | safeURL }}"> | ||
{{ .Text | safeHTML }} | ||
<a class="heading-link" href="#{{ .Anchor | safeURL }}"> | ||
<i class="fa fa-link" aria-hidden="true" title="{{ i18n "link_to_heading" | default "Link to heading" }}"></i> | ||
<span class="sr-only">{{ i18n "link_to_heading" | default "Link to heading" }}</span> | ||
</a> | ||
</h{{ .Level }}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }} {{ if findRE "^(https?:)?//" (lower .Destination) }} class="external-link" target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ .Site.Language.Lang }}"> | ||
|
||
<head> | ||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title> | ||
{{ partial "head.html" . }} | ||
</head> | ||
|
||
{{ $csClass := "colorscheme-light" }} | ||
{{ if eq .Site.Params.colorScheme "dark" }} | ||
{{ $csClass = "colorscheme-dark" }} | ||
{{ else if eq .Site.Params.colorScheme "auto" }} | ||
{{ $csClass = "colorscheme-auto" }} | ||
{{ end }} | ||
|
||
<body class="preload-transitions {{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"> | ||
{{ partial "float" . }} | ||
<main class="wrapper"> | ||
{{ partial "header.html" . }} | ||
|
||
<div class="content"> | ||
{{ block "content" . }}{{ end }} | ||
</div> | ||
|
||
{{ partial "footer.html" . }} | ||
</main> | ||
|
||
{{ if .HasShortcode "mermaid" }} | ||
<script src="https://cdn.jsdelivr.net/npm/mermaid@9.3.0/dist/mermaid.min.js" | ||
integrity="sha256-QdTG1YTLLTwD3b95jLqFxpQX9uYuJMNAtVZgwKX4oYU=" crossorigin="anonymous"></script> | ||
<script> | ||
mermaid.initialize({ startOnLoad: true }); | ||
</script> | ||
{{ end }} | ||
|
||
{{ if .Site.IsServer }} | ||
{{ $script := resources.Get "js/coder.js" }} | ||
<script src="{{ $script.RelPermalink }}"></script> | ||
{{ else }} | ||
{{ $script := resources.Get "js/coder.js" | minify | fingerprint }} | ||
<script src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script> | ||
{{ end }} | ||
|
||
{{ range .Site.Params.customJS }} | ||
{{ if $.Site.IsServer }} | ||
{{ $script := resources.Get . }} | ||
<script src="{{ $script.RelPermalink }}"></script> | ||
{{ else }} | ||
{{ $script := resources.Get . | minify | fingerprint }} | ||
<script src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script> | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{ range .Site.Params.customRemoteJS }} | ||
{{ if $.Site.IsServer }} | ||
{{ $script := resources.GetRemote . }} | ||
<script src="{{ $script.RelPermalink }}"></script> | ||
{{ else }} | ||
{{ $script := resources.GetRemote . | minify | fingerprint }} | ||
<script src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script> | ||
{{ end }} | ||
{{ end }} | ||
|
||
|
||
{{ template "_internal/google_analytics.html" . }} | ||
|
||
{{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} | ||
{{- partial "analytics/fathom" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }} | ||
{{- partial "analytics/plausible" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.goatCounter .Site.Params.goatCounter.code }} | ||
{{- partial "analytics/goatcounter" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.cloudflare .Site.Params.cloudflare.token }} | ||
{{- partial "analytics/cloudflare" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.baidu .Site.Params.baidu.token }} | ||
{{- partial "analytics/baidu" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.wideAngleAnalytics .Site.Params.wideAngleAnalytics.siteID }} | ||
{{- partial "analytics/wideangle" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.matomo .Site.Params.matomo.serverURL }} | ||
{{- partial "analytics/matomo" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.googleTagManager .Site.Params.googleTagManager.id }} | ||
{{- partial "analytics/googletagmanager" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.applicationInsights .Site.Params.applicationInsights.connectionString }} | ||
{{- partial "analytics/applicationinsights" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.microAnalytics .Site.Params.microAnalytics.id }} | ||
{{- partial "analytics/microanalyticsio" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.yandexMetrika .Site.Params.yandexMetrika.id }} | ||
{{- partial "analytics/yandex-metrika" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.umami .Site.Params.umami.siteID }} | ||
{{- partial "analytics/umami" . -}} | ||
{{ end }} | ||
|
||
{{ if and .Site.Params.pirsch .Site.Params.pirsch.code }} | ||
{{- partial "analytics/pirsch" . -}} | ||
{{ end }} | ||
|
||
{{- partial "body/extensions" . -}} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ define "title" }} | ||
{{- if eq .Kind "term" -}} | ||
{{- i18n .Data.Plural 1 | title -}} | ||
{{- print ": " -}} | ||
{{- end -}} | ||
{{- i18n (lower .Title) | default .Title | title }} · {{ .Site.Title -}} | ||
{{ end }} | ||
{{ define "content" }} | ||
{{ partial "list.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{ define "title" }} | ||
{{ .Title }} · {{ .Site.Title }} | ||
{{ end }} | ||
{{ define "content" }} | ||
{{ partial "page.html" . }} | ||
{{ partial "posts/math.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ define "title" }} | ||
{{- if eq .Kind "term" -}} | ||
{{- i18n .Data.Plural | title -}} | ||
{{- print ": " -}} | ||
{{- end -}} | ||
{{- i18n (lower .Title) | default .Title | title }} · {{ .Site.Title -}} | ||
{{ end }} | ||
{{ define "content" }} | ||
{{ partial "terms.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ define "content" }} | ||
{{ partial "home.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<section class="container centered"> | ||
<div class="error"> | ||
<h1>404</h1> | ||
<h2>{{ i18n "page_not_found" }}</h2> | ||
<p>{{ i18n "page_does_not_exist" }}<br />{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p> | ||
</div> | ||
</section> |
13 changes: 13 additions & 0 deletions
13
themes/hugo-coder/layouts/partials/analytics/applicationinsights.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script type="text/javascript"> | ||
!function(T,l,y){var S=T.location,k="script",D="connectionString",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a<n.length;a++){var i=n[a].split("=");2===i.length&&(e[i[0][b]()]=i[1])}if(!e[C]){var r=e.endpointsuffix,o=r?e.location:null;e[C]="https://"+(o?o+".":"")+"dc."+(r||"services.visualstudio.com")}return e}(),c=s[D]||d[D]||"",u=s[C],p=u?u+"/v2/track":d.endpointUrl,(l=[]).push((n="SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)",a=t,i=p,(o=(r=v(c,"Exception")).data).baseType="ExceptionData",o.baseData.exceptions=[{typeName:"SDKLoadFailed",message:n.replace(/\./g,"-"),hasFullStack:!1,stack:n+"\nSnippet failed to load ["+a+"] -- Telemetry is disabled\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\nHost: "+(S&&S.pathname||"_unknown_")+"\nEndpoint: "+i,parsedStack:[]}],r)),l.push(function(e,t,n,a){var i=v(c,"Message"),r=i.data;r.baseType="MessageData";var o=r.baseData;return o.message='AI (Internal): 99 message:"'+("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) ("+n+")").replace(/\"/g,"")+'"',o.properties={endpoint:a},i}(0,0,t,p)),function(e,t){if(JSON){var n=T.fetch;if(n&&!y.useXhr)n(t,{method:N,body:JSON.stringify(e),mode:"cors"});else if(XMLHttpRequest){var a=new XMLHttpRequest;a.open(N,t),a.setRequestHeader("Content-type","application/json"),a.send(JSON.stringify(e))}}}(l,p))}function i(e,t){f||setTimeout(function(){!t&&m.core||a()},500)}var e=function(){var n=l.createElement(k);n.src=h;var e=y[w];return!e&&""!==e||"undefined"==n[w]||(n[w]=e),n.onload=i,n.onerror=a,n.onreadystatechange=function(e,t){"loaded"!==n.readyState&&"complete"!==n.readyState||i(0,t)},n}();y.ld<0?l.getElementsByTagName("head")[0].appendChild(e):setTimeout(function(){l.getElementsByTagName(k)[0].parentNode.appendChild(e)},y.ld||0)}try{m.cookie=l.cookie}catch(p){}function t(e){for(;e.length;)!function(t){m[t]=function(){var e=arguments;g||m.queue.push(function(){m[t].apply(m,e)})}}(e.pop())}var n="track",r="TrackPage",o="TrackEvent";t([n+"Event",n+"PageView",n+"Exception",n+"Trace",n+"DependencyData",n+"Metric",n+"PageViewPerformance","start"+r,"stop"+r,"start"+o,"stop"+o,"addTelemetryInitializer","setAuthenticatedUserContext","clearAuthenticatedUserContext","flush"]),m.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4};var s=(d.extensionConfig||{}).ApplicationInsightsAnalytics||{};if(!0!==d[I]&&!0!==s[I]){var c="onerror";t(["_"+c]);var u=T[c];T[c]=function(e,t,n,a,i){var r=u&&u(e,t,n,a,i);return!0!==r&&m["_"+c]({message:e,url:t,lineNumber:n,columnNumber:a,error:i}),r},d.autoExceptionInstrumented=!0}return m}(y.cfg);function a(){y.onInit&&y.onInit(n)}(T[t]=n).queue&&0===n.queue.length?(n.queue.push(a),n.trackPageView({})):a()}(window,document,{ | ||
src: "https://js.monitor.azure.com/scripts/b/ai.2.min.js", // The SDK URL Source | ||
// name: "appInsights", // Global SDK Instance name defaults to "appInsights" when not supplied | ||
// ld: 0, // Defines the load delay (in ms) before attempting to load the sdk. -1 = block page load and add to head. (default) = 0ms load after timeout, | ||
// useXhr: 1, // Use XHR instead of fetch to report failures (if available), | ||
crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag | ||
// onInit: null, // Once the application insights instance has loaded and initialized this callback function will be called with 1 argument -- the sdk instance (DO NOT ADD anything to the sdk.queue -- As they won't get called) | ||
cfg: { // Application Insights Configuration | ||
connectionString: "{{ $.Site.Params.applicationInsights.connectionString }}" | ||
/* ...Other Configuration Options... */ | ||
}}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Baidu Analytics --> | ||
<script> | ||
var _hmt = _hmt || []; | ||
(function() { | ||
var hm = document.createElement("script"); | ||
hm.src = "https://hm.baidu.com/hm.js?{{ $.Site.Params.baidu.token }}"; | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(hm, s); | ||
})(); | ||
</script> | ||
<!-- End Baidu Web Analytics --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- Cloudflare Web Analytics --> | ||
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' | ||
data-cf-beacon='{"token": "{{ $.Site.Params.cloudflare.token }}"}'></script> | ||
<!-- End Cloudflare Web Analytics --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script> | ||
(function(f, a, t, h, o, m){ | ||
a[h]=a[h]||function(){ | ||
(a[h].q=a[h].q||[]).push(arguments) | ||
}; | ||
o=f.createElement('script'), | ||
m=f.getElementsByTagName('script')[0]; | ||
o.async=1; o.src=t; o.id='fathom-script'; | ||
m.parentNode.insertBefore(o,m) | ||
})(document, window, '//{{ .Site.Params.fathomAnalytics.serverURL | default "cdn.usefathom.com" }}/tracker.js', 'fathom'); | ||
fathom('set', 'siteId', '{{ .Site.Params.fathomAnalytics.siteID }}'); | ||
fathom('trackPageview'); | ||
</script> |
2 changes: 2 additions & 0 deletions
2
themes/hugo-coder/layouts/partials/analytics/goatcounter.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<script data-goatcounter="https://{{ $.Site.Params.goatCounter.code }}.goatcounter.com/count" | ||
async src="//gc.zgo.at/count.js"></script> |
9 changes: 9 additions & 0 deletions
9
themes/hugo-coder/layouts/partials/analytics/googletagmanager.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ $.Site.Params.googleTagManager.id }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', '{{ $.Site.Params.googleTagManager.id }}'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script type="application/javascript"> | ||
var _paq = window._paq = window._paq || []; | ||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | ||
_paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | ||
(function() { | ||
var u="https://{{ $.Site.Params.matomo.serverURL }}/"; | ||
_paq.push(['setTrackerUrl', u+'matomo.php']); | ||
_paq.push(['setSiteId', '{{ $.Site.Params.matomo.siteID | default "1" }}']); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); | ||
})(); | ||
</script> |
8 changes: 8 additions & 0 deletions
8
themes/hugo-coder/layouts/partials/analytics/microanalyticsio.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script | ||
async | ||
defer | ||
data-host="https://microanalytics.io" | ||
data-dnt="{{ .Site.Params.microAnalytics.dnt | default "true" }}" | ||
src="https://microanalytics.io/js/script.js" | ||
id="{{ .Site.Params.microAnalytics.id }}"> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script async defer type="text/javascript" src="https://api.pirsch.io/pirsch.js" | ||
id="pirschjs" | ||
data-code="{{ .Site.Params.pirsch.code }}"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<script async defer data-domain="{{ .Site.Params.plausibleAnalytics.domain }}" src="https://{{ .Site.Params.plausibleAnalytics.serverURL | default "plausible.io" }}/js/script{{if .Site.Params.plausibleAnalytics.fileDownloadsTracking}}.file-downloads{{end}}{{if .Site.Params.plausibleAnalytics.outboundLinksTracking}}.outbound-links{{end}}.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- Umami Analytics START --> | ||
<script async defer data-website-id="{{ .Site.Params.umami.siteID }}" | ||
src="{{ .Site.Params.umami.serverURL }}/umami.js"></script> | ||
<!-- Umami Analytics END --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script async defer | ||
src='https://{{ .Site.Params.wideAngleAnalytics.serverURL | default "stats.wideangle.co" }}/script/{{ .Site.Params.wideAngleAnalytics.siteID}}.js' | ||
data-waa-fingerprint='{{ .Site.Params.wideAngleAnalytics.fingerprint | default "false" }}' | ||
data-waa-dnt-supress='{{ .Site.Params.wideAngleAnalytics.supressDNT | default "false" }}'> | ||
</script> |
14 changes: 14 additions & 0 deletions
14
themes/hugo-coder/layouts/partials/analytics/yandex-metrika.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- Yandex.Metrika counter --> | ||
<script type="text/javascript" > | ||
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; | ||
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) | ||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); | ||
|
||
ym({{ $.Site.Params.yandexMetrika.id }}, "init", { | ||
clickmap:true, | ||
trackLinks:true, | ||
accurateTrackBounce:true | ||
}); | ||
</script> | ||
<noscript><div><img src="https://mc.yandex.ru/watch/{{ $.Site.Params.yandexMetrika.id }}" style="position:absolute; left:-9999px;" alt="" /></div></noscript> | ||
<!-- /Yandex.Metrika counter --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{/* | ||
This extension point occurs just before the end of each page's <body> tag. | ||
|
||
You can add further theme extensions or customizations here if needed. | ||
*/}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ printf `<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content; default-src 'self'; child-src %s; font-src %s; form-action %s; frame-src %s; img-src %s; object-src %s; style-src %s; script-src %s; prefetch-src %s; connect-src %s;">` (delimit .Site.Params.csp.childsrc " ") (delimit .Site.Params.csp.fontsrc " ") (delimit .Site.Params.csp.formaction " ") (delimit .Site.Params.csp.framesrc " ") (delimit .Site.Params.csp.imgsrc " ") (delimit .Site.Params.csp.objectsrc " ") (delimit .Site.Params.csp.stylesrc " ") (delimit .Site.Params.csp.scriptsrc " ") (delimit .Site.Params.csp.prefetchsrc " ") (delimit .Site.Params.csp.connectsrc " ") | safeHTML }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{ if not .Site.Params.hideColorSchemeToggle }} | ||
<div class="float-container"> | ||
<a id="dark-mode-toggle" class="colorscheme-toggle"> | ||
<i class="fa fa-adjust fa-fw" aria-hidden="true"></i> | ||
</a> | ||
</div> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<footer class="footer"> | ||
<section class="container"> | ||
© | ||
{{ if (and .Site.Params.since (lt .Site.Params.since now.Year)) }} | ||
{{ .Site.Params.since }} - | ||
{{ end }} | ||
{{ now.Year }} | ||
{{ with .Site.Params.author }} {{ . }} {{ end }} | ||
{{ if (and .Site.Params.license) }} | ||
{{ i18n "licensed_under" }} {{ .Site.Params.license | safeHTML }} | ||
{{ end }} | ||
|
||
{{ if (and .Site.Params.commit .GitInfo) }} | ||
[<a href="{{ .Site.Params.commit }}/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash | ||
}}</a>] | ||
{{ end }} | ||
</section> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{ partial "head/meta-tags.html" . }} | ||
|
||
{{ if .Params.canonicalUrl }} | ||
<link rel="canonical" href="{{ .Params.canonicalUrl }}"> | ||
{{ else }} | ||
<link rel="canonical" href="{{ .Permalink }}"> | ||
{{ end }} | ||
|
||
{{ partialCached "head/theme-styles.html" . }} | ||
|
||
{{ partialCached "head/color-scheme.html" . }} | ||
|
||
{{ partialCached "head/custom-styles.html" . }} | ||
|
||
{{ partialCached "head/custom-icons.html" . }} | ||
|
||
{{ partial "head/alternative-output-formats.html" . }} | ||
|
||
{{ if .IsHome }}{{ partial "head/hugo-generator.html" . }}{{ end }} | ||
|
||
{{ partial "head/extensions.html" . }} |
3 changes: 3 additions & 0 deletions
3
themes/hugo-coder/layouts/partials/head/alternative-output-formats.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ range .AlternativeOutputFormats -}} | ||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }} | ||
{{ if .Site.IsServer }} | ||
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }} | ||
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }} | ||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen"> | ||
{{ else }} | ||
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" ) }} | ||
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts | minify | fingerprint }} | ||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" /> | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon | default "/images/favicon.ico" | relURL }}" sizes="any"> | ||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon.ico" | relURL }}" sizes="32x32"> | ||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon.ico" | relURL }}" sizes="16x16"> | ||
|
||
<link rel="apple-touch-icon" href="{{ .Site.Params.touchicon | default "/images/favicon.ico" | relURL }}"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.touchicon | default "/images/favicon.ico" | relURL }}"> | ||
|
||
<link rel="manifest" href="{{ .Site.Params.manifest | default "/site.webmanifest" | relURL }}"> | ||
<link rel="mask-icon" href="{{ .Site.Params.mask_icon | default "/images/safari-pinned-tab.svg" | relURL }}" color="{{ .Site.Params.mask_icon_color | default "#5bbad5" }}"> |
Oops, something went wrong.