Skip to content

Commit

Permalink
modified: layouts/404.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-o committed Jun 23, 2024
1 parent 17a21d8 commit 2f9439e
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 57 deletions.
5 changes: 4 additions & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ <h4 class="mb-0">Didn’t find anything here!</h4>

</div>
{{ partial "footer.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
<!-- Google Analytics -->
{{ if eq (getenv "HUGO_ENV") "production"}}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
</body>

</html>
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ define "content" }}
{{ partial "home.html" . }}
{{ end }}
{{ end }}
13 changes: 1 addition & 12 deletions layouts/partials/extended_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,5 @@

<!-- Google Analytics -->
{{ if eq (getenv "HUGO_ENV") "production"}}
{{ with .Site.GoogleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
<script>
if (navigator.doNotTrack !== '1') {
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', '{{ . }}');
}
</script>
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ end }}
5 changes: 1 addition & 4 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
{{ if .Site.Copyright }}
<li class="mr-3 mr-lg-0">{{ .Site.Copyright | safeHTML }}</li>
{{ else }}
<li class="mr-3 mr-lg-0">
<a href="https://github.com/digital-clouds"><b>Digital Clouds</b></a> |
<a href="https://github.com/z-shell"><b>Z-Shell</b></a>
</li>
<li class="mr-3 mr-lg-0">Theme by <a href='https://github.com/MeiK2333/github-style'>github-style</a></li>
{{ end }}
</ul>
</div>
Expand Down
5 changes: 1 addition & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script type="application/javascript" src='{{ "js/theme-mode.js" | absURL }}'></script>
<script defer src="fontawesome/6.3.0/js/brands.js"></script>
<script defer src="fontawesome/6.3.0/js/solid.js"></script>
<script defer src="fontawesome/6.3.0/js/fontawesome.js"></script>
<link rel="stylesheet" href='{{ "css/frameworks.min.css" | absURL }}' />
<link rel="stylesheet" href='{{ "css/github.min.css" | absURL }}' />
<link rel="stylesheet" href='{{ "css/github-style.css" | absURL }}' />
Expand All @@ -21,4 +18,4 @@

<!-- Extended head section-->
{{ partial "extended_head.html" . }}
</head>
</head>
21 changes: 4 additions & 17 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
<header class="Header js-details-container Details px-3 px-md-4 px-lg-5 flex-wrap flex-md-nowrap open Details--on">
<div class="Header-item mobile-none" style="margin-top: -4px; margin-bottom: -4px;">
<a class="Header-link" href="{{ .Site.BaseURL }}">
<svg class="octicon" height="32" viewBox="0 0 16 16" version="1.1" width="32">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
</path>
</svg>
<img class="octicon" height="32" width="32" src="{{ .Site.Params.headerIcon }}">
</a>
</div>
<div class="Header-item d-md-none">
<button class="Header-link btn-link js-details-target" type="button"
onclick="document.querySelector('#header-search').style.display = document.querySelector('#header-search').style.display == 'none'? 'block': 'none'">
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 16 16" version="1.1" width="24">
<path fill-rule="evenodd"
d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z">
</path>
</svg>
<img height="24" class="octicon octicon-three-bars" width="24" src="{{ .Site.Params.headerIcon }}">
</button>
</div>
<div style="display: none;" id="header-search"
Expand All @@ -40,12 +32,7 @@

<div class="Header-item Header-item--full flex-justify-center d-md-none position-relative">
<a class="Header-link " href="{{ .Site.BaseURL }}">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1"
width="32">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
</path>
</svg>
<img class="octicon octicon-mark-github v-align-middle" height="32" width="32" src="{{ .Site.Params.headerIcon }}">
</a>
</div>
<div class="Header-item" style="margin-right: 0;">
Expand All @@ -59,4 +46,4 @@
</a>
</div>
</header>
</div>
</div>
11 changes: 7 additions & 4 deletions layouts/partials/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
<div class="d-flex flex-column">
<h1 class="break-word f3 text-normal mb-md-0 mb-1">
<span class="author">
<a href="{{ .Site.BaseURL }}">{{ .Site.Params.author }}</a></span><span
class="path-divider">/</span><strong class="css-truncate-target mr-1" style="max-width: 410px"><a
href="{{ .Permalink }}">{{ .Title }}</a></strong>
<a href="{{ .Site.BaseURL }}">{{ .Site.Params.author }}</a>
</span>
<span class="path-divider">/</span>
<strong class="css-truncate css-truncate-target mr-1" style="max-width: 410px">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</strong>
</h1>
<div class="note m-0">
Created <relative-time datetime="{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}"
Expand Down Expand Up @@ -93,4 +96,4 @@ <h1 class="break-word f3 text-normal mb-md-0 mb-1">
</main>
</div>
<script type="application/javascript" src='{{ "js/toc.js" | absURL }}'></script>
<link rel="stylesheet" href='{{ "css/toc.css" | absURL }}' />
<link rel="stylesheet" href='{{ "css/toc.css" | absURL }}' />
6 changes: 5 additions & 1 deletion layouts/partials/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="user-repo-search-results-summary TableObject-item TableObject-item--primary v-align-top">
<strong>{{ len .Pages }}</strong>
results
for <strong>{{ .Params.title }}</strong>
for <strong>{{ .Title }}</strong>
</div>
<div class="TableObject-item text-right v-align-top">
<a class="issues-reset-query text-normal d-inline-block ml-3" href="{{ .Site.BaseURL }}/post/">
Expand All @@ -21,6 +21,10 @@
</a>
</div>
</div>
{{else}}
{{if gt (len .Site.Taxonomies.tags) 0}}
{{partial "tags.html" .}}
{{end}}
{{ end }}
<ul>
{{ range .Paginator.Pages }}
Expand Down
46 changes: 42 additions & 4 deletions layouts/partials/script.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,49 @@
<script type="application/javascript" src="{{ "js/github-style.js" | absURL }}"></script>
{{ if or .Params.math .Site.Params.math }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer type="application/javascript" src="{{ "fa/js/all.min.js" | absURL }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
<script defer src="https://fastly.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
<script defer src="https://fastly.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
{{ end }}

{{ if or .Params.MathJax .Site.Params.MathJax}}
<script type="text/javascript" async
src="https://cdn.bootcss.com/mathjax/2.7.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$', '$$'], ['\[\[', '\]\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: {
equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"]
}
}
});

MathJax.Hub.Queue(function () {
// Fix <code> tags after MathJax finishes running. This is a
// hack to overcome a shortcoming of Markdown. Discussion at
// https://github.com/mojombo/jekyll/issues/199
var all = MathJax.Hub.getAllJax(), i;
for (i = 0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>

<style>
code.has-jax {
font: inherit;
font-size: 100%;
background: inherit;
border: inherit;
color: #515151;
}
</style>
{{end}}
25 changes: 25 additions & 0 deletions layouts/partials/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<style>
.tags { padding: 15px 0; }
</style>
<div class="f6 text-gray mt-2 tags border-bottom">
{{ range $taxonomy, $terms := site.Taxonomies }}
{{ range $term := $terms }}
<a class="muted-link mr-3" href="{{ .Page.RelPermalink }}">
{{ if eq $taxonomy "tags" }}
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z">
</path>
</svg>
{{ else }}
<svg class="octicon octicon-package" viewBox="0 0 16 16" version="1.1" width="16" height="16">
<path fill-rule="evenodd"
d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z">
</path>
</svg>
{{ end }}
{{ .Page.Title | lower }}
</a>
{{ end }}
{{ end }}
</div>
24 changes: 15 additions & 9 deletions layouts/partials/user-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ <h2 class="mb-2 h4">Organizations</h2>

{{ if .Site.Params.twitter}}
<a style="margin: 0 10px 10px 0;" href="https://twitter.com/{{ .Site.Params.twitter }}">
<img alt="@twitter" width="32" height="32" src="{{ "images/twitter.png" | absURL }}" class="avatar">
<svg width="32" height="32" viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="twitter-icon" d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="white"/>
</svg>
</a>
{{ end }}

Expand All @@ -128,12 +130,6 @@ <h2 class="mb-2 h4">Organizations</h2>
</a>
{{ end }}

{{ if .Site.Params.matrix}}
<a style="margin: 0 10px 10px 0;" href="https://matrix.to/#/{{ .Site.Params.matrix }}">
<img alt="@matrix" width="32" height="32" src="{{ "images/icons/png/matrix-light.png" | absURL }}" class="avatar">
</a>
{{ end }}

{{ if .Site.Params.linkedin }}
<a style="margin: 0 10px 10px 0;" href="https://linkedin.com/in/{{ .Site.Params.linkedin }}">
<img alt="@linkedin" width="32" height="32" src="{{ "images/linkedin.png" | absURL }}" class="avatar">
Expand Down Expand Up @@ -195,20 +191,30 @@ <h2 class="mb-2 h4">Organizations</h2>
<script>
window.onscroll = function (e) {
const headerImg = document.querySelector('#headerImg');
const headerStuck = document.querySelector('#headerStuck');
if (headerImg.getBoundingClientRect().bottom <= 0) {
document.querySelector('#headerStuck').classList.add('is-stuck');
headerStuck.classList.add('is-stuck');
if (window.innerWidth >= 1280) {
headerStuck.setAttribute('style', 'top: 12px;')
} else {
headerStuck.setAttribute('style', 'top: 0;')
}
} else {
document.querySelector('#headerStuck').classList.remove('is-stuck');
headerStuck.classList.remove('is-stuck');
}
};

var style = localStorage.getItem('data-color-mode');
iconElement = document.getElementById('github-icon');
twitterIconElement = document.getElementById('twitter-icon');
if (style == 'light') {
iconElement.setAttribute('fill', '#24292e');
twitterIconElement.setAttribute("fill","black")
}
else {
iconElement.removeAttribute('fill');
iconElement.setAttribute('class', 'octicon');
iconElement.setAttribute('color', '#f0f6fc');
twitterIconElement.setAttribute("fill","white")
}
</script>
6 changes: 6 additions & 0 deletions layouts/shortcodes/details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<details>
<summary>{{ (.Get 0) | markdownify }}</summary>
<p></p>
{{ .Inner | markdownify }}
<p></p>
</details>

0 comments on commit 2f9439e

Please sign in to comment.