Skip to content

Commit 8484a83

Browse files
committed
Fix coder theme.
1 parent 31064ab commit 8484a83

File tree

251 files changed

+23429
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+23429
-0
lines changed

themes/hugo-coder/CONTRIBUTORS.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Contributors
2+
3+
- [Chip Senkbeil](https://github.com/chipsenkbeil)
4+
- [Dale Noe](https://github.com/dalenoe)
5+
- [Gabor Nagy](https://github.com/Aigeruth)
6+
- [Harry Khanna](https://github.com/hkhanna)
7+
- [Ihor Dvoretskyi](https://github.com/idvoretskyi)
8+
- [Jacob Wood](https://github.com/jacoblukewood)
9+
- [Jan Baudisch](https://github.com/flyingP0tat0)
10+
- [Jiri Hubacek](https://github.com/qeef)
11+
- [Khosrow Moossavi](https://github.com/khos2ow)
12+
- [Maikel](https://github.com/mbollemeijer)
13+
- [MetBril](https://github.com/metbril)
14+
- [Myles Johnson](https://github.com/MylesJohnson)
15+
- [Niels Reijn](https://github.com/reijnn)
16+
- [Padraic Renaghan](https://github.com/prenagha)
17+
- [peterrus](https://github.com/peterrus)
18+
- [Philipp Rintz](https://github.com/p-rintz)
19+
- [Ralf Junghanns](https://github.com/rabbl)
20+
- [rdhox](https://rdhox.io)
21+
- [tobaloidee](https://github.com/Tobaloidee)
22+
- [Tomasz Wąsiński](https://github.com/wasinski)
23+
- [Vinícius dos Santos Oliveira](https://github.com/vinipsmaker)
24+
- [Vlad Ionescu](https://github.com/Vlaaaaaaad)
25+
- [Joseph Ting](https://github.com/josephting)
26+
- [Abner Campanha](https://github.com/abnerpc)
27+
- [Martin Kiesel](https://github.com/Kyslik)
28+
- [John Tobin](https://www.johntobin.ie/)
29+
- [Thomas Nys](https://thomasnys.com)
30+
- [Piotr Januszewski](https://piojanu.github.io)
31+
- [Artem Khvastunov](https://artspb.me)
32+
- [Gabriel Nepomuceno](https://blog.nepomuceno.me)
33+
- [Salvatore Giordano](https://salvatore-giordano.github.io)
34+
- [Jeffrey Carpenter](https://uvolabs.me)
35+
- [Paul Lettington](https://github.com/plett)
36+
- [Thomas Vochten](https://github.com/thomasvochten)
37+
- [Caspar Krieger](https://www.asparck.com)
38+
- [D_DAndrew](https://d-dandrew.github.io)
39+
- [Wataru Mizukami](https://github.com/tarumzu)
40+
- [Yudi Widiyanto](https://github.com/yudiwdynto)
41+
- [Łukasz Mróz](https://github.com/mrozlukasz)
42+
- [Jia "Jay" Tan](https://github.com/j7an)
43+
- [Ryan](https://github.com/alrayyes)
44+
- [Naim A.](https://github.com/naim94a)
45+
- [Alexander Rohde](https://github.com/a1x42)
46+
- [Shreyansh Khajanchi](https://shreyanshja.in)
47+
- [Lionel Brianto](https://lionel.brianto.dev)
48+
- [Luis Zarate](https://github.com/jlzaratec)
49+
- [Ariejan de Vroom](https://www.devroom.io)
50+
- [Bobby Lindsey](https://bobbywlindsey.com)
51+
- [José Mª Escartín](https://github.com/jme52)
52+
- [John Schroeder](https://blog.schroedernet.software)
53+
- [Tobias Lindberg](https://github.com/tobiasehlert)
54+
- [KK](https://github.com/bebound)
55+
- [Eli W. Hunter](https://github.com/elihunter173)
56+
- [Víctor López](https://github.com/viticlick)
57+
- [Anson VanDoren](https://github.com/anson-vandoren)
58+
- [Michael Lynch](https://github.com/mtlynch)
59+
- [FIGBERT](https://figbert.com/)
60+
- [Yash Mehrotra](https://yashmehrotra.com)
61+
- [Paolo Mainardi](https://paolomainardi.com)
62+
- [Ka-Wai Lin](https://github.com/kwlin)
63+
- [Piotr Orzechowski](https://orzechowski.tech)
64+
- [Glenn Feunteun](https://github.com/gfeun)
65+
- [Santiago González](https://github.com/netrules)
66+
- [Codruț Constantin Gușoi](https://www.codrut.pro)
67+
- [Clément Pannetier](https://clementpannetier.dev)
68+
- [FantasticMao](https://github.com/FantasticMao)
69+
- [Utkarsh Gupta](https://utkarsh2102.com)
70+
- [Latiif Alsharif](https://latiif.se)
71+
- [Endormi](https://endormi.io)
72+
- [Rajiv Ranjan Singh](https://iamrajiv.github.io/)
73+
- [Pakhomov Alexander](https://github.com/PakhomovAlexander)
74+
- [Rhys Perry](https://rhysperry.com)
75+
- [Arunvel Sriram](https://github.com/arunvelsriram)
76+
- [Lorenzo Cameroni](https://github.com/came88)
77+
- [Jared Sturdy](https://github.com/jsturdy)
78+
- [Daniel Monteiro](https://github.com/dfamonteiro)
79+
- [Dave Rolsky](https://github.com/autarch)
80+
- [Joseph Sanders](https://github.com/jls83)
81+
- [Rabin Adhikari](https://github.com/rabinadk1/)
82+
- [Hussaini Zulkifli](https://github.com/hussaini/)
83+
- [Ellison Leão](https://github.com/ellisonleao)
84+
- [Lucas de Oliveira](https://github.com/lucas-dOliveira)
85+
- [Jian Loong Liew](https://github.com/JianLoong)
86+
- [earnest ma](https://github.com/earnestma)
87+
- [TMineCola](https://github.com/tminecola)
88+
- [Arafat Hasan](https://github.com/arafat-hasan)
89+
- [YUJI](https://yuji.ne.jp/)
90+
- [JaeSang Yoo](https://github.com/JSYoo5B)
91+
- [tianheg](https://github.com/tianheg)
92+
- [Felix](https://github.com/lazyyz)
93+
- [Peter Duchnovsky](https://duchnovsky.com)
94+
- [Alex Miranda](https://ammiranda.com)
95+
- [Alphonse Mariya](https://github.com/alfunx)
96+
- [Ziwei Pan](https://github.com/PanZiwei/)
97+
- [Viktar Patotski](https://github.com/xp-vit)
98+
- [cuso4-5h2o](https://www.cuso4.me)
99+
- [freeformz](https://icanhazdowntime.org)
100+
- [Roberto Gongora](https://yourfavourite.blog)
101+
- [kuba86](https://kuba86.com)
102+
- [Vladislav Matus](https://github.com/matusvla)
103+
- [Kirill Feoktistov](https://feoktistoff.org)
104+
- [leins275](https://github.com/LanskovNV)
105+
- [Michael Weiss](https://mweiss.ch)
106+
- [Simon Pai](https://github.com/simonpai)
107+
- [Brenton Mallen](https://github.com/brentonmallen1)
108+
- [Xiaoyang Luo](https://github.com/ccviolett/)
109+
- [Michiel Appelman](https://appelman.se)
110+
- [Mark Wood](https://digitalnotions.net)
111+
- [Sam A.](https://samsapti.dev)
112+
- [John Feminella](https://jxf.me)
113+
- [zzsqwq](https://zzsqwq.cn)
114+
- [George Tsiokos](https://george.tsiokos.com)
115+
- [Eltjo](https://github.com/eltjo)
116+
- [Saurmandal](https://saur.neocities.org)
117+
- [Jneo8](https://github.com/jneo8)
118+
- [Daniel Nduati](https://github.com/DanNduati)
119+
- [Simon Hollingshead](https://github.com/simonhollingshead)
120+
- [yangyangdaji](https://github.com/yangyangdaji)
121+
- [xiaotianxt](https://github.com/xiaotianxt)
122+
- [Nour Agha](https://github.com/nourkagha)
123+
- [Brian Lachniet](https://github.com/blachniet)
124+
- [ShortArrow](https://github.com/ShortArrow)
125+
- [Martin Hellspong](https://github.com/marhel)
126+
- [Robert Tucker](https://github.com/robertwtucker)
127+
- [Michał Pawlik](https://michalp.net)
128+
- [Kilian Kluge](https://github.com/ionicsolutions)
129+
- [Jaroslaw Rozanski](https://jarekrozanski.eu)
130+
- [Easton Man](https://github.com/eastonman)
131+
- [Yiğit Altınay](https://altinay.xyz)
132+
- [Fei Kong](https://github.com/alpha0422)
133+
- [Ahmet Enes Bayraktar](https://github.com/aeb-dev)
134+
- [Todor Bogosavljević](https://github.com/tbx1b)
135+
- [Kemal Akkoyun](https://github.com/kakkoyun)
136+
- [Igetin](https://github.com/Igetin)
137+
- [Kirill Che.](https://github.com/g4s8)
138+
- [iron3oxide](https://github.com/iron3oxide)
139+
- [Jens Rantil](https://github.com/JensRantil)
140+
- [Muqeet Malik](https://github.com/mmalik23)
141+
- [Sammy44nts](https://github.com/sammy44nts)
142+
- [Shaked8634](https://github.com/shaked8634)
143+
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/)
144+
- [Antoine "Toinux" Wam](https://github.com/itzwam)
145+
- [Reberti Carvalho Soares](https://github.com/RebertiCS)
146+
- [Andreas Deininger](https://github.com/deining)
147+
- [Ardemium](https://github.com/ardemium)
148+
- [Matt Ellery](https://github.com/matt-ellery)

themes/hugo-coder/LICENSE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Luiz F. A. de Prá
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

themes/hugo-coder/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
HUGO_BIN=hugo
2+
3+
.PHONY: build demo release
4+
5+
build:
6+
$(HUGO_BIN) --themesDir=../.. --source=exampleSite
7+
8+
demo:
9+
$(HUGO_BIN) server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0
10+
11+
release: build
12+
rm -rf ./resources && cp -r ./exampleSite/resources ./resources

themes/hugo-coder/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<p align="center">
2+
<p align="center">
3+
<a href="https://themes.gohugo.io/hugo-coder/">
4+
<img src="https://img.shields.io/badge/theme-hugo--coder-2b8cbe" alt="Hugo Theme Badge"">
5+
</a>
6+
<a href="https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.txt">
7+
<img src="https://img.shields.io/github/license/luizdepra/hugo-coder.svg" alt="MIT License Badge">
8+
</a>
9+
</p>
10+
11+
<p align="center">
12+
<a href="https://github.com/luizdepra/hugo-coder">
13+
<img src="images/logos/logotype-a.png" alt="Hugo Coder Logo" width="600px" height="184px">
14+
</a>
15+
</p>
16+
</p>
17+
18+
A simple and clean blog theme for [Hugo](https://gohugo.io/).
19+
20+
![](images/screenshot.png)
21+
22+
## Live Demo
23+
24+
See [here](https://hugo-coder.netlify.app/).
25+
26+
## Quick Start
27+
28+
1. Add the repository into your Hugo Project repository as a submodule, `git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder`.
29+
2. Configure your `hugo.toml`. You can either use [this minimal configuration](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md#complete-example) as a base, or look for a complete explanation about all configurations [here](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md). The [`hugo.toml`](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/hugo.toml) inside the [`exampleSite`](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite) is also a good reference.
30+
3. Build your site with `hugo server` and see the result at `http://localhost:1313/`.
31+
32+
## Documentation
33+
34+
See the [`docs`](docs/home.md) folder.
35+
36+
## License
37+
38+
Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md).
39+
40+
## Maintenance
41+
42+
This theme is maintained by its author [Luiz de Prá](https://github.com/luizdepra) with the help from these awesome [contributors](CONTRIBUTORS.md).
43+
44+
## Sponsoring
45+
46+
If you like my project or it was useful for you, consider supporting its development. Just:
47+
48+
<a href="https://www.buymeacoffee.com/luizdepra" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-green.png" alt="Buy Me A Coffee" height="41" width="174"></a>
49+
50+
## Special Thanks
51+
52+
- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
53+
- All contributors, for every PR and Issue reported.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
+++
2+
draft = true
3+
date = {{ .Date }}
4+
title = ""
5+
slug = ""
6+
+++
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+++
2+
draft = true
3+
date = {{ .Date }}
4+
title = ""
5+
description = ""
6+
slug = ""
7+
authors = []
8+
tags = []
9+
categories = []
10+
externalLink = ""
11+
series = []
12+
+++
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
const body = document.body;
2+
const darkModeToggle = document.getElementById('dark-mode-toggle');
3+
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
4+
5+
// Check if user preference is set, if not check value of body class for light or dark else it means that colorscheme = auto
6+
if (localStorage.getItem("colorscheme")) {
7+
setTheme(localStorage.getItem("colorscheme"));
8+
} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) {
9+
setTheme(body.classList.contains("colorscheme-dark") ? "dark" : "light");
10+
} else {
11+
setTheme(darkModeMediaQuery.matches ? "dark" : "light");
12+
}
13+
14+
if (darkModeToggle) {
15+
darkModeToggle.addEventListener('click', () => {
16+
let theme = body.classList.contains("colorscheme-dark") ? "light" : "dark";
17+
setTheme(theme);
18+
rememberTheme(theme);
19+
});
20+
}
21+
22+
darkModeMediaQuery.addListener((event) => {
23+
setTheme(event.matches ? "dark" : "light");
24+
});
25+
26+
document.addEventListener("DOMContentLoaded", function () {
27+
let node = document.querySelector('.preload-transitions');
28+
node.classList.remove('preload-transitions');
29+
});
30+
31+
function setTheme(theme) {
32+
body.classList.remove('colorscheme-auto');
33+
let inverse = theme === 'dark' ? 'light' : 'dark';
34+
body.classList.remove('colorscheme-' + inverse);
35+
body.classList.add('colorscheme-' + theme);
36+
document.documentElement.style['color-scheme'] = theme;
37+
38+
function waitForElm(selector) {
39+
return new Promise(resolve => {
40+
if (document.querySelector(selector)) {
41+
return resolve(document.querySelector(selector));
42+
}
43+
44+
const observer = new MutationObserver(mutations => {
45+
if (document.querySelector(selector)) {
46+
resolve(document.querySelector(selector));
47+
observer.disconnect();
48+
}
49+
});
50+
51+
observer.observe(document.body, {
52+
childList: true,
53+
subtree: true
54+
});
55+
});
56+
}
57+
58+
if (theme === 'dark') {
59+
const message = {
60+
type: 'set-theme',
61+
theme: 'github-dark'
62+
};
63+
waitForElm('.utterances-frame').then((iframe) => {
64+
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
65+
})
66+
67+
}
68+
else {
69+
const message = {
70+
type: 'set-theme',
71+
theme: 'github-light'
72+
};
73+
waitForElm('.utterances-frame').then((iframe) => {
74+
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
75+
})
76+
77+
}
78+
79+
function sendMessage(message) {
80+
const iframe = document.querySelector('iframe.giscus-frame');
81+
if (!iframe) return;
82+
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
83+
}
84+
sendMessage({
85+
setConfig: {
86+
theme: theme,
87+
},
88+
});
89+
90+
// Create and send event
91+
const event = new Event('themeChanged');
92+
document.dispatchEvent(event);
93+
}
94+
95+
function rememberTheme(theme) {
96+
localStorage.setItem('colorscheme', theme);
97+
}

themes/hugo-coder/assets/js/purify.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)