rename portfoliolite - gamegrid, add babel JS translate + minify to main codex.js
This commit is contained in:
parent
40da5d623a
commit
8fc29dc5b6
Binary file not shown.
|
@ -0,0 +1,13 @@
|
||||||
|
module.exports = function (api) {
|
||||||
|
api.cache(true);
|
||||||
|
|
||||||
|
const presets = [
|
||||||
|
require('@babel/preset-env')
|
||||||
|
];
|
||||||
|
const plugins = [ ];
|
||||||
|
|
||||||
|
return {
|
||||||
|
presets,
|
||||||
|
plugins
|
||||||
|
};
|
||||||
|
}
|
|
@ -20,6 +20,12 @@ paginate = 20
|
||||||
mastodonlink = "https://chat.brainbaking.com/@wouter"
|
mastodonlink = "https://chat.brainbaking.com/@wouter"
|
||||||
githublink = "https://github.com/wgroeneveld"
|
githublink = "https://github.com/wgroeneveld"
|
||||||
|
|
||||||
|
# added since Hugo 0.9x to allow babel to be executed
|
||||||
|
[security]
|
||||||
|
enableInlineShortcodes = false
|
||||||
|
[security.exec]
|
||||||
|
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', 'babel']
|
||||||
|
|
||||||
[markup]
|
[markup]
|
||||||
defaultMarkdownHandler = "goldmark"
|
defaultMarkdownHandler = "goldmark"
|
||||||
|
|
||||||
|
|
|
@ -21,5 +21,10 @@
|
||||||
"homepage": "https://jefklakscodex.com",
|
"homepage": "https://jefklakscodex.com",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jam-my-stack": "^1.0.21"
|
"jam-my-stack": "^1.0.21"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/cli": "^7.17.6",
|
||||||
|
"@babel/core": "^7.17.9",
|
||||||
|
"@babel/preset-env": "^7.16.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<h1>Page not found</h1>
|
<h1>Page not found</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
No Worries! Try to <a href="/tags">dig through the Codex Appendix</a> instead to find something similar to what you were looking for. Good luck!
|
No Worries! Try to dig through <a href="/games">all games</a> or <a href="/tags">the appendix</a> instead to find something similar to what you were looking for. Good luck!
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "portfoliolite.html" . }}
|
{{ partial "gamegrid.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -1,3 +0,0 @@
|
||||||
| Template by <a href="https://bootstrapious.com/free-templates" class="external">Bootstrapious.com</a>
|
|
||||||
<!-- Not removing this link is part of the licence conditions of the template. Thanks for understanding :) -->
|
|
||||||
& ported to Hugo by <a href="https://github.com/kishaningithub">Kishan B</a>
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
<h2>Game Codex »</h2>
|
<h2>Game Codex »</h2>
|
||||||
|
|
||||||
|
{{ $pages := .RegularPagesRecursive }}
|
||||||
|
{{ if $pages }}
|
||||||
<div class="gamegridcontrols">
|
<div class="gamegridcontrols">
|
||||||
Sort by:
|
Sort by:
|
||||||
<button class="sortbtn sorted sorted-asc" data-sort="date" data-sorted="asc">Date added</button>
|
<button class="sortbtn sorted sorted-asc" data-sort="date" data-sorted="asc">Date added</button>
|
||||||
|
@ -23,12 +25,17 @@
|
||||||
Sorting relies on JavaScript which is currently disabled.
|
Sorting relies on JavaScript which is currently disabled.
|
||||||
</noscript>
|
</noscript>
|
||||||
<div class="gamegrid">
|
<div class="gamegrid">
|
||||||
{{ range .RegularPagesRecursive }}
|
{{ range $pages }}
|
||||||
{{ if isset .Params "game_name" }}
|
{{ if isset .Params "game_name" }}
|
||||||
{{ partial "portfoliolite-block.html" . }}
|
{{ partial "gamegrid-block.html" . }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<p>
|
||||||
|
No entries yet. Check back soon!
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Browse the Codex: <a href="/games">all games</a> | <a href="/platforms">by platform</a> | <a href="/tags">the appendix</a>.
|
Browse the Codex: <a href="/games">all games</a> | <a href="/platforms">by platform</a> | <a href="/tags">the appendix</a>.
|
|
@ -147,10 +147,6 @@
|
||||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="Jefklak's Codex" />
|
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="Jefklak's Codex" />
|
||||||
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="Jefklak's Codex" />
|
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="Jefklak's Codex" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- if (ne hugo.Environment "development") }}
|
|
||||||
<script data-goatcounter="https://stats.jefklakscodex.com/count"
|
|
||||||
async src="//stats.jefklakscodex.com/count.js"></script>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
<!-- twitter cards -->
|
<!-- twitter cards -->
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
<script defer src="{{ "js/scrollingelement.js" | absURL }}"></script>
|
<script defer src="{{ "js/scrollingelement.js" | absURL }}"></script>
|
||||||
<script defer src='/js/simple-lightbox.min.js'></script>
|
<script defer src='/js/simple-lightbox.min.js'></script>
|
||||||
<script src="{{ "js/codex.js" | absURL }}"></script>
|
|
||||||
|
{{- $mainScriptPath := "js/codex.js" }}
|
||||||
|
{{- $scripts := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . | babel | resources.Minify | resources.Fingerprint "sha512" }}
|
||||||
|
<script defer src='{{ $scripts.Permalink }}'></script>
|
||||||
|
|
||||||
|
{{- if (ne hugo.Environment "development") }}
|
||||||
|
<script data-goatcounter="https://stats.jefklakscodex.com/count"
|
||||||
|
async src="//stats.jefklakscodex.com/count.js"></script>
|
||||||
|
{{- end }}
|
||||||
|
|
Loading…
Reference in New Issue