Compare commits
No commits in common. "9702455db1833f7bd553ce261fb6a647db11f0da" and "d717302b0163e4fbe4511cb5473d87334734b037" have entirely different histories.
9702455db1
...
d717302b01
|
@ -16,7 +16,6 @@ Forked from [Ezhil Theme](https://github.com/vividvilla/ezhil)
|
|||
- Auto Dark Mode(based on system theme)
|
||||
- Dark/Light Mode toggle
|
||||
- tl:dr; frontamatter
|
||||
- Table of contents
|
||||
- Cache busting for CSS files
|
||||
- Disqus Comments
|
||||
|
||||
|
@ -30,9 +29,6 @@ $ git clone https://github.com/athul/archie.git
|
|||
Edit the `config.toml` file with `theme="archie"`
|
||||
For more information read the official [setup guide](https://gohugo.io/installation/) of Hugo.
|
||||
|
||||
If you encounter any issues with Google Analytics, update Hugo to v0.125.0 or
|
||||
later and make sure your using the latest version of the theme.
|
||||
|
||||
## Writing Posts
|
||||
Create a new `.md` file in the *content/posts* folder
|
||||
```yml
|
||||
|
@ -43,7 +39,6 @@ date:
|
|||
tldr: (optional)
|
||||
draft: true/false (optional)
|
||||
tags: [tag names] (optional)
|
||||
toc: true/false (optional)
|
||||
---
|
||||
```
|
||||
|
||||
|
|
|
@ -67,11 +67,6 @@ h6::before {
|
|||
content: "###### ";
|
||||
}
|
||||
|
||||
.toc {
|
||||
background-color: #272822;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 3px solid var(--darkMaincolor);
|
||||
color: inherit;
|
||||
|
|
|
@ -70,10 +70,6 @@ img {
|
|||
border: 3px solid #ececec;
|
||||
max-width: 100%;
|
||||
}
|
||||
.img-badge {
|
||||
border: 0px;
|
||||
max-width: 15em;
|
||||
}
|
||||
|
||||
figure {
|
||||
box-sizing: border-box;
|
||||
|
@ -140,24 +136,14 @@ pre code {
|
|||
header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: sticky;
|
||||
position: sticky;
|
||||
top: 1em;
|
||||
padding: 1em;
|
||||
justify-content: space-between;
|
||||
background-color: #191830;
|
||||
margin: 1em 0;
|
||||
line-height: 2.5em;
|
||||
}
|
||||
|
||||
|
||||
header .main {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.no-dec {
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 2em;
|
||||
|
@ -170,40 +156,14 @@ h4::before { color: var(--maincolor); content: '#### '; }
|
|||
h5::before { color: var(--maincolor); content: '##### '; }
|
||||
h6::before { color: var(--maincolor); content: '###### '; }
|
||||
|
||||
|
||||
.site-title::before, .site-about::before, .site-param::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 3em;
|
||||
}
|
||||
.site-about {
|
||||
font-size: 1em;
|
||||
}
|
||||
.site-param {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.meta {
|
||||
color: #999;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
.toc {
|
||||
background-color: #ececec;
|
||||
color: #232333;
|
||||
padding: 10px;
|
||||
padding-bottom: 0;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
row-gap: 1em;
|
||||
align-items: center;
|
||||
border-top: 0.4rem dotted var(--bordercl);
|
||||
padding: 2rem 0rem;
|
||||
|
|
|
@ -19,13 +19,12 @@ url = "https://github.com/athul/archie"
|
|||
[[params.social]]
|
||||
name = "Twitter"
|
||||
icon = "twitter"
|
||||
url = "https://twitter.com/athulcajay/"
|
||||
url = "https://github.com/athulcajay/"
|
||||
|
||||
[[params.social]]
|
||||
name = "GitLab"
|
||||
icon = "gitlab"
|
||||
url = "https://gitlab.com/athul/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Home"
|
||||
url = "/"
|
||||
|
|
|
@ -21,7 +21,7 @@ description: Here is a demo of all shortcodes available in Hugo.
|
|||
|
||||
## Tweet
|
||||
|
||||
{{< tweet user="GoHugoIO" id="877500564405444608" >}}
|
||||
{{< tweet 877500564405444608 >}}
|
||||
|
||||
## Vimeo
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ title: Telegram Bot for GitHub Actions
|
|||
date: "2020-04-01"
|
||||
description: Make a Telegram bot with Node.js and use it with GitHub Actions for sending notifications to you about the repo.
|
||||
tldr: Making GitHub Actions with Js Code
|
||||
toc: true
|
||||
---
|
||||
## Telegram
|
||||
[Telegram](https://telegram.org/) is a cloud-based mobile and desktop messaging app with a focus on security and speed. It is free to use and extensively hackable. It also has a good bot support system. The API is also easy to implement and has many wrappers for building bots with the API.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{- range .Data.Pages -}}
|
||||
{{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}}
|
||||
<li class="post">
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span>
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<article>
|
||||
<div class="title">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<div class="meta">Posted on {{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
||||
<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
||||
</div>
|
||||
{{ if isset .Params "tldr" }}
|
||||
<div class="tldr">
|
||||
|
@ -11,21 +11,10 @@
|
|||
{{ .Params.tldr }}
|
||||
</div>{{ end }}
|
||||
|
||||
{{ if isset .Params "toc" }}
|
||||
<div class="toc">
|
||||
<strong>Table of contents:</strong>
|
||||
{{ .TableOfContents }}
|
||||
</div>{{ end }}
|
||||
|
||||
<section class="body">
|
||||
{{ .Content }}
|
||||
<a href="https://notbyai.fyi/#not-by-ai-mission" class="no-dec" target="_blank">
|
||||
<img class="img-badge" src="/Written-By-Human-Not-By-AI-Badge-white.svg" alt="Written by human, not by Ai" aria-label="Written by human, not by Ai">
|
||||
</a>
|
||||
</section>
|
||||
|
||||
{{ partial "chat.html" }}
|
||||
|
||||
<div class="post-tags">
|
||||
{{ if ne .Type "page" }}
|
||||
{{ if gt .Params.tags 0 }}
|
||||
|
@ -39,6 +28,15 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- $.Scratch.Set "isDisqus" true -}}
|
||||
<!-- Check if disqus short name is given -->
|
||||
{{ if not .Site.DisqusShortname }}
|
||||
{{- $.Scratch.Set "isDisqus" false -}}
|
||||
{{ end }}
|
||||
|
||||
{{- if eq ($.Scratch.Get "isDisqus") true -}}
|
||||
{{- partial "disqus.html" . -}}
|
||||
{{- end -}}
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{- range .Data.Pages -}}
|
||||
{{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}}
|
||||
<li class="post">
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span>
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -5,24 +5,20 @@
|
|||
<div class="content">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<h1 class="site-title"> {{ .Site.Params.Name }}</h1>
|
||||
<h1 class="site-about"> {{ .Site.Params.About }}</h1>
|
||||
|
||||
<h1 class="site-param">My posts</h1>
|
||||
<main class="list">
|
||||
<div class="site-description">
|
||||
{{- if isset .Site.Params "subtitle" -}}
|
||||
<p>{{ .Site.Params.Subtitle | .Page.RenderString }}</p>
|
||||
<p>{{ .Site.Params.Subtitle | markdownify }}</p>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ $pages := (where .Site.RegularPages "Type" "post" | first 5) }}
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }}
|
||||
{{ range $paginator.Pages }}
|
||||
<section class="list-item">
|
||||
<h1 class="title"><a href="{{ .RelPermalink }}">{{.Title}}</a></h1>
|
||||
<time>{{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time>
|
||||
<time>{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time>
|
||||
<br>{{ template "partials/pagedescription.html" . }}
|
||||
<a class="readmore" href="{{ .RelPermalink }}">Read more</a>
|
||||
<a class="readmore" href="{{ .RelPermalink }}">Read more ⟶</a>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ template "partials/paginator.html" . }}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
|
||||
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
|
||||
<div id="comment-section"></div>
|
||||
<script>
|
||||
initComments({
|
||||
node: document.getElementById("comment-section"),
|
||||
defaultHomeserverUrl: "https://matrix.cactus.chat:8448",
|
||||
serverName: "cactus.chat",
|
||||
siteName: "4o1x5dev",
|
||||
commentSectionId: "{{ index .Params 0 }}"
|
||||
})
|
||||
</script>
|
19
layouts/partials/disqus.html
Normal file
19
layouts/partials/disqus.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script');
|
||||
dsq.type = 'text/javascript';
|
||||
dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
|
||||
Disqus.</a></noscript>
|
||||
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
|
@ -1,6 +1,21 @@
|
|||
<footer>
|
||||
<div style="display:flex">
|
||||
{{- range $index, $key := .Site.Params.Social -}}
|
||||
<a class="soc" href="{{ $key.url }}" rel="me" title="{{ $key.name }}"><i data-feather="{{ $key.icon }}"></i></a>
|
||||
<a class="border"></a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<a href="https://matrix.to/#/@4o1x5:4o1x5.dev" target="_blank">@4o1x5:4o1x5.dev</a>
|
||||
{{ dateFormat "2006" now }} {{ with .Site.Copyright }} {{ . }} | {{ end }} <a
|
||||
href="https://github.com/athul/archie">Archie Theme</a> | Built with <a href="https://gohugo.io">Hugo</a>
|
||||
</div>
|
||||
</footer>
|
||||
{{ if not .Site.IsServer }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{- if (isset .Site.Params "social") -}}
|
||||
<script>
|
||||
feather.replace()
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<header>
|
||||
<div class="main">
|
||||
<a href="{{ absURL "/" }}">{{ .Site.Title }}</a>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
<nav>
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ if eq .Site.Params.mode "toggle" -}}
|
||||
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
|
||||
<script src="{{ .Site.BaseURL }}js/themetoggle.js"></script>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<head lang="{{ .Site.Language.Lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
{{- $title := ( .Title ) -}}
|
||||
|
@ -23,9 +23,10 @@
|
|||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
{{ if and (isset .Site.Params "social") (.Site.Params.useCDN | default false) -}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
||||
{{- else if or (isset .Site.Params "social") (eq .Site.Params.mode "toggle") -}}
|
||||
<script src="{{ .Site.BaseURL }}js/feather.min.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.useCDN | default false -}}
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
|
||||
|
@ -97,7 +98,7 @@
|
|||
{{- else if (hasPrefix . "<script")}}
|
||||
{{ .| safeHTML }}
|
||||
{{- else }}
|
||||
<script src="{{ absURL . }}"></script>
|
||||
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</head>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
|
||||
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
|
||||
<div id="comment-section"></div>
|
||||
<script>
|
||||
initComments({
|
||||
node: document.getElementById("comment-section"),
|
||||
defaultHomeserverUrl: "https://matrix.cactus.chat:8448",
|
||||
serverName: "cactus.chat",
|
||||
siteName: "4o1x5dev",
|
||||
commentSectionId: "{{ index .Params 0 }}"
|
||||
})
|
||||
</script>
|
13
static/js/feather.min.js
vendored
Normal file
13
static/js/feather.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
0
static/js/main.js
Normal file
0
static/js/main.js
Normal file
23
static/js/themetoggle.js
Normal file
23
static/js/themetoggle.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
function setTheme(mode) {
|
||||
localStorage.setItem("theme-storage", mode);
|
||||
if (mode === "dark") {
|
||||
document.getElementById("darkModeStyle").disabled=false;
|
||||
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"sun\"></i>";
|
||||
feather.replace()
|
||||
} else if (mode === "light") {
|
||||
document.getElementById("darkModeStyle").disabled=true;
|
||||
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"moon\"></i>";
|
||||
feather.replace()
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTheme() {
|
||||
if (localStorage.getItem("theme-storage") === "light") {
|
||||
setTheme("dark");
|
||||
} else if (localStorage.getItem("theme-storage") === "dark") {
|
||||
setTheme("light");
|
||||
}
|
||||
}
|
||||
|
||||
var savedTheme = localStorage.getItem("theme-storage") || "light";
|
||||
setTheme(savedTheme);
|
Loading…
Reference in a new issue