68 Commits

Author SHA1 Message Date
hossainemruz 3b0f9ca0ae Fix build
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2023-01-06 01:05:43 +06:00
hossainemruz 06fd8e8919 Update config.yaml for exampleSite to match new structure
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2023-01-06 00:56:42 +06:00
Aaron Qian 02db3d3044 Bundling JS with ESBuild (#702)
* add npm dependencies used in this theme

* implement helper to configure JS and ESBuild

* migrate jquery popper.js bootstrap fontawesome to js bundle

* refactor main.js into smaller pieces, and moved navbar.js to assets

* remove list.js. It adjusts post card height to be the same, but is actually not needed.

* refactored notes.js, search.js, single.js into application.js

* move ityped to js asset, implement experiences horizontal vertical line in css

* align recent post height via css

* migrated home.js and refactored into various sections

* migrated darkMode feature to js bundle

* moved mermaid feature to js bundle

* migrate syntax highlight to js bundle

* migrate katex ( js portion ) to js bundle

* migrate pdf-js to js bundle by delegating to cdn

* set explicit comparisions for feature envvars so js can properly optimize

* removed goat-counter

* more fixes for broken achievements and small bugs

* more bug fixes

* allow configuration of hightlight.js, fix video-player shortcode

* remove jquery all together

* add null handling and fix merge conflicts

Co-authored-by: Aaron Qian <aaron@yeet.io>
2023-01-06 00:42:54 +06:00
dependabot[bot] fe14b0fbf5 Bump release-drafter/release-drafter from 5.21.1 to 5.22.0 (#718)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.1 to 5.22.0.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 11:02:44 +00:00
Emruz Hossain d3c2c6d1fc Add exampleSite + update module to v4 (#717)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-12-28 19:25:33 +00:00
hossainemruz 65c71f88ea Use relative URL in opengraph header
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-12-28 03:51:46 +06:00
Emruz Hossain 58ef60dc65 Use rendering hook for link (#716)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-12-27 21:28:51 +00:00
hossainemruz 2d43234614 Update module file
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-12-27 02:10:47 +06:00
hossainemruz dedd6ca0b7 Update Hugo Module path
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-12-27 01:55:52 +06:00
zicklam 65de557d60 Add buymeacoffee.com widget (#707)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-12-26 23:23:55 +06:00
github-actions[bot] 75845423c9 add vendor specific css prefixes (#714)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-26 23:20:23 +06:00
Bernat Borràs Civil bafd3034ae Add catalan translation (#710)
* Add catalan translation

* Add catalan language

* Add catalan language in readme

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-12-26 23:19:54 +06:00
github-actions[bot] 71d2db71d9 Update and run autoprefixer (#713)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-26 17:19:13 +00:00
M. Akif Tokatlioglu 657c50d941 Fixed spelling problems in tr.toml (#711)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-12-26 23:18:15 +06:00
dependabot[bot] 1f22a677ca Bump actions/checkout from 3.1.0 to 3.2.0 (#712)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-26 23:15:44 +06:00
github-actions[bot] 6704952afa Update and run autoprefixer (#704)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-12 15:09:11 +00:00
github-actions[bot] 108bd93598 Update and run autoprefixer (#700)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-12 15:08:16 +00:00
Hiroya Onoe 996346b249 Fix links of posts, notes, and tags/%s directories redirection (#703) 2022-11-12 21:07:19 +06:00
Mathias 2cfe671487 Fix typo in i18n/fr.toml (#699) 2022-11-11 16:52:06 +00:00
Emruz Hossain 7c849ccf21 Support external link in sidebar (#696)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-11-10 16:57:30 +00:00
Emily f475ddcef8 fix valine comment bug (#692)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-08 20:13:47 +06:00
eishundo c3dc76652e Add missing "alt" attributes to img tags in theme-selector.html (#689)
Co-authored-by: eishundo <eishundo@users.noreply.github.com>
2022-11-08 14:00:18 +00:00
Emruz Hossain a78b031ca9 Don't show search cards in search result (#690)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-11-06 17:17:30 +00:00
eishundo 76ff0e4e40 Fix recent-posts.html to not display search card (#687)
Co-authored-by: eishundo <eishundo@users.noreply.github.com>
2022-11-03 17:28:31 +00:00
Emruz Hossain c3f0bd449e Look for hero image in page bundle (#684)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-11-02 17:56:27 +00:00
github-actions[bot] a16652581b add vendor specific css prefixes (#683)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
2022-10-30 23:08:17 +06:00
Bernat Borràs Civil 7175b0d21f More Posts button (#680)
* Add More Posts button

* Update recent-posts.html

* Update recent-posts.html

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-10-30 22:46:36 +06:00
Joan 33d91af120 Centered Tags on Posts page (#681)
* Centered Tags on Posts page

* Update single.html

Proper Centering withour Removing <ul></ul>
2022-10-30 15:02:45 +00:00
dependabot[bot] 1dc00ccb1e Bump peaceiris/actions-hugo from 2.5.0 to 2.6.0 (#678)
Bumps [peaceiris/actions-hugo](https://github.com/peaceiris/actions-hugo) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/peaceiris/actions-hugo/releases)
- [Changelog](https://github.com/peaceiris/actions-hugo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-hugo/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: peaceiris/actions-hugo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 11:05:47 +00:00
Lukas Nagel 36f42bde9d Better Support if browser blocks GoatCounter (#676)
* Added local goat counter

* Undid wrong commit
2022-10-19 16:28:14 +00:00
Emruz Hossain 33c10915a8 Fix counter.dev analytics (#674) 2022-10-18 16:06:22 +00:00
Pablo Marcos 0e8e182e33 Add PDF Shortcut (#672)
* Add Blogtrottr as newsletter provider

* Fixed absLangURL issue with sections in footer

* Added embed-pdf shortcode

pdf-js is sered locally to preserve privacy and comply with GDPR

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-10-18 21:47:41 +06:00
dependabot[bot] 211a0785fa Bump release-drafter/release-drafter from 5.21.0 to 5.21.1 (#673)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.21.0 to 5.21.1.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 11:04:40 +00:00
Alexandre Neto 32c5c04632 Allow custom hero images Fixes #379 (#670)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-10-15 17:18:50 +00:00
github-actions[bot] c52b1f8dcc add vendor specific css prefixes (#669)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
2022-10-15 21:25:43 +06:00
Cyb3r Jak3 1685b0a3c4 Only load flag CSS if showing flag icons (#666) 2022-10-15 15:14:01 +00:00
Lukas Nagel bd10f18553 Added Hugo-Module (#650)
* Updated Gitignore

* Added GoModule

* fixed typo

* Updated Module-Name

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-10-12 18:46:25 +00:00
Lukas Nagel 1ca18416d1 Centered Arrow (#664) 2022-10-11 15:33:18 +06:00
imgbot[bot] 3ef375f488 [ImgBot] Optimize images (#659)
*Total -- 2,013.46kb -> 1,961.08kb (2.6%)

/static/icons/computer-svgrepo-com.svg -- 1.33kb -> 0.89kb (32.62%)
/static/flags/1x1/ax.svg -- 0.53kb -> 0.44kb (15.61%)
/static/flags/1x1/in.svg -- 1.06kb -> 0.90kb (14.67%)
/static/icons/moon-svgrepo-com.svg -- 3.12kb -> 2.67kb (14.46%)
/static/flags/1x1/ch.svg -- 0.28kb -> 0.25kb (12.85%)
/static/flags/1x1/ps.svg -- 0.53kb -> 0.46kb (12.83%)
/static/flags/1x1/uz.svg -- 1.42kb -> 1.24kb (12.69%)
/static/flags/1x1/eu.svg -- 1.22kb -> 1.06kb (12.68%)
/static/flags/1x1/bj.svg -- 0.48kb -> 0.42kb (12.5%)
/static/flags/1x1/ve.svg -- 1.16kb -> 1.02kb (11.99%)
/static/flags/1x1/to.svg -- 0.35kb -> 0.31kb (11.73%)
/static/icons/sun-svgrepo-com.svg -- 3.44kb -> 3.04kb (11.63%)
/static/flags/1x1/tz.svg -- 0.58kb -> 0.52kb (11.52%)
/static/flags/1x1/jo.svg -- 0.67kb -> 0.60kb (11.05%)
/static/flags/1x1/sl.svg -- 0.42kb -> 0.38kb (10.57%)
/static/flags/1x1/sd.svg -- 0.48kb -> 0.43kb (10.41%)
/static/flags/1x1/kw.svg -- 0.49kb -> 0.44kb (10.12%)
/static/flags/1x1/cg.svg -- 0.46kb -> 0.41kb (9.87%)
/static/flags/1x1/cf.svg -- 0.61kb -> 0.55kb (9.7%)
/static/flags/1x1/ly.svg -- 0.51kb -> 0.46kb (9.68%)
/static/flags/1x1/pk.svg -- 0.67kb -> 0.61kb (9.46%)
/static/flags/1x1/za.svg -- 0.86kb -> 0.78kb (9.41%)
/static/flags/1x1/la.svg -- 0.49kb -> 0.44kb (9.18%)
/static/flags/1x1/bw.svg -- 0.25kb -> 0.22kb (9.16%)
/static/flags/1x1/ir.svg -- 14.96kb -> 13.59kb (9.13%)
/static/flags/1x1/cd.svg -- 0.49kb -> 0.45kb (9.13%)
/static/flags/1x1/bs.svg -- 0.55kb -> 0.50kb (9.03%)
/static/flags/1x1/cu.svg -- 0.56kb -> 0.51kb (8.95%)
/static/flags/1x1/cl.svg -- 0.56kb -> 0.51kb (8.95%)
/static/flags/1x1/tl.svg -- 0.56kb -> 0.51kb (8.9%)
/static/flags/1x1/mu.svg -- 0.31kb -> 0.28kb (8.86%)
/static/flags/1x1/bv.svg -- 0.57kb -> 0.52kb (8.81%)
/static/flags/1x1/is.svg -- 0.51kb -> 0.47kb (8.8%)
/static/flags/1x1/dj.svg -- 0.57kb -> 0.52kb (8.78%)
/static/flags/1x1/gm.svg -- 0.37kb -> 0.34kb (8.71%)
/static/flags/1x1/fo.svg -- 0.52kb -> 0.47kb (8.66%)
/static/flags/1x1/kr.svg -- 0.81kb -> 0.74kb (8.56%)
/static/flags/1x1/jp.svg -- 0.47kb -> 0.43kb (8.52%)
/static/flags/1x1/ye.svg -- 0.27kb -> 0.24kb (8.46%)
/static/flags/1x1/hu.svg -- 0.27kb -> 0.24kb (8.42%)
/static/flags/1x1/ga.svg -- 0.27kb -> 0.25kb (8.36%)
/static/flags/1x1/ml.svg -- 0.27kb -> 0.25kb (8.33%)
/static/flags/1x1/td.svg -- 0.27kb -> 0.25kb (8.33%)
/static/flags/1x1/so.svg -- 0.48kb -> 0.44kb (8.3%)
/static/flags/1x1/vn.svg -- 0.48kb -> 0.44kb (8.3%)
/static/flags/1x1/pr.svg -- 0.60kb -> 0.55kb (8.29%)
/static/flags/1x1/cw.svg -- 0.66kb -> 0.61kb (8.25%)
/static/flags/1x1/pl.svg -- 0.21kb -> 0.20kb (8.22%)
/static/flags/1x1/ci.svg -- 0.27kb -> 0.25kb (8.21%)
/static/flags/1x1/lr.svg -- 0.67kb -> 0.62kb (8.12%)
/static/flags/1x1/th.svg -- 0.28kb -> 0.26kb (8.07%)
/static/flags/1x1/co.svg -- 0.28kb -> 0.26kb (8.04%)
/static/flags/1x1/ic.svg -- 0.28kb -> 0.26kb (8.04%)
/static/flags/1x1/be.svg -- 0.28kb -> 0.26kb (8.01%)
/static/flags/1x1/ru.svg -- 0.28kb -> 0.26kb (8.01%)
/static/flags/1x1/cp.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/gf.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/mf.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/wf.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/it.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/pm.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/bl.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/gp.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/yt.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/re.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/mq.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/ie.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/fr.svg -- 0.28kb -> 0.26kb (7.96%)
/static/flags/1x1/np.svg -- 1.10kb -> 1.02kb (7.96%)
/static/flags/1x1/cr.svg -- 0.28kb -> 0.26kb (7.93%)
/static/flags/1x1/bg.svg -- 0.28kb -> 0.26kb (7.9%)
/static/flags/1x1/gn.svg -- 0.29kb -> 0.26kb (7.88%)
/static/flags/1x1/pa.svg -- 0.64kb -> 0.59kb (7.79%)
/static/flags/1x1/ua.svg -- 0.23kb -> 0.21kb (7.76%)
/static/flags/1x1/tj.svg -- 1.74kb -> 1.60kb (7.75%)
/static/flags/1x1/mc.svg -- 0.23kb -> 0.21kb (7.69%)
/static/flags/1x1/mg.svg -- 0.29kb -> 0.27kb (7.69%)
/static/flags/1x1/lv.svg -- 0.23kb -> 0.21kb (7.69%)
/static/flags/1x1/tg.svg -- 0.71kb -> 0.66kb (7.67%)
/static/flags/1x1/lc.svg -- 0.36kb -> 0.33kb (7.63%)
/static/flags/1x1/ro.svg -- 0.29kb -> 0.27kb (7.62%)
/static/flags/1x1/aw.svg -- 11.79kb -> 10.90kb (7.59%)
/static/flags/1x1/at.svg -- 0.23kb -> 0.22kb (7.53%)
/static/flags/1x1/cm.svg -- 0.80kb -> 0.74kb (7.44%)
/static/flags/1x1/ag.svg -- 0.74kb -> 0.68kb (7.4%)
/static/flags/1x1/nz.svg -- 2.12kb -> 1.97kb (7.36%)
/static/flags/1x1/tw.svg -- 2.44kb -> 2.26kb (7.28%)
/static/flags/1x1/jm.svg -- 0.38kb -> 0.35kb (7.25%)
/static/flags/1x1/kp.svg -- 0.83kb -> 0.77kb (7.19%)
/static/flags/1x1/ng.svg -- 0.25kb -> 0.23kb (7%)
/static/flags/1x1/st.svg -- 0.90kb -> 0.83kb (6.98%)
/static/flags/1x1/nr.svg -- 0.65kb -> 0.60kb (6.93%)
/static/flags/1x1/tn.svg -- 0.72kb -> 0.67kb (6.92%)
/static/flags/1x1/kn.svg -- 0.79kb -> 0.74kb (6.91%)
/static/flags/1x1/gy.svg -- 0.47kb -> 0.43kb (6.9%)
/static/flags/1x1/gw.svg -- 0.87kb -> 0.81kb (6.88%)
/static/flags/1x1/rw.svg -- 0.73kb -> 0.68kb (6.85%)
/static/flags/1x1/na.svg -- 0.95kb -> 0.89kb (6.78%)
/static/flags/1x1/dm.svg -- 16.06kb -> 14.98kb (6.7%)
/static/flags/1x1/tt.svg -- 0.31kb -> 0.29kb (6.62%)
/static/flags/1x1/ee.svg -- 0.34kb -> 0.32kb (6.59%)
/static/flags/1x1/il.svg -- 0.83kb -> 0.78kb (6.59%)
/static/flags/1x1/gi.svg -- 2.87kb -> 2.68kb (6.47%)
/static/flags/1x1/gd.svg -- 1.79kb -> 1.67kb (6.4%)
/static/flags/1x1/km.svg -- 1.01kb -> 0.95kb (6.38%)
/static/flags/1x1/sn.svg -- 0.40kb -> 0.38kb (6.33%)
/static/flags/1x1/hn.svg -- 1.09kb -> 1.02kb (6.29%)
/static/flags/1x1/ai.svg -- 36.46kb -> 34.24kb (6.08%)
/static/flags/1x1/eh.svg -- 0.57kb -> 0.53kb (6.02%)
/static/flags/1x1/bi.svg -- 1.02kb -> 0.96kb (5.82%)
/static/flags/1x1/ht.svg -- 14.76kb -> 13.91kb (5.82%)
/static/flags/1x1/gr.svg -- 0.84kb -> 0.79kb (5.57%)
/static/flags/1x1/bf.svg -- 0.37kb -> 0.35kb (5.54%)
/static/flags/1x1/ke.svg -- 1.45kb -> 1.38kb (5.44%)
/static/flags/1x1/fm.svg -- 0.74kb -> 0.70kb (5.43%)
/static/flags/1x1/ae.svg -- 0.25kb -> 0.24kb (5.41%)
/static/flags/1x1/sg.svg -- 0.92kb -> 0.87kb (5.4%)
/static/flags/1x1/tc.svg -- 6.97kb -> 6.60kb (5.38%)
/static/flags/1x1/sb.svg -- 0.93kb -> 0.88kb (5.37%)
/static/flags/1x1/no.svg -- 0.31kb -> 0.29kb (5.35%)
/static/flags/1x1/sj.svg -- 0.31kb -> 0.29kb (5.35%)
/static/flags/1x1/sc.svg -- 0.31kb -> 0.30kb (5.3%)
/static/flags/1x1/vc.svg -- 0.48kb -> 0.46kb (5.27%)
/static/flags/1x1/je.svg -- 6.24kb -> 5.92kb (5.24%)
/static/flags/1x1/lt.svg -- 0.43kb -> 0.41kb (5.24%)
/static/flags/1x1/ss.svg -- 0.38kb -> 0.37kb (5.08%)
/static/flags/1x1/sv.svg -- 81.80kb -> 77.66kb (5.06%)
/static/flags/1x1/de.svg -- 0.21kb -> 0.20kb (5.05%)
/static/flags/1x1/ne.svg -- 0.27kb -> 0.26kb (5.02%)
/static/flags/1x1/tr.svg -- 0.56kb -> 0.53kb (4.9%)
/static/flags/1x1/bq.svg -- 0.22kb -> 0.21kb (4.89%)
/static/flags/1x1/nl.svg -- 0.22kb -> 0.21kb (4.89%)
/static/flags/1x1/cz.svg -- 0.22kb -> 0.21kb (4.87%)
/static/flags/1x1/gb-eng.svg -- 0.22kb -> 0.21kb (4.8%)
/static/flags/1x1/lu.svg -- 0.22kb -> 0.21kb (4.8%)
/static/flags/1x1/gh.svg -- 0.29kb -> 0.27kb (4.78%)
/static/flags/1x1/dk.svg -- 0.23kb -> 0.22kb (4.74%)
/static/flags/1x1/am.svg -- 0.23kb -> 0.22kb (4.66%)
/static/flags/1x1/fi.svg -- 0.23kb -> 0.22kb (4.64%)
/static/flags/1x1/kh.svg -- 7.10kb -> 6.77kb (4.63%)
/static/flags/1x1/mv.svg -- 0.30kb -> 0.28kb (4.61%)
/static/flags/1x1/et.svg -- 1.19kb -> 1.14kb (4.59%)
/static/flags/1x1/id.svg -- 0.17kb -> 0.17kb (4.49%)
/static/flags/1x1/gt.svg -- 35.28kb -> 33.71kb (4.46%)
/static/flags/1x1/sr.svg -- 0.31kb -> 0.30kb (4.42%)
/static/flags/1x1/py.svg -- 17.00kb -> 16.26kb (4.33%)
/static/flags/1x1/sy.svg -- 0.32kb -> 0.31kb (4.28%)
/static/flags/1x1/bd.svg -- 0.18kb -> 0.18kb (4.23%)
/static/flags/1x1/ni.svg -- 18.16kb -> 17.39kb (4.21%)
/static/flags/1x1/vu.svg -- 2.08kb -> 1.99kb (4.09%)
/static/flags/1x1/az.svg -- 0.48kb -> 0.46kb (4.04%)
/static/flags/1x1/hk.svg -- 3.46kb -> 3.33kb (3.84%)
/static/flags/1x1/cefta.svg -- 0.89kb -> 0.86kb (3.83%)
/static/flags/1x1/cv.svg -- 1.32kb -> 1.27kb (3.77%)
/static/flags/1x1/mm.svg -- 0.68kb -> 0.65kb (3.76%)
/static/flags/1x1/va.svg -- 88.67kb -> 85.34kb (3.75%)
/static/flags/1x1/pt.svg -- 8.54kb -> 8.22kb (3.72%)
/static/flags/1x1/ba.svg -- 1.21kb -> 1.16kb (3.72%)
/static/flags/1x1/gg.svg -- 0.61kb -> 0.58kb (3.7%)
/static/flags/1x1/mh.svg -- 0.74kb -> 0.71kb (3.69%)
/static/flags/1x1/tm.svg -- 30.74kb -> 29.60kb (3.69%)
/static/flags/1x1/si.svg -- 2.02kb -> 1.94kb (3.68%)
/static/flags/1x1/tf.svg -- 1.17kb -> 1.12kb (3.6%)
/static/flags/1x1/dz.svg -- 0.30kb -> 0.29kb (3.59%)
/static/flags/1x1/se.svg -- 0.22kb -> 0.21kb (3.52%)
/static/flags/1x1/mz.svg -- 2.53kb -> 2.45kb (3.51%)
/static/flags/1x1/gb-sct.svg -- 0.23kb -> 0.22kb (3.39%)
/static/flags/1x1/ug.svg -- 3.93kb -> 3.80kb (3.38%)
/static/flags/1x1/gl.svg -- 0.23kb -> 0.22kb (3.38%)
/static/flags/1x1/pg.svg -- 2.04kb -> 1.97kb (3.35%)
/static/flags/1x1/sz.svg -- 4.63kb -> 4.47kb (3.33%)
/static/flags/1x1/ws.svg -- 0.68kb -> 0.66kb (3.29%)
/static/flags/1x1/xx.svg -- 0.24kb -> 0.23kb (3.28%)
/static/flags/1x1/vg.svg -- 10.45kb -> 10.11kb (3.26%)
/static/flags/1x1/mr.svg -- 0.42kb -> 0.41kb (3.25%)
/static/flags/1x1/es-ga.svg -- 28.15kb -> 27.25kb (3.19%)
/static/flags/1x1/gb.svg -- 0.53kb -> 0.51kb (3.16%)
/static/flags/1x1/br.svg -- 7.60kb -> 7.36kb (3.15%)
/static/flags/1x1/nu.svg -- 0.82kb -> 0.79kb (3.1%)
/static/flags/1x1/mn.svg -- 1.40kb -> 1.36kb (3.07%)
/static/flags/1x1/li.svg -- 8.12kb -> 7.87kb (3.07%)
/static/flags/1x1/fj.svg -- 25.41kb -> 24.63kb (3.04%)
/static/flags/1x1/bh.svg -- 0.27kb -> 0.26kb (2.9%)
/static/flags/1x1/ky.svg -- 23.78kb -> 23.10kb (2.89%)
/static/flags/1x1/ki.svg -- 5.80kb -> 5.64kb (2.8%)
/static/flags/1x1/ad.svg -- 31.88kb -> 31.01kb (2.73%)
/static/flags/1x1/mk.svg -- 0.40kb -> 0.39kb (2.7%)
/static/flags/1x1/zm.svg -- 5.29kb -> 5.15kb (2.68%)
/static/flags/1x1/nc.svg -- 1.23kb -> 1.20kb (2.55%)
/static/flags/1x1/my.svg -- 0.67kb -> 0.66kb (2.47%)
/static/flags/1x1/mt.svg -- 10.26kb -> 10.00kb (2.46%)
/static/flags/1x1/ao.svg -- 1.56kb -> 1.52kb (2.44%)
/static/flags/1x1/lb.svg -- 2.69kb -> 2.62kb (2.36%)
/static/flags/1x1/af.svg -- 20.61kb -> 20.12kb (2.36%)
/static/flags/1x1/io.svg -- 22.33kb -> 21.80kb (2.35%)
/static/flags/1x1/dg.svg -- 22.33kb -> 21.80kb (2.35%)
/static/flags/1x1/md.svg -- 11.09kb -> 10.83kb (2.33%)
/static/flags/1x1/bt.svg -- 24.55kb -> 23.97kb (2.33%)
/static/flags/4x3/bb.svg -- 0.59kb -> 0.58kb (2.3%)
/static/flags/1x1/bb.svg -- 0.60kb -> 0.58kb (2.3%)
/static/flags/1x1/gb-nir.svg -- 24.65kb -> 24.09kb (2.27%)
/static/flags/1x1/qa.svg -- 0.34kb -> 0.34kb (2.27%)
/static/flags/1x1/pe.svg -- 71.77kb -> 70.19kb (2.2%)
/static/flags/1x1/cc.svg -- 3.01kb -> 2.95kb (2.17%)
/static/flags/1x1/iq.svg -- 1.44kb -> 1.41kb (2.17%)
/static/flags/1x1/eg.svg -- 9.73kb -> 9.53kb (2.11%)
/static/flags/1x1/cx.svg -- 2.44kb -> 2.39kb (2.04%)
/static/flags/1x1/sx.svg -- 12.77kb -> 12.51kb (2.03%)
/static/flags/1x1/mp.svg -- 23.08kb -> 22.62kb (2.03%)
/static/flags/1x1/ec.svg -- 29.20kb -> 28.61kb (2.01%)
/static/flags/1x1/gq.svg -- 5.14kb -> 5.04kb (1.96%)
/static/flags/1x1/sk.svg -- 1.15kb -> 1.13kb (1.96%)
/static/flags/1x1/by.svg -- 5.94kb -> 5.83kb (1.84%)
/static/flags/1x1/kg.svg -- 3.24kb -> 3.18kb (1.84%)
/static/flags/1x1/pf.svg -- 4.12kb -> 4.05kb (1.8%)
/static/flags/1x1/sm.svg -- 15.47kb -> 15.19kb (1.79%)
/static/flags/1x1/bo.svg -- 112.75kb -> 110.76kb (1.76%)
/static/flags/1x1/mo.svg -- 1.51kb -> 1.48kb (1.75%)
/static/flags/1x1/ea.svg -- 91.47kb -> 89.88kb (1.75%)
/static/flags/1x1/es.svg -- 91.47kb -> 89.88kb (1.75%)
/static/flags/1x1/tv.svg -- 1.31kb -> 1.29kb (1.71%)
/static/flags/1x1/um.svg -- 3.88kb -> 3.81kb (1.64%)
/static/flags/1x1/im.svg -- 10.00kb -> 9.84kb (1.62%)
/static/flags/1x1/mw.svg -- 3.80kb -> 3.74kb (1.57%)
/static/flags/1x1/hm.svg -- 1.27kb -> 1.25kb (1.53%)
/static/flags/1x1/au.svg -- 1.27kb -> 1.25kb (1.53%)
/static/flags/1x1/bz.svg -- 45.95kb -> 45.26kb (1.52%)
/static/flags/1x1/er.svg -- 3.31kb -> 3.26kb (1.51%)
/static/flags/1x1/ph.svg -- 1.43kb -> 1.41kb (1.5%)
/static/flags/1x1/tk.svg -- 0.75kb -> 0.74kb (1.42%)
/static/flags/1x1/zw.svg -- 6.60kb -> 6.51kb (1.35%)
/static/flags/1x1/gu.svg -- 4.82kb -> 4.75kb (1.32%)
/static/flags/1x1/gs.svg -- 32.71kb -> 32.28kb (1.31%)
/static/flags/1x1/rs.svg -- 182.71kb -> 180.37kb (1.28%)
/static/flags/1x1/fk.svg -- 29.54kb -> 29.17kb (1.28%)
/static/flags/1x1/mx.svg -- 88.74kb -> 87.62kb (1.26%)
/static/flags/1x1/bm.svg -- 22.25kb -> 21.97kb (1.26%)
/static/flags/1x1/ca.svg -- 0.63kb -> 0.62kb (1.24%)
/static/flags/1x1/ck.svg -- 1.81kb -> 1.79kb (1.24%)
/static/flags/1x1/kz.svg -- 11.15kb -> 11.02kb (1.2%)
/static/flags/1x1/bn.svg -- 14.16kb -> 13.99kb (1.19%)
/static/flags/1x1/vi.svg -- 8.50kb -> 8.40kb (1.17%)
/static/flags/1x1/sa.svg -- 9.98kb -> 9.87kb (1.13%)
/static/flags/1x1/ms.svg -- 6.13kb -> 6.06kb (1.13%)
/static/flags/1x1/pn.svg -- 13.64kb -> 13.49kb (1.11%)
/static/flags/1x1/ge.svg -- 1.50kb -> 1.49kb (0.91%)
/static/flags/1x1/lk.svg -- 11.07kb -> 10.98kb (0.85%)
/static/flags/1x1/ta.svg -- 29.93kb -> 29.71kb (0.73%)
/static/flags/1x1/ac.svg -- 29.93kb -> 29.71kb (0.73%)
/static/flags/1x1/nf.svg -- 5.45kb -> 5.42kb (0.7%)
/static/flags/1x1/as.svg -- 31.83kb -> 31.63kb (0.66%)
/static/flags/1x1/me.svg -- 62.36kb -> 62.02kb (0.55%)
/static/flags/1x1/al.svg -- 3.14kb -> 3.13kb (0.37%)
/static/flags/1x1/aq.svg -- 2.88kb -> 2.87kb (0.37%)
/static/flags/1x1/gb-wls.svg -- 8.86kb -> 8.83kb (0.32%)
/static/flags/1x1/xk.svg -- 8.52kb -> 8.49kb (0.25%)
/static/flags/1x1/un.svg -- 19.93kb -> 19.88kb (0.24%)
/static/flags/1x1/cy.svg -- 5.88kb -> 5.87kb (0.23%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-10-09 15:26:32 +00:00
BenjaminAdam 747106edcc Improved german localization (#662)
"Guthaben" is used for banking loans.
Changed to "Punktzahl" and "Note" to
better reflect the german education
system.

The 404 error message was just
nonsense. Changed it to correct
translation of english version.
2022-10-09 15:24:18 +00:00
Alexandre Neto 1f17e61ad6 Portuguese translation (#660)
* Portuguese translation

* Adds Portuguese to the list of languages

* Missing PT translation
2022-10-07 14:01:02 +00:00
TheDarthMole 799572c792 fix: fixed http 404 for flags required by darkreader (#658) 2022-10-06 03:48:50 +00:00
github-actions[bot] ca85a71230 Update and run autoprefixer (#653)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-04 11:10:25 +00:00
dependabot[bot] ea9812ec7c Bump actions/checkout from 3.0.2 to 3.1.0 (#654)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-04 11:09:29 +00:00
github-actions[bot] d61d39b9fb Update and run autoprefixer (#648)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-03 01:56:07 +00:00
freezingDaniel 56615bfa43 Update repo-URLs (#651) 2022-10-03 01:55:12 +00:00
dependabot[bot] 35ccacacd2 Bump release-drafter/release-drafter from 5.20.1 to 5.21.0 (#647)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.20.1 to 5.21.0.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5.20.1...v5.21.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-15 11:05:52 +00:00
dependabot[bot] 237a79332a Bump actions/checkout from 2.4.0 to 3.0.2 (#645)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-08 11:09:03 +00:00
Emruz Hossain 872e2119c2 Fix soft skill text wrapping issue (#644) 2022-09-07 11:30:26 +00:00
Elise Briers 2500174f94 Improve dutch translations (#642) 2022-09-06 16:26:21 +00:00
Emruz Hossain e2463abc4e Update Task list for publication 2022-09-05 22:01:33 +06:00
Lukas Nagel 79282571eb Local google font (#639)
* added font

* added mulish css

* updated local font css

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
2022-09-05 15:49:04 +00:00
Akumetsu 6585f002a9 Added functionality for use of any fontawesome icon and custom socials (#640) 2022-09-05 04:19:59 +00:00
Abdelhak Bougouffa d32ac9a43e Add Arabic language localization (#638)
* Add Arabic localization

* Add Arabic to README
2022-09-01 04:59:50 +00:00
github-actions[bot] 412376fdc1 Update and run autoprefixer (#636)
Co-authored-by: hossainemruz <hossainemruz@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 17:01:21 +00:00
github-actions[bot] 63931ee8f6 Update and run autoprefixer (#635)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 16:59:36 +00:00
dependabot[bot] bb87ee29ac Bump release-drafter/release-drafter from 5.20.0 to 5.20.1 (#632)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.20.0 to 5.20.1.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5.20.0...v5.20.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 22:58:09 +06:00
David Davó eefb6166eb Added matomo support (#633) 2022-08-18 16:56:16 +00:00
Emruz Hossain 55dd90a0dd Add support for providing optional URL in a achievement entry (#623)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-07-30 14:29:05 +00:00
github-actions[bot] fe5d8af56d add vendor specific css prefixes (#622)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
2022-07-29 23:22:20 +06:00
Emruz Hossain b81fd5078b Add publication section (#620)
* Add publication section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

* Don't make tags clickable

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-07-29 17:12:14 +00:00
Emruz Hossain eb167e0155 Update README.md 2022-07-21 07:59:20 +06:00
Kemal Kolcuoğlu 8cb07ffeb4 Adding Turkish Language Localization (#616) 2022-07-21 01:41:11 +00:00
Emruz Hossain 27c3d0f4cc Add margin between tags (#612)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-07-16 16:03:53 +00:00
Emruz Hossain ad3dee71c2 Support providing custom buttons in about section (#611)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-07-16 15:52:24 +00:00
Emruz Hossain bf6f63976b Fix CSS for gist (#606)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-06-15 19:44:56 +00:00
Emruz Hossain 6c8ab46a73 Use RelPermalink for background url (#605)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
2022-06-15 18:51:31 +00:00
Gabriel Jean 3d6246f3c9 Removed flag icon span if countryCode is null (#603)
* Update lang-selector.html

* Update lang-selector-2.html

* Added showFlags parameter

* Refactor showFlags logic

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Co-authored-by: hossainemruz <hossainemruz@gmail.com>
2022-06-13 15:14:39 +00:00
459 changed files with 13961 additions and 7514 deletions
+1
View File
@@ -0,0 +1 @@
node_modules
+12
View File
@@ -0,0 +1,12 @@
env:
browser: true
es2021: true
extends:
- standard
- plugin:no-jquery/all
- prettier
plugins:
- no-jquery
parserOptions:
ecmaVersion: latest
sourceType: module
+2 -2
View File
@@ -6,8 +6,8 @@ title: 'Feature Request'
<!--- <!---
Before filing an issue, please review the following: Before filing an issue, please review the following:
Existing Features: https://github.com/hossainemruz/toha#features Existing Features: https://github.com/hugo-toha/toha#features
Project Roadmap: https://github.com/hossainemruz/toha#project-roadmap Project Roadmap: https://github.com/hugo-toha/toha#project-roadmap
--> -->
### Describe the solution you'd like ### Describe the solution you'd like
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout to latest commit - name: Checkout to latest commit
uses: actions/checkout@v3 uses: actions/checkout@v3.2.0
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
+13 -7
View File
@@ -9,20 +9,26 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
# checkout to the commit that has been pushed # checkout to the commit that has been pushed
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v3.2.0
with: with:
submodules: true # Fetch Hugo themes (true OR recursive) submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# install Hugo - name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install node modules
run: npm install
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2.5.0 uses: peaceiris/actions-hugo@v2.6.0
with: with:
hugo-version: 'latest' hugo-version: 'latest'
extended: true extended: true
# build website
- name: Create Config
run: touch config.toml
- name: Build - name: Build
run: hugo --minify run: |
cd exampleSite
hugo --minify
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3.2.0
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
+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.20.0 - uses: release-drafter/release-drafter@v5.22.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# checkout to latest commit # checkout to latest commit
- uses: actions/checkout@v3 - uses: actions/checkout@v3.2.0
# run markdown linter # run markdown linter
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.14 - uses: gaurav-nelson/github-action-markdown-link-check@1.0.14
+2
View File
@@ -3,3 +3,5 @@ node_modules/
.DS_Store .DS_Store
.history/ .history/
resources/ resources/
public/
.hugo_build.lock
+5
View File
@@ -0,0 +1,5 @@
printWidth: 100
tabWidth: 2
semi: false
singleQuote: true
trailingComma: "all"
+1
View File
@@ -0,0 +1 @@
nodejs 18.12.1
+16 -7
View File
@@ -34,6 +34,7 @@ A [Hugo](https://gohugo.io/) theme for a personal portfolio with minimalist desi
- GoatCounter - GoatCounter
- counter.dev - counter.dev
- Google Analytics - Google Analytics
- Matomo/Piwik
- Comment Support - Comment Support
- [Disqus](https://disqus.com/) - [Disqus](https://disqus.com/)
- [Valine](https://valine.js.org/) - [Valine](https://valine.js.org/)
@@ -58,6 +59,10 @@ For more details about the features please visit [here](https://toha-guides.netl
- русский - русский
- suomi - suomi
- Tiếng Việt - Tiếng Việt
- Turkish
- Arabic (العربية)
- Português
- Català
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).
@@ -145,6 +150,9 @@ params:
# specify whether you want to show Table of Contents in reading page # specify whether you want to show Table of Contents in reading page
enableTOC: true enableTOC: true
# specify whether you want the language flags to be displayed.
showFlags: true
# Provide newsletter configuration. # Provide newsletter configuration.
# This feature has been implemented for Mailchimp only for now. # This feature has been implemented for Mailchimp only for now.
# You can also hide it from the footer. # You can also hide it from the footer.
@@ -240,13 +248,14 @@ Here is the check list for portfolio mode,
- [ ] **Publications** - [ ] **Publications**
- [ ] Category Filter - [x] Category Filter
- [ ] Card - [x] Card
- [ ] Abstract - [x] Tags
- [ ] Authors - [x] Links
- [ ] Tags - [ ] Dedicated Page
- [ ] Links - [ ] Abstract
- [ ] Gallery - [ ] Authors
- [ ] Gallery
- [x] **Accomplishment / Courses** - [x] **Accomplishment / Courses**
+8
View File
@@ -0,0 +1,8 @@
import 'popper.js'
import 'bootstrap'
import '@fortawesome/fontawesome-free/js/all'
import './core'
import './features'
import './sections'
import './pages'
+36
View File
@@ -0,0 +1,36 @@
let deviceState = {
isMobile: false,
isTablet: false,
isLaptop: false
}
function detectDeviceState () {
if (window.innerWidth <= 425) {
deviceState = {
isMobile: true,
isTablet: false,
isLaptop: false
}
} else if (window.innerWidth <= 768) {
deviceState = {
isMobile: false,
isTablet: true,
isLaptop: false
}
} else {
deviceState = {
isMobile: false,
isTablet: false,
isLaptop: true
}
}
}
detectDeviceState()
window.addEventListener('resize', detectDeviceState)
// returns a copy of the device state
// so other parts of code can't override this.
export function getDeviceState () {
return { ...deviceState }
}
+2
View File
@@ -0,0 +1,2 @@
export * from './device'
export * from './insertScript'
+14
View File
@@ -0,0 +1,14 @@
export const insertScript = (id, src, onload) => {
// script is already inserted, do nothing
if (document.getElementById(id)) return
// insert script
const firstScriptTag = document.getElementsByTagName('script')[0]
const scriptTag = document.createElement('script')
scriptTag.id = id
scriptTag.onload = onload
scriptTag.src = src
scriptTag.defer = true
scriptTag.async = true
firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag)
}
@@ -0,0 +1,30 @@
import { enable, disable, auto, setFetchMethod } from 'darkreader'
import * as params from '@params'
const darkreader = params?.darkmode?.darkreader || {}
const defaultColorScheme = darkreader.defaultColorScheme || 'system'
const theme = {
brightness: 100,
contrast: 100,
sepia: 0,
...(darkreader.theme || {})
}
const fixes = {
invert: ['img[src$=".svg"]'],
...(darkreader.fixes || {})
}
setFetchMethod(window.fetch)
export function setSchemeDark () {
enable(theme, fixes)
}
export function setSchemeLight () {
disable()
}
export function setSchemeSystem () {
auto(theme, fixes)
}
export { defaultColorScheme }
+60
View File
@@ -0,0 +1,60 @@
const PERSISTENCE_KEY = 'darkmode:color-scheme'
async function getService () {
if (process.env.FEATURE_DARKMODE_DARKREADER === '1') {
return await import('./darkreader')
}
throw Error(' No service defined for feature darkMode.')
}
window.addEventListener('DOMContentLoaded', async () => {
const menu = document.getElementById('themeMenu')
const $icon = document.getElementById('navbar-theme-icon-svg')
if (menu == null || $icon == null) return
const btns = menu.getElementsByTagName('a')
const iconMap = Array.from(btns).reduce((map, btn) => {
const $img = btn.getElementsByTagName('img')[0]
map[btn.dataset.scheme] = $img.src
return map
}, {})
const {
setSchemeDark,
setSchemeLight,
setSchemeSystem,
defaultColorScheme
} = await getService()
function loadScheme () {
return localStorage.getItem(PERSISTENCE_KEY) || defaultColorScheme
}
function saveScheme (scheme) {
localStorage.setItem(PERSISTENCE_KEY, scheme)
}
function setScheme (newScheme) {
$icon.src = iconMap[newScheme]
if (newScheme === 'dark') {
setSchemeDark()
} else if (newScheme === 'system') {
setSchemeSystem()
} else {
setSchemeLight()
}
saveScheme(newScheme)
}
setScheme(loadScheme())
Array.from(menu.getElementsByTagName('a')).forEach((btn) => {
btn.addEventListener('click', () => {
const { scheme } = btn.dataset
setScheme(scheme)
})
})
})
+165
View File
@@ -0,0 +1,165 @@
import { insertScript } from '../../core'
const PDFJS_BUNDLE = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@3.0.279/build/pdf.min.js'
const WORKER_BUNDLE = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@3.0.279/build/pdf.worker.min.js'
class PDFViewer {
constructor (el) {
const {
url,
hidePaginator,
hideLoader,
scale,
pageNum
} = el.dataset
if (url == null) {
throw new Error('Cannot load PDF! Attribute `data-url` is not set.')
}
// props
this.url = url
this.hidePaginator = hidePaginator !== 'false'
this.hideLoader = hideLoader !== 'false'
this.scale = scale || 3
// initial state
this.pageNum = parseInt(pageNum, 10) || 1
this.loaded = false
this.pageRendering = false
this.pageNumPending = null
// DOM elements
this.canvas = el.getElementsByClassName('pdf-canvas')[0]
if (this.canvas == null) {
throw new Error('canvas element not found!')
};
this.paginator = el.getElementsByClassName('paginator')[0]
this.loadingWrapper = el.getElementsByClassName('loading-wrapper')[0]
this.next = el.getElementsByClassName('next')[0]
this.prev = el.getElementsByClassName('prev')[0]
this.pageNum = el.getElementsByClassName('page-num')[0]
this.pageCount = el.getElementsByClassName('page-count')[0]
// context
this.ctx = this.canvas.getContext('2d')
// events
this.next.addEventListener('click', this.handleNextPage.bind(this))
this.prev.addEventListener('click', this.handlePrevPage.bind(this))
this.showPaginator()
this.showLoader()
this.loadPDF()
}
/**
* If we haven't disabled the loader, show loader and hide canvas
*/
showLoader () {
if (this.hideLoader) return
this.loadingWrapper.style.display = 'flex'
this.canvas.style.display = 'none'
}
/**
* If we haven't disabled the paginator, show paginator
*/
showPaginator () {
if (this.hidePaginator) return
this.paginator.style.display = 'block'
}
/**
* Hides loader and shows canvas
*/
showContent () {
this.loadingWrapper.style.display = 'none'
this.canvas.style.display = 'block'
}
/**
* Asynchronously downloads PDF.
*/
async loadPDF () {
this.pdfDoc = await window.pdfjsLib.getDocument(this.url).promise
this.pageCount.textContent = this.pdfDoc.numPages
// If the user passed in a number that is out of range, render the last page.
if (this.pageNum > this.pdfDoc.numPages) {
this.pageNum = this.pdfDoc.numPages
}
this.renderPage(this.pageNum)
}
/**
* Get page info from document, resize canvas accordingly, and render page.
* @param num Page number.
*/
async renderPage (num) {
this.pageRendering = true
const page = await this.pdfDoc.getPage(num)
const viewport = page.getViewport({ scale: this.scale })
this.canvas.height = viewport.height
this.canvas.width = viewport.width
// Wait for rendering to finish
await page.render({
canvasContext: this.ctx,
viewport
}).promise
this.pageRendering = false
this.showContent()
if (this.pageNumPending !== null) {
// New page rendering is pending
this.renderPage(this.pageNumPending)
this.pageNumPending = null
}
// Update page counters
this.pageNum.textContent = num
}
/**
* If another page rendering in progress, waits until the rendering is
* finished. Otherwise, executes rendering immediately.
*/
queueRenderPage (num) {
if (this.pageRendering) {
this.pageNumPending = num
} else {
this.renderPage(num)
}
}
/**
* Displays previous page.
*/
handlePrevPage () {
if (this.pageNum <= 1) {
return
}
this.pageNum--
this.queueRenderPage(this.pageNum)
}
/**
* Displays next page.
*/
handleNextPage () {
if (this.pageNum >= this.pdfDoc.numPages) {
return
}
this.pageNum++
this.queueRenderPage(this.pageNum)
}
}
insertScript('pdfjs', PDFJS_BUNDLE, () => {
window.pdfjsLib.GlobalWorkerOptions.workerSrc = WORKER_BUNDLE
Array.from(document.getElementsByClassName('pdf-viewer')).forEach(el => new PDFViewer(el))
})
@@ -0,0 +1,3 @@
if (process.env.FEATURE_FLOWCHART_MERMAID === '1') {
import('./mermaid')
}
@@ -0,0 +1,7 @@
import mermaid from 'mermaid'
import * as params from '@params'
const mermaidOptions = params.flowchart?.mermaid || {}
const options = Object.assign({}, mermaidOptions, { startOnLoad: true })
mermaid.initialize(options)
+27
View File
@@ -0,0 +1,27 @@
if (process.env.FEATURE_VIDEOPLAYER === '1') {
import('./videoplayer')
}
if (process.env.FEATURE_TOC === '1') {
import('./toc')
}
if (process.env.FEATURE_DARKMODE === '1') {
import('./darkmode')
}
if (process.env.FEATURE_FLOWCHART === '1') {
import('./flowchart')
}
if (process.env.FEATURE_SYNTAXHIGHLIGHT === '1') {
import('./syntaxhighlight')
}
if (process.env.FEATURE_MATH === '1') {
import('./math')
}
if (process.env.FEATURE_EMBEDPDF === '1') {
import('./embedpdf')
}
+3
View File
@@ -0,0 +1,3 @@
if (process.env.FEATURE_MATH_KATEX === '1') {
import('./katex')
}
+21
View File
@@ -0,0 +1,21 @@
import renderMathInElement from 'katex/contrib/auto-render'
import * as params from '@params'
const defaultOptions = {
delimiters: [
{ left: '$$', right: '$$', display: true },
{ left: '\\[', right: '\\]', display: true },
{ left: '$', right: '$', display: false },
{ left: '\\(', right: '\\)', display: false }
]
}
window.addEventListener('DOMContentLoaded', () => {
renderMathInElement(
document.body,
{
...defaultOptions,
...(params.math?.katex || {})
}
)
})
@@ -0,0 +1,4 @@
import hljs from 'highlight.js'
import * as params from '@params'
hljs.highlightAll(params.syntaxhighlight?.hljs)
@@ -0,0 +1,3 @@
if (process.env.FEATURE_SYNTAXHIGHLIGHT_HLJS === '1') {
import('./hljs')
}
+48
View File
@@ -0,0 +1,48 @@
import { getDeviceState } from '../../core'
// Toggle Table of Contents on click. Here, class "hide" open the toc
function toggleTOC () {
const toc = document.getElementById('toc-section')
if (toc == null) {
return
}
if (toc.classList.contains('hide')) {
toc.classList.remove('hide')
} else {
// if sidebar-section is open, then close it first
const sidebar = document.getElementById('sidebar-section')
if (sidebar != null && sidebar.classList.contains('hide')) {
sidebar.classList.remove('hide')
}
// add "hide" class
toc.classList.add('hide')
// if it is mobile device. then scroll to top.
const { isMobile } = getDeviceState()
if (isMobile && toc.classList.contains('hide')) {
document.body.scrollTop = 0
document.documentElement.scrollTop = 0
}
}
if (document.getElementById('hero-area') != null) {
document.getElementById('hero-area').classList.toggle('hide')
}
}
window.addEventListener('DOMContentLoaded', () => {
// bind click event to #toc-toggle in navbar-2.html
const toggle = document.getElementById('toc-toggler')
if (toggle) toggle.addEventListener('click', toggleTOC)
// hide TOC when user clicks on a TOC link.
// Only applies if it's mobile.
const toc = document.getElementById('TableOfContents')
if (toc) {
toc.addEventListener('click', (event) => {
const { isMobile } = getDeviceState()
if (isMobile && event.target.nodeName === 'A') {
toggleTOC()
}
})
}
})
@@ -0,0 +1,3 @@
if (process.env.FEATURE_VIDEOPLAYER_PLYR === '1') {
import('./plyr')
}
@@ -0,0 +1,5 @@
import Plyr from 'plyr'
import * as params from '@params'
const options = params.videoplayer?.plyr
window.addEventListener('DOMContentLoaded', () => Plyr.setup('.video-player', options))
+16
View File
@@ -0,0 +1,16 @@
import { init } from 'ityped'
// =========== Typing Carousel ================
// get data from hidden ul and set as typing data
document.addEventListener('DOMContentLoaded', () => {
const $ul = document.getElementById('typing-carousel-data')?.children
if ($ul == null || $ul.length === 0) return
const strings = Array.from($ul).map($el => $el.textContent)
init('#ityped', {
strings,
startDelay: 200,
loop: true
})
})
+4
View File
@@ -0,0 +1,4 @@
import './note'
import './search'
import './single'
import './home'
+30
View File
@@ -0,0 +1,30 @@
import imagesLoaded from 'imagesloaded'
document.addEventListener('DOMContentLoaded', function () {
function resizeGridItem (item) {
const grid = document.getElementsByClassName('note-card-holder')[0]
const rowHeight = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-auto-rows'))
const rowGap = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-row-gap'))
const rowSpan = Math.ceil((item.querySelector('.item').getBoundingClientRect().height + rowGap) / (rowHeight + rowGap))
item.style.gridRowEnd = 'span ' + rowSpan
}
function resizeAllGridItems () {
const allItems = document.getElementsByClassName('note-card')
for (let x = 0; x < allItems.length; x++) {
resizeGridItem(allItems[x])
}
}
function resizeInstance (instance) {
const item = instance.elements[0]
resizeGridItem(item)
}
window.addEventListener('resize', resizeAllGridItems)
const allItems = document.getElementsByClassName('note-card')
for (let x = 0; x < allItems.length; x++) {
imagesLoaded(allItems[x], resizeInstance)
}
})
+133
View File
@@ -0,0 +1,133 @@
import Fuse from 'fuse.js'
import Mark from 'mark.js'
window.addEventListener('DOMContentLoaded', () => {
const summaryInclude = 60
const fuseOptions = {
shouldSort: true,
includeMatches: true,
threshold: 0.0,
tokenize: true,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
{ name: 'title', weight: 0.8 },
{ name: 'hero', weight: 0.7 },
{ name: 'summary', weight: 0.6 },
{ name: 'date', weight: 0.5 },
{ name: 'contents', weight: 0.5 },
{ name: 'tags', weight: 0.3 },
{ name: 'categories', weight: 0.3 }
]
}
const searchQuery = param('keyword')
if (searchQuery) {
document.getElementById('search-query').value = searchQuery
executeSearch(searchQuery)
} else {
const node = document.createElement('p')
node.textContent = 'Please enter a word or phrase above'
document.getElementById('search-results')?.append(node)
}
function executeSearch (searchQuery) {
const url = window.location.href.split('/search/')[0] + '/index.json'
fetch(url).then(function (data) {
const pages = data
const fuse = new Fuse(pages, fuseOptions)
const results = fuse.search(searchQuery)
document.getElementById('search-box').value = searchQuery
if (results.length > 0) {
populateResults(results)
} else {
const node = document.createElement('p')
node.textContent = 'No matches found'
document.getElementById('search-results')?.append(node)
}
})
}
function populateResults (results) {
results.forEach(function (value, key) {
const contents = value.item.contents
let snippet = ''
const snippetHighlights = []
if (fuseOptions.tokenize) {
snippetHighlights.push(searchQuery)
} else {
value.matches.forEach(function (mvalue) {
if (mvalue.key === 'tags' || mvalue.key === 'categories') {
snippetHighlights.push(mvalue.value)
} else if (mvalue.key === 'contents') {
const start = mvalue.indices[0][0] - summaryInclude > 0 ? mvalue.indices[0][0] - summaryInclude : 0
const end = mvalue.indices[0][1] + summaryInclude < contents.length ? mvalue.indices[0][1] + summaryInclude : contents.length
snippet += contents.substring(start, end)
snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0], mvalue.indices[0][1] - mvalue.indices[0][0] + 1))
}
})
}
if (snippet.length < 1) {
snippet += contents.substring(0, summaryInclude * 2)
}
// pull template from hugo template definition
const templateDefinition = document.getElementById('search-result-template').innerHTML
// replace values
const output = render(templateDefinition, {
key,
title: value.item.title,
hero: value.item.hero,
date: value.item.date,
summary: value.item.summary,
link: value.item.permalink,
tags: value.item.tags,
categories: value.item.categories,
snippet
})
const doc = new DOMParser().parseFromString(output, 'text/html')
document.getElementById('search-results').append(doc)
snippetHighlights.forEach(function (snipvalue) {
const context = document.getElementById('#summary-' + key)
const instance = new Mark(context)
instance.mark(snipvalue)
})
})
}
function param (name) {
return decodeURIComponent((location.search.split(name + '=')[1] || '').split('&')[0]).replace(/\+/g, ' ')
}
function render (templateString, data) {
let conditionalMatches, copy
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g
// since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop
copy = templateString
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) {
if (data[conditionalMatches[1]]) {
// valid key, remove conditionals, leave contents.
copy = copy.replace(conditionalMatches[0], conditionalMatches[2])
} else {
// not valid, remove entire section
copy = copy.replace(conditionalMatches[0], '')
}
}
templateString = copy
// now any conditionals removed we can do simple substitution
let key, find, re
for (key in data) {
find = '\\$\\{\\s*' + key + '\\s*\\}'
re = new RegExp(find, 'g')
templateString = templateString.replace(re, data[key])
}
return templateString
}
})
+60
View File
@@ -0,0 +1,60 @@
window.addEventListener('DOMContentLoaded', () => {
// =========== Add anchor to the headers ================
function addAnchor (element) {
element.innerHTML = `<a href="#${element.id}" class="header-anchor">${element.innerHTML}<sup><i class="fas fa-link fa-sm"></i></sup></a>`
}
const postContent = document.getElementById('post-content')
if (postContent != null) {
const headerTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
for (let i = 0; i < headerTypes.length; i++) {
const headers = postContent.querySelectorAll(headerTypes[i])
if (headers) {
headers.forEach(addAnchor)
}
}
}
// =============== Make TOC Compatible wit Bootstrap Scroll Spy ========
// add "navbar" class to the "nav" element
const toc = document.getElementById('TableOfContents')
if (toc) {
toc.classList.add('navbar')
// add "nav-pills" class to the "ul" elements
let elems = toc.getElementsByTagName('ul')
for (let i = 0; i < elems.length; i++) {
elems[i].classList.add('nav-pills')
}
// add "nav-item" class to the "li" elements
elems = toc.getElementsByTagName('li')
for (let i = 0; i < elems.length; i++) {
elems[i].classList.add('nav-item')
}
// add "nav-link" class to the "a" elements
elems = toc.getElementsByTagName('a')
for (let i = 0; i < elems.length; i++) {
elems[i].classList.add('nav-link')
}
}
// add scroll to top button
const btn = document.getElementById('scroll-to-top')
if(btn) {
window.addEventListener('scroll', function () {
if (window.scrollY > 300) {
btn.classList.add('show')
} else {
btn.classList.remove('show')
}
})
btn.addEventListener('click', function (e) {
e.preventDefault()
window.scrollTo({
top: 0,
behavior: 'smooth'
})
})
}
})
+3
View File
@@ -0,0 +1,3 @@
export const process = {
env: {}
}
+220
View File
@@ -0,0 +1,220 @@
import { getDeviceState } from '../core'
function fourColumRow (gallery, entries, i) {
const entry1 = document.createElement('div')
entry1.classList.add('col-lg-6', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-1')
gallery.appendChild(entry1)
i++
const entry2 = document.createElement('div')
entry2.classList.add('col-lg-3', 'm-0', 'p-0')
entry2.appendChild(entries[i].cloneNode(true))
entry2.children[0].classList.add('img-type-1')
gallery.appendChild(entry2)
i++
const entry3 = document.createElement('div')
entry3.classList.add('col-lg-3', 'm-0', 'p-0')
entry3.appendChild(entries[i].cloneNode(true))
entry3.children[0].classList.add('img-type-2')
i++
entry3.appendChild(entries[i].cloneNode(true))
entry3.children[1].classList.add('img-type-2')
gallery.appendChild(entry3)
i++
}
function fourColumnReversedRow (gallery, entries, i) {
const entry1 = document.createElement('div')
entry1.classList.add('col-lg-3', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-2')
i++
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[1].classList.add('img-type-2')
gallery.appendChild(entry1)
i++
const entry2 = document.createElement('div')
entry2.classList.add('col-lg-3', 'm-0', 'p-0')
entry2.appendChild(entries[i].cloneNode(true))
entry2.children[0].classList.add('img-type-1')
gallery.appendChild(entry2)
i++
const entry3 = document.createElement('div')
entry3.classList.add('col-lg-6', 'm-0', 'p-0')
entry3.appendChild(entries[i].cloneNode(true))
entry3.children[0].classList.add('img-type-1')
gallery.appendChild(entry3)
i++
}
function threeColumnRow (gallery, entries, i) {
console.log(i)
const entry1 = document.createElement('div')
entry1.classList.add('col-lg-6', 'col-md-6', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-1')
gallery.appendChild(entry1)
i++
const entry2 = document.createElement('div')
entry2.classList.add('col-lg-3', 'col-md-3', 'm-0', 'p-0')
entry2.appendChild(entries[i].cloneNode(true))
entry2.children[0].classList.add('img-type-1')
gallery.appendChild(entry2)
i++
const entry3 = document.createElement('div')
entry3.classList.add('col-lg-3', 'col-md-3', 'm-0', 'p-0')
entry3.appendChild(entries[i].cloneNode(true))
entry3.children[0].classList.add('img-type-1')
gallery.appendChild(entry3)
i++
}
function threeColumnReversedRow (gallery, entries, i) {
const entry1 = document.createElement('div')
entry1.classList.add('col-lg-3', 'col-md-3', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-1')
gallery.appendChild(entry1)
i++
const entry2 = document.createElement('div')
entry2.classList.add('col-lg-3', 'col-md-3', 'm-0', 'p-0')
entry2.appendChild(entries[i].cloneNode(true))
entry2.children[0].classList.add('img-type-1')
gallery.appendChild(entry2)
i++
const entry3 = document.createElement('div')
entry3.classList.add('col-lg-6', 'col-md-3', 'm-0', 'p-0')
entry3.appendChild(entries[i].cloneNode(true))
entry3.children[0].classList.add('img-type-1')
gallery.appendChild(entry3)
i++
}
function twoColumnRow (gallery, entries, i) {
const entry1 = document.createElement('div')
entry1.classList.add('col-6', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-1')
gallery.appendChild(entry1)
i++
const entry2 = document.createElement('div')
entry2.classList.add('col-6', 'm-0', 'p-0')
entry2.appendChild(entries[i].cloneNode(true))
entry2.children[0].classList.add('img-type-1')
gallery.appendChild(entry2)
i++
}
function singleColumnRow (gallery, entries, i) {
const entry1 = document.createElement('div')
entry1.classList.add('col-12', 'm-0', 'p-0')
entry1.appendChild(entries[i].cloneNode(true))
entry1.children[0].classList.add('img-type-1')
gallery.appendChild(entry1)
i++
}
function showAchievements () {
const { isLaptop, isTablet } = getDeviceState()
// show achievements from achievements-holder div
const gallery = document.getElementById('gallery')
if (gallery == null) {
return
}
gallery.innerHTML = ''
const entries = document.getElementById('achievements-holder').children
let len = entries.length
let i = 0
let rowNumber = 1
while (i < len) {
if (isLaptop) {
if (i + 4 <= len) {
if (rowNumber % 2) {
fourColumRow(gallery, entries, i)
} else {
fourColumnReversedRow(gallery, entries, i)
}
i += 4
} else if (i + 3 <= len) {
if (rowNumber % 2) {
threeColumnRow(gallery, entries, i)
} else {
threeColumnReversedRow(gallery, entries, i)
}
i += 3
} else if (i + 2 <= len) {
twoColumnRow(gallery, entries, i)
i += 2
} else {
singleColumnRow(gallery, entries, i)
i++
}
} else if (isTablet) {
if (i + 2 <= len) {
twoColumnRow(gallery, entries, i)
i += 2
} else {
singleColumnRow(gallery, entries, i)
i++
}
} else {
singleColumnRow(gallery, entries, i)
i++
}
rowNumber++
}
// show full image on click
const elements = document.getElementsByClassName('achievement-entry')
len = elements.length
for (let i = 0; i < len; i++) {
elements[i].onclick = function () {
const achievements = document.getElementsByClassName('achievement-entry')
const len2 = achievements.length
for (let j = 0; j < len2; j++) {
achievements[j].classList.toggle('hidden')
}
this.classList.toggle('achievement-details')
this.classList.toggle('hidden')
this.parentElement.classList.toggle('col-lg-12')
this.parentElement.classList.toggle('col-md-12')
this.parentElement.classList.toggle('col-sm-12')
if (this.children.SmallImage.hasAttribute('active')) {
const mainLogo = this.children.LargeImage.getAttribute('Style')
this.children.LargeImage.setAttribute('active', true)
this.children.SmallImage.removeAttribute('active')
this.setAttribute('Style', mainLogo)
} else {
const mainLogo = this.children.SmallImage.getAttribute('Style')
this.children.SmallImage.setAttribute('active', true)
this.children.LargeImage.removeAttribute('active')
this.setAttribute('Style', mainLogo)
}
if (this.children.caption !== undefined) {
this.children.caption.classList.toggle('hidden')
}
if (this.children['enlarge-icon'] !== undefined) {
this.getElementsByClassName('fa-xmark')[0].classList.toggle('hidden')
this.getElementsByClassName('fa-magnifying-glass-plus')[0].classList.toggle('hidden')
}
if (this.children['achievement-title'] !== undefined) {
this.children['achievement-title'].classList.toggle('hidden')
}
}
}
}
['DOMContentLoaded', 'resize'].forEach((event) =>
document.addEventListener(event, showAchievements))
+33
View File
@@ -0,0 +1,33 @@
// Show more rows in the taken courses table
function toggleCourseVisibility (elem) {
// find the courses
const courses = elem.parentNode.getElementsByClassName('course')
if (courses == null) {
return
}
// toggle hidden-course class from the third elements
for (const course of courses) {
if (course.classList.contains('hidden-course') || course.classList.contains('toggled-hidden-course')) {
course.classList.toggle('hidden-course')
course.classList.add('toggled-hidden-course')
}
}
// toggle the buttons visibility
const buttonsToToggle = elem.parentNode.getElementsByClassName('show-more-btn')
for (const buttonToToggle of buttonsToToggle) {
buttonToToggle.classList.toggle('hidden')
}
}
window.addEventListener('DOMContentLoaded', () => {
const els = [
document.getElementById('show-more-btn'),
document.getElementById('show-less-btn')
]
els.filter((el) => el != null).forEach((el) =>
el.addEventListener('click', ({ target }) =>
toggleCourseVisibility(target)))
})
+7
View File
@@ -0,0 +1,7 @@
import './navbar'
import './sidebar'
import './education'
import './achievements'
import './projects'
import './publications'
+60
View File
@@ -0,0 +1,60 @@
const updateNavBar = () => {
const topNavbar = document.getElementById('top-navbar')
const navbarToggler = document.getElementById('navbar-toggler')
const themeIcon = document.getElementById('navbar-theme-icon-svg')
if (window.scrollY > 40) {
topNavbar?.classList.remove('initial-navbar')
topNavbar?.classList.add('final-navbar', 'shadow')
navbarToggler?.classList.remove('navbar-dark')
navbarToggler?.classList.add('navbar-light')
// color theme selector a.k.a. dark mode
themeIcon?.classList.remove('navbar-icon-svg-dark')
// get the main logo from hidden img tag
const mainLogo = document.getElementById('main-logo')
if (mainLogo) {
const logoURL = mainLogo.getAttribute('src')
document.getElementById('logo')?.setAttribute('src', logoURL)
}
} else {
topNavbar?.classList.remove('final-navbar', 'shadow')
topNavbar?.classList.add('initial-navbar')
navbarToggler?.classList.remove('navbar-light')
navbarToggler?.classList.add('navbar-dark')
// color theme selector a.k.a. dark mode
themeIcon?.classList.add('navbar-icon-svg-dark')
// get the inverted logo from hidden img tag
const invertedLogo = document.getElementById('inverted-logo')
if (invertedLogo) {
const logoURL = invertedLogo.getAttribute('src')
document.getElementById('logo')?.setAttribute('src', logoURL)
}
}
}
document.addEventListener('DOMContentLoaded', function () {
// change navbar style on scroll
// ==================================================
// When the user scrolls down 80px from the top of the document,
// resize the navbar's padding and the logo's font size
document.addEventListener('scroll', updateNavBar)
// Creates a click handler to collapse the navigation when
// anchors in the mobile nav pop up are clicked
const navMain =document.getElementsByClassName('navbar-collapse')
Array.from(navMain).forEach(function(el) {
el.addEventListener('click', function (e) {
if (e.target.tagName === 'A') {
el.classList.add('collapse')
}
})
})
updateNavBar()
})
+19
View File
@@ -0,0 +1,19 @@
import Filterizr from 'filterizr'
import { insertScript } from '../core'
document.addEventListener('DOMContentLoaded', () => {
// ================== Project cards =====================
// setup project filter buttons
const projectCardHolder = document.getElementById('project-card-holder')
if (projectCardHolder != null && projectCardHolder.children.length !== 0) {
// eslint-disable-next-line no-new
new Filterizr('.filtr-projects', {
layout: 'sameWidth',
controlsSelector: '.project-filtr-control'
})
}
})
// dynamically insert github buttons script.
insertScript('github-buttons', 'https://buttons.github.io/buttons.js')
+13
View File
@@ -0,0 +1,13 @@
import Filterizr from 'filterizr'
document.addEventListener('DOMContentLoaded', () => {
const publicationCardHolder = document.getElementById('publication-card-holder')
if (publicationCardHolder != null && publicationCardHolder.children.length !== 0) {
// eslint-disable-next-line no-new
new Filterizr('.filtr-publications', {
layout: 'sameWidth',
gridItemsSelector: '.pub-filtr-item',
controlsSelector: '.pub-filtr-control'
})
}
})
+38
View File
@@ -0,0 +1,38 @@
import { getDeviceState } from '../core/device'
// Toggle sidebar on click. Here, class "hide" open the sidebar
function toggleSidebar () {
const sidebar = document.getElementById('sidebar-section')
if (sidebar == null) {
return
}
if (sidebar.classList.contains('hide')) {
sidebar.classList.remove('hide')
} else {
// if toc-section is open, then close it first
const toc = document.getElementById('toc-section')
if (toc != null && toc.classList.contains('hide')) {
toc.classList.remove('hide')
}
// add "hide" class
sidebar.classList.add('hide')
// if it is mobile device. then scroll to top.
const { isMobile } = getDeviceState()
if (isMobile && sidebar.classList.contains('hide')) {
document.body.scrollTop = 0
document.documentElement.scrollTop = 0
if (document.getElementById('hero-area') != null) {
document.getElementById('hero-area').classList.toggle('hide')
}
}
}
if (document.getElementById('content-section') != null) {
document.getElementById('content-section').classList.toggle('hide')
}
}
window.addEventListener('DOMContentLoaded', () => {
// bind click event to #sidebar-toggler in navbar-2.html
const toggle = document.getElementById('sidebar-toggler')
if (toggle) toggle.addEventListener('click', toggleSidebar)
})
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+1 -1
View File
@@ -43,7 +43,7 @@ Esto expone los valores en /index.json: por ejemplo, para agregar `categories`
\``` \```
### Editar las opciones de fuse.js para buscar ### Editar las opciones de fuse.js para buscar
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -13,7 +13,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -41,7 +41,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+1 -1
View File
@@ -43,7 +43,7 @@ Esto expone los valores en /index.json: por ejemplo, para agregar `categories`
\``` \```
### Editar las opciones de fuse.js para buscar ### Editar las opciones de fuse.js para buscar
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+2 -2
View File
@@ -15,7 +15,7 @@ No content shown here is rendered, all content is based in the template layouts/
Setting a very low sitemap priority will tell search engines this is not important content. Setting a very low sitemap priority will tell search engines this is not important content.
This implementation uses Fusejs, jquery and mark.js This implementation uses Fusejs and mark.js
## Initial setup ## Initial setup
@@ -43,7 +43,7 @@ i.e. add `category`
\``` \```
### Edit fuse.js options to Search ### Edit fuse.js options to Search
`static/js/search.js` `assets/scripts/pages/search.js`
\``` \```
keys: [ keys: [
"title", "title",
+292
View File
@@ -0,0 +1,292 @@
baseURL: http://example.org/
languageCode: en-us
title: Example Site
module:
imports:
- path: github.com/hugo-toha/hugo-toha.github.io
disable: false
mounts:
- source: content
target: content
- source: layouts
target: layouts
- source: data
target: data
- source: assets
target: assets
- source: static
target: static
- path: github.com/hugo-toha/toha/v4
# Manage languages
# For any more details, you can check the official documentation: https://gohugo.io/content-management/multilingual/
languages:
en:
languageName: English
weight: 1
bn:
languageName: বাংলা
weight: 3
# Force a locale to be use, really useful to develop the application ! Should be commented in production, the "weight" should rocks.
# DefaultContentLanguage: bn
# Allow raw html in markdown file
markup:
goldmark:
renderer:
unsafe: true
tableOfContents:
startLevel: 2
endLevel: 6
ordered: false
# At least HTML and JSON are required for the main HTML content and
# client-side JavaScript search
outputs:
home:
- HTML
- RSS
- JSON
# Enable global emoji support
enableEmoji: true
# Site parameters
params:
# Background image of the landing page
background: /images/site/background.jpg
# Provide logos for your site. The inverted logo will be used in the initial
# transparent navbar and the main logo will be used in the non-transparent navbar.
logo:
main: /images/site/main-logo.png
inverted: /images/site/inverted-logo.png
favicon: /images/site/favicon.png
# GitHub repo of your site
gitRepo: https://github.com/hugo-toha/hugo-toha.github.io
# Default branch of your Git repo
gitBranch: main
# Configure the number of section title visible in the top navbar
topNavbar:
maxVisibleSections: 5
# Configure various features of this theme
features:
# Enable dark theme
darkMode:
enable: false
services:
darkreader:
defaultColorScheme: system # options are 'system', 'dark', 'light'
fixes:
invert: ['img[src$=".svg"]'] # inverts svg colors.
theme:
brightness: 100
contrast: 100
sepia: 0
# Enable and configure portfolio
portfolio:
enable: true
# Enable and configure blog posts
blog:
enable: true
# Share post on different social media
shareButtons:
facebook: true
twitter: true
linkedin: true
reddit: true
whatsapp: true
email: true
# tumblr: true
# pocket: true
# diaspora: true
# mastodon: true
# Enable & configure "Notes" features
notes:
enable: true
# Enable comment feature. There, should be only one of them.
comment:
enable: false
services:
disqus:
shortName: toha-example-site
# valine:
# appId: HTV6askWxVo3vOxlqjjaq2hd-MsYXbMMI
# appKey: pVrT3C85KGIuk27t07eh6bUC
# avatar: retro
# placeholder: Share your thought.
# lang: en
# recordIP: true
# enableQQ: true
# utteranc:
# repo: github.com/hugo-toha/hugo-toha.github.io
# issueTerm: title
# theme: github-light
# giscus:
# repo: your-repo/name
# repoID: your-repo-id
# category: your-category
# categoryID: your-category-id
# theme: light
# map: url
# reaction: 1
# metadata: 0
# inputPosition: bottom
# crossOrigin: anonymous
# commento:
# serverURL: cdn.commento.io
# autoInit: true
# hideDeleted: false
# Enable Analytics
analytics:
enabled: false
services:
# Google Analytics
google:
id: G-H4LBG7NDFZ
# # CounterDev
# counterDev:
# id: <your counterdev id>
# # GoatCounter
# goatCounter:
# code: <your goat counter code>
# # Matomo / Piwik
# matomo:
# instance: matomo.example.com
# siteId: 1 # Or any other number
# Enable Support
support:
enable: false
services:
kofi:
user: hossainemruz
text: Tip Me
textColor: '#f9fafc'
backgroundColor: '#248aaa'
# buymeacoffee:
# user: <your buymeacoffee.com user>
# text: Support me on Buy me a coffee!
# info: Buy me a coffee!
# color: '#FFDD00'
# specify whether you want to show Table of Contents in reading page
toc:
enable: true
# Show tags under the post title
tags:
enable: true
# Specify whether to show flag in the language selector. Default is true.
flags:
enable: true
# # If you want to use different country flag for a language, specify them here.
# flagOverwrites:
# - languageCode: en
# countryCode: us
# Enable this to use `embed-pdf` shortcode.
embedpdf:
enable: false
# Enable this to create flowcharts using shortcodes.
flowchart:
enable: false
services:
# Uncomment for `mermaid` shortcode.
mermaid:
# For config options, see: https://mermaid-js.github.io/mermaid/#/Setup?id=configuration
# theme: dark
# Enable this to create mathematic expressions using `$$` blocks
math:
enable: false
services:
# https://katex.org/docs/autorender.html#api for more configurations
katex:
delimiters:
- left: $$
right: $$
display: true
- left: \\[
right: \\]
display: true
- left: $
right: $
display: false
- left: \\(
right: \\)
display: false
# Enable to use custom syntax highlight
# Please note, Hugo comes with it's own html based syntax highlighter.
# Your code block will still be syntax highlighted by hugo.
# For more details: https://gohugo.io/content-management/syntax-highlighting/
# To disable Hugo's builtin syntax highlight,
# see: https://gohugo.io/getting-started/configuration-markup#highlight
# ```
# # config.yaml
# markup:
# # this disables hugo's syntax highlighting.
# codeFences: false
# ```
syntaxHighlight:
enable: true
services:
hljs:
# see: https://highlightjs.readthedocs.io/en/latest/api.html#configure
noHighlightRe: /^no-highlight$/i
# Enable to use `video-player` shortcode
videoPlayer:
enable: false
services:
# convert .js-player class into video player via https://plyr.io/
# Can play HTML5 Video, Audio, Youtube, Vimeo.
# For more info on setup: https://github.com/sampotts/plyr#quick-setup
plyr:
# options doc: https://github.com/sampotts/plyr#options
# fullscreen: true
# Provide footer configuration.
footer:
enable: true
# You can provide your custom footer template using this option.
# Put your template in "layouts/partials" folder of your repo.
template: footer.html
# Show/hide navigation in the footer. Default is "true".
navigation:
enable: true
# show custom menus in the footer
customMenus: true
# Show/hide "Contact Me" section in the footer. Default is "true".
contactMe:
enable: true
# Show/hide credentials section in the footer. Default is "true".
credentials:
enable: true
# Show/hide newsletter section in the footer. Default is "true".
# Currently, it supports "mailchimp".
newsletter:
enable: true
provider: mailchimp
mailchimpURL: https://github.us1.list-manage.com/subscribe/post?u=19de52a4603135aae97163fd8&amp;id=094a24c76e
# Show/hide disclaimer notice in the footer. Default is "false".
disclaimer:
enable: true
+7
View File
@@ -0,0 +1,7 @@
module github.com/hugo-toha/toha/exampleSite
go 1.19
require github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6 // indirect
replace github.com/hugo-toha/toha/v4 => ../../toha
+2
View File
@@ -0,0 +1,2 @@
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6 h1:TPFhOZAnuH4wjLIdzimswCRa2qCcc1teKVTatADJU2g=
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6/go.mod h1:OMMaP9Hh9NsKd41lVIazBQRPa0s6Z57AfJoY3DcCNNY=
+3
View File
@@ -0,0 +1,3 @@
module github.com/hugo-toha/toha/v4
go 1.19
+126
View File
@@ -0,0 +1,126 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "Inici"
[posts]
other = "Publicacions"
[toc_heading]
other = "Taula de Continguts"
[tags]
other = "Etiquetes"
[categories]
other = "Categories"
[at]
other = "a"
[resume]
other = "El meu currículum"
[navigation]
other = "Navegació"
[contact_me]
other = "Contacta'm:"
[email]
other = "Correu electrònic"
[phone]
other = "Telèfon"
[newsletter_text]
other = "Subscriure's"
[newsletter_input_placeholder]
other = "Entra l'email"
[newsletter_warning]
other = "Al entrar la vostra direcció de correu electrònic, esteu acceptant rebre el butlletí d'aquest lloc web."
[submit]
other = "Enviar"
[hugoAttributionText]
other = "Impulsat per"
[prev]
other = "Anterior"
[next]
other = "Següent"
[share_on]
other = "Compartir a"
[improve_this_page]
other = "Millorar aquesta pàgina"
[out_of]
other = "de"
[publications]
other = "Publicacions"
[taken_courses]
other = "Cursos realitzats"
[course_name]
other = "Nom del curs"
[total_credit]
other = "Crèdits Totals"
[obtained_credit]
other = "Crèdits Obtinguts"
[extracurricular_activities]
other = "Activitats Extracurriculars"
[show_more]
other = "Mostra'n més"
[show_less]
other = "Mostra'n menys"
[responsibilities]
other = "Responsabilitats:"
[present]
other = "Actualitat"
[comments_javascript]
other = "Si us plau, activa Javascript per mostrar"
[comments_by]
other = "Comentaris per"
[read]
other = "Llegir"
[project_star]
other = "Preferit"
[project_details]
other = "Detalls"
[err_404]
other = "La pàgina que està cercant encara no existeix."
[more]
other = "Més"
[view_certificate]
other = "Mostrar Certificat"
[notes]
other = "Notes"
[disclaimer_text]
other = "Avís de Responsabilitat"
[search]
other = "Cerca"
+126
View File
@@ -0,0 +1,126 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "الصفحة الرئيسية"
[posts]
other = "المنشورات"
[toc_heading]
other = "قائمة المحتويات"
[tags]
other = "الوسوم"
[categories]
other = "الأقسام"
[at]
other = "at"
[resume]
other = "سيرتي الذاتية"
[navigation]
other = "التصفح"
[contact_me]
other = "اتصل بي:"
[email]
other = "البريد الإلكتروني"
[phone]
other = "الهاتف"
[newsletter_text]
other = "ابق على اتصال من خلال القائمة البريدية"
[newsletter_input_placeholder]
other = "ادخل بريدك الالكتروني"
[newsletter_warning]
other = "بإدخال بريدك الإلكتروني، أنت توافق على تلقي رسائل إلكترونية دورية من هذا الموقع."
[submit]
other = "إرسال"
[hugoAttributionText]
other = "صنع باستخدام"
[prev]
other = "السابق"
[next]
other = "التالي"
[share_on]
other = "المشاركة على"
[improve_this_page]
other = "ساعد في تحسين هذه الصفحة"
[out_of]
other = "من"
[publications]
other = "المنشورات"
[taken_courses]
other = "الدروس"
[course_name]
other = "اسم المادة"
[total_credit]
other = "العلامة العامة"
[obtained_credit]
other = "العلامة"
[extracurricular_activities]
other = "نشاطات خارجية"
[show_more]
other = "إظهار المزيد"
[show_less]
other = "إخفاء"
[responsibilities]
other = "المسؤوليات:"
[present]
other = "حاليا"
[comments_javascript]
other = "من فضلك قم بتفعيل جافاسكريب لإظهار"
[comments_by]
other = "التعليقات موفرة بواسطة"
[read]
other = "قراءة"
[project_star]
other = "نجمة"
[project_details]
other = "التفاصيل"
[err_404]
other = "الصفحة التي تبحث عنها ليست بعد هناك."
[more]
other = "المزيد"
[view_certificate]
other = "إظهار الشهادة"
[notes]
other = "ملاحظات"
[disclaimer_text]
other = "إشعار بالمسؤولية"
[search]
other = "بحث"
+3 -3
View File
@@ -72,10 +72,10 @@ other = "Belegte Kurse"
other = "Kursname" other = "Kursname"
[total_credit] [total_credit]
other = "Gesamtguthaben" other = "Mögliche Punktzahl"
[obtained_credit] [obtained_credit]
other = "Erhaltenes Guthaben" other = "Note"
[extracurricular_activities] [extracurricular_activities]
other = "Außerschulische Aktivitäten" other = "Außerschulische Aktivitäten"
@@ -108,7 +108,7 @@ other = "Star"
other = "Details" other = "Details"
[err_404] [err_404]
other = "Die Seite nach der Seite ist noch nicht vorhanden." other = "Die von Ihnen gesuchte Seite ist noch nicht vorhanden."
[more] [more]
other = "Mehr" other = "Mehr"
+1 -1
View File
@@ -87,7 +87,7 @@ other = "En savoir plus"
other = "Montrer moins" other = "Montrer moins"
[responsibilities] [responsibilities]
other = "Responsabilitiés :" other = "Responsabilités :"
[present] [present]
other = "Aujourd'hui" other = "Aujourd'hui"
+29 -28
View File
@@ -1,11 +1,11 @@
[home] [home]
other = "Startseite" other = "Hoofdpagina"
[posts] [posts]
other = "Beiträge" other = "Posts"
[toc_heading] [toc_heading]
other = "Inhaltsverzeichnis" other = "Inhoudsopgave"
[tags] [tags]
other = "Tags" other = "Tags"
@@ -14,49 +14,49 @@ other = "Tags"
other = "Categorieën" other = "Categorieën"
[at] [at]
other = "bei" other = "bij"
[resume] [resume]
other = "Mein Lebenslauf" other = "Curriculum Vitae"
[navigation] [navigation]
other = "Navigation" other = "Navigatie"
[contact_me] [contact_me]
other = "Kontakt aufnehmen" other = "Contactgegevens"
[email] [email]
other = "E-Mail" other = "E-Mail"
[phone] [phone]
other = "Telefon" other = "Telefoon"
[newsletter_text] [newsletter_text]
other = "Mit dem Newsletter auf dem neuesten Stand bleiben" other = "Ontvang updates via email"
[newsletter_input_placeholder] [newsletter_input_placeholder]
other = "E-Mail-Adresse eingeben" other = "Email ingeven"
[newsletter_warning] [newsletter_warning]
other = "Door uw e-mailadres in te voeren, gaat u akkoord met het ontvangen van de nieuwsbrief van deze website." other = "Door uw e-mailadres in te voeren, gaat u akkoord met het ontvangen van de nieuwsbrief van deze website."
[submit] [submit]
other = "Absenden" other = "Opslaan"
[hugoAttributionText] [hugoAttributionText]
other = "Unterstützt von" other = "Mogelijk gemaakt met"
[prev] [prev]
other = "Vorherige" other = "Vorige"
[next] [next]
other = "Nächste" other = "Volgende"
# [share_on] [share_on]
# other = "Share on" other = "Delen op"
[improve_this_page] [improve_this_page]
other = "Diese Seite verbessern" other = "Deze pagina verbeteren"
[out_of] [out_of]
other = "van de" other = "van de"
@@ -65,7 +65,7 @@ other = "van de"
other = "Publicaties" other = "Publicaties"
[taken_courses] [taken_courses]
other = "Cursussen gevolgd" other = "Gevolgde cursussen"
[course_name] [course_name]
other = "Cursus naam" other = "Cursus naam"
@@ -85,11 +85,11 @@ other = "Bekijk meer"
[show_less] [show_less]
other = "Laat minder zien" other = "Laat minder zien"
# [responsibilities] [responsibilities]
# other = "Responsibilities:" other = "Verantwoordelijkheden:"
# [present] [present]
# other = "Present" other = "Heden"
# [comments_javascript] # [comments_javascript]
# other = "Please enable JavaScript to view the" # other = "Please enable JavaScript to view the"
@@ -103,11 +103,11 @@ other = "Laat minder zien"
# [project_star] # [project_star]
# other = "Star" # other = "Star"
# [project_details] [project_details]
# other = "Details" other = "Details"
# [err_404] [err_404]
# other = "The page you are looking for is not there yet." other = "De pagina waar je voor zoekt bestaat nog niet."
[more] [more]
other = "Meer" other = "Meer"
@@ -119,6 +119,7 @@ other = "Bekijk certificaat"
other = "Opmerkingen" other = "Opmerkingen"
[disclaimer_text] [disclaimer_text]
other = "Haftungshinweis" other = "Aansprakelijkheidsverklaring"
[search] [search]
other = "Zoekopdracht" other = "Zoek"
+126
View File
@@ -0,0 +1,126 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "Início"
[posts]
other = "Artigos"
[toc_heading]
other = "Tabela de conteúdos"
[tags]
other = "Etiquetas"
[categories]
other = "Categorias"
[at]
other = "em"
[resume]
other = "O meu Currículo"
[navigation]
other = "Navegação"
[contact_me]
other = "Contacte-me:"
[email]
other = "Email"
[phone]
other = "Telefone"
[newsletter_text]
other = "Mantenha-se actualizado com notificações por email"
[newsletter_input_placeholder]
other = "Inserir email"
[newsletter_warning]
other = "Ao submeter o seu endereço de email, concorda em receber a newsletter deste website."
[submit]
other = "Enviar"
[hugoAttributionText]
other = "Desenvolvido por"
[prev]
other = "Anterior"
[next]
other = "Próximo"
[share_on]
other = "Partilha"
[improve_this_page]
other = "Melhore esta página"
[out_of]
other = "de"
[publications]
other = "Publicações"
[taken_courses]
other = "Cursos frequentados"
[course_name]
other = "Nome do Curso"
[total_credit]
other = "Créditos Totais"
[obtained_credit]
other = "Créditos Obtidos"
[extracurricular_activities]
other = "Actividades Extracurriculares"
[show_more]
other = "Ver Mais"
[show_less]
other = "Ver Menos"
[responsibilities]
other = "Responsabilidades:"
[present]
other = "Presente"
[comments_javascript]
other = "Por favor active JavaScript para ver o"
[comments_by]
other = "comentários por"
[read]
other = "Ler"
[project_star]
other = "Star"
[project_details]
other = "Detalhes"
[err_404]
other = "A página que procura ainda não está aqui."
[more]
other = "Mais"
[view_certificate]
other = "Ver Certificado"
[notes]
other = "Notas"
[disclaimer_text]
other = "Nota legal"
[search]
other = "Pesquisar"
+126
View File
@@ -0,0 +1,126 @@
# More documentation here: https://github.com/nicksnyder/go-i18n
[home]
other = "Anasayfa"
[posts]
other = "Gönderiler"
[toc_heading]
other = "İçerik Tablosu"
[tags]
other = "Etiketler"
[categories]
other = "Kategoriler"
[at]
other = ","
[resume]
other = "Özgeçmişim"
[navigation]
other = "Menü"
[contact_me]
other = "İletişime geç:"
[email]
other = "E-Posta"
[phone]
other = "Telefon"
[newsletter_text]
other = "Yeni içeriklerden haberdar olmak için E-Posta adresinizi giriniz."
[newsletter_input_placeholder]
other = "E-Posta adresi giriniz."
[newsletter_warning]
other = "E-Posta adresini girerseniz, bu web sitesinin haber bültenini almayı kabul ediyorsunuz."
[submit]
other = "Onayla"
[hugoAttributionText]
other = ""
[prev]
other = "Önceki"
[next]
other = "Sonraki"
[share_on]
other = "Paylaş"
[improve_this_page]
other = "Bu sayfaya katkıda bulunun"
[out_of]
other = "/"
[publications]
other = "Akademik Yayınlar"
[taken_courses]
other = "Alınan Dersler"
[course_name]
other = "Ders Adı"
[total_credit]
other = "Üzerinden"
[obtained_credit]
other = "Alınan Not"
[extracurricular_activities]
other = "Ders Dışı Aktiviteler"
[show_more]
other = "Devamını Göster"
[show_less]
other = "Gizle"
[responsibilities]
other = "Sorumluluklar:"
[present]
other = "Halen"
[comments_javascript]
other = "Görüntüleyebilmek için lüften Javascript etkinleştirin"
[comments_by]
other = "comments powered by"
[read]
other = "Oku"
[project_star]
other = "Star"
[project_details]
other = "Detaylar"
[err_404]
other = "Aradığınız sayfa bulunamadı."
[more]
other = "Devamını Göster"
[view_certificate]
other = "Sertifikayı Görüntüle"
[notes]
other = "Notlar"
[disclaimer_text]
other = "Yükümlülük Bildirisi"
[search]
other = "Ara"
@@ -0,0 +1 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
+1 -1
View File
@@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}} {{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}} {{- range (where .Site.RegularPages "Layout" "!=" "search") -}}
{{- $.Scratch.Add "index" (dict "title" .Title "hero" (partial "helpers/get-hero.html" .) "date" (.Date.Format "January 2, 2006") "summary" .Summary "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} {{- $.Scratch.Add "index" (dict "title" .Title "hero" (partial "helpers/get-hero.html" .) "date" (.Date.Format "January 2, 2006") "summary" .Summary "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
{{- end -}} {{- end -}}
{{- $.Scratch.Get "index" | jsonify -}} {{- $.Scratch.Get "index" | jsonify -}}
-4
View File
@@ -55,7 +55,3 @@
</div> </div>
</section> </section>
{{ end }} {{ end }}
{{ define "scripts" }}
<script src="{{ "/js/list.js" | relURL }}"></script>
{{ end }}
-6
View File
@@ -66,9 +66,3 @@
</div> </div>
</section> </section>
{{ end }} {{ end }}
{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.0/fuse.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js"></script>
<script src="{{ "/js/search.js" | absURL }}"></script>
{{ end }}
+8 -19
View File
@@ -24,7 +24,7 @@
</form> </form>
<div class="sidebar-tree"> <div class="sidebar-tree">
<ul class="tree" id="tree"> <ul class="tree" id="tree">
<li id="list-heading"><a href="{{ "/posts" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li> <li id="list-heading"><a href="{{ "/posts/" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li>
<div class="subtree"> <div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menuName" "sidebar" "menuItems" site.Menus.sidebar "ctx" .) }} {{ partial "navigators/sidebar.html" (dict "menuName" "sidebar" "menuItems" site.Menus.sidebar "ctx" .) }}
</div> </div>
@@ -40,7 +40,7 @@
<div class="content"> <div class="content">
<div class="container p-0 read-area"> <div class="container p-0 read-area">
<!--Hero Area--> <!--Hero Area-->
<div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'> <div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ partial "helpers/get-hero.html" . }});'>
</div> </div>
<!--Content Start--> <!--Content Start-->
@@ -54,11 +54,11 @@
<div class="title"> <div class="title">
<h1>{{ .Page.Title }}</h1> <h1>{{ .Page.Title }}</h1>
</div> </div>
{{ if site.Params.enableTags }} {{ if site.Params.features.tags.enable }}
<div class="taxonomy-terms"> <div class="taxonomy-terms">
<ul> <ul style="padding-left: 0;">
{{ range .Params.tags }} {{ range .Params.tags }}
{{ $url:= printf "tags/%s" . }} {{ $url:= printf "tags/%s/" . }}
<li class="rounded"><a href="{{ $url | urlize | relLangURL }}" class="btn, btn-sm">{{ . }}</a></li> <li class="rounded"><a href="{{ $url | urlize | relLangURL }}" class="btn, btn-sm">{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
@@ -158,7 +158,7 @@
<!----- Add comment support -----> <!----- Add comment support ----->
{{ if site.Params.features.comment.enable }} {{ if site.Params.features.comment.enable }}
{{ partial "comments.html" site.Params.features.comment }} {{ partial "comments.html" site.Params.features.comment.services }}
{{ end }} {{ end }}
<!-- Keep backward compatibility with old config.yaml --> <!-- Keep backward compatibility with old config.yaml -->
@@ -179,7 +179,7 @@
{{ define "toc" }} {{ define "toc" }}
<section class="toc-section" id="toc-section"> <section class="toc-section" id="toc-section">
{{ if and site.Params.enableTOC ( .Params.enableTOC | default true ) }} {{ if and site.Params.features.toc.enable ( .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>
@@ -192,20 +192,9 @@
{{ end }} {{ end }}
{{ define "scripts" }} {{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script src="{{ "/js/single.js" | relURL }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
<!-------------- Enable Math support for this page ----------------> <!-------------- Enable Math support for this page ---------------->
{{ if .Params.math }} {{ if site.Params.features.math.enable }}
{{ partial "math.html" . }} {{ partial "math.html" . }}
{{ end }} {{ end }}
<!-------------- Enable mermaid support for this page ---------------->
{{ if .Params.mermaid }}
{{ partial "mermaid.html" . }}
{{ end }}
{{ end }} {{ end }}
-4
View File
@@ -56,7 +56,3 @@
</div> </div>
</section> </section>
{{ end }} {{ end }}
{{ define "scripts" }}
<script src="{{ "/js/list.js" | relURL }}"></script>
{{ end }}
+1 -6
View File
@@ -25,6 +25,7 @@
<link rel="stylesheet" href="{{ "/css/sections/recent-posts.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/sections/recent-posts.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/achievements.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/sections/achievements.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/accomplishments.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/sections/accomplishments.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/publications.css" | relURL }}"/>
<!--================= custom style overrides =========================--> <!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
@@ -74,12 +75,6 @@
<!--- ADD COMMON SCRIPTS ---------------> <!--- ADD COMMON SCRIPTS --------------->
{{ partial "scripts.html" . }} {{ partial "scripts.html" . }}
<!--- ADD INDEX PAGE SPECIFIC SCRIPTS -->
<script src="{{ "/js/itype.min.js" | relURL }}"></script>
<script src="{{ "/js/github-button.js" | relURL }}"></script>
<script src="{{ "/js/home.js" | relURL }}"></script>
<script src="{{ "/js/jquery.filterizr.min.js" | relURL }}"></script>
<!------ ADD SUPPORT LINKS --------> <!------ ADD SUPPORT LINKS -------->
{{- partial "misc/support.html" . -}} {{- partial "misc/support.html" . -}}
+1 -7
View File
@@ -57,13 +57,7 @@
{{ end }} {{ end }}
{{ define "scripts" }} {{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script> {{ if site.Params.features.math.enable }}
<script src="{{ "/js/imagesloaded.pkgd.min.js" | relURL }}"></script>
<script src="{{ "/js/note.js" | relURL }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ if .Params.math }}
{{ partial "math.html" . }} {{ partial "math.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+1 -7
View File
@@ -47,13 +47,7 @@
{{ end }} {{ end }}
{{ define "scripts" }} {{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script> {{ if site.Params.features.math.enable }}
<script src="{{ "/js/imagesloaded.pkgd.min.js" | relURL }}"></script>
<script src="{{ "/js/note.js" | relURL }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ if .Params.math }}
{{ partial "math.html" . }} {{ partial "math.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+24 -20
View File
@@ -1,6 +1,7 @@
<!-- Add Analytics if enabled in configuration --> <!-- Add Analytics if enabled in configuration -->
{{ with site.Params.features.analytics }} {{ with site.Params.features.analytics }}
{{ if .enabled }} {{ if .enabled }}
{{ with .services }}
<!-- Google Analytics --> <!-- Google Analytics -->
{{ with .google }} {{ with .google }}
{{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }} {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }}
@@ -10,26 +11,10 @@
<!-- Counter.dev --> <!-- Counter.dev -->
{{ with .counterDev }} {{ with .counterDev }}
<script> <script src="https://cdn.counter.dev/script.js"
if ( data-id="{{ .id }}"
!sessionStorage.getItem("_swa") && data-utcoffset="1"
document.referrer.indexOf(location.protocol + "//" + location.host) !== 0 ></script>
) {
fetch(
"https://counter.dev/track?" +
new URLSearchParams({
referrer: document.referrer,
screen: screen.width + "x" + screen.height,
user: "{{ .id }}",
utcoffset: "1",
}),
{{ with .referrerPolicy }}
{ referrerPolicy: "{{ . }}" }
{{ end }}
);
}
sessionStorage.setItem("_swa", "1");
</script>
{{ end }} {{ end }}
<!-- GoatCounter --> <!-- GoatCounter -->
@@ -40,6 +25,25 @@
src="//gc.zgo.at/count.js" src="//gc.zgo.at/count.js"
></script> ></script>
{{ end }} {{ end }}
<!-- Piwik/Matomo -->
{{ with .matomo }}
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{{ .instance }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ .siteId }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
{{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
+2 -1
View File
@@ -42,8 +42,9 @@
{{ end }} {{ end }}
<div class="project-btn-holder"> <div class="project-btn-holder">
{{ if .repo }} {{ if .repo }}
<!-- Place this tag where you want the button to render. -->
<a <a
class="github-button-inactive project-btn" class="github-button project-btn d-none"
href="{{ .repo }}" href="{{ .repo }}"
data-icon="octicon-standard" data-icon="octicon-standard"
data-show-count="true" data-show-count="true"
+39
View File
@@ -0,0 +1,39 @@
{{ $dataCategories:= slice "pub-all"}}
{{ range .categories}}
{{ $dataCategories = $dataCategories | append (printf "pub-%s" .)}}
{{end}}
<div
class="col-12 p-2 pub-filtr-item"
data-category='{{ delimit $dataCategories ","}}'
>
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title mb-0">{{ .title }}</h5>
<div class="sub-title">
<span><a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a></span>
<span class="ml-2">{{ .publishedIn.date }}</span>
</div>
<div class="authors">
{{ range $index,$author:= .authors }}
<span class="mr-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
{{ end }}
</div>
</div>
<div class="card-body">
<p>{{ .paper.summary | markdownify }}</p>
</div>
<div class="card-footer">
<div class="tags">
{{ range $index,$tag:= .tags }}
<span class="btn badge btn-info ml-1 p-2">
{{ $tag }}
</span>
{{ end }}
</div>
<div class="details-btn">
<a class="btn btn-outline-info ml-1 pl-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a>
</div>
</div>
</div>
</div>
+2 -1
View File
@@ -1,6 +1,6 @@
{{ with .valine }} {{ with .valine }}
<div id="vcomments"></div> <div id="vcomments"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> <script src="//code.bdstatic.com/npm/leancloud-storage@4.12.0/dist/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script> <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
new Valine({ new Valine({
@@ -13,6 +13,7 @@
lang: "{{ .lang }}", lang: "{{ .lang }}",
recordIP: "{{ .recordIP }}", recordIP: "{{ .recordIP }}",
enableQQ: "{{ .enableQQ }}", enableQQ: "{{ .enableQQ }}",
serverURLs: "https://{{ .serverURLs }}.api.lncldglobal.com"
}); });
</script> </script>
{{ end }} {{ end }}
+16 -2
View File
@@ -115,6 +115,20 @@
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener"> <li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span> <span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
</a></li> </a></li>
{{ else if reflect.IsMap $value }}
<li>
{{ if (and (isset $value "url") (isset $value "icon"))}}
<a href={{ $value.url }} target="_blank" rel="noopener">
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
</a>
{{ else if isset $value "icon" }}
<span><i class={{ printf "fab fa-%s" $value.icon }}></i></span> <span>{{ $value.text }}</span>
{{ else }}
<a href={{ $value.url }} target="_blank" rel="noopener">
<span>{{ title $key }}: </span> <span>{{ $value.text }}</span>
</a>
{{ end }}
</li>
{{ else }} {{ else }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li> <li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ end }} {{ end }}
@@ -155,7 +169,7 @@
<form method='post' action='https://blogtrottr.com'> <form method='post' action='https://blogtrottr.com'>
<div class="form-group"> <div class="form-group">
<input type='email' class="form-control" name='btr_email' placeholder="{{ i18n "newsletter_input_placeholder" }}"/><br /> <input type='email' class="form-control" name='btr_email' placeholder="{{ i18n "newsletter_input_placeholder" }}"/><br />
<input type='hidden' name='btr_url' value='{{ "" | absLangURL }}index.xml' /> <input type='hidden' name='btr_url' value='{{ "" | absLangURL }}/index.xml' />
<input type='hidden' name='schedule_type' value='1' /> <input type='hidden' name='schedule_type' value='1' />
<small id="emailHelp" class="form-text text-muted">{{ i18n "newsletter_warning" }}</small> <small id="emailHelp" class="form-text text-muted">{{ i18n "newsletter_warning" }}</small>
<button type="submit" class="btn btn-info"> {{ i18n "submit" }} </button> <button type="submit" class="btn btn-info"> {{ i18n "submit" }} </button>
@@ -177,7 +191,7 @@
<div class="container"> <div class="container">
<div class="row text-left"> <div class="row text-left">
<div class="col-md-4"> <div class="col-md-4">
<a id="theme" href="https://github.com/hossainemruz/toha" target="_blank" rel="noopener"> <a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener">
<img src="{{ $themeLogo }}" alt="Toha Theme Logo"> <img src="{{ $themeLogo }}" alt="Toha Theme Logo">
Toha Toha
</a> </a>
+4 -6
View File
@@ -7,16 +7,14 @@
<link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/>
{{ if ne site.Params.features.flags.enable false }}
<link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/>
{{ end }}
<!--=================== fonts ==============================--> <!--=================== fonts ==============================-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600"> <link rel="stylesheet" href="{{ "/google-fonts/Mulish/mulish.css" | relURL }}"/>
<!--=================== icons ==============================-->
<link rel="stylesheet" href="{{ "/fontawesome/css/all.min.css" | relURL }}"/>
<!--=================== dark mode ==========================--> <!--=================== dark mode ==========================-->
{{ if site.Params.darkMode.enable }} {{ if site.Params.features.darkMode.enable }}
<link rel="stylesheet" href="{{ "/css/colortheme/colortheme.css" | relURL }}"/> <link rel="stylesheet" href="{{ "/css/colortheme/colortheme.css" | relURL }}"/>
{{ end }} {{ end }}
+1 -1
View File
@@ -14,7 +14,7 @@
{{/* if the user specify a country code for a language via "params.flagOverwrites" field, then use it. */}} {{/* if the user specify a country code for a language via "params.flagOverwrites" field, then use it. */}}
{{ range site.Params.flagOverwrites }} {{ range site.Params.features.flags.flagOverwrites }}
{{ if eq $languageCode .languageCode }} {{ if eq $languageCode .languageCode }}
{{ $countryCode = .countryCode }} {{ $countryCode = .countryCode }}
{{ end }} {{ end }}
@@ -0,0 +1,209 @@
{{/*
## Overview
This helper returns options dictionary used to configure ESBuild.
The following configurations are set:
* Enable JS minification.
* Enable source map if not building for production.
* Prepare `process.env.<ENVIRONMENT VARIABLE>` defines based on enabled features.
This allows ESBuild to optimize JS bundle size by removing code related
to unused features.
* Added `process-shim.js` so `process.env` is defined.
This way we don't have to explicitly specify every environment
variable via `defines` value.
* Prepare `params` for feature and service configs used in JS.
For more details on ESBuild configuration, see: https://gohugo.io/hugo-pipes/js/
## Detailed Concepts
### `feature` and `service`
Features configured in site wide `config.yml` file under `params.features` section.
A **feature** provides a certain functionality to the user via one or more services.
A feature be can enabled or disabled.
A **service** is a 3rd party service, or JS library that implements a feature.
For example, `analytics` is considered a feature.
There are many services that can provide this feature, to name a few:
* Google Analytics
* Counter.Dev
* GoatCounter
To maximize extendibility and therefore usefulness as an open source project,
it is important to define a standard interface that is easy to understand,
configure, and extend.
In this file, I took the liberty of standardizing this interface under `params.features`.
Please note that this breaks compatibility with previous versions of `config.yaml`.
I will provide sample `config.yaml` files with fully documented features, as well as
documentation on migrating the `config.yaml` file to the new standard.
Here is a sample config file for the new `params.features` section. Notice that each `service`
is a dictionary with `enable` and `services` key. `services` is a dictionary with each key
corresponding to a concrete service, and value as configuration / settings. In the case of
services that need no configuration, an empty dictionary is created.
```yml
params:
features:
# This is the `analytics` feature
analytics:
# This feature is enabled
enable: true
# List of services to enable
services:
# Google Analytics is enabled
google:
# settings for Google Analytics
id: G-xxxxx
# # Counter Dev is disabled
# counterDev:
# id: foo
# name: bar
# The `darkMode` feature
darkmode:
enable: true
services:
# darkmode is realized by using DarkReader library
darkreader:
# options are 'system', 'dark', 'light'
defaultColorScheme: system
# For all available options, see `interface DynamicThemeFix`:
# https://github.com/darkreader/darkreader/blob/main/index.d.ts#L125
fixes:
invert: ['img[src$=".svg"]'] # inverts svg colors.
# For all available options, see `interface Theme` in:
# https://github.com/darkreader/darkreader/blob/main/index.d.ts#L45
theme:
brightness: 100
contrast: 100
sepia: 0
```
This helper will convert the above config into the following env vars:
* `FEATURE_ANALYTICS=1`
* `FEATURE_ANALYTICS_GOOGLE=1`
* `FEATURE_DARKMODE=1`
* `FEATURE_DARKMODE_DARKREADER=1`
In JS, you can use it like this:
```js
import * as params from '@params';
if (process.env.FEATURE_ANALYTICS) {
// Do things to enable this feature here
if (process.env.FEATURE_ANALYTICS_GOOGLE) {
// Do things things to enable google analytics
}
}
```
You can also access service configs via params:
```js
import * as params from '@params';
console.log(params);
```
You will see console output like below. Note, each service configuration is
namespaced by their corresponding feature.
```json
{
"analytics": {
"google": {
"id": "G-xxxxx"
}
},
"darkmode": {
"darkreader": {
"defaultColorScheme": "system",
"fixes": {
"invert": "['img[src$=\".svg\"]']"
},
"theme": {
"brightness": 100,
"contrast": 100,
"sepia": 0
}
}
}
}
```
*/}}
{{/* Holds all the feature flag environment variables for `process.env.*` in JS land */}}
{{ $defines := dict }}
{{/* Holds all the feature configuration variables exposed to JS side */}}
{{ $params := dict }}
{{/* set NODE_ENV depending on if we are building for production use. */}}
{{ $defines = $defines | merge (dict
"process.env.NODE_ENV" (cond hugo.IsProduction `"production"` `"development"` )
)}}
{{/* Go through each feature defined in our config.yml/config.toml/config.json file. */}}
{{ range $feature, $featureDef := site.Params.features }}
{{/* Initialize a dictionary that will hold all service configs for this specific feature */}}
{{ $featureParams := dict }}
{{ with $featureDef }}
{{/* convert feature name to uppercase and remove '_', e.g. `darkMode` becomes `DARKMODE` */}}
{{ $featureName := replace $feature "_" "" | upper }}
{{/* The feature is enabled if the `enable` key is absent, or is set to `true` */}}
{{ $featureEnabled := or (not (isset . "enable")) .enable }}
{{/* Sets `FEATURE_<FEATURE_NAME>` env var to "1" or "0" depending on if the feature is enabled. */}}
{{ $defines = $defines | merge (dict
(printf "process.env.FEATURE_%s" $featureName) (cond $featureEnabled `'1'` `'0'`)
) }}
{{ if $featureEnabled }}
{{/* Loop through each service under this feature */}}
{{ range $service, $config := .services }}
{{/*
We assume all services are enabled. To disable a service,
simply comment it out from `config.yaml`.
*/}}
{{/* Convert name to all uppercase, removing underscore */}}
{{ $serviceName := replace $service "_" "" | upper }}
{{/* let JS side know this service is enabled */}}
{{ $defines = $defines | merge (dict
(printf "process.env.FEATURE_%s_%s" $featureName $serviceName) `'1'`
) }}
{{/* add service configuration to feature params */}}
{{ $featureParams = $featureParams | merge (dict $service $config) }}
{{ end }}
{{/* add feature params to top level params */}}
{{ $params = $params | merge (dict $feature $featureParams) }}
{{ end }}
{{ end }}
{{ end }}
{{
return dict
"defines" $defines
"params" $params
"minify" true
"sourceMap" (cond hugo.IsProduction "" "inline")
"inject" "scripts/process-shim.js"
}}
+6 -1
View File
@@ -3,7 +3,12 @@
{{/* if hero image is specified in the page front-matter, then use that */}} {{/* if hero image is specified in the page front-matter, then use that */}}
{{ if .Params.hero }} {{ if .Params.hero }}
{{ $heroImage = .Page.Resources.GetMatch .Params.hero }} {{/* try to read from the page bundle */}}
{{ $heroImage = .Resources.Get .Params.hero }}
{{/* if the image does not exist in the page bundle,try looking in the assets folder */}}
{{ if not $heroImage }}
{{ $heroImage = resources.Get .Params.hero }}
{{ end }}
{{ end }} {{ end }}
{{ .Scratch.Set "heroScratch" $heroImage }} {{ .Scratch.Set "heroScratch" $heroImage }}
@@ -0,0 +1,5 @@
{{- $options := partial "helpers/get-esbuild-options.html" -}}
{{- $options = $options | merge (dict "targetPath" "application.js") -}}
{{- $app := resources.Get "scripts/application.js" -}}
{{- $bundle := $app | js.Build $options | fingerprint -}}
<script src="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" defer></script>
-14
View File
@@ -1,15 +1 @@
<link rel="stylesheet" href="{{ "/katex/katex.min.css" | relURL }}"> <link rel="stylesheet" href="{{ "/katex/katex.min.css" | relURL }}">
<script type="text/javascript" defer src="{{ "/katex/katex.min.js" | relURL }}"></script>
<script type="text/javascript" defer src="{{ "/katex/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body);">
renderMathInElement(
document.body,
{
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\[", right: "\\]", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false}
]
}
);
</script>
-6
View File
@@ -1,6 +0,0 @@
<script src="{{ "/js/mermaid-8.14.0.min.js" | relURL }}"></script>
<script>
mermaid.initialize({
startOnLoad:true
});
</script>

Some files were not shown because too many files have changed in this diff Show More