Skip to content

Commit

Permalink
stop submodule usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lostluck committed Oct 19, 2024
1 parent 64027d7 commit faf0ad4
Show file tree
Hide file tree
Showing 249 changed files with 19,488 additions and 1 deletion.
1 change: 0 additions & 1 deletion themes/hugo-coder
Submodule hugo-coder deleted from f69d6d
29 changes: 29 additions & 0 deletions themes/hugo-coder/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://editorconfig.org

# this file is the top-most editorconfig file
root = true

# all files
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# markdown files
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

# configuration files
[*.toml]
indent_size = 2

# web files
[*.{html,css,scss}]
indent_size = 2

[Makefile]
indent_style = tab
6 changes: 6 additions & 0 deletions themes/hugo-coder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
**/themes/
exampleSite/public/
exampleSite/resources/
*.lock
public
148 changes: 148 additions & 0 deletions themes/hugo-coder/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Contributors

- [Chip Senkbeil](https://github.com/chipsenkbeil)
- [Dale Noe](https://github.com/dalenoe)
- [Gabor Nagy](https://github.com/Aigeruth)
- [Harry Khanna](https://github.com/hkhanna)
- [Ihor Dvoretskyi](https://github.com/idvoretskyi)
- [Jacob Wood](https://github.com/jacoblukewood)
- [Jan Baudisch](https://github.com/flyingP0tat0)
- [Jiri Hubacek](https://github.com/qeef)
- [Khosrow Moossavi](https://github.com/khos2ow)
- [Maikel](https://github.com/mbollemeijer)
- [MetBril](https://github.com/metbril)
- [Myles Johnson](https://github.com/MylesJohnson)
- [Niels Reijn](https://github.com/reijnn)
- [Padraic Renaghan](https://github.com/prenagha)
- [peterrus](https://github.com/peterrus)
- [Philipp Rintz](https://github.com/p-rintz)
- [Ralf Junghanns](https://github.com/rabbl)
- [rdhox](https://rdhox.io)
- [tobaloidee](https://github.com/Tobaloidee)
- [Tomasz Wąsiński](https://github.com/wasinski)
- [Vinícius dos Santos Oliveira](https://github.com/vinipsmaker)
- [Vlad Ionescu](https://github.com/Vlaaaaaaad)
- [Joseph Ting](https://github.com/josephting)
- [Abner Campanha](https://github.com/abnerpc)
- [Martin Kiesel](https://github.com/Kyslik)
- [John Tobin](https://www.johntobin.ie/)
- [Thomas Nys](https://thomasnys.com)
- [Piotr Januszewski](https://piojanu.github.io)
- [Artem Khvastunov](https://artspb.me)
- [Gabriel Nepomuceno](https://blog.nepomuceno.me)
- [Salvatore Giordano](https://salvatore-giordano.github.io)
- [Jeffrey Carpenter](https://uvolabs.me)
- [Paul Lettington](https://github.com/plett)
- [Thomas Vochten](https://github.com/thomasvochten)
- [Caspar Krieger](https://www.asparck.com)
- [D_DAndrew](https://d-dandrew.github.io)
- [Wataru Mizukami](https://github.com/tarumzu)
- [Yudi Widiyanto](https://github.com/yudiwdynto)
- [Łukasz Mróz](https://github.com/mrozlukasz)
- [Jia "Jay" Tan](https://github.com/j7an)
- [Ryan](https://github.com/alrayyes)
- [Naim A.](https://github.com/naim94a)
- [Alexander Rohde](https://github.com/a1x42)
- [Shreyansh Khajanchi](https://shreyanshja.in)
- [Lionel Brianto](https://lionel.brianto.dev)
- [Luis Zarate](https://github.com/jlzaratec)
- [Ariejan de Vroom](https://www.devroom.io)
- [Bobby Lindsey](https://bobbywlindsey.com)
- [José Mª Escartín](https://github.com/jme52)
- [John Schroeder](https://blog.schroedernet.software)
- [Tobias Lindberg](https://github.com/tobiasehlert)
- [KK](https://github.com/bebound)
- [Eli W. Hunter](https://github.com/elihunter173)
- [Víctor López](https://github.com/viticlick)
- [Anson VanDoren](https://github.com/anson-vandoren)
- [Michael Lynch](https://github.com/mtlynch)
- [FIGBERT](https://figbert.com/)
- [Yash Mehrotra](https://yashmehrotra.com)
- [Paolo Mainardi](https://paolomainardi.com)
- [Ka-Wai Lin](https://github.com/kwlin)
- [Piotr Orzechowski](https://orzechowski.tech)
- [Glenn Feunteun](https://github.com/gfeun)
- [Santiago González](https://github.com/netrules)
- [Codruț Constantin Gușoi](https://www.codrut.pro)
- [Clément Pannetier](https://clementpannetier.dev)
- [FantasticMao](https://github.com/FantasticMao)
- [Utkarsh Gupta](https://utkarsh2102.com)
- [Latiif Alsharif](https://latiif.se)
- [Endormi](https://endormi.io)
- [Rajiv Ranjan Singh](https://iamrajiv.github.io/)
- [Pakhomov Alexander](https://github.com/PakhomovAlexander)
- [Rhys Perry](https://rhysperry.com)
- [Arunvel Sriram](https://github.com/arunvelsriram)
- [Lorenzo Cameroni](https://github.com/came88)
- [Jared Sturdy](https://github.com/jsturdy)
- [Daniel Monteiro](https://github.com/dfamonteiro)
- [Dave Rolsky](https://github.com/autarch)
- [Joseph Sanders](https://github.com/jls83)
- [Rabin Adhikari](https://github.com/rabinadk1/)
- [Hussaini Zulkifli](https://github.com/hussaini/)
- [Ellison Leão](https://github.com/ellisonleao)
- [Lucas de Oliveira](https://github.com/lucas-dOliveira)
- [Jian Loong Liew](https://github.com/JianLoong)
- [earnest ma](https://github.com/earnestma)
- [TMineCola](https://github.com/tminecola)
- [Arafat Hasan](https://github.com/arafat-hasan)
- [YUJI](https://yuji.ne.jp/)
- [JaeSang Yoo](https://github.com/JSYoo5B)
- [tianheg](https://github.com/tianheg)
- [Felix](https://github.com/lazyyz)
- [Peter Duchnovsky](https://duchnovsky.com)
- [Alex Miranda](https://ammiranda.com)
- [Alphonse Mariya](https://github.com/alfunx)
- [Ziwei Pan](https://github.com/PanZiwei/)
- [Viktar Patotski](https://github.com/xp-vit)
- [cuso4-5h2o](https://www.cuso4.me)
- [freeformz](https://icanhazdowntime.org)
- [Roberto Gongora](https://yourfavourite.blog)
- [kuba86](https://kuba86.com)
- [Vladislav Matus](https://github.com/matusvla)
- [Kirill Feoktistov](https://feoktistoff.org)
- [leins275](https://github.com/LanskovNV)
- [Michael Weiss](https://mweiss.ch)
- [Simon Pai](https://github.com/simonpai)
- [Brenton Mallen](https://github.com/brentonmallen1)
- [Xiaoyang Luo](https://github.com/ccviolett/)
- [Michiel Appelman](https://appelman.se)
- [Mark Wood](https://digitalnotions.net)
- [Sam A.](https://samsapti.dev)
- [John Feminella](https://jxf.me)
- [zzsqwq](https://zzsqwq.cn)
- [George Tsiokos](https://george.tsiokos.com)
- [Eltjo](https://github.com/eltjo)
- [Saurmandal](https://saur.neocities.org)
- [Jneo8](https://github.com/jneo8)
- [Daniel Nduati](https://github.com/DanNduati)
- [Simon Hollingshead](https://github.com/simonhollingshead)
- [yangyangdaji](https://github.com/yangyangdaji)
- [xiaotianxt](https://github.com/xiaotianxt)
- [Nour Agha](https://github.com/nourkagha)
- [Brian Lachniet](https://github.com/blachniet)
- [ShortArrow](https://github.com/ShortArrow)
- [Martin Hellspong](https://github.com/marhel)
- [Robert Tucker](https://github.com/robertwtucker)
- [Michał Pawlik](https://michalp.net)
- [Kilian Kluge](https://github.com/ionicsolutions)
- [Jaroslaw Rozanski](https://jarekrozanski.eu)
- [Easton Man](https://github.com/eastonman)
- [Yiğit Altınay](https://altinay.xyz)
- [Fei Kong](https://github.com/alpha0422)
- [Ahmet Enes Bayraktar](https://github.com/aeb-dev)
- [Todor Bogosavljević](https://github.com/tbx1b)
- [Kemal Akkoyun](https://github.com/kakkoyun)
- [Igetin](https://github.com/Igetin)
- [Kirill Che.](https://github.com/g4s8)
- [iron3oxide](https://github.com/iron3oxide)
- [Jens Rantil](https://github.com/JensRantil)
- [Muqeet Malik](https://github.com/mmalik23)
- [Sammy44nts](https://github.com/sammy44nts)
- [Shaked8634](https://github.com/shaked8634)
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/)
- [Antoine "Toinux" Wam](https://github.com/itzwam)
- [Reberti Carvalho Soares](https://github.com/RebertiCS)
- [Andreas Deininger](https://github.com/deining)
- [Ardemium](https://github.com/ardemium)
- [Matt Ellery](https://github.com/matt-ellery)
20 changes: 20 additions & 0 deletions themes/hugo-coder/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2018 Luiz F. A. de Prá

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12 changes: 12 additions & 0 deletions themes/hugo-coder/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
HUGO_BIN=hugo

.PHONY: build demo release

build:
$(HUGO_BIN) --themesDir=../.. --source=exampleSite

demo:
$(HUGO_BIN) server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0

release: build
rm -rf ./resources && cp -r ./exampleSite/resources ./resources
53 changes: 53 additions & 0 deletions themes/hugo-coder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<p align="center">
<p align="center">
<a href="https://themes.gohugo.io/hugo-coder/">
<img src="https://img.shields.io/badge/theme-hugo--coder-2b8cbe" alt="Hugo Theme Badge"">
</a>
<a href="https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.txt">
<img src="https://img.shields.io/github/license/luizdepra/hugo-coder.svg" alt="MIT License Badge">
</a>
</p>

<p align="center">
<a href="https://github.com/luizdepra/hugo-coder">
<img src="images/logos/logotype-a.png" alt="Hugo Coder Logo" width="600px" height="184px">
</a>
</p>
</p>

A simple and clean blog theme for [Hugo](https://gohugo.io/).

![](images/screenshot.png)

## Live Demo

See [here](https://hugo-coder.netlify.app/).

## Quick Start

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`.
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.
3. Build your site with `hugo server` and see the result at `http://localhost:1313/`.

## Documentation

See the [`docs`](docs/home.md) folder.

## License

Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md).

## Maintenance

This theme is maintained by its author [Luiz de Prá](https://github.com/luizdepra) with the help from these awesome [contributors](CONTRIBUTORS.md).

## Sponsoring

If you like my project or it was useful for you, consider supporting its development. Just:

<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>

## Special Thanks

- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
- All contributors, for every PR and Issue reported.
6 changes: 6 additions & 0 deletions themes/hugo-coder/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
draft = true
date = {{ .Date }}
title = ""
slug = ""
+++
12 changes: 12 additions & 0 deletions themes/hugo-coder/archetypes/posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
draft = true
date = {{ .Date }}
title = ""
description = ""
slug = ""
authors = []
tags = []
categories = []
externalLink = ""
series = []
+++
97 changes: 97 additions & 0 deletions themes/hugo-coder/assets/js/coder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
const body = document.body;
const darkModeToggle = document.getElementById('dark-mode-toggle');
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');

// Check if user preference is set, if not check value of body class for light or dark else it means that colorscheme = auto
if (localStorage.getItem("colorscheme")) {
setTheme(localStorage.getItem("colorscheme"));
} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) {
setTheme(body.classList.contains("colorscheme-dark") ? "dark" : "light");
} else {
setTheme(darkModeMediaQuery.matches ? "dark" : "light");
}

if (darkModeToggle) {
darkModeToggle.addEventListener('click', () => {
let theme = body.classList.contains("colorscheme-dark") ? "light" : "dark";
setTheme(theme);
rememberTheme(theme);
});
}

darkModeMediaQuery.addListener((event) => {
setTheme(event.matches ? "dark" : "light");
});

document.addEventListener("DOMContentLoaded", function () {
let node = document.querySelector('.preload-transitions');
node.classList.remove('preload-transitions');
});

function setTheme(theme) {
body.classList.remove('colorscheme-auto');
let inverse = theme === 'dark' ? 'light' : 'dark';
body.classList.remove('colorscheme-' + inverse);
body.classList.add('colorscheme-' + theme);
document.documentElement.style['color-scheme'] = theme;

function waitForElm(selector) {
return new Promise(resolve => {
if (document.querySelector(selector)) {
return resolve(document.querySelector(selector));
}

const observer = new MutationObserver(mutations => {
if (document.querySelector(selector)) {
resolve(document.querySelector(selector));
observer.disconnect();
}
});

observer.observe(document.body, {
childList: true,
subtree: true
});
});
}

if (theme === 'dark') {
const message = {
type: 'set-theme',
theme: 'github-dark'
};
waitForElm('.utterances-frame').then((iframe) => {
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
})

}
else {
const message = {
type: 'set-theme',
theme: 'github-light'
};
waitForElm('.utterances-frame').then((iframe) => {
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
})

}

function sendMessage(message) {
const iframe = document.querySelector('iframe.giscus-frame');
if (!iframe) return;
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
}
sendMessage({
setConfig: {
theme: theme,
},
});

// Create and send event
const event = new Event('themeChanged');
document.dispatchEvent(event);
}

function rememberTheme(theme) {
localStorage.setItem('colorscheme', theme);
}
3 changes: 3 additions & 0 deletions themes/hugo-coder/assets/js/purify.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit faf0ad4

Please sign in to comment.