-
+PaperModX is a forked version of [PaperMod](https://github.com/adityatelange/hugo-PaperMod),
+it aims at adding new features and improving code quality,
+makes it easier to read and modify by anyone with basic knowledge of Hugo and HTML.
-> 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 a few more stuff. Make sure you visit it, to get an awesome hands-on experience and get to know 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.83.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.83.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/themes/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)
-
----
-
-
-
-
-
----
-
-## 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 posts.
-- 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.
-- Multiple Author support.
-- Search Page with Fuse.js
-- Other Posts suggestion below a post
-- Breadcrumb Navigation
-- Code Block Copy buttons
-- No webpack, nodejs and other dependencies are 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)**
-
----
-
-## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/)
-
----
-
-## Special Thanks 🌟
-
-- [**Highlight.js**](https://github.com/highlightjs/highlight.js)
-- [**Fuse.js**](https://github.com/krisk/fuse)
-- [**Feather Icons**](https://github.com/feathericons/feather)
-- [**Simple Icons**](https://github.com/simple-icons/simple-icons)
-- **All Contributors and Supporters**
+Features and changes:
+- Table of Contents (ToC) floating on the side
+- InstantClick integration
+- Social icons from [Simple Icons](https://simpleicons.org/)
+- Opinionated UI enhancements
diff --git a/assets/css/common/footer.css b/assets/css/common/footer.css
index 5addb1e..b0dc264 100644
--- a/assets/css/common/footer.css
+++ b/assets/css/common/footer.css
@@ -58,3 +58,8 @@
#theme-toggle:focus {
outline: 0;
}
+
+/* InstantClick css */
+#instantclick-bar {
+ background: var(--tertiary);
+}
diff --git a/assets/css/common/header.css b/assets/css/common/header.css
index 3cd070e..4c8de8f 100644
--- a/assets/css/common/header.css
+++ b/assets/css/common/header.css
@@ -67,10 +67,12 @@ body:not(.dark) #sun {
#menu a {
font-size: 16px;
+ font-weight: 500;
+ color: var(--secondary);
}
#menu .active {
- font-weight: 500;
+ color: var(--primary);
border-bottom: 2px solid currentColor;
}
diff --git a/assets/css/common/main.css b/assets/css/common/main.css
index 50022ac..22dc39c 100644
--- a/assets/css/common/main.css
+++ b/assets/css/common/main.css
@@ -1,3 +1,4 @@
+/* for home and other pages */
.main {
position: relative;
min-height: calc(100vh - var(--header-height) - var(--footer-height));
@@ -5,6 +6,10 @@
margin: auto;
padding: var(--gap);
}
+/* for post page */
+.main.post {
+ max-width: calc(var(--post-width) + var(--gap) * 2);
+}
.page-header h1 {
font-size: 40px;
diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css
index b9b9709..8730e88 100644
--- a/assets/css/common/post-single.css
+++ b/assets/css/common/post-single.css
@@ -69,8 +69,7 @@
font-size: 12px;
}
-.post-content a,
-.toc a:hover {
+.post-content a {
box-shadow: 0 1px 0;
}
@@ -263,20 +262,26 @@
border-radius: var(--radius);
padding: 0.4em;
}
+@media screen and (min-width: 1000px) {
+ .toc.side {
+ position: fixed;
+ right: 30px;
+ top: 100px;
+ width: 300px;
+ font-size: .9em;
+ z-index: 1;
+ }
+}
.dark .toc {
background: var(--entry);
}
.toc details summary {
- cursor: zoom-in;
+ cursor: pointer;
margin-inline-start: 20px;
}
-.toc details[open] summary {
- cursor: zoom-out;
-}
-
.toc .details {
display: inline;
font-weight: 500;
@@ -290,6 +295,12 @@
.toc li ul {
margin-inline-start: var(--gap);
}
+.toc li a.active {
+ box-shadow: 0 2px 0 var(--secondary);
+}
+.toc a:hover {
+ text-decoration: underline;
+}
.toc summary:focus {
outline: 0;
diff --git a/assets/css/core/theme-vars.css b/assets/css/core/theme-vars.css
index fd0c5ee..955b7e4 100644
--- a/assets/css/core/theme-vars.css
+++ b/assets/css/core/theme-vars.css
@@ -1,8 +1,9 @@
:root {
--gap: 24px;
--content-gap: 20px;
- --nav-width: 1024px;
+ --nav-width: 960px;
--main-width: 720px;
+ --post-width: 800px;
--header-height: 60px;
--footer-height: 60px;
--radius: 8px;
diff --git a/assets/js/instantclick.js b/assets/js/instantclick.js
new file mode 100644
index 0000000..a2539d8
--- /dev/null
+++ b/assets/js/instantclick.js
@@ -0,0 +1,13 @@
+/* InstantClick 3.1.0 | (C) 2014 Alexandre Dieulot | http://instantclick.io/license */
+var InstantClick=function(d,e){function w(a){var b=a.indexOf("#");return 0>b?a:a.substr(0,b)}function z(a){for(;a&&"A"!=a.nodeName;)a=a.parentNode;return a}function A(a){var b=e.protocol+"//"+e.host;if(!(b=a.target||a.hasAttribute("download")||0!=a.href.indexOf(b+"/")||-1+new Date-500||(a=z(a.target))&&A(a)&&x(a.href)}function N(a){G>+new Date-500||(a=z(a.target))&&A(a)&&(a.addEventListener("mouseout",T),H?(O=a.href,l=setTimeout(x,H)):x(a.href))}function U(a){G=+new Date;(a=z(a.target))&&A(a)&&(D?a.removeEventListener("mousedown",
+M):a.removeEventListener("mouseover",N),x(a.href))}function V(a){var b=z(a.target);!b||!A(b)||1p.readyState)&&0!=p.status){q.ready=+new Date-q.start;if(p.getResponseHeader("Content-Type").match(/\/(x|ht|xht)ml/)){var a=d.implementation.createHTMLDocument("");a.documentElement.innerHTML=p.responseText.replace(/