19 Commits

Author SHA1 Message Date
github-actions[bot] 4a5f6ce426 Update and run autoprefixer (#601)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-10 15:23:40 +00:00
github-actions[bot] 20bc7dd71f add vendor specific css prefixes (#600)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-10 21:22:48 +06:00
donfiguerres 65049cfbb7 Dark theme via DarkReader (#595)
* Initial commit for dark theme.

* Use DarkReader.auto() to watch for system theme.

* Tunning default parameters.

* Allow configurable number of recent posts.

* Added invisible element to hack theme initialization.

* Added default value.

* Use Darkreader CDN.

* Cleanup to keep darkreader in as few files as possible.

* Renamed darkmode.js to darkmode-darkreader.js.

* Bring back the initialization.

* Added provider property.

* Added theme selector to the posts navbar.

* Removed extra line breaks.

* Changed darkreader CDN to local copy.

* Renamed to darkMode.

* Fixed CodeQL failures.

* Added icons.

* Renamed function.

* Added SVG inversion.

* Used icons for selection.

* Toggle initial dark only in the dynamic navbar.

Co-authored-by: donfiguerres <donfiguerres@github.com>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-06-10 15:18:49 +00:00
Clarence 869eba97a2 Update zh-tw.toml (#598)
* Update zh-tw

* Update zh-tw.toml
2022-06-09 04:23:08 +00:00
hossainemruz ddbb4bf7ce Fix project automation
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-05-16 22:26:23 +06:00
Gabriel Jean 2ae15e5235 Added logic to the education icon line (#589)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-05-16 05:08:47 +00:00
github-actions[bot] eacae1be3e add vendor specific css prefixes (#591)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
2022-05-16 11:06:32 +06:00
dependabot[bot] 43fe14bfa1 Bump release-drafter/release-drafter from 5.19.0 to 5.20.0 (#590)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.19.0 to 5.20.0.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5.19.0...v5.20.0)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-12 11:06:08 +00:00
github-actions[bot] 06ee3c1e1f add vendor specific css prefixes (#585)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
2022-04-27 14:22:02 +06:00
dependabot[bot] baa4774862 Bump github/codeql-action from 1 to 2 (#584)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 11:05:42 +00:00
Marcin Jasion a22474538d Add RSS post sorting by date descending (#580) 2022-04-14 19:31:29 +00:00
SalahDin Ahmed 827a940995 Post specific togglable TOC (#575)
The default is true.
2022-04-04 03:20:48 +00:00
SalahDin Ahmed f6440e69d5 Enable pages in counter.dev (#571)
* Enable pages in counter.dev

Not perfect but will work fine for a while.

* Make counter.dev's `referrerPolicy` togglable

* Make `referrerPolicy` take more options

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-04-02 00:06:38 +06:00
Emruz Hossain a50f947384 Add commento.io support (#564)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-03-30 19:57:40 +00:00
github-actions[bot] a1bff16050 Update and run autoprefixer (#568)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-28 04:47:39 +00:00
github-actions[bot] e8615c64e2 Update and run autoprefixer (#567)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-28 04:47:26 +00:00
jakob42 c43da0089d fixed gitlab link (#570)
Co-authored-by: Jakob Lenfers <lenfers@bremen-social-sciences.de>
2022-03-28 04:46:26 +00:00
Marko Korhonen c9cebe5fe8 Add finnish translation (#565)
* Add finnish translation

* Add finnish translation to the README

* Use a more fitting word for prev in finnish translation

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-03-23 21:21:54 +06:00
dependabot[bot] 4025a6e321 Bump peter-evans/create-pull-request from 3.14.0 to 4 (#566)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3.14.0 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3.14.0...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 11:38:19 +00:00
36 changed files with 6186 additions and 223 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
npm run autoprefixer npm run autoprefixer
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3.14.0 uses: peter-evans/create-pull-request@v4
with: with:
branch: autoprefixer branch: autoprefixer
branch-suffix: timestamp branch-suffix: timestamp
+3 -3
View File
@@ -43,7 +43,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v2
# ️ Command-line programs to run using the OS shell. # ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v2
+1 -1
View File
@@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Create/Update release draft # Create/Update release draft
- uses: release-drafter/release-drafter@v5.19.0 - uses: release-drafter/release-drafter@v5.20.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -106,7 +106,7 @@ jobs:
# Set the "Type" field to appropriate option # Set the "Type" field to appropriate option
gh api graphql -f query=' gh api graphql -f query='
mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: ID!) { mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: String!) {
updateProjectNextItemField(input: { updateProjectNextItemField(input: {
projectId: $project projectId: $project
itemId: $item itemId: $item
@@ -136,7 +136,7 @@ jobs:
fi fi
gh api graphql -f query=' gh api graphql -f query='
mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: ID!) { mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) {
updateProjectNextItemField(input: { updateProjectNextItemField(input: {
projectId: $project projectId: $project
itemId: $item itemId: $item
+3 -3
View File
@@ -109,7 +109,7 @@ jobs:
# Set the "Type" field to appropriate option # Set the "Type" field to appropriate option
gh api graphql -f query=' gh api graphql -f query='
mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: ID!) { mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: String!) {
updateProjectNextItemField(input: { updateProjectNextItemField(input: {
projectId: $project projectId: $project
itemId: $item itemId: $item
@@ -153,7 +153,7 @@ jobs:
echo 'PR_STATUS='$OPTION_ID >> $GITHUB_ENV echo 'PR_STATUS='$OPTION_ID >> $GITHUB_ENV
gh api graphql -f query=' gh api graphql -f query='
mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: ID!) { mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) {
updateProjectNextItemField(input: { updateProjectNextItemField(input: {
projectId: $project projectId: $project
itemId: $item itemId: $item
@@ -204,7 +204,7 @@ jobs:
# Update the Issue Status # Update the Issue Status
gh api graphql -f query=' gh api graphql -f query='
mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: ID!) { mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) {
updateProjectNextItemField(input: { updateProjectNextItemField(input: {
projectId: $project projectId: $project
itemId: $item itemId: $item
+1
View File
@@ -56,6 +56,7 @@ For more details about the features please visit [here](https://toha-guides.netl
- 日本語 - 日本語
- 한국어 - 한국어
- русский - русский
- suomi
- Tiếng Việt - Tiếng Việt
To know more about how to translate your site, please visit [here](https://toha-guides.netlify.app/posts/translation/). Follow, the data and post format from this [example site](https://hugo-toha.github.io). To know more about how to translate your site, please visit [here](https://toha-guides.netlify.app/posts/translation/). Follow, the data and post format from this [example site](https://hugo-toha.github.io).
+126
View File
@@ -0,0 +1,126 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "Koti"
[posts]
other = "Artikkelit"
[toc_heading]
other = "Sisällysluettelo"
[tags]
other = "Tagit"
[categories]
other = "Kategoriat"
[at]
other = "at"
[resume]
other = "Ansioluetteloni"
[navigation]
other = "Navigointi"
[contact_me]
other = "Ota yhteyttä minuun:"
[email]
other = "Sähköposti"
[phone]
other = "Puhelin"
[newsletter_text]
other = "Pysy ajan tasalla tilaamalla sähköposti-ilmoitukset"
[newsletter_input_placeholder]
other = "Syötä sähköpostiosoite"
[newsletter_warning]
other = "Syöttämällä sähköpostin, hyväksyt että haluat vastaanottaa uutiskirjeen tältä sivustolta."
[submit]
other = "Lähetä"
[hugoAttributionText]
other = "Voimanlähteenä"
[prev]
other = "Edellinen"
[next]
other = "Seuraava"
[share_on]
other = "Jaa"
[improve_this_page]
other = "Paranna tätä sivua"
[out_of]
other = "out of"
[publications]
other = "Julkaisut"
[taken_courses]
other = "Käydyt kurssit"
[course_name]
other = "Kurssin nimi"
[total_credit]
other = "Opintopisteet yhteensä"
[obtained_credit]
other = "Saadut opintopisteet"
[extracurricular_activities]
other = "Opetusohjelman ulkopuolinen toiminta"
[show_more]
other = "Näytä lisää"
[show_less]
other = "Näytä vähemmän"
[responsibilities]
other = "Työtehtävät:"
[present]
other = "Tämä päivä"
[comments_javascript]
other = "Ole hyvä ja enabloi JavaScript katsoaksesi"
[comments_by]
other = "kommentit mahdollistavat"
[read]
other = "Lue"
[project_star]
other = "Tähti"
[project_details]
other = "Yksityiskohdat"
[err_404]
other = "Sivua jota etsit ei löydy."
[more]
other = "Lisää"
[view_certificate]
other = "Katso todistus"
[notes]
other = "Muistiinpanot"
[disclaimer_text]
other = "Vastuuilmoitus"
[search]
other = "Haku"
+16 -16
View File
@@ -86,29 +86,29 @@ other = "查看更多"
[show_less] [show_less]
other = "顯示較少" other = "顯示較少"
# [responsibilities] [responsibilities]
# other = "Responsibilities:" other = "職責:"
# [present] [present]
# other = "Present" other = "現在"
# [comments_javascript] [comments_javascript]
# other = "Please enable JavaScript to view the" other = "請開啟 JavaScript 查看"
# [comments_by] [comments_by]
# other = "comments powered by" other = "評論由"
# [read] [read]
# other = "Read" other = "閱讀"
# [project_star] [project_star]
# other = "Star" other = "Star"
# [project_details] [project_details]
# other = "Details" other = "詳情"
# [err_404] [err_404]
# other = "The page you are looking for is not there yet." other = "您訪問的頁面不存在"
[more] [more]
other = "更多的" other = "更多的"
+3 -3
View File
@@ -2,11 +2,11 @@
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}} {{- $pages := slice -}}
{{- if $.IsHome -}} {{- if $.IsHome -}}
{{- $pages = $pctx.RegularPages -}} {{- $pages = sort $pctx.RegularPages "Date" "desc" -}}
{{- else if $.IsSection -}} {{- else if $.IsSection -}}
{{- $pages = $pctx.RegularPagesRecursive -}} {{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}}
{{- else -}} {{- else -}}
{{- $pages = $pctx.RegularPagesRecursive -}} {{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}}
{{- end -}} {{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}} {{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}} {{- if ge $limit 1 -}}
+6 -19
View File
@@ -136,7 +136,7 @@
{{ end }} {{ end }}
<div class="col-md-6 btn-improve-page"> <div class="col-md-6 btn-improve-page">
{{ if ( eq site.Params.GitForge "gitlab" ) }} {{ if ( eq site.Params.GitForge "gitlab" ) }}
<a href="{{ site.Params.GitRepo }}/-/edit/{{ .Scratch.Get "GitBranch" }}/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener"> <a href="{{ site.Params.GitRepo }}/-/edit/{{ .Scratch.Get "GitBranch" }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
{{ else if ( eq site.Params.GitForge "gitea" ) }} {{ else if ( eq site.Params.GitForge "gitea" ) }}
<a href="{{ site.Params.GitRepo }}/_edit/{{ .Scratch.Get "GitBranch" }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener"> <a href="{{ site.Params.GitRepo }}/_edit/{{ .Scratch.Get "GitBranch" }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
{{ else }} <!--- Make Github-style the default --> {{ else }} <!--- Make Github-style the default -->
@@ -157,26 +157,13 @@
<hr /> <hr />
<!----- Add comment support -----> <!----- Add comment support ----->
{{ with site.Params.features.comment }} {{ if site.Params.features.comment.enable }}
{{ if .enable }} {{ partial "comments.html" site.Params.features.comment }}
<!-- Add Disqus forum -->
{{ if .disqus.shortName }}
{{ partial "disqus.html" . }}
<!-- Add valine -->
{{ else if .valine }}
{{ partial "valine.html" . }}
<!-- Add utteranc -->
{{ else if .utteranc }}
{{ partial "utteranc.html" . }}
<!-- Add giscus -->
{{ else if .giscus }}
{{ partial "giscus.html" . }}
{{ end }}
{{ end }}
{{ end }} {{ end }}
<!-- Keep backward compatibility with old config.yaml --> <!-- Keep backward compatibility with old config.yaml -->
{{ if site.DisqusShortname }} {{ if site.DisqusShortname }}
{{ partial "disqus.html" . }} {{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") site.DisqusShortname) }}
{{ end }} {{ end }}
</div> </div>
@@ -192,7 +179,7 @@
{{ define "toc" }} {{ define "toc" }}
<section class="toc-section" id="toc-section"> <section class="toc-section" id="toc-section">
{{ if site.Params.enableTOC }} {{ if and site.Params.enableTOC ( .Params.enableTOC | default true ) }}
<div class="toc-holder"> <div class="toc-holder">
<h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5> <h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5>
<hr> <hr>
+4 -1
View File
@@ -22,7 +22,10 @@
screen: screen.width + "x" + screen.height, screen: screen.width + "x" + screen.height,
user: "{{ .id }}", user: "{{ .id }}",
utcoffset: "1", utcoffset: "1",
}) }),
{{ with .referrerPolicy }}
{ referrerPolicy: "{{ . }}" }
{{ end }}
); );
} }
sessionStorage.setItem("_swa", "1"); sessionStorage.setItem("_swa", "1");
+11
View File
@@ -0,0 +1,11 @@
{{ if .disqus.shortName }}
{{ partial "comments/disqus.html" . }}
{{ else if .valine }}
{{ partial "comments/valine.html" . }}
{{ else if .utteranc }}
{{ partial "comments/utteranc.html" . }}
{{ else if .giscus }}
{{ partial "comments/giscus.html" . }}
{{ else if .commento }}
{{ partial "comments/commento.html" . }}
{{ end }}
+12
View File
@@ -0,0 +1,12 @@
{{ with .commento }}
{{ $serverURL := .serverURL }}
{{ $autoInit := .autoInit | default "true"}}
{{ $hideDeleted := .hideDeleted | default "false"}}
<script defer
src="http://{{ $serverURL }}/js/commento.js"
data-auto-init="{{ $autoInit }}"
data-hide-deleted="{{ $hideDeleted }}"
></script>
<div id="commento"></div>
{{ end }}
+29
View File
@@ -0,0 +1,29 @@
{{ with .disqus }}
<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 = "{{ .shortName }}";
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(
document.getElementsByTagName("head")[0] ||
document.getElementsByTagName("body")[0]
).appendChild(dsq);
})();
</script>
<noscript
>{{ i18n "comments_javascript" }}
<a href="https://disqus.com/?ref_noscript"
>{{ i18n "comments_by" }} Disqus.</a
></noscript
>
<a href="https://disqus.com/" class="dsq-brlink"
>{{ i18n "comments_by" }} <span class="logo-disqus">Disqus</span></a
>
{{ end }}
+28
View File
@@ -0,0 +1,28 @@
{{ with .giscus }}
{{ $repo := .repo }}
{{ $repoID := .repoID }}
{{ $category := .category | default "General" }}
{{ $categoryID := .categoryID }}
{{ $theme := .theme | default "light" }}
{{ $map := .map | default "url" }}
{{ $reaction := .reaction | default "1" }}
{{ $metadata := .metadata | default "0" }}
{{ $inputPosition := .inputPosition | default "bottom" }}
{{ $crossOrigin := .crossOrigin | default "anonymous" }}
<script src="https://giscus.app/client.js"
data-repo="{{ $repo }}"
data-repo-id="{{ $repoID }}"
data-category="{{ $category }}"
data-category-id="{{ $categoryID }}"
data-mapping="{{ $map }}"
data-reactions-enabled="{{ $reaction }}"
data-emit-metadata="{{ $metadata }}"
data-input-position="{{ $inputPosition }}"
data-theme="{{ $theme }}"
data-lang="{{ .Site.Language.Lang }}"
crossorigin="{{ $crossOrigin }}"
async>
</script>
{{ end }}
@@ -1,6 +1,7 @@
{{ $repo := site.Params.features.comment.utteranc.repo }} {{ with .utteranc }}
{{ $issueTerm := site.Params.features.comment.utteranc.issueTerm }} {{ $repo := .repo }}
{{ $theme := site.Params.features.comment.utteranc.theme }} {{ $issueTerm := .issueTerm }}
{{ $theme := .theme }}
<div id="utteranc_thread"></div> <div id="utteranc_thread"></div>
<div id="comments" class="comments"> <div id="comments" class="comments">
@@ -20,3 +21,4 @@
document.getElementById('comments-container').appendChild(utterances); document.getElementById('comments-container').appendChild(utterances);
})(); })();
</script> </script>
{{ end }}
+18
View File
@@ -0,0 +1,18 @@
{{ with .valine }}
<div id="vcomments"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript">
new Valine({
el: "#vcomments",
appId: "{{ .appId }}",
appKey: "{{ .appKey }}",
avatar: "{{ .avatar }}",
placeholder: "{{ .placeholder }}",
visitor: "{{ .visitor }}",
lang: "{{ .lang }}",
recordIP: "{{ .recordIP }}",
enableQQ: "{{ .enableQQ }}",
});
</script>
{{ end }}
-32
View File
@@ -1,32 +0,0 @@
{{ $disqusShortName := site.DisqusShortname }}
{{ if site.Params.features.comment.disqus.shortName }}
{{ $disqusShortName = site.Params.features.comment.disqus.shortName }}
{{ end }}
<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 = "{{ $disqusShortName }}";
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(
document.getElementsByTagName("head")[0] ||
document.getElementsByTagName("body")[0]
).appendChild(dsq);
})();
</script>
<noscript
>{{ i18n "comments_javascript" }}
<a href="https://disqus.com/?ref_noscript"
>{{ i18n "comments_by" }} Disqus.</a
></noscript
>
<a href="https://disqus.com/" class="dsq-brlink"
>{{ i18n "comments_by" }} <span class="logo-disqus">Disqus</span></a
>
-25
View File
@@ -1,25 +0,0 @@
{{ $repo := site.Params.features.comment.giscus.repo }}
{{ $repoID := site.Params.features.comment.giscus.repoID }}
{{ $category := site.Params.features.comment.giscus.category | default "General" }}
{{ $categoryID := site.Params.features.comment.giscus.categoryID }}
{{ $theme := site.Params.features.comment.giscus.theme | default "light" }}
{{ $map := site.Params.features.comment.giscus.map | default "url" }}
{{ $reaction := site.Params.features.comment.giscus.reaction | default "1" }}
{{ $metadata := site.Params.features.comment.giscus.metadata | default "0" }}
{{ $inputPosition := site.Params.features.comment.giscus.inputPosition | default "bottom" }}
{{ $crossOrigin := site.Params.features.comment.giscus.crossOrigin | default "anonymous" }}
<script src="https://giscus.app/client.js"
data-repo="{{ $repo }}"
data-repo-id="{{ $repoID }}"
data-category="{{ $category }}"
data-category-id="{{ $categoryID }}"
data-mapping="{{ $map }}"
data-reactions-enabled="{{ $reaction }}"
data-emit-metadata="{{ $metadata }}"
data-input-position="{{ $inputPosition }}"
data-theme="{{ $theme }}"
data-lang="{{ .Site.Language.Lang }}"
crossorigin="{{ $crossOrigin }}"
async>
</script>
+5
View File
@@ -15,6 +15,11 @@
<!--=================== icons ==============================--> <!--=================== icons ==============================-->
<link rel="stylesheet" href="{{ "/fontawesome/css/all.min.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/fontawesome/css/all.min.css" | relURL }}"/>
<!--=================== dark mode ==========================-->
{{ if site.Params.darkMode.enable }}
<link rel="stylesheet" href="{{ "/css/colortheme/colortheme.css" | relURL }}"/>
{{ end }}
<!--================= fab-icon =========================--> <!--================= fab-icon =========================-->
{{/* add favicon only if the site author has provided the the favicon */}} {{/* add favicon only if the site author has provided the the favicon */}}
{{ if site.Params.logo.favicon }} {{ if site.Params.logo.favicon }}
@@ -47,6 +47,9 @@
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ partial "navigators/lang-selector-2.html" . }} {{ partial "navigators/lang-selector-2.html" . }}
{{ end }} {{ end }}
{{ if site.Params.darkMode.enable }}
{{ partial "navigators/theme-selector.html" . }}
{{ end }}
</ul> </ul>
</div> </div>
</div> </div>
+4 -1
View File
@@ -66,7 +66,7 @@
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="top-nav-items"> <div class="collapse navbar-collapse dynamic-navbar" id="top-nav-items">
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#home">{{ i18n "home" }}</a> <a class="nav-link" href="#home">{{ i18n "home" }}</a>
@@ -124,6 +124,9 @@
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ partial "navigators/lang-selector.html" . }} {{ partial "navigators/lang-selector.html" . }}
{{ end }} {{ end }}
{{ if site.Params.darkMode.enable }}
{{ partial "navigators/theme-selector.html" . }}
{{ end }}
</ul> </ul>
</div> </div>
</div> </div>
@@ -0,0 +1,20 @@
<li class="nav-item dropdown">
<!-- This is for initializing the color scheme selection for new visitors. See /js/darkmode.js -->
<div id="theme-initialization" style="display: none;"
default-theme="{{ site.Params.darkMode.default }}"></div>
<a class="nav-link dropdown-toggle" href="#" id="themeSelector" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img id="navbar-theme-icon-svg" src="{{ "/icons/moon-svgrepo-com.svg" }}" width=20>
</a>
<div class="dropdown-menu dropdown-menu-icons-only" aria-labelledby="themeSelector">
<a class="dropdown-item nav-link" href="#" onclick="enableLightTheme()">
<img class="menu-icon-center" src="{{ "/icons/sun-svgrepo-com.svg" }}" width=20>
</a>
<a class="dropdown-item nav-link" href="#" onclick="enableDarkTheme()">
<img class="menu-icon-center" src="{{ "/icons/moon-svgrepo-com.svg" }}" width=20>
</a>
<a class="dropdown-item nav-link" href="#" onclick="useSystemTheme()">
<img class="menu-icon-center" src="{{ "/icons/computer-svgrepo-com.svg" }}" width=20>
</a>
</div>
</li>
+7
View File
@@ -5,3 +5,10 @@
<script type="text/javascript" src="{{ "/js/navbar.js" | relURL }}"></script> <script type="text/javascript" src="{{ "/js/navbar.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "/js/plyr.js" | relURL }}"></script> <script type="text/javascript" src="{{ "/js/plyr.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "/js/main.js" | relURL }}"></script> <script type="text/javascript" src="{{ "/js/main.js" | relURL }}"></script>
{{ if site.Params.darkMode.enable }}
{{ if eq site.Params.darkMode.provider "darkreader" }}
<script type="text/javascript" src="{{ "/js/darkreader.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "/js/darkmode-darkreader.js" | relURL }}"></script>
{{ end }}
{{ end }}
@@ -15,10 +15,13 @@
<div class="container"> <div class="container">
<table class="education-info-table"> <table class="education-info-table">
<tbody> <tbody>
{{ $count := len .degrees }}
{{ range .degrees}} {{ range .degrees}}
<tr> <tr>
<td class="icon"> <td class="icon">
{{ if gt $count 1}}
<div class="hline"></div> <div class="hline"></div>
{{ end }}
<div class="icon-holder"> <div class="icon-holder">
<i class="fas {{ .icon }}"></i> <i class="fas {{ .icon }}"></i>
</div> </div>
+3
View File
@@ -15,10 +15,13 @@
<div class="container"> <div class="container">
<table class="education-info-table"> <table class="education-info-table">
<tbody> <tbody>
{{ $count := len .degrees }}
{{ range .degrees}} {{ range .degrees}}
<tr> <tr>
<td class="icon"> <td class="icon">
{{ if gt $count 1}}
<div class="hline"></div> <div class="hline"></div>
{{ end }}
<div class="icon-holder"> <div class="icon-holder">
<i class="fas {{ .icon }}"></i> <i class="fas {{ .icon }}"></i>
</div> </div>
-17
View File
@@ -1,17 +0,0 @@
<!-- valine -->
<div id="vcomments"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript">
new Valine({
el: "#vcomments",
appId: "{{ .valine.appId }}",
appKey: "{{ .valine.appKey }}",
avatar: "{{ .valine.avatar }}",
placeholder: "{{ .valine.placeholder }}",
visitor: "{{ .valine.visitor }}",
lang: "{{ .valine.lang }}",
recordIP: "{{ .valine.recordIP }}",
enableQQ: "{{ .valine.enableQQ }}",
});
</script>
+101 -77
View File
@@ -8,8 +8,8 @@
"version": "1.0.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.7",
"postcss": "^8.4.8", "postcss": "^8.4.14",
"postcss-cli": "^8.3.1" "postcss-cli": "^8.3.1"
} }
}, },
@@ -104,14 +104,24 @@
} }
}, },
"node_modules/autoprefixer": { "node_modules/autoprefixer": {
"version": "10.4.2", "version": "10.4.7",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.2.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz",
"integrity": "sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ==", "integrity": "sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==",
"dev": true, "dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
}
],
"dependencies": { "dependencies": {
"browserslist": "^4.19.1", "browserslist": "^4.20.3",
"caniuse-lite": "^1.0.30001297", "caniuse-lite": "^1.0.30001335",
"fraction.js": "^4.1.2", "fraction.js": "^4.2.0",
"normalize-range": "^0.1.2", "normalize-range": "^0.1.2",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"postcss-value-parser": "^4.2.0" "postcss-value-parser": "^4.2.0"
@@ -122,10 +132,6 @@
"engines": { "engines": {
"node": "^10 || ^12 || >=14" "node": "^10 || ^12 || >=14"
}, },
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
"peerDependencies": { "peerDependencies": {
"postcss": "^8.1.0" "postcss": "^8.1.0"
} }
@@ -152,15 +158,25 @@
} }
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.19.1", "version": "4.20.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz",
"integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==",
"dev": true, "dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
}
],
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001286", "caniuse-lite": "^1.0.30001332",
"electron-to-chromium": "^1.4.17", "electron-to-chromium": "^1.4.118",
"escalade": "^3.1.1", "escalade": "^3.1.1",
"node-releases": "^2.0.1", "node-releases": "^2.0.3",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"
}, },
"bin": { "bin": {
@@ -168,21 +184,23 @@
}, },
"engines": { "engines": {
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001299", "version": "1.0.30001340",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001340.tgz",
"integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", "integrity": "sha512-jUNz+a9blQTQVu4uFcn17uAD8IDizPzQkIKh3LCJfg9BkyIqExYYdyc/ZSlWUSKb8iYiXxKsxbv4zYSvkqjrxw==",
"dev": true, "dev": true,
"funding": { "funding": [
{
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/browserslist" "url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
} }
]
}, },
"node_modules/chalk": { "node_modules/chalk": {
"version": "4.1.2", "version": "4.1.2",
@@ -278,9 +296,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.33", "version": "1.4.137",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.33.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz",
"integrity": "sha512-OVK1Ad3pHnmuXPhEfq85X8vUKr1UPNHryBnbKnyLcAfh8dPwoFjoDhDlP5KpPJIiymvSucZs48UBrE1250IxOw==", "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==",
"dev": true "dev": true
}, },
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
@@ -336,9 +354,9 @@
} }
}, },
"node_modules/fraction.js": { "node_modules/fraction.js": {
"version": "4.1.2", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.2.tgz", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz",
"integrity": "sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA==", "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "*" "node": "*"
@@ -603,9 +621,9 @@
} }
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.1", "version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"dev": true, "dev": true,
"bin": { "bin": {
"nanoid": "bin/nanoid.cjs" "nanoid": "bin/nanoid.cjs"
@@ -615,9 +633,9 @@
} }
}, },
"node_modules/node-releases": { "node_modules/node-releases": {
"version": "2.0.1", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz",
"integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==",
"dev": true "dev": true
}, },
"node_modules/normalize-path": { "node_modules/normalize-path": {
@@ -675,21 +693,27 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.4.8", "version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.8.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
"integrity": "sha512-2tXEqGxrjvAO6U+CJzDL2Fk2kPHTv1jQsYkSoMeOis2SsYaXRO2COxTdQp99cYvif9JTXaAk9lYGc3VhJt7JPQ==", "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
"dev": true, "dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
}
],
"dependencies": { "dependencies": {
"nanoid": "^3.3.1", "nanoid": "^3.3.4",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"source-map-js": "^1.0.2" "source-map-js": "^1.0.2"
}, },
"engines": { "engines": {
"node": "^10 || ^12 || >=14" "node": "^10 || ^12 || >=14"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
} }
}, },
"node_modules/postcss-cli": { "node_modules/postcss-cli": {
@@ -1083,14 +1107,14 @@
"dev": true "dev": true
}, },
"autoprefixer": { "autoprefixer": {
"version": "10.4.2", "version": "10.4.7",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.2.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz",
"integrity": "sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ==", "integrity": "sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==",
"dev": true, "dev": true,
"requires": { "requires": {
"browserslist": "^4.19.1", "browserslist": "^4.20.3",
"caniuse-lite": "^1.0.30001297", "caniuse-lite": "^1.0.30001335",
"fraction.js": "^4.1.2", "fraction.js": "^4.2.0",
"normalize-range": "^0.1.2", "normalize-range": "^0.1.2",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"postcss-value-parser": "^4.2.0" "postcss-value-parser": "^4.2.0"
@@ -1112,22 +1136,22 @@
} }
}, },
"browserslist": { "browserslist": {
"version": "4.19.1", "version": "4.20.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz",
"integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"caniuse-lite": "^1.0.30001286", "caniuse-lite": "^1.0.30001332",
"electron-to-chromium": "^1.4.17", "electron-to-chromium": "^1.4.118",
"escalade": "^3.1.1", "escalade": "^3.1.1",
"node-releases": "^2.0.1", "node-releases": "^2.0.3",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001299", "version": "1.0.30001340",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001340.tgz",
"integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", "integrity": "sha512-jUNz+a9blQTQVu4uFcn17uAD8IDizPzQkIKh3LCJfg9BkyIqExYYdyc/ZSlWUSKb8iYiXxKsxbv4zYSvkqjrxw==",
"dev": true "dev": true
}, },
"chalk": { "chalk": {
@@ -1204,9 +1228,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.4.33", "version": "1.4.137",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.33.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz",
"integrity": "sha512-OVK1Ad3pHnmuXPhEfq85X8vUKr1UPNHryBnbKnyLcAfh8dPwoFjoDhDlP5KpPJIiymvSucZs48UBrE1250IxOw==", "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {
@@ -1253,9 +1277,9 @@
} }
}, },
"fraction.js": { "fraction.js": {
"version": "4.1.2", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.2.tgz", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz",
"integrity": "sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA==", "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
"dev": true "dev": true
}, },
"fs-extra": { "fs-extra": {
@@ -1447,15 +1471,15 @@
} }
}, },
"nanoid": { "nanoid": {
"version": "3.3.1", "version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"dev": true "dev": true
}, },
"node-releases": { "node-releases": {
"version": "2.0.1", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz",
"integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==",
"dev": true "dev": true
}, },
"normalize-path": { "normalize-path": {
@@ -1495,12 +1519,12 @@
"dev": true "dev": true
}, },
"postcss": { "postcss": {
"version": "8.4.8", "version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.8.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
"integrity": "sha512-2tXEqGxrjvAO6U+CJzDL2Fk2kPHTv1jQsYkSoMeOis2SsYaXRO2COxTdQp99cYvif9JTXaAk9lYGc3VhJt7JPQ==", "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
"dev": true, "dev": true,
"requires": { "requires": {
"nanoid": "^3.3.1", "nanoid": "^3.3.4",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"source-map-js": "^1.0.2" "source-map-js": "^1.0.2"
} }
+2 -2
View File
@@ -17,8 +17,8 @@
}, },
"homepage": "https://github.com/hossainemruz/toha#readme", "homepage": "https://github.com/hossainemruz/toha#readme",
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.7",
"postcss": "^8.4.8", "postcss": "^8.4.14",
"postcss-cli": "^8.3.1" "postcss-cli": "^8.3.1"
} }
} }
+20
View File
@@ -0,0 +1,20 @@
/* Note: No need to invert when the screen is small because the navbar is
collapsed to a hamburger menu. */
@media only screen and (min-width: 1200px) {
.dynamic-navbar .navbar-icon-svg-dark {
filter: invert(1);
};
}
@media only screen and (min-width: 1200px) {
.dropdown-menu-icons-only {
width: 25px;
min-width: 3rem;
}
}
.menu-icon-center {
display: block;
margin-left: auto;
margin-right: auto;
}
+45
View File
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 364 364" style="enable-background:new 0 0 364 364;" xml:space="preserve">
<g>
<path d="M350,60.5h-50c-7.72,0-14,6.28-14,14v225c0,7.72,6.28,14,14,14h50c7.72,0,14-6.28,14-14v-225
C364,66.78,357.72,60.5,350,60.5z M325.864,166.5c-11.23,0-20.333-9.104-20.333-20.333s9.104-20.333,20.333-20.333
s20.333,9.104,20.333,20.333S337.094,166.5,325.864,166.5z"/>
<path d="M230,50.5H30c-16.542,0-30,13.458-30,30v149c0,16.542,13.458,30,30,30h79v21.765c0,0.665-0.466,1.235-0.847,1.235H52.351
C46.092,282.5,41,287.329,41,293.265v9.235c0,5.962,5.198,11,11.351,11h156.604c6.091,0,11.046-4.935,11.046-11v-9.235
c0-6.037-4.852-10.765-11.046-10.765h-55.803c-0.517,0-1.151-0.681-1.151-1.235V259.5h78c16.542,0,30-13.458,30-30v-149
C260,63.958,246.542,50.5,230,50.5z M230,80.5l0.017,133H30v-133H230z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+66
View File
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 206.622 206.622" style="enable-background:new 0 0 206.622 206.622;" xml:space="preserve">
<g>
<g>
<g>
<path d="M155.287,58.38c-6.703-7.189-14.65-12.775-23.62-16.603c-1.299-0.552-2.8-0.291-3.83,0.672
c-1.034,0.963-1.4,2.443-0.94,3.777c8.128,23.444,1.654,49.524-16.485,66.441c-18.146,16.918-44.614,21.557-67.43,11.812
c-1.288-0.55-2.8-0.291-3.83,0.672c-1.034,0.963-1.4,2.443-0.94,3.777c3.197,9.218,8.215,17.535,14.918,24.72
c12.721,13.643,29.996,21.517,48.64,22.168c0.836,0.03,1.668,0.043,2.5,0.043c17.728,0,34.54-6.611,47.571-18.764
c13.647-12.724,21.517-29.998,22.168-48.643C174.658,89.807,168.011,72.025,155.287,58.38z M166.883,108.203
c-0.585,16.74-7.655,32.251-19.905,43.675c-12.25,11.423-28.223,17.425-44.959,16.809c-16.743-0.583-32.252-7.652-43.674-19.904
c-4.21-4.511-7.678-9.519-10.363-14.947c23.47,6.872,49.127,0.987,67.291-15.952c18.167-16.941,25.828-42.13,20.608-66.02
c5.23,3.057,9.984,6.867,14.19,11.382C161.496,75.496,167.465,91.464,166.883,108.203z"/>
<path d="M167.607,163.757c-1.393-1.393-3.649-1.393-5.042,0s-1.393,3.649,0,5.042l7.563,7.563
c0.696,0.696,1.609,1.045,2.521,1.045c0.912,0,1.825-0.348,2.521-1.045c1.393-1.393,1.393-3.649,0-5.042L167.607,163.757z"/>
<path d="M170.128,30.259l-7.563,7.565c-1.393,1.393-1.393,3.651,0,5.042c0.696,0.696,1.609,1.045,2.521,1.045
s1.825-0.348,2.521-1.045l7.563-7.565c1.393-1.393,1.393-3.651,0-5.042C173.777,28.866,171.521,28.866,170.128,30.259z"/>
<path d="M103.311,188.793c-1.971,0-3.566,1.597-3.566,3.566v10.697c0,1.969,1.595,3.566,3.566,3.566
c1.971,0,3.566-1.597,3.566-3.566v-10.697C106.877,190.39,105.282,188.793,103.311,188.793z"/>
<path d="M201.371,99.745h-10.697c-1.971,0-3.566,1.597-3.566,3.566c0,1.969,1.595,3.566,3.566,3.566h10.697
c1.971,0,3.566-1.597,3.566-3.566C204.937,101.342,203.341,99.745,201.371,99.745z"/>
<path d="M39.015,42.866c0.696,0.696,1.609,1.045,2.521,1.045s1.825-0.348,2.521-1.045c1.393-1.391,1.393-3.649,0-5.042
l-7.563-7.565c-1.393-1.393-3.649-1.393-5.042,0c-1.393,1.391-1.393,3.649,0,5.042L39.015,42.866z"/>
<path d="M39.015,163.757l-7.563,7.563c-1.393,1.393-1.393,3.649,0,5.042c0.696,0.696,1.609,1.045,2.521,1.045
c0.912,0,1.825-0.348,2.521-1.045l7.563-7.563c1.393-1.393,1.393-3.649,0-5.042C42.664,162.364,40.408,162.364,39.015,163.757z"
/>
<path d="M103.311,17.829c1.971,0,3.566-1.597,3.566-3.566V3.566c0-1.969-1.595-3.566-3.566-3.566
c-1.971,0-3.566,1.597-3.566,3.566v10.697C99.745,16.232,101.34,17.829,103.311,17.829z"/>
<path d="M15.949,99.745H5.251c-1.971,0-3.566,1.597-3.566,3.566c0,1.969,1.595,3.566,3.566,3.566h10.697
c1.971,0,3.566-1.597,3.566-3.566C19.514,101.342,17.919,99.745,15.949,99.745z"/>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

+68
View File
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
<g id="Sun">
<path d="M32.1318512,18.2793007c-7.7119007,0-13.9863014,6.2743988-13.9863014,13.9862976
s6.2744007,13.9864006,13.9863014,13.9864006s13.9862976-6.274498,13.9862976-13.9864006
S39.84375,18.2793007,32.1318512,18.2793007z M32.1318512,44.2793007c-6.6245003,0-12.0137005-5.3897018-12.0137005-12.0137024
s5.3892002-12.0135975,12.0137005-12.0135975s12.0136986,5.3895988,12.0136986,12.0135975
S38.7563515,44.2793007,32.1318512,44.2793007z"/>
<path d="M32.0000496,13.1688995c0.5522003,0,1-0.4471998,1-1V1c0-0.5527-0.4477997-1-1-1c-0.5522995,0-1,0.4473-1,1v11.1688995
C31.0000496,12.7216997,31.4477501,13.1688995,32.0000496,13.1688995z"/>
<path d="M32.0000496,50.830101c-0.5522995,0-1,0.4472008-1,1V63c0,0.5527,0.4477005,1,1,1c0.5522003,0,1-0.4473,1-1V51.830101
C33.0000496,51.2773018,32.5522499,50.830101,32.0000496,50.830101z"/>
<path d="M62.263649,30.4452991H51.09375c-0.5522003,0-1,0.4473-1,1s0.4477997,1.0000019,1,1.0000019h11.169899
c0.5522995,0,1-0.4473019,1-1.0000019S62.8159485,30.4452991,62.263649,30.4452991z"/>
<path d="M13.90625,31.4452991c0-0.5527-0.447794-1-0.999999-1H1.7363508c-0.5523,0-1,0.4473-1,1s0.4477,1.0000019,1,1.0000019
H12.906251C13.458456,32.4453011,13.90625,31.9979992,13.90625,31.4452991z"/>
<path d="M45.1801491,19.8778992c0.2559013,0,0.5116997-0.097599,0.7070999-0.2929001l7.8988991-7.8984995
c0.3906021-0.3905993,0.3906021-1.0233994,0-1.4139996c-0.3905983-0.3907003-1.0234985-0.3907003-1.4140968,0l-7.8989029,7.8984003
c-0.3905983,0.3906002-0.3905983,1.0233994,0,1.4140987C44.668457,19.7803001,44.9243507,19.8778992,45.1801491,19.8778992z"/>
<path d="M45.887249,45.2030983c-0.3906975-0.3905983-1.0234985-0.3905983-1.4141006,0
c-0.3905983,0.3907013-0.3905983,1.0235023,0,1.4141006l7.8989029,7.8973999
c0.1952972,0.1954002,0.4511986,0.2929993,0.7070999,0.2929993c0.2557983,0,0.5116997-0.097599,0.7069969-0.2929993
c0.3906021-0.3905983,0.3906021-1.0233994,0-1.4139977L45.887249,45.2030983z"/>
<path d="M18.112751,19.5849991c0.1954002,0.1953011,0.4511986,0.2929001,0.7070999,0.2929001
c0.2558002,0,0.5116997-0.097599,0.7069988-0.2929001c0.3906059-0.3906994,0.3906059-1.0234985,0-1.4140987L11.6289501,10.2725
c-0.3906994-0.3907003-1.0234947-0.3907003-1.4140997,0c-0.3906002,0.3906002-0.3906002,1.0234003,0,1.4139996
L18.112751,19.5849991z"/>
<path d="M19.5712509,45.2700996c-0.0177002-0.0208015-0.024601-0.0471992-0.0444012-0.0670013
c-0.3906002-0.3905983-1.0233936-0.3905983-1.4140987,0l-3.9401007,3.9400024l-4.0341949,3.8446999
c-0.3999052,0.3811989-0.415205,1.0139008-0.0339994,1.4137993c0.0192947,0.0203018,0.045495,0.0278015,0.066,0.0460014
c0.0176945,0.0208969,0.0245943,0.0472984,0.0443945,0.0669975c0.1953001,0.1954002,0.4512005,0.2929993,0.7069998,0.2929993
c0.2559004,0,0.5117006-0.097599,0.7070999-0.2929993l3.9401007-3.9398994l4.0341997-3.8446999
c0.3999004-0.3811989,0.415205-1.0139008,0.0340004-1.4137993C19.6179504,45.2958984,19.5917511,45.2882996,19.5712509,45.2700996z
"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

+59
View File
@@ -0,0 +1,59 @@
const DARK = "dark";
const LIGHT = "light";
const SYSTEM = "system";
const COLOR_THEME = "color-theme";
const DARK_OPTIONS = {
brightness: 100,
contrast: 100,
sepia: 0
};
const SVG_INVERT = {invert: ['img[src$=".svg"]']};
const NAVBAR_ICON_ID = "navbar-theme-icon-svg";
const DARK_ICON = "/icons/moon-svgrepo-com.svg";
const LIGHT_ICON = "/icons/sun-svgrepo-com.svg";
const SYSTEM_ICON = "/icons/computer-svgrepo-com.svg";
function enableDarkTheme() {
localStorage.setItem(COLOR_THEME, DARK);
DarkReader.enable(DARK_OPTIONS, SVG_INVERT);
document.getElementById(NAVBAR_ICON_ID).src = DARK_ICON;
}
function enableLightTheme() {
localStorage.setItem(COLOR_THEME, LIGHT);
DarkReader.disable();
document.getElementById(NAVBAR_ICON_ID).src = LIGHT_ICON;
}
function useSystemTheme() {
localStorage.setItem(COLOR_THEME, SYSTEM);
DarkReader.auto(DARK_OPTIONS, SVG_INVERT);
document.getElementById(NAVBAR_ICON_ID).src = SYSTEM_ICON;
}
function initializeColorTheme() {
// We're using the themeInitialization attributes as a 'hack' for setting up
// the default color scheme because we don't want to complicate this further
// by creating custom javascript output in Hugo.
let themeInitialization = document.getElementById("theme-initialization");
let defaultColorScheme = themeInitialization.getAttribute('default-theme');
// If the user has already selected a preferred theme then use that instead
// of the default theme. Also, the default theme gets loaded to localStorage
// on the first visit.
let colorTheme = localStorage.getItem(COLOR_THEME);
if (colorTheme == null || colorTheme.length == 0) {
colorTheme = defaultColorScheme;
}
// Enable the color theme
if (colorTheme == DARK) {
enableDarkTheme();
} else if (colorTheme == SYSTEM) {
useSystemTheme();
} else {
// We use light theme for the two conditions below.
// 1. the selected theme is light
// 2. no default theme is found - fall back to original behavior
enableLightTheme();
}
}
initializeColorTheme()
File diff suppressed because it is too large Load Diff
+6
View File
@@ -8,6 +8,9 @@ const updateNavBar = () => {
$('#navbar-toggler').removeClass('navbar-dark'); $('#navbar-toggler').removeClass('navbar-dark');
$('#navbar-toggler').addClass('navbar-light'); $('#navbar-toggler').addClass('navbar-light');
// color theme selector a.k.a. dark mode
$('#navbar-theme-icon-svg').removeClass('navbar-icon-svg-dark');
// get the main logo from hidden img tag // get the main logo from hidden img tag
let mainLogo = document.getElementById("main-logo") let mainLogo = document.getElementById("main-logo")
if (mainLogo !== null) { if (mainLogo !== null) {
@@ -22,6 +25,9 @@ const updateNavBar = () => {
$('#navbar-toggler').removeClass('navbar-light'); $('#navbar-toggler').removeClass('navbar-light');
$('#navbar-toggler').addClass('navbar-dark'); $('#navbar-toggler').addClass('navbar-dark');
// color theme selector a.k.a. dark mode
$('#navbar-theme-icon-svg').addClass('navbar-icon-svg-dark');
// get the inverted logo from hidden img tag // get the inverted logo from hidden img tag
let invertedLogo = document.getElementById("inverted-logo") let invertedLogo = document.getElementById("inverted-logo")
if (invertedLogo !== null) { if (invertedLogo !== null) {