308 Commits
v3.0 ... backup

Author SHA1 Message Date
3ec70e6f4b added killin blogpost 2024-12-07 11:16:50 +00:00
7df8f4e616 added first hiking blog post 2024-12-01 01:44:51 +00:00
578c739b86 added new website content 2024-07-07 16:04:43 +01:00
921be8cb23 updated website 2022-12-03 16:08:44 +00:00
d3a63eef28 new changes 2021-10-20 01:19:51 +04:00
1a7f951489 updated resume 2021-10-12 23:28:01 +04:00
f1f87045fe added implementaion for plugin 2021-10-12 23:23:27 +04:00
392c2e09f9 changed PR to smaller header (i.e H4) 2021-10-12 23:17:05 +04:00
0cb65e80f6 added PR link 2021-10-12 23:15:41 +04:00
1c3ac2671d added blog post for automatic ports 2021-10-12 23:14:44 +04:00
5b714db2db added blog post for extension of P2PRC 2021-10-12 23:10:39 +04:00
aa4142459e added new cli commands for p2prc draft escaping NAT using a reverse proxy 2021-10-12 17:30:47 +04:00
334c0e45db added more to the draft for escaping NAT using reverse proxy servers 2021-10-12 16:48:33 +04:00
7c4ba27bf6 Merge branch 'master' of github.com:Akilan1999/Akilan-website 2021-10-11 14:33:06 +04:00
09952333e1 added base draft P2PRC escaping NAT 2021-10-11 14:31:09 +04:00
Akilan Selvacoumar
ce7d227248 Update Working-on-p2prc-challenges.md 2021-09-09 17:31:35 +04:00
87ce250af7 added blog for laplace with barrier KVM 2021-07-06 01:00:30 +04:00
1634690b99 added blog post open to work 2021-06-30 01:48:35 +04:00
0606c4a861 fixed spellling error 2021-06-28 18:12:55 +04:00
092821b4cf added alpha release blog post 2021-06-28 00:37:19 +04:00
679e46d888 modified new post 2021-06-22 03:29:56 +04:00
d248055f13 new post 2021-06-22 03:02:49 +04:00
d8b62fedd4 fixed spelling mistakes 2021-05-31 02:25:42 +04:00
755297006c added a new technical blog on RISC-V 2021-05-31 02:12:23 +04:00
503855ce9f added project Internet of energy project 2021-05-15 23:33:43 +04:00
ad0dc8fe42 added project custom website generator 2021-05-15 22:56:48 +04:00
1ba0a370e2 fixed the CV 2021-05-15 09:41:39 +04:00
896b484beb removed sarcasm 2021-05-15 09:14:53 +04:00
76e058931e added kubecon video to project 2021-05-15 09:12:49 +04:00
23e8dc9fa2 added projects section 2021-05-14 16:36:45 +04:00
3882da1030 added resume.md file 2021-05-14 15:18:43 +04:00
38fa7c8bb7 added about page 2021-05-14 15:04:15 +04:00
c5f62d3f1b added netlify.toml file 2021-05-14 14:04:52 +04:00
4d856403bd removed cache 2021-05-14 13:58:36 +04:00
20f289b866 push themes 2021-05-14 13:51:07 +04:00
e904b0d250 added .gitmodules 2021-05-14 13:48:21 +04:00
6e5984d607 added sub module 2021-05-14 13:47:08 +04:00
02d45ada14 added more technical and general posts 2021-05-14 13:42:29 +04:00
28e015f16f added techincal posts 2021-05-14 13:01:22 +04:00
8f8b015a70 created home page 2021-05-14 12:23:49 +04:00
Aditya Telange
fb0393fa12 Update github templates for Issues and PRs 2021-04-21 21:10:02 +05:30
Khoschuluu Khuderchuluu
ccbe179033 Add Mongolian translations mn.yaml (#375) 2021-04-21 13:50:44 +05:30
Ahmet Türkmen
4e6eebe318 add Turkish translation tr.yaml (#374) 2021-04-21 09:47:21 +05:30
No Coffee No Life
87fd91ed6a Add Vietnamese translations vi.yaml (#370) 2021-04-20 15:25:12 +05:30
Geeqla
d136063229 Add custom alt title in Multilingual Mode + Add fallback based on LanguageName with emojify (#364) 2021-04-17 10:25:04 +05:30
Aditya Telange
98c17559e9 Add checks for adding the copy button in code-blocks
- adds checks to put copy button for code
 inside table and highlight code block

- Fixes #363
2021-04-16 10:00:47 +05:30
Cody Brownstein
c3634e6ccd Join lines in head for hljs assets (#360)
Fixes errors in lower hugo versions

Error: add site dependencies: load resources: loading templates: "site/themes/hugo-PaperMod/layouts/partials/head.html:79:1": parse failed: template: partials/head.html:79: unexpected unclosed action in command
2021-04-16 09:53:18 +05:30
Cody Brownstein
a015ec2efc Rename file eo.yml -> eo.yaml (#359)
Error: add site dependencies: load resources: loading translations: "site/themes/hugo-PaperMod/i18n/eo.yml:1:1": failed to load translations: no unmarshaler registered for yml
2021-04-15 11:15:40 +05:30
1000283
0430a98e74 Add translations for Esperanto eo.yml (#350) 2021-04-15 00:44:09 +05:30
Geeqla
c51e027390 Update ru.yaml Russian translations (#357) 2021-04-14 21:01:40 +05:30
Geeqla
791999df38 Add uk.yaml Ukrainian translation (#356) 2021-04-14 18:41:44 +05:30
Achim Blanarsch
8c313af0f3 Add missing spacing between search title and icon (#351) 2021-04-13 12:53:41 +05:30
Aditya Telange
1627fe7d7a Update README.md
README is always incomplete 

fixes: #355
2021-04-13 12:49:33 +05:30
Aditya Telange
bbb35cb6d5 Update README.md
Update mockup image

Thanks to screely.com and screenshot.rocks
2021-04-11 17:35:14 +05:30
Aditya Telange
87e9a27630 Update README 2021-04-10 17:57:18 +05:30
Aditya Telange
6c64ad0695 Show Code Copy scripts only on Kind = page 2021-04-10 11:53:23 +05:30
Kian Kasad
17c4da86b5 Add copy button to copy code block contents (#345)
* add buttons to copy code block contents

Adds a clickable "copy" link in the top-right corner of each code block.

If available, uses the navigator.clipboard API. Falls back to selecting
the text and calling document.execCommand('copy') to copy text.

* hides copy button unless mouse is hovering over code block

* change text of copy button when text is copied

* add translation keys for copy button text  `code_copy` and `code_copied`

* To disable use `Params.disableCodeCopy: true` in site config
2021-04-10 11:33:31 +05:30
Aditya Telange
f1bc3471a6 Fix focus ghosting in search results O_o 2021-04-10 00:59:24 +05:30
Aditya Telange
c255d148d8 Fix results being searched before index building;
refactor resultSet generation to fix duplicate items with large db
2021-04-10 00:58:40 +05:30
Aditya Telange
ba48765e2c Use js.Build to fetch fuseOpts;
also load Search on window load
2021-04-10 00:58:23 +05:30
Aditya Telange
b756217126 Add crossorigin="anonymous" also for scripts 2021-04-09 19:41:26 +05:30
Aditya Telange
bb7b6f0076 Refactor, move HLJS code from footer to head;
already defered.
2021-04-09 19:38:04 +05:30
Aditya Telange
9d7576bd04 Add crossorigin="anonymous" for links #334 2021-04-09 19:25:05 +05:30
Mohammad Noor Abu Khleif
427053290d Move post nav links to a partial section (#343) 2021-04-09 14:55:56 +05:30
Aditya Telange
0f4dc88c63 Remove humanize from translation list
so that emojify could work
2021-03-31 11:49:28 +05:30
Aditya Telange
23610de4a0 Update min hugo version to 0.82.0
- for Google Analytics v4 support template
2021-03-31 10:07:07 +05:30
Aditya Telange
55fe10e9d3 Use non-async internal template for Google Analytics v4 2021-03-31 10:07:04 +05:30
Aditya Telange
4878383dd4 Add global keywords for home page
original idea #311
2021-03-31 10:00:31 +05:30
Aditya Telange
196b82645e Fix Spacing in overall repo 2021-03-30 18:26:43 +05:30
Aditya Telange
dae7f2b8a1 Align the svg email icon with others 2021-03-30 16:07:51 +05:30
Aditya Telange
635054cd07 Add hackerone icon from simpleicons
https://simpleicons.org/?q=hackerone
2021-03-30 16:07:51 +05:30
Aditya Telange
a60ececdfb Update social icons svg for hackthebox from simpleicons
https://simpleicons.org/?q=hackthebox
2021-03-30 16:07:51 +05:30
Jannik Arndt
6d6fe2c389 Move ToC divs to toc partial (#329)
Allows Overriding of ToC
2021-03-30 16:07:20 +05:30
Aditya Telange
fe94d7f347 Revert "Remove trailing and leading slashes off the $url for Breadcrumb gen;"
This reverts commit 0f0e027def.
2021-03-28 20:14:11 +05:30
Syphdias
54744ba694 Fix path in editPost URL for Windows (#333)
`.File.Path` is OS dependant and uses `\` as directory separator. This leads to
cases where posts get the wrong URL, if in a sub folder, e.g.
`content/posts/folder\post.md`.

One idea was to replace `\` with `/` this however breaks valid files (on Unix
systems) which include `\` in the file name.
According to the docs [`path.Join`](layouts/partials/edit_post.html) is OS
unaware and converts to a Unix-like path.

> Note: All path elements on Windows are converted to slash ('/') separators.

PS: It looks like hugo also uses this internally to build URLs.
PPS: Solution was discussed in #278.
2021-03-28 19:39:22 +05:30
Aditya Telange
0f0e027def Remove trailing and leading slashes off the $url for Breadcrumb gen;
so that no empty values remain in []interface

fixes: #331
2021-03-28 19:25:09 +05:30
Aditya Telange
fb4988cfb6 Don't consider page-variable to disable HLJS while generating assets
- may lead to generating multiple bundles
2021-03-28 09:52:14 +05:30
Aditya Telange
0c0c6847e5 Don't include an-old-hope when hljs is disabled
- reduces 0.6 kb resources
2021-03-27 21:42:29 +05:30
Aditya Telange
2fea5a1062 add browser-level lazy loading to cover images
amend to c353447
2021-03-27 13:16:10 +05:30
Aditya Telange
009d3a2e1d Fix logo not being displayed with no title pages
- use a local var to get label text ot site title

fixes: #281
2021-03-27 12:46:43 +05:30
Aditya Telange
e503367a1a [BREAKING] Split-up css into sub-parts (#317)
* Move styles into 3 different locations
- core
- common
- hljs

* Load all stylesheets in proper order
2021-03-27 11:28:55 +05:30
Aditya Telange
b6af9eddee Imrprovements to RSS (#319)
* Copy hugo's internal rss template
- loc: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml

- at commit 5f42590144579c318a444ea2ce46d5c3fbbbfe6e of https://github.com/gohugoio/hugo/

* Add Site image from images param

* Hide search and archives layouts from feed index

* add Description and Summary in RSS as in other templates
2021-03-25 14:50:53 +05:30
Aditya Telange
ddf004b709 Allow disabling ScrollToTop button
- refactor corresponding code

usage =>
in site config:
params:
    disableScrollToTop: true

closes: #321
2021-03-25 13:34:01 +05:30
Aditya Telange
a2b3be0169 Refactor noscript styles to not break with code formatter 2021-03-25 10:55:11 +05:30
Daniel Atwood
772f571161 Update internal tempplate from hugo
cp from ffd9dac4218b8f1709de04f7131ca661715fc481 & fe77f7434bc0d7a9b54af69014eb28dbea2b236b

tpl: Update date logic of opengraph and schema internal
 templates

* Fix: updated date logic in opengraph template

* Updated date logic in schema template

* Reformatted opengraph and schema

* Wrapped PublishDate and Lastmod in with

tpl: Make the build green again

Co-authored-by: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= <bjorn.erik.pedersen@gmail.com>

Signed-off-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2021-03-23 15:45:10 +05:30
Aditya Telange
0ca760a9b3 add Description and Summary in JSON schema as in other templates 2021-03-23 15:10:40 +05:30
Syphdias
abfdb54c92 Add option to show link in meta data for editing posts (#278)
Usage

- in site config =>

    Params:
    editPost:
        URL: "https://github.com/<path_to_repo>/content"
        Text: "Suggest Changes" # edit text 
        appendFilePath: true # to append file path to Edit link

- in front-matter vars =>
    ---
    editPost:
        URL: "https://github.com/<path_to_repo>/content"
        Text: "Suggest Changes" # edit text 
        appendFilePath: true # to append file path to Edit link
    ---

- Front-matter vars overrides global ones
2021-03-23 14:58:26 +05:30
Aditya Telange
f3cac6c09e Refactor media queries
reduce code
2021-03-22 18:21:16 +05:30
Aditya Telange
d3813138d7 fix more reduced motion in search Results
amend to 4b24a94 & e03348c
2021-03-22 18:16:26 +05:30
Bassel Cheaib
cb778d8db4 Minor adjustments in Arabic translations (#309) 2021-03-22 16:49:29 +05:30
Mohammad Noor Abu Khleif
80ad6ec2a3 Add support for rtl and ltr shortcodes (#293)
refer https://github.com/adityatelange/hugo-PaperMod/pull/293#issue-585979395 for usage guide and examples
2021-03-22 16:47:40 +05:30
Kian Kasad
306aa9fbfc Fix scrollbar track background in dark mode caused by #308 (#313) 2021-03-22 16:34:02 +05:30
Aditya Telange
4b24a94a6a fix reduced motion in search Results
amend to e03348c
2021-03-19 19:36:46 +05:30
gsh3ll
b523192b51 Fix code block wraps on Safari (#298) 2021-03-19 18:51:20 +05:30
Kian Kasad
e01b52193a Use CSS inside noscript when JS is disabled to detect preferred color theme (#308)
- Makes auto theme work when JS is disabled
- Only applies if the 'theme' configuration parameter is set to 'auto' or is unset.
2021-03-19 18:42:49 +05:30
Aditya Telange
706b5a1c94 Hide "..." in list pages when summary is not Truncated 2021-03-18 18:15:49 +05:30
Mohammad Noor Abu Khleif
ad81825345 Allow selective summary (in list pages) hiding in front matter (#292) 2021-03-18 17:46:32 +05:30
Aditya Telange
24f71d7f15 rm extra p tag from render-image hook 2021-03-16 13:29:53 +05:30
Aditya Telange
c353447d8e add browser-level lazy loading
ref: https://web.dev/browser-level-image-lazy-loading/
2021-03-16 13:18:57 +05:30
Aditya Telange
a982a29e24 clone render-image hook template
ref: https://gohugo.io/getting-started/configuration-markup/#render-hook-templates
2021-03-16 13:17:39 +05:30
Aditya Telange
766f07fe79 Update issue templates 2021-03-16 12:48:23 +05:30
Tobias
6c0726b418 Add social icon for ctftime (#300)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2021-03-16 12:26:28 +05:30
Ben J
baa9c39ec9 Add social icon for itch.io (#306)
fetched from: https://itch.io/press-kit

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2021-03-16 12:18:26 +05:30
Wagner Macedo
f8b16702fa Add portuguese (pt) translation (#294) 2021-03-14 18:52:30 +05:30
Brian
e76154d418 Allow selective disabling of PostNavLinks in front matter (#279) 2021-03-01 22:37:24 +05:30
Muhammad
e0ed556818 Add i18n support for Arabic (#271) 2021-03-01 10:11:29 +05:30
Alon
3492e151e5 Add he.yaml Hebrew translation (#259) 2021-02-24 12:55:20 +05:30
Jason Lavoie
5e05ed6543 Enforce language url subsitution on path boundary for breadcrumbs (#254)
* Without this, the section name gets mangled when the language was a
  sub-string of the section.  For example, under 'en', a section named
  "fragment" changes to "fragmt".
2021-02-22 11:30:04 +05:30
Kian Kasad
14ebcdecf3 Add 'align' option to figure shortcode (#256)
Usage: 

{{< figure align=center src="image.jpg" >}}

Parameter values:
  - 'center': align image and captions to center of page
  - anything else neglected

* Appends "#center" to the image's URL in order to utilize existing CSS
rules for centering images.
2021-02-22 11:24:43 +05:30
Explore-Space
45c4b48e53 Add social icon for unsplash (#255)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2021-02-20 12:28:24 +05:30
Kian Kasad
b71baa147a rework design of image captions in figure shortcode (#247) 2021-02-20 10:51:19 +05:30
Aditya Telange
e53bfe514a fix json schema parsing error on pages not having a section 2021-02-16 18:37:55 +05:30
Ibragimov R
cc99dba7bd Add uz.yaml uzbek language translation (#245) 2021-02-16 13:19:15 +05:30
Arnau
33c85c5d56 Add ca.yaml for catalan translation (#237) 2021-02-14 14:42:25 +05:30
Aditya Telange
17d48ce9bb add structured data for breadcrumb nav
https://developers.google.com/search/docs/data-types/breadcrumb
2021-02-12 13:13:33 +05:30
Aditya Telange
a21094f4a0 hide theme-toggle focus outline 2021-02-12 11:58:44 +05:30
Aditya Telange
a57641a24b fix theme-toggle shown when js is disabled 2021-02-12 10:49:03 +05:30
Aditya Telange
6f8edf1ffa change theme-switch from 'a' to 'button'
and refactor
2021-02-12 10:48:04 +05:30
Aditya Telange
034da04180 use local scratch var in breadcrumbs
- fix undisplayed breadcrumbs in section pages
 having pagination
2021-02-10 21:43:45 +05:30
Aditya Telange
1a8e14a848 Use custom paginator's PageNumber for home-info
fixes non-mainSections pages from being displayed in the list

amend to 143eb18
2021-02-10 21:17:40 +05:30
Aditya Telange
143eb18b75 handle case where home-info was hidden
when num of posts = 0

- fix: #227
- refactor conditions for nested if
- also fix for 082d960
2021-02-10 21:00:12 +05:30
Aditya Telange
37afb5f13e show breadcrumb nav also on list pages
- specifically section pages
- should not display on home(index)
2021-02-08 20:30:34 +05:30
Aditya Telange
43ddff0fde breadcrumb nav as partial 2021-02-08 20:28:55 +05:30
Aditya Telange
65f84d6f19 use Parent's Permalink for breadcrumb nav 2021-02-08 20:21:26 +05:30
Aditya Telange
e03348c041 improve search
- fix menu element becoming inactive
      change class active -> focus
    - set input type seach #198
    - add a reset func
    - add script to clear searchbox
      when clicked on X sign
2021-02-07 21:40:27 +05:30
Aditya Telange
7170eda172 translation list separate partial 2021-02-06 23:50:19 +05:30
Aditya Telange
084498558c Fix 'Tap targets are not sized appropriately' 2021-02-06 22:56:40 +05:30
Aditya Telange
c32e036053 set equal margin to page-header and post-header 2021-01-31 17:33:22 +05:30
Aditya Telange
e8076c8f61 Fix missing first level heading in home-info
close: #199
2021-01-31 17:17:00 +05:30
Aditya Telange
f8781e2cc8 Improve header
- fix header height
       61px->60px
    - check for elements before displaying
    - align theme-toggle
    - rm unnecessary elements
    - rm theme-toggle class
    - rm menu class
2021-01-31 17:09:38 +05:30
Aditya Telange
ebbeca4ab4 Revert "fix : footer height increase for mobile devices"
This reverts commit f40842915e.
2021-01-31 12:18:04 +05:30
Aditya Telange
c7b388346b hide archives and search page from being searched 2021-01-30 12:53:14 +05:30
Aditya Telange
0c28a4ad5a introduce searchHidden front-matter var
- to hide particular pages from search

usage:
in page's front-matter add
searchHidden: true
2021-01-30 12:50:16 +05:30
Aditya Telange
6c79b99de8 reserve space for scroll-bar 2021-01-30 12:14:38 +05:30
Aditya Telange
f64c44c8d2 tweak fuse opts
-rm default opts,
- add ignoreLocation (to search everywhere not just 1st 60 chars)
- ref https://fusejs.io/concepts/scoring-theory.html#scoring-theory
2021-01-30 12:08:19 +05:30
Aditya Telange
624b1d0afb trim whitespace before searching 2021-01-30 12:08:09 +05:30
Aditya Telange
346ae95069 use Basic instead of Full
- also use production ones which contains lesser redundant code
- https://fusejs.io/getting-started/different-builds.html#explanation-of-different-builds
2021-01-30 12:07:01 +05:30
Aditya Telange
714859b682 Update README.md
add new features in the list
2021-01-30 11:31:41 +05:30
Aditya Telange
2b8e7c0b22 Update FUNDING.yml
re-add buymeacoffee after technical issue is resolved
2021-01-30 11:07:52 +05:30
Aditya Telange
75855b2758 init feat Breadcrumb Navigation (#207)
* adds Breadcrumb nav above title of single page/post
* add enabler var 'ShowBreadCrumbs'
* introduce i18n var "home"

usage:
in site config:
Params:
    ShowBreadCrumbs: true

in page front-matter:
ShowBreadCrumbs: false
2021-01-29 23:37:07 +05:30
Aditya Telange
a7e0b2f5a9 add check to display post-description in single 2021-01-29 23:25:46 +05:30
Aditya Telange
cc4fb70336 rm translateX from post-title in single 2021-01-29 23:25:46 +05:30
Coderslang Master
84e208f98d Fix missing reciprocal and self-reference hreflang (#211)
ref:
- https://help.ahrefs.com/en/articles/2631143-missing-reciprocal-hreflang-no-return-tag-error-in-site-audit
- https://help.ahrefs.com/en/articles/2754344-what-does-the-self-referencing-hreflang-annotation-missing-issue-in-site-audit-mean
2021-01-29 23:25:07 +05:30
Aditya Telange
778ee39137 init feat Prev Next post links on single post page (#180)
usage =>
in site config add 
Params:
   ShowPostNavLinks: true
2021-01-28 00:05:30 +05:30
Aditya Telange
3c3888f7ad add workflow to test PR builds fine 2021-01-27 23:58:34 +05:30
Aditya Telange
2f06f5e4fa fill background of table of contents 2021-01-27 23:21:00 +05:30
Aditya Telange
b284ba5799 center align share-buttons 2021-01-27 23:20:37 +05:30
Aditya Telange
91a9e1b9bb add background to share buttons and tags under single 2021-01-27 23:16:08 +05:30
Aditya Telange
9257321547 Add description to other layouts
- helps adding description to sub-sections,
  search, terms, archive pages
2021-01-27 21:31:33 +05:30
Csaba Vass
a414d16b86 Add Hungarian(hu) translations (#203) 2021-01-27 21:30:08 +05:30
Hattomo (TomohiroHattori)
f1329fe53d Add more japanese traslations (#202) 2021-01-27 13:30:45 +05:30
Muhammad Hanif
698616d9fb Add a meta tag for bing site verification (#197) 2021-01-26 10:57:14 +05:30
Aditya Telange
e1ea90aa60 Revert "Use md5 instead of default sha256 for generating SRI hashes (#195)"
This reverts commit 9e99493e69.
2021-01-26 10:52:48 +05:30
Aditya Telange
cadca8a68a fix scroll-bar colors for tables 2021-01-26 10:52:30 +05:30
Aditya Telange
9691c41983 retain history of header link clicks
close: #196
2021-01-25 21:48:15 +05:30
John
9e99493e69 Use md5 instead of default sha256 for generating SRI hashes (#195)
reference: https://gohugo.io/hugo-pipes/fingerprint/
2021-01-25 21:38:10 +05:30
Aditya Telange
789b1f824c reduce toc size
0.5em -> 0.4em
2021-01-25 21:25:19 +05:30
Aditya Telange
9c50449ce8 improve scroll-bar styling
and fix hidden gist scrollbar
2021-01-25 21:04:29 +05:30
Aditya Telange
cd03c69e40 fix blockquote margin with simplified tweet shorcode
sticking together
2021-01-25 12:48:10 +05:30
Aditya Telange
471e4caba2 add gitea social-icon svg
closes: #191
2021-01-24 18:22:29 +05:30
Aditya Telange
55d9dc26cd make similar border-radius to tags and share-buttons under single 2021-01-24 18:12:15 +05:30
Aditya Telange
f7dbf75d5b allow setting ShowReadingTime per-page
as well as site-wide
2021-01-24 18:08:15 +05:30
Aditya Telange
bc4d4153dc add hideMeta param to list
- same as in single
- allows hiding meta in list pages
2021-01-24 18:05:00 +05:30
Aditya Telange
75375a4337 rm use of blockquote in Toc 2021-01-24 17:58:03 +05:30
Florian Kohrt
b6842db0a5 Only show vertical bar if necessary in post-meta (#193)
fixes unnecessary "|" shown when post-meta is empty but translations are available
2021-01-24 17:52:45 +05:30
Daksh
24afe952b2 Add social icon for snapchat (#188)
Credits for icon: https://simpleicons.org/?q=snapchat
2021-01-23 17:21:52 +05:30
Aditya Telange
be1ea53910 rm selector hiding anchor links on some devices
fix: #189

partial revert of f5c5546249
2021-01-23 17:03:54 +05:30
Muhammad Hanif
fc28fa7493 Add meta tag for yandex site verification (#187)
usage in site config =>
params:  
  analytics:
    yandex:
      SiteVerificationTag: xxxxxxxxxxxxxxxx
2021-01-23 15:49:51 +05:30
Corban Mailloux
2c67ae9877 Allow page-specific cover settings to win. (#185)
check for front-matter's cover.hidden before global config's
2021-01-22 11:52:00 +05:30
Aditya Telange
042f4e9254 fix code-borders were rounded on desktop but not on mobile devices 2021-01-22 10:51:11 +05:30
Aditya Telange
a8316f0073 fix code highlight radius when markup.highlight.lineNos is enabled 2021-01-22 00:33:09 +05:30
Aditya Telange
3167acd32a fix code highlight spacing when in a list
rm redundant code
2021-01-22 00:33:09 +05:30
Aditya Telange
f5c5546249 fix gist colors
hide anchor underline for gist
2021-01-22 00:33:09 +05:30
Aditya Telange
565c36fdb0 Update README.md
correct minor mistakes
2021-01-20 22:00:17 +05:30
Aditya Telange
0af2e50d89 rm redundant styleing from profile-mode 2021-01-20 21:42:05 +05:30
Aditya Telange
2c9efe204a Update README.md
link refs to wiki instead of demo
2021-01-20 21:30:44 +05:30
Aditya Telange
757a3094b2 add drop-shadow to show go-to-top button
on code-bg in light mode
2021-01-20 19:21:59 +05:30
Aditya Telange
e02df37142 Revert "fix wrong load stylesheet and JS on multihost (multilingual) #126"
Doesn't work with multilingual config with no specific baseurl

This reverts commit ad79fdaf83.
2021-01-20 19:11:21 +05:30
Aditya Telange
ad79fdaf83 fix wrong load stylesheet and JS on multihost (multilingual) #126 2021-01-20 19:06:02 +05:30
skinner12
42280d1170 Add italian (it) translation (#184) 2021-01-20 11:27:30 +05:30
Aditya Telange
e4a6970186 Update FUNDING.yml
keep only ko-fi link

Thanks to everyone who supported on other platforms :)
2021-01-17 13:55:03 +05:30
Aditya Telange
ec2aa47c44 make content in dark more whiter improving redability and contrast in-between 2021-01-17 12:29:35 +05:30
Florian Kohrt
2b3baf94bb Make some page settings also configurable site wide (#182)
Adds **local** and **global** param to following front-matter vars:
- hideMeta
- ShowToc
- TocOpen
- comments

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2021-01-17 12:25:35 +05:30
Aditya Telange
8222f2bd11 fix search result multiple hightlight on lost focus
also use set vars instead of fetching element again
2021-01-16 13:26:55 +05:30
Aditya Telange
704921ccd1 init media.css
- combine all media queries
- name zmedia to conacat at last
- change some max-width values to group them
2021-01-16 12:54:51 +05:30
Aditya Telange
4c51e9e8be fix code highlight spacing when in a list 2021-01-15 23:27:25 +05:30
Aditya Telange
ad44cdda0f fix highlight.js loading on section pages 2021-01-15 23:21:13 +05:30
Aditya Telange
18ae4e5593 respect prefers-reduced-motion while animating 2021-01-13 23:35:54 +05:30
Aditya Telange
b6a308d331 Do not smooth scrollIntoView
if user has it preferred

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
2021-01-13 23:19:35 +05:30
Aditya Telange
dd83560010 go-top-top button cleanup 2021-01-11 21:01:50 +05:30
Aditya Telange
7a0e1f369c change animation condition from hover to active for share-buttons and terms-tags 2021-01-11 20:31:03 +05:30
Aditya Telange
89414d00dc add minimal border to post-entry
- increases element speration without being noticed
cc: #169
2021-01-11 20:15:04 +05:30
Aditya Telange
e809aef590 lighten dark's border
#5b5d67 -> #333
2021-01-11 20:01:19 +05:30
Muhammad Hanif
6f397ef591 i18n: Add id Bahasa Indonesia (#173) 2021-01-11 19:13:36 +05:30
Aditya Telange
6a897a9e67 update LICENSE for 2021 2021-01-08 23:37:28 +05:30
Aditya Telange
4fd4bc5e20 Add info to blank.css 2021-01-08 23:36:33 +05:30
Aditya Telange
9d478913ec Update README.md
replace unseen emoji
2021-01-08 23:35:00 +05:30
Aditya Telange
bd4a118afa rm unnecessay color to box-shadow for anchors 2021-01-08 22:53:04 +05:30
Aditya Telange
3b0997fc42 fix margin when hljs was disabled 2021-01-08 22:52:03 +05:30
Aditya Telange
905640ceef increase blockquote thickness inside post 2021-01-08 20:38:00 +05:30
Aditya Telange
09de369d2f update fuse.js to v6.4.6
credits: https://github.com/krisk/Fuse/releases/tag/v6.4.6
2021-01-06 01:52:22 +05:30
Roman Ispaev
3b5c7faaec fix wrong asset links on multihost config (#126)
CORS issue for multidomain setup (#168)
2021-01-06 01:51:43 +05:30
Weichen Liu
946cc1ffe3 single: Add post description (#165)
usage =>
in post params add : 
    description: "Desc Text."
2021-01-02 22:30:20 +05:30
Aditya Telange
5d6de5ecb1 post-single(css): fix scroll-bar in code
hiding background
2020-12-31 17:01:26 +05:30
Tomás Dias Almeida
bfb5019cbc Code block / blockquote / hr should respect the margin layout (#154)
* Code block should respect the margin layout

* Blockquote should respect the margin layout

* align others elements to main width with minors mods

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-12-31 16:11:18 +05:30
Aditya Telange
d53671786c social-icons: add reddit icon #163
credits for svg: https://iconmonstr.com/reddit-1-svg/

LICENSE: https://iconmonstr.com/license/
2020-12-31 11:05:08 +05:30
Aditya Telange
e000675275 social-icons: add nuget icon & refactor code #163
credits for svg: https://commons.wikimedia.org/wiki/File:NuGet_project_logo.svg

This file is licensed under the Creative Commons Attribution 2.0 Generic license.
2020-12-31 11:05:08 +05:30
Aditya Telange
3d88f46f33 Update README.md 2020-12-30 21:37:26 +05:30
Aditya Telange
b825b7f27c post-single: Fix embeded gist colors
fixes: #161
2020-12-29 18:12:15 +05:30
Aditya Telange
2b7d2dd493 reset: scroll-bar: set only on devices > 768px
default style to others
2020-12-29 18:10:18 +05:30
Aditya Telange
0e9ca244dc fotter: fix Links do not have a discernible name for go-to-top btn 2020-12-29 17:03:22 +05:30
Aditya Telange
c9fa6c7915 cover: granular controls for hiding cover image #156
in site config =>
    params:
        cover:
            hidden: true # hide everywhere but not in structured data
            hiddenInList: true # hide on list pages and home
            hiddenInSingle: true # hide on single page

per-page in front-matter =>
   hidden: true # only hide on current single page
2020-12-29 16:44:03 +05:30
Aditya Telange
e252e761f5 footer: allow disabling HLJS #143
usage =>

in site config =>
    params:
        assets:
            disableHLJS: true

per-page in front-matter =>
   disableHLJS: true
2020-12-29 16:39:23 +05:30
Aditya Telange
838e607122 head: rm invalid rel="preload" on search assets 2020-12-27 22:39:03 +05:30
Aditya Telange
4389e03df9 baseof: pass .Layout
for 0f994eee95/layouts/partials/footer.html (L21)
2020-12-27 22:31:14 +05:30
Aditya Telange
0f994eee95 footer: change scroll behaviour as it was before 80954de
fixes #151

anchored-headings: retain anchor link '#' in URL
cc #108

footer: remove '#' with go-to-top

Revert "anchored-headings: retain anchor link '#' in URL"
This reverts commit 80954de8bd.

Revert "footer: rm unused code"
This reverts commit c76233b350.
2020-12-24 13:00:58 +05:30
Aditya Telange
7c53c14c85 Update theme.toml
change homepage to demo website
2020-12-23 16:44:32 +05:30
Aditya Telange
aeaa60d9b6 reset(css): rm -webkit-appearance
fixes: #150
2020-12-23 16:36:19 +05:30
pacientes
a36d045214 post-single(css): add image center align tag (#145)
usage in markdown =>
![name](path/to/image.png#center)

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-12-23 16:34:01 +05:30
Maurice Bauer
8933950217 i18n: Added missing german (de) translation (#147) 2020-12-23 13:09:20 +05:30
Aditya Telange
b4933eadd6 header: use .KeyName for accesskey search
in menu

- .Name doesn't work with emojis
- .URL doesn't work with url such as 'search/'
2020-12-18 22:50:04 +05:30
Aditya Telange
6c83df566c header: add accesskey (Alt + /) for search
in menu

- Alt + /: jumps to search page if in menu
2020-12-18 22:05:02 +05:30
Aditya Telange
bccce36c98 search: use kb nav only inside searchbox
rm 'prevent mouseclick to change active element'
2020-12-18 21:25:34 +05:30
Aditya Telange
a150c3449a Link AccessKeys shortcut in title of elements 2020-12-18 20:02:05 +05:30
Aditya Telange
23aeda369c head: trim whitespace from canonicalURL
- amend to 14c5245
2020-12-18 11:58:16 +05:30
Aditya Telange
b7f8749cdf Search: Keyboard Bindings for easier navigation (#138)
* set up basic actions on keypress
* add actions to perform conditionally
* add simple highlight animation
* prevent mouseclick to change active element
* clear input box on Escape
* click on Arrow Right
* clear results and focus search-input on esc
* refactor
2020-12-18 11:45:10 +05:30
Maciej Sawicki
d6b2282582 templates: Fix series detection in opengraph
When inside front matter you specified series with spaces,
then the opengraph template wouldn't detect other articles,
because in `.Site.Taxonomies.series` they are stored by
urlized key.

Example:

```yaml
series:
    - My Series
```

```gohtml
{{/* in a template */}}
{{- $series := index .Site.Taxonomies.series$name }}

{{/* was resolved to */}}
{{- $series := index {'my-series': ...} "MySeries" }}
```

(cherry picked from commit d2d493ab5d6a054001a8448ea0de2949dac4b30e)
2020-12-16 18:07:59 +05:30
Aditya Telange
f5417ab6d0 Update README.md 2020-12-16 00:01:44 +05:30
Cody Brownstein
2abc278c69 head: Fix user defining canonical URL resulting in multiple canonical URLs (#133)
* Revert "head: add support for Canonical URLs"

This reverts commit 8af7c551ff.

* Allow user to specify single canonical URL
2020-12-15 22:59:04 +05:30
Aditya Telange
77ff1e6b45 search: introduce loading custom fusejs options from site config #134
* refer https://fusejs.io/api/options.html for opts
* keys used can be some, all or none from
   ["title", "permalink", "summary", "content"]

in config.yml, add fuseOpts as shown below =>
  params:
    fuseOpts:
        isCaseSensitive: false
        shouldSort: true
        location: 0
        distance: 1000
        threshold: 0.4
        minMatchCharLength: 0
        keys: ["title", "permalink", "summary", "content"]
2020-12-15 18:57:42 +05:30
Kian Kasad
f9236d92af shortcodes: figure: don't use h4 tag in figure captions (#127)
* avoiding h4 tags in figcaption elements
* picked from https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/figure.html
* figure.html is licensed under Apache License 2.0 and is part of https://github.com/gohugoio/hugo
2020-12-15 17:52:04 +05:30
Aditya Telange
09aba49bf0 header: rm class attributes [WIP]
from hugov0.79.0
2020-12-13 22:29:06 +05:30
Aditya Telange
bf79c208ae layouts: use hugo.IsProduction 2020-12-13 20:19:25 +05:30
Aditya Telange
153740bbac header: add title attribute to menus 2020-12-13 20:17:01 +05:30
Aditya Telange
73de54e4bc update theme meta
- add search
2020-12-13 20:01:54 +05:30
Aditya Telange
14c524539b Remove whitespace around urls wherever applicable
- corrects mistyped urls with leading or trailing whitespaces
2020-12-13 16:56:41 +05:30
Aditya Telange
8af7c551ff head: add support for Canonical URLs
cc:  #104

usage =>
  in site config.yml (used for home page only) =>
     canonical: ["https://www.example.com" , "https://blog.example.com"]
  in per-page vars =>
     canonical: ["https://www.example.com/page1" , "https://blog.example.com/pages/page1"]
2020-12-13 16:36:30 +05:30
Aditya Telange
b7f5dd10f1 language-switch: humanize only Lang code
- displays weird text :/
- amend to ad11fe1
2020-12-11 17:20:50 +05:30
Aditya Telange
d74ad93c18 head: add *.css under assets/css/extended/
to bundle it with stylesheet.css as single resource minified

- added to the end so that default vars are overriden properly
2020-12-11 18:22:21 +05:30
Kian Kasad
5e40132673 single: add support for custom taxonomy URLs (#125)
* fix URLs of tags in tag lists
* use recommended code by hugo for tag list generator
* https://gohugo.io/templates/taxonomy-templates/#example-list-tags-in-a-single-page-template
* closes: #113
2020-12-11 11:28:09 +05:30
Aditya Telange
9c09564590 header: fix trailing slash '/' in menu URL
closes #122
2020-12-11 00:18:08 +05:30
Kian Kasad
7352aedb34 README: make non-executable (#106)
Readme isn't an executable, so the executable permission should be disabled.
2020-12-10 21:09:16 +05:30
pacientes
11c3230214 social-icons: add svg for kakaotalk (#115)
credits for svg: https://www.flaticon.com/free-icon/kakao-talk_2111683
Flaticon License: Free for personal and commercial purpose with attribution.

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-12-08 18:19:07 +05:30
Aditya Telange
db38e156f5 footer: hljs: add check to not load hljs on archive and search 2020-12-08 00:16:11 +05:30
Aditya Telange
08e58f5f77 head: commonize stylesheet resource 2020-12-07 22:59:51 +05:30
Aditya Telange
91bc0acfa9 Update README.md 2020-12-06 22:31:18 +05:30
Aditya Telange
f4b900de72 footer: go-to-top: fix Uncrawlable Link
rm redundant a tag
2020-12-06 19:45:46 +05:30
Aditya Telange
bb2717a3b9 search: fix redundant results after clearing searchbox 2020-12-06 19:44:36 +05:30
Aditya Telange
4a4408573e search: init Search feature (#105)
* based on https://gist.github.com/cmod/5410eae147e4318164258742dd053993
* modified working for PaperMod
* fetches current lang index.json for search
* add fuse.js v6.4.3 LICENSE: Apache License 2.0
* bundled fastsearch and fusejs as search.js

Co-authored-by: Craig Mod <stuff@craigmod.com>
2020-12-06 18:19:50 +05:30
Aditya Telange
c76233b350 footer: rm unused code
CC: #108 #64
2020-12-05 20:45:15 +05:30
Aditya Telange
80954de8bd anchored-headings: retain anchor link '#' in URL
close: #108
2020-12-05 20:17:07 +05:30
Devorange
d4b259cd63 list: use absURL for pagination (#109) 2020-12-05 20:12:55 +05:30
Aditya Telange
28abfba27e home-info: fix title line height
close: #102
2020-12-04 16:29:56 +05:30
Aditya Telange
f2253b2e83 Create FUNDING.yml 2020-12-02 16:04:55 +05:30
Aditya Telange
a9ff9533a0 head, footer: add option to disable fingerprinting #89
in site config =>
    params:
      assets:
        disableFingerprinting: true
2020-12-01 18:52:06 +05:30
Aditya Telange
7a0e742def header: improve menu location indicator
- fix non-highlight on subdirs
- menu url need not have leading or trailing slashes
- fix non-highlight with multilingual config
2020-12-01 13:59:31 +05:30
Aditya Telange
dc743ae5e2 header: fix menu items overflow instead of horizontal scroll #99
- broken by https://git.io/JIfLS
2020-12-01 08:36:08 +05:30
Aditya Telange
29797a7464 social-icons: add kofi icon #29
* thanks to https://iconify.design/icon-sets/simple-icons/kofi.html
  and Simple Icons Collaborators
* License CC0 1.0
* edited to fit dual-tone theme
2020-11-30 20:55:41 +05:30
Aditya Telange
b5f3debebb footer: go-to-top: fix overlap with next_page button
close: #91
2020-11-30 13:25:20 +05:30
Aditya Telange
0d8cb9fd15 cover: responsive cover: rm forced q100
- lets quality attribute in imaging section
- https://gohugo.io/content-management/image-processing/#image-processing-config

close #92
2020-11-29 09:39:57 +05:30
Misha Brukman
e89e7570cd Archive: Close the <sup> tag for month counts (#93) 2020-11-29 09:20:56 +05:30
Aditya Telange
ad11fe16ed language-switch: rm humanize on 'displayFullLangName'
- displays weird text :/
2020-11-28 23:04:32 +05:30
Aditya Telange
e7e5e8ce6d main(css): rm media rule for smaller devices
-has no effect
2020-11-28 23:03:06 +05:30
Aditya Telange
673f7ccc96 baseof: rm unused classes
single, home
2020-11-28 22:33:57 +05:30
Aditya Telange
b301d60f03 theme-switch: Improve theme switch logic (#86)
- removes unnecessary local-storage item removal
- less inline script on build
- assumes `defaultTheme as auto when value is not `dark` or `light`
- should work according to table at docs
2020-11-26 09:10:24 +05:30
Aditya Telange
678b5d82fc update README 2020-11-24 23:16:17 +05:30
Niek Blankers
aa6be95a12 social-icons: add svg for keybase (#79)
From https://github.com/keybase/keybase-issues/issues/973#issuecomment-307547386
SVG reduced to 2.5kB

Co-authored-by: dabura667 <matsuringo667@gmail.com>
2020-11-23 18:25:57 +05:30
Aditya Telange
dbb0e63248 head: change title separator "-" -> "|" 2020-11-23 01:27:09 +05:30
Aditya Telange
20710d34b9 social-icons: Trim whitespace and Lowercase name
- allows name like shown below

    socialIcons:
        - name: "TWitteR"
          url: "https://twitter.com"
        - name: "Codepen"
          url: "https://codepen.com"
2020-11-22 19:20:58 +05:30
Mikhail Zolotukhin
1f608c8fad social-icons: add svg for Mastodon (#82)
from: https://joinmastodon.org/press-kit.zip
LICENSE: AGPLv3

close #81
2020-11-22 19:05:56 +05:30
Aditya Telange
d4967f9ebc hljs: updatev10.2.0 -> v10.2.1
* credits : https://cdnjs.com/libraries/highlight.js
2020-11-19 15:29:02 +05:30
Aditya Telange
4cc4604498 cover: add rel="noopener noreferrer"
to links
2020-11-18 15:45:19 +05:30
Aditya Telange
361362773c social-icons: add svg for discord
- from https://discord.com/branding
close #76
2020-11-18 15:34:21 +05:30
Aditya Telange
c429d81b18 static: rm PaperMod icons from theme 2020-11-17 19:39:24 +05:30
Aditya Telange
a276a5dfd1 head: rm site.webmanifest, not a PWA 2020-11-17 19:38:07 +05:30
Aditya Telange
c9a387ebdb assets(css): fix "calc" operands should be correctly spaced 2020-11-17 15:56:27 +05:30
Aditya Telange
fd06af55fc footer: simpify loading hljs,
defer and beautify
2020-11-17 15:44:16 +05:30
Aditya Telange
3c28b8a8b2 footer: fix scroll for non ASCII anchors
closes #78
2020-11-17 15:25:39 +05:30
Aditya Telange
2a06c26e9f assets(css): optimize using csso
https://css.github.io/csso/csso.html
2020-11-17 12:45:19 +05:30
Aditya Telange
62477e7d1b head: add meta robots
- disable indexing for non-prod sites
2020-11-14 12:55:19 +05:30
Aditya Telange
f4998a1ab8 head: add google_news internal template from hugo 2020-11-14 12:44:56 +05:30
Aditya Telange
66ba0f0ea9 home-info: unset line-clamp for content
- content can be as long as one wants it to be
- was hiding content on mobile devices
- amend to 2c7cffb
2020-11-12 22:20:24 +05:30
Aditya Telange
d2f2fa6cc6 head: add alternate pages
to indicate multiple language/locale versions
for multilungual sites
2020-11-12 11:19:29 +05:30
Aditya Telange
b22520630d toc: highlight underline on hover 2020-11-12 11:09:23 +05:30
Aditya Telange
1775dfccfd scroll-bar(css): fix dark track color on list
pages, due to c960b8a
2020-11-11 10:39:55 +05:30
Aditya Telange
0b07dd2a7d header: fix spacing when logo-text overflows 2020-11-11 10:36:54 +05:30
Aditya Telange
cf4fd27e3d anchored-headings: port to PaperMod
- add corresponding css
- gen anchored headings for h1-h6
- link with single.html
2020-11-10 12:34:22 +05:30
Jake Wiesler
2b0619f684 anchored-headings: init partial
Signed-off-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-11-10 12:08:52 +05:30
Aditya Telange
8574c385cd profile-mode: user set-able image size
- default 150

usage:
      profileMode:
        imageUrl: "/android-chrome-192x192.png"
        imageWidth: 120
        imageHeight: 120
2020-11-09 12:14:45 +05:30
Aditya Telange
c960b8af04 scroll-bar(css): fix white track color on list
pages, due to diff bg
2020-11-09 11:52:57 +05:30
Aditya Telange
64e8532a50 head: load stylesheet resources with a wildcard
- include profile-mode
  (cannot be done before f9fbdc9963)
- reduce request count from 2 to 1
  improves perf :P
  https://web.dev/resource-summary/
2020-11-09 11:18:22 +05:30
Aditya Telange
f9fbdc9963 profile-mode: improvements
- update css logic
- rm redundant code
- reduce image size, it looks big imo
2020-11-09 11:12:52 +05:30
Aditya Telange
b7169d2259 language-switch: enable emojify
- languageName: ":country_emoji:"
 can now be displayed as emoji
2020-11-08 23:07:51 +05:30
Aditya Telange
b5d55aee8d layouts/single: fix Lang Name hidden when LanguageName
was unset
2020-11-08 23:04:24 +05:30
Aditya Telange
77baa3d76e layouts: add robots.txt
used when
enableRobotsTXT: true

https://gohugo.io/templates/robots/
2020-11-08 22:31:27 +05:30
Aditya Telange
5264c7011e toc: add aria-label for accessibility reasons
- fix: Links do not have a discernible name
2020-11-06 10:58:23 +05:30
Aditya Telange
795c06b2cc head: improve favicons presence
- also set theme color to #2e2e33
- use syntax from https://favicon.io
- `site.webmanifest` added, should be present in "static"

Custom links to favicons can be added in site config =>

params:
  assets:
    favicon: "<link / abs url>"
    favicon16x16:  "<link / abs url>"
    favicon32x32:  "<link / abs url>"
    apple_touch_icon:  "<link / abs url>"
    safari_pinned_tab:  "<link / abs url>"
2020-11-05 19:48:30 +05:30
Itay Cohen
3064e8cfc5 theme-switch: Enable theme toggle unless specifically disabled (#69)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-11-04 14:04:45 +05:30
Aditya Telange
12b6b132e4 Revert "theme-switch-button: improve logic"
This reverts commit 0eed773e6d.
2020-11-03 20:21:10 +05:30
Aditya Telange
0eed773e6d theme-switch-button: improve logic
- owner can set dark/light/auto default theme
- theme toggle will be enabled on all theme modes unless disbaled
- if disableThemeToggle is true, user won't be able to switch themes,
here auto (a/c to system theme) also works

for #69
2020-11-03 20:07:59 +05:30
Aditya Telange
229df19ec9 header: fix spacing between lang-selector and label
when theme-toggle is disabled
2020-11-03 19:44:19 +05:30
Nick Spreitzer
55107fcfc2 footer: Fix broken anchor link scrolling (#64)
fixes: Footnotes anchor link hrefs such as `#fn:1`
fixes: ToC anchors failing with hrefs having numbers.

based-on: https://stackoverflow.com/a/51396346/300212
2020-10-30 22:39:44 +05:30
Dan van Wijk
0a7a540761 footer: remove hidden chars (#63)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-10-30 17:31:52 +05:30
Aditya Telange
b8c29c2e06 reset(css): disable focus only on toc and go-to-top button
revert "css: reset: disbale highlight on focus"

This reverts commit 94b67a5dc9.
2020-10-30 11:42:58 +05:30
Aditya Telange
b239f42f6b Add accesskeys (attribute specifies a shortcut key to activate/focus an element.)
c - ToC Open/Close
g- Go To Top
h - Home (according to current lang)
t - Theme toggle

more: https://www.w3schools.com/tags/att_global_accesskey.asp
2020-10-30 01:15:43 +05:30
Aditya Telange
9acbc2c134 baseof: use dir attribute instead of class
and set default dir to `auto`

main(css): rm unused class
2020-10-30 01:01:48 +05:30
Aditya Telange
0887805caf README: update
link faq post
2020-10-28 22:41:42 +05:30
Aditya Telange
7392edb1d3 README: update
- rm old Lighthouse report
- beautify
- update demo image
2020-10-28 11:11:13 +05:30
173 changed files with 4669 additions and 1402 deletions

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: adityatelange
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.buymeacoffee.com/adityatelange']

47
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
<!--
## READ BEFORE OPENING ISSUES
Please fill the template below
- **DO NOT** ask for instructions.
- Use Discussions section if you need help
- See project wiki https://github.com/adityatelange/hugo-PaperMod/wiki
- Read FAQs section https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs
- Search for previous issues/ pull requests
-->
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- Hugo Version [ >=0.82.0 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:**
<!--
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
**Expected behavior**:
<!-- A clear and concise description of what you expected to happen. -->
**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
**Additional context**
<!--Add any other context about the problem here. -->

4
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
contact_links:
- name: PaperMod Discussions
url: https://github.com/adityatelange/hugo-PaperMod/discussions
about: Please ask and answer questions/doubts here, do not open an issue for questions.

View File

@@ -0,0 +1,43 @@
<!--
## READ BEFORE OPENING A PR
Thank you for contributing to hugo-PaperMod!
Please fill out the following questions to make it easier for us to review your
changes. You do not need to check all the boxes below.
**NOTE**: PaperMod does not have any external dependencies fetched from 3rd party
CDN servers. However we do have custom Head/Footer extender templates which you can use
to add those to your website.
https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#custom-head--footer
-->
**What does this PR change? What problem does it solve?**
<!--
Describe the changes and their purpose here, as detailed as and if needed.
Please do not add 2 unrelated changes in a single PR as it is difficult to track/revert those in future.
-->
**Was the change discussed in an issue or in the Discussions before?**
<!--
Link issues and relevant Discussions posts here.
If this PR resolves an issue on GitHub, use "Closes #1234" so that the issue
is closed automatically when this PR is merged.
-->
## PR Checklist
- [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-).
- [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [ ] This change **does not** any CDN resources/links.
- [ ] This change **does not** include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository.

32
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Build
on:
pull_request:
branches:
- master
- exampleSite
workflow_dispatch:
# manual run
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
ref: exampleSite
- name: Get Theme
run: git submodule update --init --recursive
- name: Update theme to Latest commit
run: git submodule update --remote --merge
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build
run: hugo --buildDrafts --gc --verbose --minify

27
.gitignore vendored Normal file
View File

@@ -0,0 +1,27 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
/public
.DS_Store

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "themes/hugo-PaperMod"]
path = themes/hugo-PaperMod
url = https://github.com/adityatelange/hugo-PaperMod.git

0
.hugo_build.lock Normal file
View File

View File

@@ -1,6 +1,7 @@
MIT License
Copyright (c) 2020 nanxiaobei, adityatelange
Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021 adityatelange
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

111
README.md Executable file → Normal file
View File

@@ -1,88 +1,89 @@
![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)
![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)
<h1 align=center>Hugo PaperMod | <a href="https://adityatelange.github.io/hugo-PaperMod/" rel="nofollow">Demo</a></h1>
<h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4>
<br>
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
> The goal of this project is to add more Features and customization to the og theme.
The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
**ExampleSite** can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source.
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.82.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.82.0)
[![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)](https://github.com/adityatelange/hugo-PaperMod/deployments/activity_log?environment=github-pages)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod)
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)
# hugo-PaperMod | [Demo](https://adityatelange.github.io/hugo-PaperMod/)
☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive
Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
The goal of this project is add more Features and customization to the og theme.
The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with exampleSite as source.
---
<p align="center">
<kbd><img width=600px src="https://i.ibb.co/GvspqCX/HomeInfo.png" alt="HomeInfo" /></kbd>
<kbd><img width=153px src="https://i.ibb.co/LNgGcrt/mobileview.png" alt="HomeInfo" /></kbd>
<kbd><img src="https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png" alt="Mockup image" title="Mockup"/></kbd>
</p>
---
## Install
## Features/Mods 💥
Read this post For More Details => [hugo-PaperMod - Installation](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/)
- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default.
- 3 Modes:
- [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode)
- [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode)
- [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode)
- Table of Content Generation (newer implementation).
- Archive of posts.
- Social Icons (home-info and profile-mode)
- Social-Media Share buttons on post.
- Menu location indicator.
- Multilingual support. (with language selector)
- Taxonomies
- Cover image for each post (with Responsive image support).
- Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button).
- SEO Friendly.
- Muliple Author support.
- Search Page with Fuse.js
- Other Posts suggestion below a post
- BreadCrumb Navigation
- Code Block Copy buttons
- No webpack, nodejs and other depedencies required to edit the theme.
Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**
---
## Features/Mods
## Install/Update 📥
- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default.
- 3 Modes:
- Regular Mode.
- [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode)
- [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode)
- Table of Content Generation (newer implementation).
- Archive of posts.
- Social-Media Share buttons on post.
- Menu location indicator.
- Multilingual support.
- Cover image for each post (with Responsive image support).
- Light/Dark theme ( automatic theme switch a/c to browser theme).
- SEO Friendly.
- Muliple Author support.
- No webpack, nodejs and other depedencies required to edit the theme :)
Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/)
Release ChangeLog has info about stuff added: [Releases](https://github.com/adityatelange/hugo-PaperMod/releases)
Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)**
---
## Social-Icons
## Social-Icons/Share-Icons 🖼️
Read this post For More Details => [Social-Icons](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-icons/)
Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**
---
## LightHouse Report
## FAQs / How To's Guide 🙋
<kbd><a href="https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F"><img src="https://i.ibb.co/y6RwCzb/lighthouse.png" alt="LightHouse" /></a></kbd>
Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)**
---
### Sponsoring
## Release Changelog
If you like my work and if you think this project is worth to support it, you can
<a href="https://www.buymeacoffee.com/adityatelange" target="_blank">
<img height=40 width=150 src="https://cdn.buymeacoffee.com/buttons/v2/arial-blue.png" alt="Buy Me A Coffee"/>
</a>
Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)**
---
## Found a bug?
## [LightHouse Report (100% ?)](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F)
If you spot any bugs, please use [Issue Tracker](https://github.com/adityatelange/hugo-PaperMod/issues) and/or
create a new [Pull Request](https://github.com/adityatelange/hugo-PaperMod/pulls) to fix the issue.
---
[![GitHub issues](https://img.shields.io/github/issues-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aopen)
[![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aissue+is%3Aclosed)
[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Aopen+is%3Apr)
[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Apr+is%3Aclosed)
## Special Thanks 🌟
- [**Highlight.js**](https://github.com/highlightjs/highlight.js)
- [**Fuse.js**](https://github.com/krisk/fuse)
- [**Feather Icons**](https://github.com/feathericons/feather)
- **All Contributors and Supporters**

View File

@@ -1,60 +0,0 @@
/* Archive
-------------------------------------------------- */
.archive-posts {
width: 100%;
font-size: 16px;
}
.archive-year {
margin-top: 40px;
}
.archive-year:not(:last-of-type) {
border-bottom: 2px solid var(--border);
}
.archive-month {
display: flex;
align-items: flex-start;
padding: 10px 0;
}
.archive-month-header {
margin: 25px 0;
width: 200px;
}
.archive-month:not(:last-of-type) {
border-bottom: 1px solid var(--border);
}
.archive-entry {
position: relative;
padding: 5px;
margin: 10px 0;
}
.archive-entry-title {
margin: 5px 0;
font-weight: 400;
}
.archive-meta {
color: var(--secondary);
font-size: 14px;
}
.archive-count {
color: var(--secondary);
font-size: 14px;
}
@media (max-width: 800px) {
.archive-month {
flex-direction: column;
}
.archive-year {
margin-top: 20px;
}
}

View File

@@ -1,50 +0,0 @@
/* Footer
-------------------------------------------------- */
.footer {
max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto;
padding: calc((var(--footer-height) - (var(--gap)) - 10px) / 2) var(--gap);
color: var(--secondary);
font-size: 12px;
text-align: center;
line-height: 24px;
}
.footer span {
margin-inline-start: 1px;
margin-inline-end: 1px;
}
.footer a {
color: inherit;
border-bottom: 1px solid var(--secondary);
}
.footer a:hover {
color: var(--primary);
border-bottom: 1px solid var(--primary);
}
.top-link {
font-size: 12px;
visibility: hidden;
opacity: 0;
position: fixed;
bottom: 60px;
right: 30px;
z-index: 99;
background: var(--tertiary);
width: 42px;
height: 42px;
padding: 12px;
color: var(--secondary);
border-radius: 64px;
fill: currentColor;
fill-opacity: 80%;
transition: visibility 0.5s,
opacity 0.8s linear;
}
.top-link:hover {
color: var(--primary);
}

View File

@@ -1,319 +0,0 @@
/* Post single
-------------------------------------------------- */
.post-header {
margin: 24px auto var(--content-gap) auto
}
.post-title {
margin-bottom: 2px;
font-size: 40px;
transform: translateX(-2px);
}
.post-meta {
color: var(--secondary);
font-size: 14px;
display: flex;
flex-wrap: wrap;
}
.post-meta .i18n_list li {
display: inline-flex;
list-style: none;
margin: auto 3px;
box-shadow: 0 1px 0 var(--secondary);
}
.post-content {
color: var(--content);
}
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin: 24px 0 16px 0;
}
.post-content h1 {
margin: 40px auto 32px auto;
font-size: 40px;
}
.post-content h2 {
margin: 32px auto 24px auto;
font-size: 32px;
}
.post-content h3 {
font-size: 24px;
}
.post-content h4 {
font-size: 16px;
}
.post-content h5 {
font-size: 14px;
}
.post-content h6 {
font-size: 12px;
}
.post-content a {
box-shadow: 0 1px 0 var(--primary);
}
.post-content a code {
margin: auto 0;
border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset;
}
.post-content del {
text-decoration: none;
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50% / 1px 1px repeat-x;
}
.post-content p,
.post-content ul,
.post-content ol,
.post-content dl {
margin-bottom: var(--content-gap);
}
.post-content ul,
.post-content ol {
padding-inline-start: 20px;
}
.post-content li {
margin-top: 5px;
}
.post-content li p {
margin-bottom: 0;
}
.post-content dl {
display: flex;
flex-wrap: wrap;
margin: 0;
}
.post-content dt {
width: 25%;
font-weight: 700;
}
.post-content dd {
width: 75%;
margin-inline-start: 0;
padding-inline-start: 10px;
}
.post-content dt~dt,
.post-content dd~dd {
margin-top: 10px;
}
.post-content table {
margin-bottom: 32px;
}
.post-content table th,
.post-content table:not(.highlighttable) td {
min-width: 80px;
padding: 12px 8px;
line-height: 1.5;
border-bottom: 1px solid var(--border);
}
.post-content table th {
font-size: 14px;
text-align: start;
}
.post-content table:not(.highlighttable) td code:only-child {
margin: auto 0;
}
.post-content .highlight,
.post-content pre {
margin: auto calc(var(--gap) * -1) 32px calc(var(--gap) * -1);
background: var(--hljs-bg) !important;
border-radius: var(--radius);
}
.post-content li>.highlight {
margin-inline-end: 0
}
.post-content ul pre {
margin-inline-start: calc(var(--gap) * -2);
}
.post-content .highlight pre {
margin: 0;
}
/* table */
.post-content .highlighttable {
table-layout: fixed;
}
.post-content .highlighttable td:first-child {
width: 40px;
}
.post-content .highlighttable td .linenodiv {
padding-inline-end: 0 !important;
}
.post-content .highlighttable td .linenodiv pre,
.post-content .highlighttable td .highlight {
margin-bottom: 0;
}
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
display: none;
}
/* inline */
.post-content .highlight span {
background: transparent !important;
}
.post-content code {
margin: auto 4px;
padding: 4px 6px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: 0.78em;
line-height: 1.5;
background: var(--code-bg);
border-radius: 2px;
}
.post-content pre code {
display: block;
margin: auto 0;
padding: 10px;
color: rgba(255, 255, 255, 0.8);
background: transparent;
border-radius: 0;
overflow-x: auto;
}
.post-content blockquote {
margin: 0 calc(var(--gap) * -1);
padding: 0 32px;
border-inline-start: 2px solid var(--primary);
}
.post-content hr {
margin: 30px calc(var(--gap) * -1);
height: 2px;
background: var(--tertiary);
border-top: 0;
border-bottom: 0;
}
.post-content iframe {
max-width: 100%;
}
.post-content img {
border-radius: 4px;
}
.toc {
margin-bottom: 40px;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: .5em;
}
.toc details summary {
cursor: zoom-in;
margin-inline-start: 20px;
}
.toc details[open] summary {
cursor: zoom-out;
}
.toc .details {
display: inline;
font-weight: 500;
}
.toc blockquote {
margin: 0 20px;
padding: 10px 20px;
}
.toc li ul {
margin-inline-start: var(--gap);
}
.post-footer {
margin-top: 56px;
}
.post-tags li {
display: inline-block;
margin-inline-end: 3px;
margin-bottom: 5px;
}
.post-tags a {
display: block;
padding-inline-start: 14px;
padding-inline-end: 14px;
color: var(--secondary);
font-size: 14px;
line-height: 34px;
background: var(--code-bg);
border-radius: 4px;
border: 1px solid var(--tertiary);
}
.post-tags a:hover {
background: var(--border);
}
.share-buttons {
margin-top: var(--gap);
border: 1px solid var(--tertiary);
padding-inline-start: var(--radius);
border-radius: var(--radius);
display: flex;
overflow-x: auto;
}
.share-buttons a {
margin-top: 10px;
}
.share-buttons a:not(:last-of-type) {
margin-inline-end: 12px;
}
.share-buttons a svg {
height: 30px;
width: 30px;
fill: currentColor;
transition: transform 0.1s;
}
.share-buttons svg:hover {
transform: scale(0.96);
}
@media screen and (max-width: 600px) {
.post-content blockquote {
margin: 0 calc(var(--gap) * -1);
padding: 0 21px;
}
}

View File

@@ -1,62 +0,0 @@
.main {
text-align: center;
display: table;
}
.main>.profile {
display: table-cell;
vertical-align: middle;
}
.main>.profile>.profile_inner {
transform: translate(0, -10%);
}
.profile_inner h1 {
padding: 12px 0;
}
.profile_inner span {
padding: 10px 0;
font-size: 18px;
}
img {
display: inline-table;
width: 180px;
border-radius: 50%;
pointer-events: none;
}
@media screen and (max-width: 600px) {
img {
width: 150px;
}
.main>.profile>.profile_inner {
transform: translate(0, 0);
}
}
.buttons {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 400px;
margin: 0 auto;
}
.button {
background: var(--tertiary);
border-radius: var(--radius);
margin: 8px;
padding: 6px;
transition: transform 0.1s;
}
.button-inner {
padding: 0 8px;
}
.button:active {
transform: scale(0.96);
}

View File

@@ -1,137 +0,0 @@
/* Reset
-------------------------------------------------- */
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-tap-highlight-color: transparent;
}
body {
margin: 0;
color: var(--primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 18px;
line-height: 1.6;
word-break: break-word;
background: var(--theme);
}
article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section {
display: block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0;
color: var(--primary);
line-height: 1.2;
}
p {
margin-top: 0;
margin-bottom: 0;
}
ul {
margin: 0;
padding: 0;
}
a {
color: var(--primary);
text-decoration: none;
}
figure {
margin: 0;
}
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
display: block;
overflow-x: scroll;
word-break: keep-all;
}
button,
input,
textarea {
padding: 0;
font: inherit;
background: transparent;
border: 0;
-webkit-appearance: none;
}
button,
input[type='button'],
input[type='submit'] {
cursor: pointer;
}
input,
textarea {
padding: 0;
border: 0;
outline: 0;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 50px var(--theme) inset;
}
img {
display: block;
max-width: 100%;
}
*::-webkit-scrollbar {
width: 10px;
height: 6px;
}
*::-webkit-scrollbar-track {
background: var(--theme);
}
*::-webkit-scrollbar-thumb {
background: var(--tertiary);
border-radius: var(--radius);
}
*::-webkit-scrollbar-thumb:hover {
background: var(--secondary);
}
@media screen and (max-width: 800px) {
*::-webkit-scrollbar {
width: 8px;
height: 2px;
}
}
*:focus {
outline:none;
}

141
config.yml Normal file
View File

@@ -0,0 +1,141 @@
baseURL: "https://akilan.io/"
title: Akilan
paginate: 5
theme: PaperMod
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
minify:
disableXML: false
minifyOutput: true
params:
env: production # to enable google analytics, opengraph, twitter-cards and schema.
title: Akilan
description: "Akilan the not boring developer"
keywords: [Blog, Portfolio, Akilan]
author: ["Me","Not boring developer","Akilan Selvacoumar"]
# author: ["Me", "You"] # multiple authors
# images: ["<link or path of image for opengraph, twitter-cards>"]
DateFormat: "January 2, 2006"
defaultTheme: auto # dark, light
disableThemeToggle: false
ShowReadingTime: true
ShowShareButtons: false
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: false
disableSpecial1stPost: false
disableScrollToTop: false
comments: false
hidemeta: false
hideSummary: false
showtoc: true
tocopen: false
# profile-mode
profileMode:
enabled: true # needs to be explicitly set
title: The Not Boring Developer
subtitle: "Akilan Selvacoumar"
imageUrl: "https://avatars.githubusercontent.com/u/31743758?v=4"
imageWidth: 160
imageHeight: 160
imageTitle: my image
buttons:
- name: About
url: about
- name: Resumé
url: resume
- name: Projects
url: projects
- name: Technical Posts
url: technicalposts
- name: General Posts
url: generalposts
- name: Hiking
url: hiking
# home-info mode
homeInfoParams:
Title: "Hi there \U0001F44B"
Content: Welcome to my blog
socialIcons:
- name: youtube
url: "https://www.youtube.com/channel/UChy18QB1hBzZ7MniIW_FJvQ"
- name: github
url: "https://github.com/Akilan1999"
- name: linkedin
url: "https://www.linkedin.com/in/akilan-selvacoumar/"
- name: email
url: "mailto:me@akilan.io"
cover:
hidden: true # hide everywhere but not in structured data
hiddenInList: true # hide on list pages and home
hiddenInSingle: true # hide on single page
editPost:
URL: "https://github.com/Akilan1999/Akilan-website/tree/master/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
# for search
# https://fusejs.io/api/options.html
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]
menu:
main:
- identifier: About
name: About
url: /about/
weight: 10
- identifier: Resumé
name: Resumé
url: /resume/
weight: 20
- identifier: Projects
name: Projects
url: /projects/
weight: 30
- identifier: Technical Posts
name: Technical Posts
url: /technicalposts/
weight: 40
- identifier: General Posts
name: General Posts
url: /Generalposts/
weight: 50
- identifier: Papers
name: Papers
url: /Papers/
weight: 50
- identifier: Chat
name: Chat
url: /Chat/
weight: 60
- identifier: Hiking
name: Hiking
url: /hiking/
weight: 60
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
# pygmentsUseClasses: true
# markup:
# highlight:
# # anchorLineNos: true
# codeFences: true
# guessSyntax: true
# lineNos: true
# style: monokai

23
content/about.md Normal file
View File

@@ -0,0 +1,23 @@
---
title: About
summary: I am a Homosapien
description: I am a Homosapien
---
## Hi there,
I am just a normal person.
I love to build stuff and a huge believer in randomization.
### Areas I focus on:
1. Distributed computation
2. p2p networks
3. RISC-V
4. Linux distributions
5. Compilers
<!-- ### Preferred programming langauge to use:
- Go lang (Scalable code) -->
### My wish list
- FS2020 becomes open source or better alternatives catch up.
- Distributed computing on the foundations of a p2p network becomes the standard norm.
<!-- - Using houseold devices to generate basic income -->

10
content/chat.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: Chat
summary: One to one conversation
description: One to one conversation
---
If you would like to have a one of one chat you can initially email me with
the email me@akilan.io. I will normally respond within 24 hours and at the worst
case 48 hours.
<!-- Link: https://calendly.com/akilan1999 -->

View File

@@ -0,0 +1,91 @@
---
title: "Why FS2020 is something very Exciting"
summary: Closer towards a future where it's hard to compare reality and simulation
date: 2020-05-02
tags: ["Flightsim","Introduction"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/fs2020]
weight: 2
---
## What are Flight sims ?
A flight simulator is a device that artificially re-creates aircraft flight and the environment in which it flies, for pilot training, design, or other purposes. It has been really popular since 1982. The first release was called subLogic flight simulator which was released in 1979 on the Apple II.
![](https://i.ytimg.com/vi/vK-iIrIEOyc/hqdefault.jpg)
Since this release flight sim has completely evolved with newer versions with newer features which means more and more accurate modelling of newer aircrafts.
### Important milestones:
- Flight Simulator 2.0:
![](https://s.uvlist.net/l/y2014/01/122928.jpg)
- Flight Simulator 5.1:
![](https://i.ytimg.com/vi/dHpzHYHcqV8/hqdefault.jpg)
- Flight Simulator X:
![](https://s3-eu-west-2.amazonaws.com/assets.fsxinsider.com/app/uploads/2015/09/27215612/Image2.jpg)
Flight sims have also become part open source. The current best flight simulator in the market Xplane 11 has open source modules such as BetterPushBack , SharedCockpit etc ... In recent years flight school students can even skip most of the instrumental classes for aircrafts such as the Ceesna's due to the fact that they have already learned it in the flight sim at home.
## FS2020 Competitor
Before we start the discussion of FS2020 we need to compare the current progress of their competitor [Xplane](https://www.x-plane.com/) which is designed by a Software Company called [Laminar research](http://www.laminarresearch.com/). Xplane 11 is the current best Flight sim platform out there. Xplane 11 comes built in with VR compatibility , Runs on all platforms such as Mac , Windows , Linux and the graphics speaks for itself and runs on most common Pc's on today's standards.
![](https://steamcdn-a.akamaihd.net/steam/apps/269950/ss_35a2520bad426346196ac6e2aa96883e96f84e59.1920x1080.jpg?t=1586961059)
[XPlane 11 in VR](https://www.youtube.com/watch?v=31S_jUy3h7Q&t=887s)
## Introduction to FS2020
The release date of FS2020 is still unknown due to COVID19 delays. All we know is that it should be coming out sometime this year. The idea is that the game is rendered on your PC but the scenery is downloaded from the azure servers. The reason it has a lot of hype is because of the fact that it's graphics is game changing and even the amount of realism that they have added to the game (We will talk more on this later).
## Ground Scenery
![](https://lh6.googleusercontent.com/sagSw47Tw5K8i9KLgN-SZVKudzYN4B2UJu78qEiKZniaTaEWmFRkj673Cr4CCkISZgvYk0Q5mk-HF-2SU_tUfn_PqzCoCBbjK8q1Ur1X9lzlQJQjvvJV_p59qdPV470iw3uOZTwM)
The game has an online and offline maps. The Hype comes from the online maps as it's a 3D map from Bing. With the current technology, satellites are able to take a picture of cities from different angles and generate 3D models out of them and the game developers have been using a lot of machine learning techniques to generate the tiniest details such as grass ,trees , cars on the road etc.. There have also been very funny comments on these 3D maps such as "Tips on how to tour north korea", "How to catch your wife cheating","This video gave me morning wood. Girlfriend thought it was because of her. Yea honey....it's totally you." etc...
[This link will give you a general idea on 3D models of cities look like](https://earth.google.com/web/@40.71247137,-74.0072421,27.70327415a,2644.644745d,35y,35.47111927h,60.00244366t,0r)
For higher details many of the major airports are modeled partially manually. The movement ground crew and vehicles are all a bunch of AI's working in parallel. The details of the runway and taxiway are super high. In the demo we can even see tiny stones on the taxiway.
As per the developers the 3D models are generated using Photogrammetry data or else it's augmented bitmap which means that the base image is from bing maps and then it's filled with some pre-build objects. The size of the bing scenery which they use is around 2 Petabytes and this is only one aspect of the Sim. All the maps are generated or drawn based on the horizon and this varies based on the height of the aircraft.
## Behavior in the Sky
![](https://lh5.googleusercontent.com/_vxFWb0lLyo-NnwgypPoz4m0EFRbNX4qh54E5-YvnlPZ1cZEo-xW7kv9MqK06ns561bTfS2_QTwi13uEnU1CcLDBo8G9mg84nGBhvBqPiXl0fBU2K124CfedGS7_IOlpxG2PkjxD)
Again for the weather there is online and offline data. Is it actually interesting to know that simulating or modeling the weather is as complex as doing it for the ground. To simulate that the game generates millions of virtual particles to generate accurate lift for the aircraft. In many other sims the stalls in the code have been like flags (i.e on and off switch) this means that when the aircraft loses speed the nose dive will be a bit unrealistic. This has been fixed in FS2020 and they calculate various aspects such as density of air , wind patterns because at many times the aircraft would not even stall due to the design of the hardware which automatically pushes the nose down to gain speed. FS2020 can even predict which direction the aircraft will stall at.
### Atmospheric Simulation:
The developers had to use a fresh approach to ensure that the lighting effects have to be as realistic as possible and to also accommodate all new techniques coming out from the video game industry. They have their own scattering system which gets lights from unified sources such as Sunlight ,Moonlight ,Starlight ,City light etc... The photons are scattered based on the parameters such as humidity , weather , pollution etc ... The shadows of the clouds are casted on the ground , shadows of the ground have been casted on the clouds and so this gives unbelievable sights.
### Weather Special Effects:
The sim has volumetric 3D rain , volumetric Rainbow scattering; this means that the rainbow is generated based on the compositions required to generate one. Each water droplet on the windshield is generated based on the speed of the aircraft and as the aircraft speed varies this impacts on how much the water is stretched in the windshield of the cockpit.
The sim even has window icing that takes place mostly in the cruise altitude if the Anti ice systems are not turned on in the aircraft.
The position of the sun , moon and stars will be informed based on date and time of year and even the light of the city will be reflected back to the cloud which creates realistic VFR flying. The reflection of the building on water is also realistic based on time of day, number of clouds etc.. and it is rendered the same way as how the atmosphere is rendered.
### Volumetric clouds:
This is one of the best features for anyone flying aircraft's through clouds. There are 32 layers from sea level and they are based on density , shape , fuzziness and all these clouds can be seen from any angle. The formations are informed based on the updraft winds. The sim natively supports all types of clouds. The max view distance of generated clouds is 600 km.
### Real Weather Data:
The weather data is collected from one of the research centers in Switzerland. Based on data provided to the engine, The corresponding clouds and updrafts are generated. The sim gets upto 32 layers of real world cloud data, pressure , humidity, temperature, wind speed and gusts.
## Specs for the game:
![](https://lh3.googleusercontent.com/F-UoR7uLg0AfDB0ybzpE4uE8UM-IndxoVoLaSVlERcO7bBUXPERSNINNJLV8FqtWfjOtozGm7zf1rbmrHJPgXXidqMgOGyKfQPIM3eHKnNWARYIEVSqeAetDidGbAdxv_4NTDaox)

View File

@@ -0,0 +1,26 @@
---
title: "Open to work"
summary: Just graduated looking for remote or work based in the UAE.
date: 2024-07-07
tags: ["Work","Open"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/opentowork]
weight: 1
---
I am current working on my PhD experiments on CHERI based capability system.
[Read more](https://github.com/Akilan1999/phd-thesis/releases/download/Year2/thesis.pdf)
I am currently looking for work as a part time software engineer (Max 17 hours a week). What I
am capable of building is what you see in my website.
#### Current Location: UK (GMT +1)
#### Preferred rate hourly: 60$ an hour
#### Contact email: me@akilan.io (Response time will be 24 hours)
I am happy to have a conversation with interested employers :)

View File

@@ -0,0 +1,32 @@
---
title: "Psychological challenges working on P2PRC POST 1"
summary: Mental challenges I face when working on open source project I created called P2PRC.
date: 2021-22-06
tags: ["P2PRC","Psychological"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/P2PRC_Psychological_1]
weight: 1
---
Okay so P2PRC is a technical topic atleast for me as it's about a peer to peer networks that is designed for computation. This post is about how I feel mentally working on this project. What I am talking about in this post can be linked to how I feel working in
any of my personal projects.
At the current stage of P2PRC, I have been trying to use my free time on trying to build a binary that just works. I know it's being
optimistic but I am way over my head at many instances. The painful
part for me is figure out how to get this project at a useful state.
At the current moment P2PRC project is like me talking to myself.
Example I create an Issue , fix it and review my own code. It's like taking to yourself. This is fine initially but it just feels
extremely (i.e in kind words) lonely. No one is blame for this
but it's a true fact in my case simple as that.
I have no idea on why I keep working on this project. I guess
maybe it's just that I have fun doing it. The true fact is that it
is fun at times and really lonley at many times. As a hacker or
Open Source developer (i.e call it whatever you like). The important thing would just be feedback and hopefully feeling
happy on what you built.
I promoised that I would continue this project for 3 more years and
see how it continues from there. The project is at the very initial stages and very tough to say what would be it's fate. The aim of this was to be helping hand towards the main aim of creating a distributed game engine. But at the moment have no clue on how a
game engine works.

View File

@@ -0,0 +1,5 @@
---
title: General Posts
summary: General concepts and stuff I love to talk about.
description: Mostly on my hobbies and stuff other than CS topics.
---

5
content/hiking/_index.md Normal file
View File

@@ -0,0 +1,5 @@
---
title: Hiking
summary: Logging the places I hiking around for the weekend (To be updated on a weekly basis).
description: Logging the places I hiking around for the weekend (To be updated on a weekly basis).
---

View File

@@ -0,0 +1,54 @@
---
title: "Burntisland (Burnt Island)"
summary: The hike with best weather so far in the warmest Scottish winter.
tags: ["hiking","good weather","seaside"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/CutestTrainStation]
weight: 3
---
## Key Picture
![](/img/hike/burntisland/Edinburgh.jpeg)
Edinburgh the only sunny city in Scotland!!!
## Original path
![](/img/hike/burntisland/OriginalPath.png)
Path information: https://www.walkhighlands.co.uk/fife-stirling/the-binn-burntisland.shtml
## Walk description
A really easy and relaxed walk. Can be easily done no matter the weather condition.
From the previous hikes done so far one of the most well connected hikes (In terms of public transport) especially from the Edinburgh side.
### Key highlights
- Really cute train station.
- You can easily unleash the kid in yourself by adoring the cute trains and the [4 legged wingman](https://hips.hearstapps.com/hmg-prod/images/cutest-dog-breed-german-shephard-6435743c5766b.jpg?crop=1.00xw:0.836xh;0,0.141xh&resize=980:*) along the walkway.
- Fancy houses blocking pathways which should be public.
## Path we walked
![](/img/hike/burntisland/burntislandpath.jpg)
## Pictures
![](/img/hike/burntisland/burntisland.jpg)
This was taken from the highest peak and shows
an impressive view of the small town with Edinburgh across the sea. North bridge is barely visible due to the clouds.
![](/img/hike/burntisland/PathBlocked.jpeg)
While walking through the trail we intended to take
a deviation to walk through the Fife costal walkway
to walk closer to the sea. There is a small caveat, the segment of costal walkway can only be traversed
on a low tide (Unless you are [Moses](https://i.pinimg.com/474x/e5/fb/3e/e5fb3eb00e8a5c2566f571fdde2e0385.jpg)).
The annoying part was that there was a relatively high tide which we didn't notice blocking parts of the path. The worst case scenario would be to walk back to the start of the costal path and walk along side the road to city centre. The picture above reflects one of the deviated paths we could have taken but unfortunately private property had fenced out path way from the public from using it (This was a bit frustrating). When walking through the partially blocked pathway a nice view of the sea could be captured.
![](/img/hike/burntisland/Rocks.jpeg)
Rocky parts which had to be crossed through the costal walkway.
![](/img/hike/burntisland/Seaside.jpeg)
Start of the costal walkway from the fancy golf course. Crossing the golf course is part of the trail. Heading
to the beach is not part of the documented path on the trail provided in [Walkhighlands](https://www.walkhighlands.co.uk/fife-stirling/the-binn-burntisland.shtm).

50
content/hiking/kilin.md Normal file
View File

@@ -0,0 +1,50 @@
---
title: "Killin"
summary: Really cute public transport for the last stretch and great view of the highlands
tags: ["hiking","good weather","highlands","Perthshire"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/PersonalPublicTransport]
weight: 3
---
## Key Picture
![](https://photos.akilan.io/api/assets/6495891f-8dc6-4798-b900-02ad670d7e2e/thumbnail?size=preview&key=_q41093B16xTMIRZ_0lIS4uarrWcg5TDB0qGW8yXA3qcxh4--dmBMemG5_oNEm0Y4Rs&c=VJBWP152EfRwvwySXx4qQFiVSDQ%3D)
A random stream of water which my flatmate is tempted to row in. You wouldn't believe me but I have normal friends.
## Walk description
![](/img/hike/killin/path.png)
Path: https://www.walkhighlands.co.uk/perthshire/sron-a-chlachain.shtml
### Key highlights
- Great weather and a lot of rainbows! It made total sense to be [gay](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSS0x6__AdYYUxvcsUJv7sIouFNRqOMPW8KJA&s) that day.
- The path looked easy but did get annoying at a lot of parts. But really enjoyable walk.
- Killin looks like mini version of a swiss town (With the highlands replicating a smaller version of the Alps and the cost being scaled down as well). Great place to go if you are broke and want to enjoy good views.
## Pictures
![](https://photos.akilan.io/api/assets/c70cf9ca-85ab-4974-887e-63acaeb1079f/thumbnail?size=preview&key=_q41093B16xTMIRZ_0lIS4uarrWcg5TDB0qGW8yXA3qcxh4--dmBMemG5_oNEm0Y4Rs&c=QvR7%2FR0LBj1Ikc%2B%2BgNGDw3PXQhs%3D)
First identified rainbow, this was the first instance of the gayness unleashed (Still straight though). I don't have a picture
but there was a double rainbow by basic arithmetic makes you straight as well.
![](https://photos.akilan.io/api/assets/6711f894-c83d-40e9-a39a-2b22af958c09/thumbnail?size=preview&key=GQP_7Kkm0mqF_CQeQlNyswgUbR8B4o7kHA68rPSm9X_KO6OKUyObTWjos-Z_Euk9D44&c=UtfAtu4zt8Jaueur%2BlTLCLnhr6I%3D)
Proof that no one was tortured during this hike. I am not liable to people having
traumatic memories listening to
me talk for 4 hours straight :-).
![](https://photos.akilan.io/api/assets/ed2d4cc9-fca7-468d-847e-af5b5408d629/thumbnail?size=preview&key=_q41093B16xTMIRZ_0lIS4uarrWcg5TDB0qGW8yXA3qcxh4--dmBMemG5_oNEm0Y4Rs&c=7iW4GoVheCiLdGL6Az26Fcw1ztU%3D)
Oww look another rainbow with camel humped style hills in the background. Don't get fooled by the weather the path was pretty swampy.
![](https://photos.akilan.io/api/assets/ec1ab5cd-4843-4f58-9380-81d9056801e0/thumbnail?size=preview&key=_q41093B16xTMIRZ_0lIS4uarrWcg5TDB0qGW8yXA3qcxh4--dmBMemG5_oNEm0Y4Rs&c=5NEOL%2BGVK3BXRYYjFy78pykMebk%3D)
Wee beauty!

9
content/papers.md Normal file
View File

@@ -0,0 +1,9 @@
---
title: Papers
summary: Papers published
description: Papers published
---
- "P2PRC—A Peer-To-Peer Network Designed for Computation" (https://link.springer.com/chapter/10.1007/978-981-16-7618-5_45)
- "Benchmarking Parallelism in Unikernels" (https://researchportal.hw.ac.uk/en/publications/benchmarking-parallelism-in-unikernels)

View File

@@ -0,0 +1,34 @@
---
title: "Custom Static Website Generator"
summary: Creating a custom static website engine which
can be accessed by using RestApi
tags: ["website","static","generator","Rest"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/CustomStaticWebsiteGenerator]
weight: 3
---
## Introduction
We have designed a simple static website generator which can be designed to be interacted via Rest Apis. We have demonstrated how a user can create a static webpage from WhatsApp. The intention of this project is to prove simplicity of having static websites.
#### Project link: https://github.com/HWTechClub/Custom-Static-Website-Generator
## Features
1. Static files generated in less than a second and served to your visitors just as fast.
2. We support deploying your website on IPFS. Time to power the distributed web.
3. Users attention to content rather than design.
## Demo Interaction
The demo interaction is done using a whatsapp bot to interact with Rest Apis.
{{< youtube SXfCQiZDZKY >}}
## Basic Information
1. Main programming langauge: Nodejs
2. License: GPLv2
3. [Installation](https://cwsg-docs.hwtech.club/getting-started/installation/)
4. [Documentation](https://cwsg-docs.hwtech.club/)

27
content/projects/IOE.md Normal file
View File

@@ -0,0 +1,27 @@
---
title: "Internet Of Energy"
summary: Prototype Implementation of energy transcations in a micro grid.
tags: ["Internet Of Energy","Decentralized","Micro Grids","Transactional","battery"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/IOE]
weight: 4
---
## Introduction
![](http://www.networkrevolution.co.uk/wp-content/uploads/2014/04/img-smartgrid-problem.png)
This project aims to create a marketplace where anyone generating energy by using renewable sources can sell it to anyone in the grid. This will in most cases will be cheaper and aims to have no carbon emissions.This entire platform has two versions, a centralized and a decentralized version.The centralized version uses the client-server architecture while decentralized version uses the concept of a transactional battery along with relay modules which is used to forward and receive power from other batteries. We were able to transfer energy from one power bank to the other using relays.
#### website: https://ioe.hwtech.club
#### Github organization page: https://github.com/internet-of-energy/
#### White Paper: https://ioe.hwtech.club/pdf/white_paper_v3.pdf
## Main repositories
1. [Centralized IOE](https://github.com/internet-of-energy/Centralized_IOE): We will use a simple backend model that can communicate with smart meters at home to control the flow of the electricity. The client-server architecture has a lot of support and tools available for development. This means we can create functioning platform with a lot of features at a quicker pace.
2. [IOE relays api](https://github.com/internet-of-energy/IOE_relays_api): The Concept of IOE is that anyone can buy electricity from anyone. Once a transaction is successful there must be a way to transfer electricity. This code will run on a raspberry pi and using relays it will control the flow of electricity.
3. [IOE electricity cost](https://github.com/internet-of-energy/IOE-electricity-cost): In this repo we will focus on designing a module that helps decide the cost in the electric grid based on supply and demand.

View File

@@ -0,0 +1,5 @@
---
title: Open Source Projects
summary: Open source I have created or been a part of.
description: Open source I have created or been a part of.
---

View File

@@ -0,0 +1,31 @@
---
title: "Vitess Arewefastyet"
summary: intergrating benchmarks for the open source repository vitess
tags: ["vitess","benchmark"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/arewefastyet]
weight: 2
---
## Introduction
The purpose of this project is to do a benchmark run when ever there is a push. The background activity is fairly simple, we create our own bare metal server. Once this server is created we run a bunch of ansibles(for sysbench) and once the run is complete we read the results and store them in a mysql instance. Once the following operations are complete we take down the server.
## Kubecon talk
{{< youtube h1bd1yxA4ec >}}
#### Project Link: https://github.com/vitessio/arewefastyet
#### website link: https://benchmark.vitess.io
## Objectives
1. Creates a VPS
2. Runs the ansibles on the VPS
3. Reads benchmark results
4. Kills VPS
## Architecture
![](https://raw.githubusercontent.com/vitessio/arewefastyet/master/docs/architecture/arewefastyet_architecture.png)
## SQL Schema
![](https://raw.githubusercontent.com/vitessio/arewefastyet/master/docs/architecture/sql/arewefastyet_schema.png)

23
content/projects/p2prc.md Normal file
View File

@@ -0,0 +1,23 @@
---
title: "P2P Rendering/Computation"
summary: p2p network that creates containers and eventually helps in harnessing the computation power.
tags: ["p2p","rendering","computation"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/p2prc]
weight: 1
---
## About
The main aim of this project was to create a custom peer to peer network. The user acting as the client has total flexibility on how to batch the tasks and the user acting as the server has complete flexibility on tracking the container's usages and killing the containers at any point of time.
#### Project Link: https://github.com/Akilan1999/p2p-rendering-computation
## Demo
{{< youtube LRv3NR2lu7I >}}
## Basic Information
1. Main programming langauge: Go
2. License: GPLv2
3. [Installation](https://github.com/Akilan1999/p2p-rendering-computation/blob/master/Docs/Installation.md)
4. [Documentation](https://github.com/Akilan1999/p2p-rendering-computation/blob/master/Docs/README.md)

135
content/resume.md Normal file
View File

@@ -0,0 +1,135 @@
---
title: Resumé
summary: My voluntary and work experience.
description: My voluntary and work experience.
---
<!-- Todo:
- More descriptive descriptions of work done on the job -->
- I am just a normal person
- I love to build stuff and love to run away from fancy documentation.
- Believer in free knowledge.
### Interested areas
<!-- - Web Development -->
<!-- - IOT Development -->
- Distributed Databases.
- P2P networks for distributed computing.
- Operating systems (i.e Uni-kernels and Multi-kernels).
- Capability based systems (i.e [CHERI](https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/)).
<!-- ### Programming Languages:
- Go
- Python
- Node js
- C -->
<!-- ### Databases:
- MySQL
- Mongodb -->
---------------------------------------------------------------------------------------------------------------------------------------------------------------
## Experience
### 1. Maintainer
#### [P2PRC](http://github.com/Akilan1999/p2p-rendering-computation)
Maintainer of a project I created and currently developing. P2PRC is a p2p network designed to orchestrate custom tasks on a P2P network. The project is built entirely using Go Lang.
##### Languages used:
Go, Haskell, Python
#### Derived from P2PRC:
- Open source self hosted version for remote gaming using WebRTC: https://github.com/Akilan1999/remotegameplay
### 2. Core Developer
#### [Peernet](https://github.com/PeernetOfficial)
October 2021 - November 2023, Remote (Prague, Czechia)
Worked on the open source project (https://github.com/PeernetOfficial/core).
##### Languages used:
- Go, JS, Kotlin
### 3. Senior Software Engineer
#### [Maman LLC](https://maman.ae)
August 2021 - March 2022, Remote (Dubai, UAE)
Worked on Read Solomon error corrections for finger printing audio signals and
worked with Maman with smaller consultancy work.
##### Languages used:
- Go, Python
### 4. Senior Software Engineer
#### [Karaz](https://apps.apple.com/tt/app/karaz-platform-%D9%83%D8%B1%D8%B2/id1576524708)
September 2021 - Present, Remote (Riyadh, Saudi Arabia)
Took over the Karaz back end development as apart of mutual agreement to switch over from
Maman to Karaz. Initially built the entire back-end system for Karaz which included reverse
engineering glucose devices and extracting data from such devices. As the company grew recruited
back-end developers to do most of the maintenance and feature building.
##### Languages used:
Go, Python, Javascript, Kotlin, Java
### 5. Software Engineer Intern
#### [PlanetScale](https://planetscale.com/)
August 2020 - March 2021, Remote (San Francisco, California, United States)
Working on an open source project to benchmark the project Vitess (A database clustering system for horizontal scaling of MySQL).
Project: [Vitess Arewefastyet](/projects/arewefastyet/)
### 6. Heriot Watt / HW Tech Club President
November 2018 - May 2021, (Dubai , UAE)
My role as tech club president is to work on projects that seem to help towards building a strong community.
#### Milestones acheived:
1. Grew the club from 8 to 160 members
2. Setup the leadership team
3. Lead the leadership to setup initial infrastructure
4. Setup tech club to run using an open source model
5. Initial contributor to boost projects within the club
<!-- ### Dubai Holiday Camps / Assistant Teacher
July 2017 - July 2019, DIA, Dubai
My role as an assistant teacher was to just make sure that kids have as much fun as possible by getting involved in various sports such as Football, Basketball , Tennis , Dodgeball etc... -->
------------------------------------------------------------------------------------------------------------------------------------------------------------------
## Education
### Heriot-Watt University / BSc (Hons) Computer Science
September 2017 - July 2021
Major courses completed:
- Databases and management systems
- Hardware and Software Interfaces
- Bio Inspired Computing
- Data mining and machine learning
- Advanced network security
- Digital forensics
#### Final Dissertation: [p2p network rendering/computation](/projects/p2prc/)
### Heriot-Watt University / PhD Computer Science
January 2022 - Present
#### Keywords
- [CHERI](https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/)
- Memory allocators
- FreeBSD kernel development
#### Languages used:
- C
- ARM Assembly
#### Ongoing research:
The increasing disparity between application workloads and the capacity of Translation Lookaside Buffers (TLB) has prompted researchers to explore innovative solutions to mitigate this gap. One such approach involves leveraging physically contiguous memory to optimize TLB utilization. Concurrently, advancements in hardware-level system security, exemplified by the Capability Hardware Enhanced RISC Instructions (CHERI) architecture, offer additional opportunities for improving memory management and security.
CHERI introduces capability-based addressing, a novel approach that enhances system security by associating capabilities with memory pointers. These capabilities restrict access to memory regions, thereby fortifying the system against various security threats. Importantly, the mechanisms implemented in CHERI for enforcing memory protection can also serve as accelerators for standard user-space memory allocators. By leveraging capability-based addressing, memory allocators can efficiently manage memory resources while ensuring robust security measures are in place.
- ##### [Draft report link](https://github.com/Akilan1999/phd-thesis/releases/download/Year2/thesis.pdf)
- ##### [Release](https://github.com/Akilan1999/phd-thesis/releases/tag/Year2)

View File

@@ -0,0 +1,42 @@
---
title: "Custom static website generator"
summary: Based on a Website generator built by
hw tech club
date: 2020-02-27
tags: ["Generator","Website"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/technicalposts/website-generator]
weight: 2
---
In this blog post we will talk about the project custom website generator which hw tech club contributors created. Before that a bit of basics of how static website generators work. In the current scenarios websites are either rendered in the front end using React/Vue or in the backend using Jinga , express etc … The flaw in the front end is that websites use a lot of CPU memory from the Client side to load webpages and rendering on the backend does fix this issue but is still relatively more expensive than loading static web pages. A static website generator basically generates static web pages only when content is changed.
### Problems of existing Static website generators
There are many static generators such as Hugo and Jenkyll which are super efficient and do a great job in generating static web pages. The only problem is both are human readable and not Api friendly which made it initially tough for us to interact with it. Ex: Hugo has many variations and with Yaml , Toml and creating an Api to store these states and ensuring to populate according to the template was super painful for us.
### Solution
To build a simple website generator that can take a JSON file of any shape and populate it to the according website template. The only catch is that both the JSON shape and fields that should be populated in the template should be of the same shape. The implementation of this was done using Node js as that was the only language me and my friends were familiar with at that time.
![Describes a high level visualization](https://blogs.hwtech.club/images/Customwebsite.png)
### Process of generating a website
- Send Data via Rest Api
- Populate inside the appropriate template
- Copy the files modified and add it to the project directory which is created based on the project name in the JSON file.
- Respond to the user the website generated link
### Deploying generated websites in IPFS
There are bash scripts added to make it possible to deploy websites generated to IPFS (Interplanetary file system). This is to ensure that your generated website can be deployed on a peer to peer network.
The following project is released on GPLv2 hence it is completely open source and we accept contributions from all developers.
### How to contribute:
1. Create an Issue
2. Create a PR(Pull Request) linking to that issue
3. If we approve it will be merged or we will inform you on the changes we need
We have only covered the high level overview of this project and there are other modules not talked about like the whatsapp bot to interact with this Api.
- [Documentation to the project](https://website-generator.netlify.app)
- [Module of the project we are talking about in this blog](https://github.com/HWTechClub/Custom-Static-Website-Generator/tree/master/website-generator)
- [Repo Link (Main project)](https://github.com/HWTechClub/Custom-Static-Website-Generator)

View File

@@ -0,0 +1,39 @@
---
title: "IT infrastructure (Beginners guide)"
summary: Basics of running power and cheap IT infrastructure
date: 2020-05-25
aliases: ["/papermod-how-to-guide"]
tags: ["IT","Beginners"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/technicalposts/beginners]
weight: 2
---
Although the current cost of IT infrastructure is relatively minimal cost these days. We can still dramatically reduce the cost further. A good IT infrastructure is the fact that we rely less on 3rd party companies and they are simple to run. When we mean simple it does mean a fancy UI where everything is drag and drop. Using a terminal can be your best friend and save you a lot of time. Like any skill you need to use it regularly to reap the benefits. It is very important to stay minimal to sustain your IT infrastructure for a longer period of time.
## Always stick to Open Source OS:
If you run a windows server then stop it. Always use an Open source OS over Proprietary. Transition is an open source OS (i.e Ubuntu , Debian) is relatively easy. To start off use a VPS to host your servers (i.e Digital Ocean, Vultr) . The main reason to use a VPS is the fact that you get an static IPV4 address. You pay for the hour rather than the month. If you think something is wrong in your server you can back it up and delete the server. Saves a lot of time on your side.
If you have an inhouse server, You can either get a static IPV4 address or use a DDNS if it is expensive (i.e so that someone can access it from outside your company network). There are many free training courses to learn how to use a linux server and configure it. This means you can be self-reliant and not rely on other companies to configure your server.
### Benefits of Open Source servers:
The main benefit is that there is no licensing cost and you have access to the source code. For Example : The linux community is really big and OS keeps getting updated frequently that means if a new vulnerability is found its most likely fixed really quick. The concept of open source OS is simple if you break it then just back up data and reinstall the OS.
## You should know Git no matter who you are:
Git is a version control system which can be used to store documents or codebase. Using it is the best way to store your company information in a secure way. It recommended you run it on your company server (Recommended to use Gitlab). If you want you can use github ( :) Owned by microsoft) .
1. [Documentation](https://git-scm.com/doc)
2. [Video](https://www.youtube.com/watch?v=2sjqTHE0zok&list=LLhy18QB1hBzZ7MniIW_FJvQ&index=6&t=0s)
## You can avoid office 365:
For your email you can set up your own mail server(i.e https://github.com/maildev/maildev) or use [Migadu](https://www.migadu.com/en/index.html) which is extremely cheap. There are so many alternatives for word , excel etc .. ( i.e LibreOffice , Apache Open Office , Google Suite etc...). If you want to have your own conference on your own server or on outside server use [Jitsi](https://jitsi.org/).
For any tool which is paid there is an open source alternative.
## Building websites:
If you are planning to have a website which is either an E-commerce website or a normal company webpage there is no point of a database like Sql unless your website is really huge. I would recommend using [static website generators](https://dzone.com/articles/6-reasons-why-you-should-go-for-a-static-website) like [Hugo](https://gohugo.io/) and either design your theme or use the ones available online. In most cases you only need to only use static generators for your company page and your basic e-commerce website.
## Deploying websites:
If you use a static website generator you can either deploy it on places like [netlify](https://www.netlify.com/) for free of cost or deploy them on your server.

View File

@@ -0,0 +1,73 @@
---
title: "Patch: Using remote ScreenShare ,keyboard and mouse using laplace and Barrier"
summary: Modifying the open source project laplace to allow remote keyboard and mouse during screenshare
date: 2021-07-05
aliases: ["/laplace-keyboard-mouse"]
tags: ["WebRTC","laplace"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/laplace-keyboard-mouse]
weight: 2
---
## What is laplace ?
" Laplace is an open-source project to enable screen sharing directly via browser. Made possible using WebRTC for low latency peer-to-peer connections, and WebSocket implemented in golang for WebRTC signaling. "
link: https://github.com/adamyordan/laplace
Link to my branch which has Barrier intergrated with Barrier KVM:
https://github.com/Akilan1999/laplace/tree/keyboard_mouse
Link to the pull request: https://github.com/adamyordan/laplace/pull/8
## Installation
### Installation required to share keyboard and mouse
To do this we ensure that the client either has has a IPV6
address or a public IPV4 address.
We use the use the popular open repository known as [Barrier KVM](https://github.com/debauchee/barrier).
#### What is Barrier kvm?
"Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system." [Barrier KVM](https://github.com/debauchee/barrier)
#### Barrier KVM build status and links to install
|Platform |Build Status|
| --:|:-- |
|Linux |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Linux%20Build)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Mac |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Mac%20Build)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Windows Debug |[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Windows%20Build&configuration=Windows%20Build%20Debug)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Windows Release|[![Build Status](https://dev.azure.com/debauchee/Barrier/_apis/build/status/debauchee.barrier?branchName=master&jobName=Windows%20Build&configuration=Windows%20Build%20Release%20with%20Release%20Installer)](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)|
|Snap |[![Snap Status](https://build.snapcraft.io/badge/debauchee/barrier.svg)](https://build.snapcraft.io/user/debauchee/barrier)|
### Build from source
```bash
$ git clone https://github.com/adamyordan/laplace.git
$ cd laplace && go build -o laplace main.go
$ export LAPLACE = $PATH
$ ./laplace --help
$ ./laplace -setconfig
$ ./laplace -tls -addrs <ip address>:<port no>
```
Note: ensure you are running none using Sudo
## Limitation
The machine that wants to control the screen needs to either be:
- Same network as the server
- Needs to have an IPV6 address
- Needs to have an public IPV4 address
## Vidoe demo
#### Video demo server side installation
{{< youtube 7c1_jlXJW4Q >}}
#### Video demo client side installation
{{< youtube gF70pqvN3Gk >}}

View File

@@ -0,0 +1,50 @@
---
title: "Alpha Release P2PRC v1.0.0"
summary: Alpha release for P2PRC
date: 2021-06-27
aliases: ["/papermod-how-to-guide"]
tags: ["P2PRC","v1.0.0-alpha"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/p2prc-1.0.0-alpha]
weight: 2
---
After 5 months of working on this project. I would be glad to announce that we
have a alpha release. The objective of P2PRC is to create a p2p network where nodes
can share each others computatination power in a virtualized manner (i.e digital
ocean where anyone can share resources). In the alpha release the choice of
virtualization used is docker. The current release will
support docker. It should be noted that from the next release onwards we will
not support the docker daemon. We will try to provide backwards compatability
as much as we can but I have decided to ditch the docker daemon and write
compatable code from containerd.
## Major features
- IPV4 and IPV6 support: All the nodes can listen to both IPV4 and
IPV6 addresses. It can be noted that with IPV6 there are minor issues
detected in certain PC in terms of SSH into a docker container which is
mostly on the server side.
- Hopping mechanism: Since it's a p2p network we have a very simple
implementation that hops though servers and downloads it's IP tables.
In our implementation. This contains about imformtaion of other servers
in the network. This way nodes can automatically learn parts of the
network. The current implementation uses 3 hops.
- Possibility to run any docker container: To satisfy this the server
must already have the docker container and the must ensure that the
SSH username is 'master' and password is 'password' in creation of new
servers. It's not secure but worksout for this version for now.
The test network will be avaliable for use from the beta release
which should come out on the 5th of july 2021. The network will
consist of 1 node which runs on a paid cloud server as I do not
keep my machines on 24/7. The node up will help to connect with
other nodes and the paid cloud server cannot be used to create
and remove containers.
### Link to release and installation instructions:
https://github.com/Akilan1999/p2p-rendering-computation/releases/tag/v1.0.0-alpha

View File

@@ -0,0 +1,135 @@
---
title: "Extension of P2PRC to create your own modification"
summary: P2PRC as a abstraction
date: 2021-08-31
aliases: ["/P2PRC-Extending"]
tags: ["P2PRC","AST","Extend"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/P2PRC-Extending]
weight: 2
---
# Generate Module
P2PRC is a great layer of abstraction. This means that in many cases it is not an end product but rather
a tool that customized as an end product. An example would be writing your own billing module to monetize
the computation power available. The generate module copies the current with the appropriate git histories
and keeps only the go files which would be useful to edit. To use the generate module the user will need
to have a go compiler present in his computer. Due to the introduction of this module there will 2 releases:
- Regular Release (Consists of only the build binary and cli command cannot access the generate module)
- Developer Release (Consists of important Go files and the cli can access the generate module)
## How does this work ?
### [Struct information](https://github.com/Akilan1999/p2p-rendering-computation/blob/9d69aed8ce0fe5273aaff2828f7d51c3d5ac2ce4/generate/generate.go#L19)
- ###```Generate.go```:
This file creates a local copy of P2PRC from where the CLI was called from.
This go file also does various stuff like instruction of file should be ignored when copying and
which of should not be. Now let's understand this. Below is a sample code which does the following:
```go
//----------------------------------------------------------------
// Action performed:
// - Ensuring main.go file exists
// - Skipping all .go files apart from the ones listed above
// - Skipping .idea/ directory
// - Skipping Makefile file
//----------------------------------------------------------------
Options.Skip = func(src string) (bool, error) {
switch {
case strings.HasSuffix(src, "main.go"):
return false, nil
case strings.HasSuffix(src, ".go"):
return true, nil
case strings.HasSuffix(src, ".idea"):
return true, nil
case strings.HasSuffix(src, "Makefile"):
return true, nil
default:
return false, nil
}
}
// Doing the copy
err = copy.Copy("<P2PRC folder you want to copy from>", "<PATH to the directory>", Options)
```
Unfortunately currently this will have to be manually edited in the ```Generate.go``` file. When using the generate
module the user also creates their own Go module which is the modified version of P2PRC. This means
if the 1 modified package is using another modified package then the appropriate import have to be modified
in the file where the import is called:
Ex:
```go
//Sample Project module name = Test
//Package names:
//- Test/Genius
//- Test/GeGeGenuis
//
// When we call the generate function with the new project with the module name = MicDrop
// The new package name would be:
// - MicDrop/Genius
// - MicDrop/GeGeGenuis
// Test/Genius code depends on the package Test/GeGeGenuis
import (
"Test/GeGeGenuis"
)
// When we create a new module with the copy of the
// existing project we need change:
import (
"MicDrop/GeGeGenuis"
)
```
To do this we have built functions which can modify import names in the Go file provided.
To customize the use case of your generate module you would need to manually add your own
imports which are supposed to be replaced and in which files they are supposed to be replaced
in.
```go
// 1.0 - Test/Genius.go -> GeGeGenuis module
// a is struct of type NewProject
a.FileNameAST = "<path to project to copy from>/Test/Genius.go"
// Get AST information of the file
err := a.GetASTGoFile()
if err != nil {
return err
}
// Change the appropriate Go file
err = a.ChangeImports("Test/GeGeGenuis", "MicDrop/GeGeGenuis")
if err != nil {
return err
}
// Writes the change to the appropriate file
err = a.WriteGoAst()
if err != nil {
return err
}
```
Higher order of execution of ```Generate.go```:
1. Copy entire P2PRC project and ignores files which are not meant to be copied
2. The folder name will be based on the new project name and the module name based on the new
module name provided.
3. Modifies the appropriate imports in the project as instructed in the code.
4. Creates a commit with the new changes in the new project.
- ### ``` modifyGenerate.go```:
This a really simple implementation where we replace the imports
in certain files as instructed from ```generate.go```. To do we create an AST (i.e Abstract Syntax tree)
from new file we want to change the imports in. AST create a tree structure of expression. To change the
import we can just traverse to the appropriate expression and change the value of that expression in
the case of modifying imports. This approach is more simple than using templates.
## Cli command
```
p2prc --gen <project name> --mod <go module name>
```
#### based on PR: https://github.com/Akilan1999/p2p-rendering-computation/pull/69

View File

@@ -0,0 +1,140 @@
---
title: "Draft for escaping NAT with reverse proxy P2PRC"
summary: Annoying NAT boo boo
date: 2021-10-11
aliases: ["/P2PRC-escaping-NAT"]
tags: ["P2PRC","NAT"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/P2PRC-escaping-NAT]
weight: 2
---
## Abstract
We focus here on escaping NAT for the project P2PRC. The intial
plan is to use a middle server with an IPV4 address to escape NAT.
The future plan would be to use a WebRTC approach to where we
use a middle server to intansiate a direct p2p connection
using UDP sockets with nodes behind NAT.
## Architecture plan
The server behind NAT would use a reverse proxy server with an IPV4 address
to be a possible way to communicate with the outside world.
Ex:
```
NAT
|
Server <--> Reverse Proxy server with <--> Clients
| public IPV4
```
We use the libaray known as [frp](https://github.com/fatedier/frp).
"frp is A fast reverse proxy to help you expose a local server behind a NAT
or firewall to the internet."
The server behind the NAT IPTable would be broadcasted through the reverse proxy.
The mapping would be done automatically though P2PRC because the reverse proxy
could have certain ports already taken.
We are introducting a new concept of detecting reverse proxies over P2PRC.
We call this ``` reverse_proxy_server.json ``` and ``` reverse_proxy_mapping.json```.
The ```reverse_proxy_server.json``` file is incharge of detecting all reverse
proxy servers and the ```reverse_proxy_mapping.json``` is incharge of logging
all the reverse proxy server mappings talking place.
#### reverse_proxy_server.json
```
{
"reverse_proxy_servers": [
{
"Server_name": <server name>,
"Address": <remote address>,
"Latency": <latency>
}, ... n
]
}
```
#### reverse_proxy_mapping.json
```
{
"reverse_proxy_mappings": [
{
"Server_name": <server name>,
"Address": <remote address>,
"Type": <TCP or UDP>,
"blind_port": <port no>
}, ... n
]
}
```
### Port allocation
The function for port allocation would need certain
modifications need to ensure that the port is not only free
on the server but also on the on reverse proxy server.
We are debate on this would occur as it requires
further reading on the inner depths of [frp](https://github.com/fatedier/frp).
The idea scenario would be that the odds a 5 or 6 digit
taken is a low probability.
### How would the ip tables would look
There would not be much change when a client looks
at it. This only difference is that the client
see's the address of the proxy server.
Ex:
```
{
"ip_address": [
{
"ipv4": "<reverse proxy address>",
"ipv6": "",
"latency": 0,
"download": 0,
"upload": 0,
"serverport": "<server port no>"
}
]
}
```
If the server is using a reverse proxy then the server
port no should be decided by P2PRC to ensure that there
is no scenario where the port is already taken.
## New Cli Commands
We will be introducing a new set of Cli commands.
These cli commands would be incharge to starting
the reverse proxy or connecting to the reverse proxy
and various other function.
1. start reverse proxy (need public IPV4)
```
p2prc -s --reverse-proxy
```
This will start the reverse
and autoamtically broadcast
as a reverse proxy as well.
2. connecting to a reverse proxy
```
p2prc -s --connect-reverse-proxy <proxy ip address>
```
This will start p2prc as server
and automatically set the server port
and link it to the reverse proxy and
any connections would go through the
reverse proxy.
3. Listing all proxy servers avaliable
```
p2prc --view-rps or p2prc --view-reverse-proxy-servers
```
4. Listing all reverse proxy connection mapping
```
p2prc --view-rpm or p2prc --view-reverse-proxy-mapping
```

View File

@@ -0,0 +1,92 @@
---
title: "P2PRC Plugin module implementation"
summary: Plugin Module implementation P2PRC
date: 2021-07-16
aliases: ["/P2PRC-Plugin"]
tags: ["P2PRC","Plugin"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/P2PRC-Plugin]
weight: 2
---
## Introduction
The plugin module is designed to ensure clients can execute instructions in a declarative manner across different
containers created. This means the user (i.e client) needs to write the instruction only once, and these instructions
can be executed across different nodes in a repetitive manner.
In the scenario of this project Ansibles will be used as the way the users can create these instructions.
The plugin module introduces a new path to the config file known as pluginpath. This path by defaults points to
```${P2PRC}/plugin/deploy```. Any file/folder inside ```plugin/deploy``` is part of the .gitginore. Plugins are
detected by folder names inside the ```plugin/deploy```.
```
plugin
|___ Deploy
|___<plugin name>
|___ site.yml
|___ hosts
|___ description.txt
.
.
.
n: n number of plugins possible
```
## Site File Template
The site file is also known as the Ansible playbook and is incharge of executing
instructions in a declarative manner. The below example specifies how to make one.
```
- hosts: all
tasks:
- name: <task name>
<ansible task>
debug:
msg: <debug message>
```
Read more about ansible tasks: https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#about-playbooks
## Hosts file
hosts file is also known as the inventory file. This file consists of all the information required to connect to other
nodes to execute Ansible instructions. In this project this file needs to be set in a certain configuration because the
go code or binary will populate this file automatically with the appropriate information required to connect to local or
remote containers.
#### Note: Add as exactly specified below
```
all:
vars:
ansible_python_interpreter: /usr/bin/python3 // Path to your python 3 interpreter
main:
hosts:
host1:
// Note: These values will be automatically overwritten
// by the Go functions
ansible_host: 0.0.0.0
ansible_port: 39269
ansible_user: master
ansible_ssh_pass: password
ansible_sudo_pass: password
```
## Description file
This is a simple text file used to describe what the module does.
When the client is looking at various commands via the ClI.
The description is displayed along-side the plugin name.
Ex: When the flag ```--ViewPlugins``` or ```--vp``` is called
```
{
"PluginsDetected": [
{
"FolderName": "<name of the plugin>",
"PluginDescription": "<description of the plugin>"
}
]
}
```
#### Based on PR: https://github.com/Akilan1999/p2p-rendering-computation/pull/50

View File

@@ -0,0 +1,60 @@
---
title: "Automatic ports allocation P2PRC"
summary: Allocating ports to plugins P2PRC
date: 2021-10-03
aliases: ["/P2PRC-Automatic-ports"]
tags: ["P2PRC","Ports","TCP","Automatic"]
author: "Akilan Selvacoumar"
draft: false
aliases: [//P2PRC-Automatic-ports]
weight: 2
---
## Automatic port allocations
P2PRC would be in-charge to set to the ports to various TCP ports
opened. Due to this implementation the plugin being executed is
copied to the tmp directory with a unique UUID.
```
Command: ls /tmp
output: Semantic <UUID>_<Plugin Name>
2e6d76c4-0ed1-4b55-9385-79a58d4f0492_p2prc-vscode-browser
7b631e08-62ee-4c1c-a2a4-c05857b9aa7d_p2prc-vscode-browser
```
Once the copy of the plugin is added to the /tmp directory
the site.yml file inside the appropriate yaml is modified
with the appropriate ports assigned to the container.
### Ex:
1. Create container called c1 with an automatic generated TCP port
3313 (external) - 3313 (internal)
2. Assumption of plugin p1 exists. p1 has one server which needs to
be mapped to a free open TCP port in container c1. Below shows
an implementation of a sample site.yml file.
```
---
- hosts: all
tasks:
- name: start vscode code server
shell: sh server.sh 0.0.0.0:{{index . 0}}
```
Notice there is the following {{index . 0}}. {{index . 0}} does not belong to
Ansible but rather is a way to mention where to add the external free port
of the container. We use the golang [template library](https://pkg.go.dev/text/template)
to parse and populate the site.yml with the appropriate open ports. An array of ints
which consists of open free ports are sent to the site.yml. 0 in {{index . 0}} refers
to the index in the int array passed on.
After the port is automatically it's ready to run !
```
---
- hosts: all
tasks:
- name: start vscode code server
shell: sh server.sh 0.0.0.0:3313
```
### Sample plugins implemented:
- [VSCode Plugin](https://github.com/Akilan1999/p2prc-vscode-browser)
## based on PR: https://github.com/Akilan1999/p2p-rendering-computation/pull/73

View File

@@ -0,0 +1,6 @@
---
title: Technical Posts
summary: Fun CS concepts to play around with
description: Contains posts regrading CS topics I love
to play around with.
---

View File

@@ -0,0 +1,25 @@
---
title: "Distributed computing in a local network"
summary: Brainstroming ideas to run distributed tasks locally
date: 2021-01-01
aliases: ["/distributed-local-network"]
tags: ["Distributed","Brainstorming"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/technicalposts/distributed-local-network]
weight: 2
---
mDNS or called multicast DNS is just a DNS over a local network. mDNS is also considered as a Zero configuration technique. It can be used to discover nodes in a local network (ex: Apples bonjour).
## Implementation
- [multicast-dns](https://github.com/mafintosh/multicast-dns)
- [dns-discovery](https://github.com/mafintosh/dns-discovery)
- [libp2p-mdns](https://github.com/libp2p/js-libp2p-mdns)
Assuming all machines are running a linux kernel. All nodes in the network can have an SSH server and can broadcast each other's public key. All the nodes can add broadcasted public keys to their authorized_keys file. This is assuming its done in a local private network (i.e not a secure solution but an easier way). Now all nodes can SSH into each other.
To render tasks [DrQueue](https://github.com/DrQueue/drqueue) seems to be a promising choice. DrQueue is an open source render farm system. Similar to Farmer-Joe-Render. DrQueue is used in the Visual effects ,science and finance industry. The objective of DrQueue is batch tasks and run as a task management tool for multiple nodes. DrQueue is compatible on Windows, macOS, Linux, Irix and FreeBSD. DrQueue can be used with any renderer that supports a CLI(Command Line Interface). DrQueue auto generated scripts for Blender, Maya, Lightwave, Cinema 4D, Maya, lightwave, Mental Ray, After Effects, Aqsis, 3Delight, Pixie, Snake , Terragen and Nuke. DrQueue makes it possible to talk to master and slave nodes with a custom API which any user can create based on the inbuilt functions.
This is just a thought in my mind of a logical and simple way to run tasks distributed. This is really important as we underestimate the computing power we have if we use our home devices collectively. We could start pushing game developers to start building games for distributed systems. Imagine if [FS2020](https://blogs.hwtech.club/post/fs2020/) could be rendered distributed :).

View File

@@ -0,0 +1,155 @@
---
title: "Challenging myself to understand RISC-V"
summary: Basics of what is RISC-V
date: 2021-05-30
aliases: ["/riscv"]
tags: ["RISCV","Open Source"]
author: "Akilan Selvacoumar"
draft: false
aliases: [/technicalposts/riscv"]
weight: 2
---
## Why do we need open standards for CPU Architecture ?
- We want to allow users to see all the parts of the architecture
without any proprietary constraints.
- We want to have the rights to modify and distribute without paying any licensing fees and constraints in sharing.
- With open standards it's easier to build on top of others work and possibly build CPU designs custom made for certain tasks.
## What is RISC-V ?
RISC-V is just an open source ISA (Instruction Set Architecture). An ISA is the software interface for the hardware. A single ISA can
have many hardware implementations. In technical terms as ISA defines set of Instructions and how they behave such as:
- Data types
- Registers
- Addressing modes
- memory models
- Protection levels
- How is I/O are done
- Virtual memory
- Exceptions
Another important factor to understand is that RISC-V is a standard
and not an implementation. This means that the entire ISA is defined in a huge latex file which can be found on Github.
Repo link: https://github.com/riscv/riscv-isa-manual
The RISC-V is a well organized ISA and is divided into various categories and extensions in order to keep it as a modular design.
The RISC-V is maintained the non profit organization called [RISC-V foundation](https://riscv.org/).
### ["RISC-V in contrast was made specifically to be easy to teach while pragmatic enough to actually allow the implementation of high performance microprocessors."](https://medium.com/swlh/risc-v-assembly-for-beginners-387c6cd02c49)
## Few companies working on RISC-V
- [NVIDIA](https://riscv.org/wp-content/uploads/2017/05/Tue1345pm-NVIDIA-Sijstermans.pdf): using RISC-V in it's GPU
- [SiFive](https://www.sifive.com/): Startup that allows you to create your own RISC-V board or use exsisting models they provide with great toolkits around them.
- [Western Digital](https://blog.westerndigital.com/risc-v-swerv-core-open-source/): Focusing on building custom
RISC-V cores.
## Complier support for RISC-V ISA
- [GCC](https://github.com/riscv/riscv-gnu-toolchain)
- [LLVM/Clang](https://github.com/sifive/riscv-llvm)
- [glibc](https://sourceware.org/git/?p=glibc.git)
- [Go](https://github.com/riscvarchive/riscv-go)
- [Rust](https://github.com/riscv-rust/riscv-rust-quickstart)
## How is the RISC-V ISA organized
In this section we look into how RISC-V is organised
### RV N (Extension letter)
- RV stands for RISC-V
- N - Number of bits (Ex: 32 bits)
- Extension letter: This is the Extension for the instruction
sets (I stands for Integer)
### Example Base ISA
RV32I, RV64I, RV128I
### Standard Extensions
- M: Math
- A: Atomic
- F: Floating Point
- D: Double Precision Floating Point
#### - G: General Purpose (Includes, Integer, Math, Atomic, Floating Point and Double Precision Floating Point)
### Linux supports
#### RV64G
This is called as RISC-V 64 bit General Purpose
## Lets talk a bit indepth of RV32I
RV32I is a base ISA and the easiest to understand.
RV32I means it's RISC-V 32 bit Integer ISA.
```
Registers: x0-x31
(x0 is hardwired to 0)
```
Each register is 32 bits which can be called as 1 word.
![](https://raw.githubusercontent.com/Artoriuz/RV32I-SC/master/images/schematic.png)
Fig 1.0 [Simplified schematics of RV32I](https://github.com/Artoriuz/RV32I-SC)
Now we will recall the basics and try to understand
how to read an instruction.
```
add rd,rs1,rs2
```
- add: is the opcode
- rd: is the destination register
- rs1: Source register 1
- rs2: Source register 2
![](/img/rv32i.png)
Fig 1.1 [Assembly instructions for RV32I](https://github.com/jameslzhu/riscv-card/blob/master/riscv-card.pdf)
![](/img/registersrv32i.png)
Fig 1.2 [Registers for RV32I](https://github.com/jameslzhu/riscv-card/blob/master/riscv-card.pdf)
## Interesting research papers
- [Implementing RISC-V System-on-Chip for Acceleration of Convolution Operation and Activation Function Based on FPGA (Field programmable gate arrays)](https://ieeexplore.ieee.org/document/8564810): FGPA are mostly for application specific integrated circuits. An example would be Intel using FGPA to
prototype new chips. The objective of the paper was to design
a RISC-V processor for specific tasks such as Convolution functions and activation functions. The result was that the
RISC-V processor was faster than CPU + co-processor mode and
used lesser than the CPU + GPU mode.
- [Towards deep learning using Tensorflow lite on RISC-V](
https://edge.seas.harvard.edu/files/edge/files/carrv_workshop_submission_2019_camera_ready.pdf
): This paper focuses on ISA extensions customized for
machine learning kernels. The software infrastructure implemented was optimized for neural network execution.
The following was integrated into Tensorflow lite. The
result was that instructions was reduced by 8X.
- [A compiler comparison in the RISC-V ecosystem](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9191411): Comparing LLVM and GCC performance on RISC-V. LLVM and GCC
produce same binary size but both have different execution
times.
## Interesting Open Source projects
- [RISCBoy](https://github.com/Wren6991/RISCBoy): It is an open-source portable games console, designed from scratch.
RISC-V compatible CPU. Has raster graphics pipelines and display controllers. It consists of other infrastructure such as memory
controllers and GPIO ports. It also consists of a CAD design of
the PCB layout.
- [Potato](https://github.com/skordal/potato): The Potato Processor is a simple RISC-V processor written in VHDL for use in FPGAs. It implements the 32-bit integer subset of the RISC-V Specification version 2.0.
- [Vulcan](https://github.com/vmmc2/Vulcan): RISC-V instruction set simulation built for education using flutter.

View File

@@ -1,5 +0,0 @@
- id: prev_page
translation: "Vorherige Seite"
- id: next_page
translation: "Nächste Seite"

View File

@@ -1,5 +0,0 @@
- id: prev_page
translation: "前のページ"
- id: next_page
translation: "次のページ"

View File

@@ -1,14 +0,0 @@
- id: prev_page
translation: 'Предыдущая'
- id: next_page
translation: 'Следующая'
- id: read_time
translation: '{{ .Count }} мин'
- id: toc
translation: 'Оглавление'
- id: translations
translation: 'Переводы'

View File

@@ -1,3 +0,0 @@
{{ define "main" }}
<div class="not-found">404</div>
{{ end }}{{/* end main */}}

View File

@@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language }}" class="direction-{{ .Language.LanguageDirection | default "ltr" }}">
<head>
{{- partial "head.html" . }}
</head>
<body class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list
{{- if .IsHome }} home{{ end }}{{ end }}{{- if eq $.Site.Params.defaultTheme `dark` }} dark{{ end }}" id="top">
{{- partialCached "header.html" . .Page}}
<main class="main">
{{- block "main" . }}
{{- end }}
</main>
{{- partialCached "footer.html" . .Type }}
</body>
</html>

View File

@@ -1,58 +0,0 @@
{{- define "main" }}
<article class="post-single">
<header class="post-header">
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
</h1>
{{- if .Params.hideMeta }}{{ else }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- if .IsTranslated -}}&nbsp;|&nbsp;
<ul class="i18n_list">
{{- i18n "translations" | default "Translations"}}:
{{- range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{- end }}
</ul>
{{- end }}
</div>
{{- end}}
</header>
{{- partial "cover.html" (dict "cxt" . "IsHome" false) }}
{{- if .Params.ShowToc }}
<div class="toc">
<details {{if .Params.TocOpen }} open{{ end }}>
<summary>
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
</summary>
<blockquote>
{{- partial "toc.html" . }}
</blockquote>
</details>
</div>
{{- end }}
<div class="post-content">{{ .Content }}</div>
<footer class="post-footer">
{{- if .Params.tags }}
<ul class="post-tags">
{{- range .Params.tags }}
{{- $href := print (absLangURL "tags/") (urlize .) }}
<li><a href="{{ $href }}">{{ . }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }}
{{- partial "share_icons.html" . }}
{{- end }}
</footer>
{{- if and ($.Site.Params.comments) (ne .Params.comments false) }}
{{- partial "comments.html" . }}
{{- end }}
</article>
{{- end }}{{/* end main */}}

View File

@@ -1,5 +0,0 @@
<!-- Comments area start -->
<!--
to add comments read => https://gohugo.io/content-management/comments/
-->
<!-- Comments area end -->

View File

@@ -1,5 +0,0 @@
<!-- Footer custom content area start -->
<!--
Insert any custom code web-analytics, resources, etc. here
-->
<!-- Footer custom content area end -->

View File

@@ -1,5 +0,0 @@
<!-- Head custom content area start -->
<!--
Insert any custom code (web-analytics, resources, etc.) - it will appear in the <head></head> section of every page. Can be overwritten by partial with the same name in the global layouts.
-->
<!-- Head custom content area end -->

View File

@@ -1,70 +0,0 @@
<footer class="footer">
{{- if .Site.Copyright }}
<span>{{ .Site.Copyright | markdownify }}</span>
{{- else }}
<span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span>
{{- end }}
<span>&middot;</span>
<span>Powered by <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a></span>
<span>&middot;</span>
<span>Theme <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top">
<button class="top-link" id="top-link" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6">
<path d="M12 6H0l6-6z" /></svg>
</button>
</a>
{{- partial "extend_footer.html" . -}}
{{ if in site.Params.mainSections .Type }}
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint -}}
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{- end }}
<script>
window.onload = function () {
if (localStorage.getItem("menu-scroll-position")) {
document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position");
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
document.querySelector(this.getAttribute("href")).scrollIntoView({
behavior: "smooth"
});
});
});
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
function menu_on_scroll() {
localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft);
}
</script>
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
{{- else -}}
<!-- case where owner disables theme button after deployment, this resets the stored theme -->
<script>
localStorage.removeItem("pref-theme");
</script>
{{- end }}

View File

@@ -1,55 +0,0 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Title -->
<title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
<!-- Meta -->
<meta name="keywords" content="{{ if .Params.keywords -}}
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" />
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
<meta name="author" content="{{ (partial "author.html" . ) }}">
<link rel="canonical" href="{{ .Permalink }}" />
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
{{- end}}
<!-- Styles -->
{{- $anoldhope := resources.Get "css/an-old-hope.min.css" }}
{{- $theme := resources.Get "css/theme-vars.css" }}
{{- $reset := resources.Get "css/reset.css" }}
{{- $header := resources.Get "css/header.css" }}
{{- $main := resources.Get "css/main.css" }}
{{- $postentry := resources.Get "css/post-entry.css" }}
{{- $postsingle := resources.Get "css/post-single.css" }}
{{- $terms := resources.Get "css/terms.css" }}
{{- $archive := resources.Get "css/archive.css" }}
{{- $footer := resources.Get "css/footer.css" }}
{{- $404 := resources.Get "css/404.css" }}
{{- $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" }}
{{- $stylesheet := slice $anoldhope $style | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
as="style">
{{- if (and (.Site.Params.profileMode.enabled) (.IsHome)) }}
{{- $profileMode := slice (resources.Get "css/profile-mode.css") | resources.Concat "assets/css/profile-mode.css" | minify | fingerprint }}
<link href="{{ $profileMode.Permalink }}" integrity="{{ $profileMode.Data.Integrity }}" rel="preload stylesheet"
as="style">
{{- end -}}
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}">
<!-- Generator -->
{{- hugo.Generator }}
<!-- RSS -->
{{- range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{- partial "extend_head.html" . -}}
<!-- Misc -->
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{- template "_internal/google_analytics_async.html" . }}
{{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }}
{{- template "partials/templates/schema_json.html" . }}
{{- end }}

View File

@@ -1,108 +0,0 @@
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
<script>
// load memory
if (localStorage.getItem("pref-theme") === "dark") {
document.body.classList.add('dark');
} else if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
} else {
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('dark');
}
}
</script>
{{- end }}
{{- if (and (.Site.Params.disableThemeToggle) (eq .Site.Params.defaultTheme "auto")) }}
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('dark');
}
</script>
{{- end }}
<noscript>
<style type="text/css">
.theme-toggle,
.top-link {
display: none;
}
</style>
</noscript>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="{{ "" | absLangURL }}">
{{- if .Site.Params.label.icon }}
<img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo"
height="{{- .Site.Params.label.iconHeight | default "30px" -}}">
{{- end -}}
{{- .Site.Params.label.text | default .Site.Title -}}
</a>
<span class="logo-switches">
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
<span class="theme-toggle">
<a id="theme-toggle">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</a>
</span>
{{- end}}
{{ $lang := .Lang}}
{{- with $.Site.Home.AllTranslations }}
<span class="lang-switch">
<span>|</span>
<ul>
{{- range . -}}
{{- if ne $lang .Lang }}
<li>
<a href="{{- .Permalink -}}" title="{{ .Language.LanguageName | default .Lang | humanize }}"
aria-label="{{ .Language.LanguageName | default .Lang | humanize }}">
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
{{- .Language.LanguageName | humanize -}}
{{- else }}
{{- .Lang | humanize -}}
{{- end -}}
</a>
</li>
{{- end -}}
{{- end}}
</ul>
</span>
{{- end }}
</span>
</div>
{{- $currentPage := . }}
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
{{- range .Site.Menus.main }}
{{- $menu_item_url := .URL | relLangURL }}
{{- $page_url:= $currentPage.RelPermalink | relLangURL }}
<li>
<a href="{{ .URL | absLangURL }}">
<span {{- if eq $menu_item_url $page_url }}
{{- /* the menu item links to the current page (with relLangURL) */}} class="active" {{- end }}>
{{ .Name }}
</span>
</a>
</li>
{{- end -}}
</ul>
</nav>
</header>

View File

@@ -1,20 +0,0 @@
<div class="profile">
{{- with .Site.Params.profileMode }}
<div class="profile_inner">
{{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" />{{- end}}
<h1>{{- .title | default $.Site.Title | markdownify -}}</h1>
<span>{{- .subtitle | markdownify -}}</span>
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
{{- with .buttons }}
<div class="buttons">
{{- range . -}}
<a class="button" href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
<span class="button-inner">{{ .name }}</span>
</a>
{{- end -}}
</div>
{{- end }}
</div>
{{- end}}
</div>

View File

@@ -1,6 +0,0 @@
<div class="social-icons">
{{- range . -}}
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer me"
title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a>
{{- end -}}
</div>

View File

@@ -1,84 +0,0 @@
{{- $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content -}}
{{- $has_headers := ge (len $headers) 1 -}}
{{- if $has_headers -}}
{{- $largest := 6 -}}
{{- range $headers -}}
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
{{- $headerLevel := len (seq $headerLevel) -}}
{{- if lt $headerLevel $largest -}}
{{- $largest = $headerLevel -}}
{{- end -}}
{{- end -}}
{{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}}
{{- $.Scratch.Set "bareul" slice -}}
<ul>
{{- range seq (sub $firstHeaderLevel $largest) -}}
<ul>
{{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}}
{{- end -}}
{{- range $i, $header := $headers -}}
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
{{- $headerLevel := len (seq $headerLevel) -}}
{{/* get id="xyz" */}}
{{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
{{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}}
{{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
{{- $header := replaceRE "<h[1-6].*?>((.|\n])+?)</h[1-6]>" "$1" $header -}}
{{- if ne $i 0 -}}
{{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}}
{{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}}
{{- if gt $headerLevel $prevHeaderLevel -}}
{{- range seq $prevHeaderLevel (sub $headerLevel 1) -}}
<ul>
{{/* the first should not be recorded */}}
{{- if ne $prevHeaderLevel . -}}
{{- $.Scratch.Add "bareul" . -}}
{{- end -}}
{{- end -}}
{{- else -}}
</li>
{{- if lt $headerLevel $prevHeaderLevel -}}
{{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
{{- if in ($.Scratch.Get "bareul") . -}}
</ul>
{{/* manually do pop item */}}
{{- $tmp := $.Scratch.Get "bareul" -}}
{{- $.Scratch.Delete "bareul" -}}
{{- $.Scratch.Set "bareul" slice}}
{{- range seq (sub (len $tmp) 1) -}}
{{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}}
{{- end -}}
{{- else -}}
</ul>
</li>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
<li>
<a href="#{{- $cleanedID -}}">{{- $header | safeHTML -}}</a>
{{- else -}}
<li>
<a href="#{{- $cleanedID -}}">{{- $header | safeHTML -}}</a>
{{- end -}}
{{- end -}}
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} -->
{{- $firstHeaderLevel := $largest }}
{{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) -}}
</li>
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
{{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) -}}
</ul>
{{- else -}}
</ul>
</li>
{{- end -}}
{{- end -}}
</ul>
{{- end -}}

30
netlify.toml Normal file
View File

@@ -0,0 +1,30 @@
[build]
publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.83.1"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
[context.split1]
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.83.1"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.83.1"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.83.1"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/img/rv32i.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

View File

@@ -1 +0,0 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

12
themes/PaperMod/.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: adityatelange
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.buymeacoffee.com/adityatelange']

View File

@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
<!--
## READ BEFORE OPENING ISSUES
Please fill the template below
- **DO NOT** ask for instructions.
- Use Discussions section if you need help
- See project wiki https://github.com/adityatelange/hugo-PaperMod/wiki
- Read FAQs section https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs
- Search for previous issues/ pull requests
-->
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- Hugo Version [ >=0.82.0 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:**
<!--
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
**Expected behavior**:
<!-- A clear and concise description of what you expected to happen. -->
**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
**Additional context**
<!--Add any other context about the problem here. -->

View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: PaperMod Discussions
url: https://github.com/adityatelange/hugo-PaperMod/discussions
about: Please ask and answer questions/doubts here, do not open an issue for questions.

View File

@@ -0,0 +1,7 @@
---
name: New Blank Issue
about: Anything other than bug report
title: ""
labels: ""
assignees: ""
---

View File

@@ -0,0 +1,43 @@
<!--
## READ BEFORE OPENING A PR
Thank you for contributing to hugo-PaperMod!
Please fill out the following questions to make it easier for us to review your
changes. You do not need to check all the boxes below.
**NOTE**: PaperMod does not have any external dependencies fetched from 3rd party
CDN servers. However we do have custom Head/Footer extender templates which you can use
to add those to your website.
https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#custom-head--footer
-->
**What does this PR change? What problem does it solve?**
<!--
Describe the changes and their purpose here, as detailed as and if needed.
Please do not add 2 unrelated changes in a single PR as it is difficult to track/revert those in future.
-->
**Was the change discussed in an issue or in the Discussions before?**
<!--
Link issues and relevant Discussions posts here.
If this PR resolves an issue on GitHub, use "Closes #1234" so that the issue
is closed automatically when this PR is merged.
-->
## PR Checklist
- [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-).
- [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [ ] This change **does not** any CDN resources/links.
- [ ] This change **does not** include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository.

17
themes/PaperMod/.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 7
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 3
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- keep
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View File

@@ -0,0 +1,32 @@
name: Build
on:
pull_request:
branches:
- master
- exampleSite
workflow_dispatch:
# manual run
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
ref: exampleSite
- name: Get Theme
run: git submodule update --init --recursive
- name: Update theme to Latest commit
run: git submodule update --remote --merge
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build
run: hugo --buildDrafts --gc --verbose --minify

View File

@@ -0,0 +1,42 @@
name: Build GH-Pages
on:
push:
paths-ignore:
- 'images/**'
- 'LICENSE'
- 'README.md'
branches:
- master
- exampleSite
workflow_dispatch:
# manual run
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
ref: exampleSite
- name: Get Theme
run: git submodule update --init --recursive
- name: Update theme to Latest commit
run: git submodule update --remote --merge
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build
run: hugo --buildDrafts --gc --verbose --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TOKEN }}
publish_dir: ./public

22
themes/PaperMod/LICENSE Normal file
View File

@@ -0,0 +1,22 @@
MIT License
Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021 adityatelange
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

89
themes/PaperMod/README.md Normal file
View File

@@ -0,0 +1,89 @@
<h1 align=center>Hugo PaperMod | <a href="https://adityatelange.github.io/hugo-PaperMod/" rel="nofollow">Demo</a></h1>
<h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4>
<br>
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
> The goal of this project is to add more Features and customization to the og theme.
The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
**ExampleSite** can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source.
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.82.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.82.0)
[![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)](https://github.com/adityatelange/hugo-PaperMod/deployments/activity_log?environment=github-pages)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod)
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)
---
<p align="center">
<kbd><img src="https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png" alt="Mockup image" title="Mockup"/></kbd>
</p>
---
## Features/Mods 💥
- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default.
- 3 Modes:
- [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode)
- [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode)
- [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode)
- Table of Content Generation (newer implementation).
- Archive of posts.
- Social Icons (home-info and profile-mode)
- Social-Media Share buttons on post.
- Menu location indicator.
- Multilingual support. (with language selector)
- Taxonomies
- Cover image for each post (with Responsive image support).
- Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button).
- SEO Friendly.
- Muliple Author support.
- Search Page with Fuse.js
- Other Posts suggestion below a post
- BreadCrumb Navigation
- Code Block Copy buttons
- No webpack, nodejs and other depedencies required to edit the theme.
Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**
---
## Install/Update 📥
Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)**
---
## Social-Icons/Share-Icons 🖼️
Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**
---
## FAQs / How To's Guide 🙋
Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)**
---
## Release Changelog
Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)**
---
## [LightHouse Report (100% ?)](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F)
---
## Special Thanks 🌟
- [**Highlight.js**](https://github.com/highlightjs/highlight.js)
- [**Fuse.js**](https://github.com/krisk/fuse)
- [**Feather Icons**](https://github.com/feathericons/feather)
- **All Contributors and Supporters**

View File

@@ -1,5 +1,3 @@
/* 404
-------------------------------------------------- */
.not-found {
position: absolute;
left: 0;
@@ -9,5 +7,5 @@
justify-content: center;
height: 80%;
font-size: 160px;
font-weight: 700;
}
font-weight: 700
}

View File

@@ -0,0 +1,44 @@
.archive-posts {
width: 100%;
font-size: 16px
}
.archive-year {
margin-top: 40px
}
.archive-year:not(:last-of-type) {
border-bottom: 2px solid var(--border)
}
.archive-month {
display: flex;
align-items: flex-start;
padding: 10px 0
}
.archive-month-header {
margin: 25px 0;
width: 200px
}
.archive-month:not(:last-of-type) {
border-bottom: 1px solid var(--border)
}
.archive-entry {
position: relative;
padding: 5px;
margin: 10px 0
}
.archive-entry-title {
margin: 5px 0;
font-weight: 400
}
.archive-count,
.archive-meta {
color: var(--secondary);
font-size: 14px
}

View File

@@ -0,0 +1,60 @@
.footer,
.top-link {
font-size: 12px;
color: var(--secondary)
}
.footer {
max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto;
padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap);
text-align: center;
line-height: 24px
}
.footer span {
margin-inline-start: 1px;
margin-inline-end: 1px
}
.footer span:last-child {
white-space: nowrap;
}
.footer a {
color: inherit;
border-bottom: 1px solid var(--secondary)
}
.footer a:hover {
border-bottom: 1px solid var(--primary)
}
.top-link {
visibility: hidden;
position: fixed;
bottom: 60px;
right: 30px;
z-index: 99;
background: var(--tertiary);
width: 42px;
height: 42px;
padding: 12px;
border-radius: 64px;
transition: visibility .5s, opacity .8s linear
}
.top-link,
.top-link svg {
filter: drop-shadow(0px 0px 0px var(--theme));
}
.footer a:hover,
.top-link:hover {
color: var(--primary)
}
.top-link:focus,
#theme-toggle:focus {
outline: 0
}

View File

@@ -1,5 +1,3 @@
/* Header
-------------------------------------------------- */
.nav {
display: flex;
flex-wrap: wrap;
@@ -7,18 +5,21 @@
max-width: calc(var(--nav-width) + var(--gap) * 2);
margin-inline-start: auto;
margin-inline-end: auto;
line-height: var(--header-height);
line-height: var(--header-height)
}
.nav a {
display: block;
display: block
}
.logo,
.menu {
#menu {
display: flex;
margin: auto var(--gap);
flex-wrap: inherit;
}
.logo {
flex-wrap: inherit
}
.logo a {
@@ -32,60 +33,65 @@
pointer-events: none;
transform: translate(0, -10%);
border-radius: 6px;
margin-inline-end: 8px;
margin-inline-end: 8px
}
.theme-toggle svg {
#theme-toggle svg {
height: 18px;
margin: 0 10px;
user-select: none;
cursor: pointer;
}
button#theme-toggle {
font-size: 26px;
margin: auto 4px
}
body.dark #moon {
vertical-align: middle;
display: none;
display: none
}
body:not(.dark) #sun {
display: none;
display: none
}
.menu {
#menu {
list-style: none;
word-break: keep-all;
overflow-x: auto;
white-space: nowrap;
white-space: nowrap
}
.menu li+li {
margin-inline-start: var(--gap);
#menu li+li {
margin-inline-start: var(--gap)
}
.menu a {
font-size: 16px;
#menu a {
font-size: 16px
}
.menu .active {
#menu .active {
font-weight: 500;
border-bottom: 2px solid currentColor;
border-bottom: 2px solid currentColor
}
.lang-switch ul {
.lang-switch li,
.lang-switch ul,
.logo-switches {
display: inline-flex;
margin: auto 4px;
}
.lang-switch {
display: flex;
flex-wrap: inherit
}
.lang-switch a {
margin: auto 3px;
font-size: 16px;
font-weight: 500;
margin: 0 8px;
}
.lang-switch li {
display: inline-flex;
}
.logo-switches {
display: inline-flex;
flex-wrap: inherit;
flex-wrap: inherit
}

View File

@@ -1,29 +1,17 @@
/* Main
-------------------------------------------------- */
.main {
position: relative;
min-height: calc(100vh - var(--header-height) - var(--footer-height));
max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto;
padding: var(--gap);
}
@media screen and (max-width: 400px) {
.main {
min-height: calc(100vh - var(--header-height) - var(--footer-height) - 24px);
}
}
.page-header {
margin-bottom: 24px;
padding: var(--gap)
}
.page-header h1 {
font-size: 40px;
font-size: 40px
}
.pagination {
display: flex;
display: flex
}
.pagination a {
@@ -32,34 +20,47 @@
line-height: 36px;
background: var(--primary);
border-radius: calc(36px / 2);
padding: 0 16px;
padding: 0 16px
}
.pagination .next {
margin-inline-start: auto;
margin-inline-start: auto
}
.social-icons {
padding: 12px 0;
padding: 12px 0
}
.social-icons a:not(:last-of-type) {
margin-inline-end: 12px;
margin-inline-end: 12px
}
.social-icons a svg {
height: 26px;
width: 26px;
}
.direction-rtl {
direction: rtl;
}
.direction-ltr {
direction: ltr;
width: 26px
}
code {
direction: ltr;
}
div.highlight, pre {
position: relative;
}
.copy-code {
display: none;
position: absolute;
top: 4px;
right: 4px;
color: rgba(255, 255, 255, 0.8);
background: rgba(78, 78, 78, 0.8);
border-radius: var(--radius);
padding: 0 5px;
font-size: 14px;
}
div.highlight:hover .copy-code,
pre:hover .copy-code {
display: block;
}

View File

@@ -1,43 +1,36 @@
/* Post entry
-------------------------------------------------- */
.first-entry {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 320px;
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}
@media screen and (max-width: 600px) {
.first-entry {
min-height: 260px;
}
margin: var(--gap) 0 calc(var(--gap) * 2) 0
}
.first-entry .entry-header {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
-webkit-line-clamp: 3
}
.first-entry .entry-header h2 {
.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3
}
.first-entry .entry-content {
margin: 14px 0;
font-size: 16px;
-webkit-line-clamp: 3;
-webkit-line-clamp: 3
}
.first-entry .entry-footer {
font-size: 14px;
font-size: 14px
}
.home-info .entry-content {
-webkit-line-clamp: 5;
-webkit-line-clamp: unset
}
.post-entry {
@@ -46,19 +39,20 @@
padding: var(--gap);
background: var(--entry);
border-radius: var(--radius);
transition: transform 0.1s;
transition: transform .1s;
border: 1px solid var(--border);
}
.post-entry:active {
transform: scale(0.96);
transform: scale(.96)
}
.tag-entry .entry-cover {
display: none;
display: none
}
.entry-header h2 {
font-size: 24px;
font-size: 24px
}
.entry-content {
@@ -69,12 +63,12 @@
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 2
}
.entry-footer {
color: var(--secondary);
font-size: 13px;
font-size: 13px
}
.entry-link {
@@ -82,29 +76,31 @@
left: 0;
right: 0;
top: 0;
bottom: 0;
bottom: 0
}
.entry-cover,
.entry-isdraft {
font-size: 14px;
color: var(--secondary)
}
.entry-isdraft {
display: inline;
color: var(--secondary);
font-size: 14px;
display: inline
}
.entry-cover {
margin-bottom: var(--gap);
text-align: center;
font-size: 14px;
color: var(--secondary);
text-align: center
}
.entry-cover img {
border-radius: var(--radius);
pointer-events: none;
width: 100%;
width: 100%
}
.entry-cover a {
color: var(--secondary);
box-shadow: 0 1px 0 var(--primary);
box-shadow: 0 1px 0 var(--primary)
}

View File

@@ -0,0 +1,433 @@
.page-header,
.post-header {
margin: 24px auto var(--content-gap) auto
}
.post-title {
margin-bottom: 2px;
font-size: 40px
}
.post-description {
margin-top: 10px;
margin-bottom: 5px;
}
.post-meta,
.breadcrumbs {
color: var(--secondary);
font-size: 14px;
display: flex;
flex-wrap: wrap
}
.post-meta .i18n_list li {
display: inline-flex;
list-style: none;
margin: auto 3px;
box-shadow: 0 1px 0 var(--secondary)
}
.breadcrumbs a {
font-size: 16px;
}
.post-content {
color: var(--content)
}
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin: 24px 0 16px
}
.post-content h1 {
margin: 40px auto 32px;
font-size: 40px
}
.post-content h2 {
margin: 32px auto 24px;
font-size: 32px
}
.post-content h3 {
font-size: 24px
}
.post-content h4 {
font-size: 16px
}
.post-content h5 {
font-size: 14px
}
.post-content h6 {
font-size: 12px
}
.post-content a,
.toc a:hover {
box-shadow: 0 1px 0
}
.post-content a code {
margin: auto 0;
border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset
}
.post-content del {
text-decoration: none;
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50%/1px 1px repeat-x
}
.post-content dl,
.post-content ol,
.post-content p,
.post-content figure,
.post-content ul {
margin-bottom: var(--content-gap)
}
.post-content ol,
.post-content ul {
padding-inline-start: 20px
}
.post-content li {
margin-top: 5px
}
.post-content li p {
margin-bottom: 0
}
.post-content dl {
display: flex;
flex-wrap: wrap;
margin: 0
}
.post-content dt {
width: 25%;
font-weight: 700
}
.post-content dd {
width: 75%;
margin-inline-start: 0;
padding-inline-start: 10px
}
.post-content dd~dd,
.post-content dt~dt {
margin-top: 10px
}
.post-content table {
margin-bottom: 32px
}
.post-content table th,
.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
min-width: 80px;
padding: 12px 8px;
line-height: 1.5;
border-bottom: 1px solid var(--border)
}
.post-content table th {
font-size: 14px;
text-align: start
}
.post-content table:not(.highlighttable) td code:only-child {
margin: auto 0
}
.post-content .highlight table {
border-radius: var(--radius)
}
.post-content .highlight:not(table),
.post-content pre {
margin: 10px auto;
background: var(--hljs-bg) !important;
border-radius: var(--radius)
}
.post-content li>.highlight {
margin-inline-end: 0
}
.post-content ul pre {
margin-inline-start: calc(var(--gap) * -2)
}
.post-content .highlight pre {
margin: 0
}
.post-content .highlighttable {
table-layout: fixed
}
.post-content .highlighttable td:first-child {
width: 40px
}
.post-content .highlighttable td .linenodiv {
padding-inline-end: 0 !important
}
.post-content .highlighttable td .highlight,
.post-content .highlighttable td .linenodiv pre {
margin-bottom: 0
}
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
display: none
}
.post-content .highlight span {
background: 0 0 !important
}
.post-content code {
margin: auto 4px;
padding: 4px 6px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: .78em;
line-height: 1.5;
background: var(--code-bg);
border-radius: 2px
}
.post-content pre code {
display: block;
margin: auto 0;
padding: 10px;
color: rgba(255, 255, 255, .8);
background: 0 0;
border-radius: 0;
overflow-x: auto;
word-break: break-all;
}
.post-content blockquote {
margin: 20px 0;
padding: 0 14px;
border-inline-start: 3px solid var(--primary)
}
.post-content hr {
margin: 30px 0;
height: 2px;
background: var(--tertiary);
border-top: 0;
border-bottom: 0
}
.post-content iframe {
max-width: 100%
}
.post-content img {
border-radius: 4px
}
.post-content img[src*='#center'] {
margin: auto
}
.post-content figure.align-center {
text-align: center;
}
.post-content figure>figcaption {
color: var(--primary);
font-size: 16px;
font-weight: bold;
margin: 8px 0 16px;
}
.post-content figure>figcaption>p {
color: var(--secondary);
font-size: 14px;
font-weight: normal;
}
.toc {
margin: 0 2px 40px 2px;
border: 1px solid var(--border);
background: var(--code-bg);
border-radius: var(--radius);
padding: .4em
}
.dark .toc {
background: var(--entry);
}
.toc details summary {
cursor: zoom-in;
margin-inline-start: 20px
}
.toc details[open] summary {
cursor: zoom-out
}
.toc .details {
display: inline;
font-weight: 500
}
.toc .inner {
margin: 0 20px;
padding: 10px 20px
}
.toc li ul {
margin-inline-start: var(--gap)
}
.toc summary:focus {
outline: 0
}
.post-footer {
margin-top: 56px
}
.post-tags li {
display: inline-block;
margin-inline-end: 3px;
margin-bottom: 5px
}
.post-tags a,
.share-buttons,
.paginav {
border-radius: var(--radius);
background: var(--code-bg);
border: 1px solid var(--border)
}
.post-tags a {
display: block;
padding-inline-start: 14px;
padding-inline-end: 14px;
color: var(--secondary);
font-size: 14px;
line-height: 34px;
background: var(--code-bg)
}
.post-tags a:hover,
.paginav a:hover {
background: var(--border)
}
.share-buttons {
margin: 14px 0;
padding-inline-start: var(--radius);
display: flex;
justify-content: center;
overflow-x: auto
}
.share-buttons a {
margin-top: 10px
}
.share-buttons a:not(:last-of-type) {
margin-inline-end: 12px
}
.share-buttons a svg {
height: 30px;
width: 30px;
fill: currentColor;
transition: transform .1s
}
.share-buttons svg:active {
transform: scale(.96)
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
display: inline-flex;
color: var(--secondary);
margin-inline-start: 8px;
font-weight: 500
}
.post-content :not(table) ::-webkit-scrollbar-thumb {
border: 2px solid var(--hljs-bg);
background: rgba(255, 255, 255, 0.32)
}
.post-content :not(table) ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.56)
}
.gist table::-webkit-scrollbar-thumb {
border: 2px solid rgb(255, 255, 255);
background: rgba(0, 0, 0, 0.32)
}
.gist table::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.56)
}
.post-content table::-webkit-scrollbar-thumb {
border-width: 2px;
}
.paginav {
margin: 10px 0;
display: flex;
line-height: 30px;
border-radius: var(--radius);
}
.paginav a {
padding-inline-start: 14px;
padding-inline-end: 14px;
border-radius: var(--radius);
}
.paginav .title {
letter-spacing: 1px;
text-transform: uppercase;
font-size: small;
color: var(--secondary);
}
.paginav .prev,
.paginav .next {
width: 50%;
}
.paginav span:hover:not(.title) {
box-shadow: 0 1px 0;
}
.paginav .next {
margin-inline-start: auto;
text-align: right;
}
[dir="rtl"] .paginav .next {
text-align: left;
}

View File

@@ -0,0 +1,46 @@
.buttons,
.main .profile {
display: flex;
justify-content: center
}
.main .profile {
position: absolute;
left: 0;
right: 0;
align-items: center;
height: 80%;
text-align: center
}
.profile .profile_inner h1 {
padding: 12px 0
}
.profile img {
display: inline-table;
border-radius: 50%;
pointer-events: none
}
.buttons {
flex-wrap: wrap;
max-width: 400px;
margin: 0 auto
}
.button {
background: var(--tertiary);
border-radius: var(--radius);
margin: 8px;
padding: 6px;
transition: transform .1s
}
.button-inner {
padding: 0 8px
}
.button:active {
transform: scale(.96)
}

View File

@@ -0,0 +1,45 @@
#searchbox input {
padding: 4px 10px;
width: 100%;
color: var(--primary);
font-weight: bold;
border: 2px solid var(--tertiary);
border-radius: var(--radius);
}
#searchbox input:focus {
border-color: var(--secondary);
}
#searchResults li {
list-style: none;
border-radius: var(--radius);
padding: 10px;
margin: 10px 0;
position: relative;
font-weight: 500;
}
#searchResults {
margin: 10px 0;
width: 100%;
}
#searchResults li:active {
transition: transform .1s;
transform: scale(.98);
}
#searchResults a {
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
outline: none;
}
#searchResults .focus {
transform: scale(.98);
border: 2px solid var(--tertiary)
}

View File

@@ -1,7 +1,7 @@
.terms-tags li {
display: inline-block;
margin: 10px;
font-weight: 500;
font-weight: 500
}
.terms-tags a {
@@ -9,10 +9,10 @@
padding: 3px 10px;
background: var(--tertiary);
border-radius: 6px;
transition: transform 0.1s;
transition: transform .1s
}
.terms-tags a:hover {
.terms-tags a:active {
background: var(--tertiary);
transform: scale(0.96);
}
transform: scale(.96)
}

View File

@@ -0,0 +1,138 @@
*,
::after,
::before {
box-sizing: border-box
}
html {
-webkit-tap-highlight-color: transparent;
overflow-y: scroll;
}
a,
button,
body,
h1,
h2,
h3,
h4,
h5,
h6 {
color: var(--primary)
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 18px;
line-height: 1.6;
word-break: break-word;
background: var(--theme)
}
article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
table {
display: block
}
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.2
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin-top: 0;
margin-bottom: 0
}
ul {
padding: 0
}
a {
text-decoration: none
}
body,
figure,
ul {
margin: 0
}
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
overflow-x: auto;
word-break: keep-all
}
button,
input,
textarea {
padding: 0;
font: inherit;
background: 0 0;
border: 0;
}
input,
textarea {
outline: 0
}
button,
input[type=button],
input[type=submit] {
cursor: pointer
}
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 50px var(--theme) inset
}
img {
display: block;
max-width: 100%
}
::-webkit-scrollbar-track {
background: 0 0
}
.list:not(.dark)::-webkit-scrollbar-track {
background: var(--code-bg)
}
::-webkit-scrollbar-thumb {
background: var(--tertiary);
border: 5px solid var(--theme);
border-radius: var(--radius)
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border: 5px solid var(--code-bg)
}
::-webkit-scrollbar-thumb:hover {
background: var(--secondary)
}

View File

@@ -1,5 +1,3 @@
/* Theme
-------------------------------------------------- */
:root {
--gap: 24px;
--content-gap: 20px;
@@ -8,36 +6,27 @@
--header-height: 60px;
--footer-height: 60px;
--radius: 8px;
--theme: #fff;
--entry: #fff;
--primary: rgba(0, 0, 0, 0.88);
--secondary: rgba(0, 0, 0, 0.56);
--tertiary: rgba(0, 0, 0, 0.16);
--content: rgba(0, 0, 0, 0.88);
--hljs-bg: #1c1d21;
--code-bg: #f5f5f5;
--border: #eee;
}
@media screen and (max-width: 600px) {
:root {
--gap: 14px;
}
}
.dark {
--theme: #1d1e20;
--entry: #2e2e33;
--primary: rgba(255, 255, 255, 0.84);
--secondary: rgba(255, 255, 255, 0.56);
--tertiary: rgba(255, 255, 255, 0.16);
--content: rgba(255, 255, 255, 0.64);
--content: rgba(255, 255, 255, 0.74);
--hljs-bg: #2e2e33;
--code-bg: #37383e;
--border: #5b5d67;
--border: #333;
}
.list {
@@ -46,4 +35,4 @@
.dark.list {
background: var(--theme);
}
}

View File

@@ -0,0 +1,53 @@
@media screen and (max-width: 768px) {
/* theme-vars */
:root {
--gap: 14px;
}
/* profile-mode */
.profile img {
transform: scale(0.85);
}
/* post-entry */
.first-entry {
min-height: 260px;
}
/* archive */
.archive-month {
flex-direction: column;
}
.archive-year {
margin-top: 20px;
}
}
@media screen and (min-width: 768px) {
/* reset */
::-webkit-scrollbar {
width: 19px;
height: 11px;
}
}
/* footer */
@media screen and (max-width: 900px) {
.list .top-link {
transform: translateY(-5rem);
}
}
@media (prefers-reduced-motion) {
/* terms; profile-mode; post-single; post-entry; post-entry; search; search */
.terms-tags a:active,
.button:active,
.share-buttons svg:active,
.post-entry:active,
.top-link,
#searchResults .focus,
#searchResults li:active {
transform: none;
}
}

View File

@@ -0,0 +1,5 @@
/*
This is just a placeholder blank stylesheet so as to support adding custom styles budled with theme's default styles
Read https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets for more info
*/

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