diff --git a/README.md b/README.md index 9d94653..457842a 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,11 @@ params: ``` ToC will float on the left/right side of the page. +You can take a look at how `'right'` feels like in [Installation | Update](https://reorx.github.io/hugo-PaperModX/docs/installation/). + The ToC box is responsive, it only shows on the side when minimum screen size is 1440px. -this feature is enabled on this site. +This feature is enabled on this site. ## InstantClick integration @@ -55,7 +57,7 @@ Though PaperModX is designed to be minimal, accent color is still essential. It's a good way to show personality and make your site feels more delightful. The default color is a purple vibe, -you can customize the colors of link, link underline and the hover variants of them +you can customize the colors of link, link underline and their hover variants by override the following css variables in `assets/css/extended/custom.css` of your site. ```css @@ -108,6 +110,10 @@ Available icons: - twitter-simple - pinboard-simple +The icons are moved from `layouts/partials/svg.html` to `data/svg.toml`, +makes it easier to maintain, it's now possible to have an index page +to show all the icons, check it out at: [Icons Preview](https://reorx.github.io/hugo-PaperModX/docs/icons_preview/) + ## Opinionated UI enhancements diff --git a/assets/css/common/header.css b/assets/css/common/header.css index ca40bcc..95a54a2 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -85,6 +85,17 @@ body:not(.dark) #sun { box-shadow: 0 2px 0 var(--primary); } +#menu .external-link { + position: relative; +} +#menu .external-link svg { + width: 13px; + height: auto; + position: relative; + top: 1px; + margin-left: 3px; +} + .lang-switch li, .lang-switch ul, .logo-switches { diff --git a/data/svg.toml b/data/svg.toml index d10ada7..1464a83 100644 --- a/data/svg.toml +++ b/data/svg.toml @@ -22,7 +22,7 @@ applemusic = ''' ''' applepodcasts = ''' - ''' @@ -185,6 +185,14 @@ email = ''' ''' +external-link = ''' + + + + + + +''' facebook = ''' @@ -243,7 +251,7 @@ goodreads = ''' ''' googlepodcasts = ''' - ''' @@ -416,7 +424,7 @@ monero = ''' ''' overcast = ''' - ''' @@ -450,7 +458,7 @@ phone = ''' ''' pocketcasts = ''' - ''' diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 6c0c0bd..1d90437 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -38,6 +38,8 @@ languages: weight: 10 - name: "@Author" url: "https://reorx.com" + params: + external: true zh: languageName: ":cn:" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a80249d..88872c4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -127,10 +127,13 @@ + {{- if eq $menu_item_url $page_url }} class="active" {{- end }} + {{- if .Params.External }} target="_blank" {{- end }} + > {{- .Pre }} {{- .Name -}} {{ .Post -}} + {{- if .Params.External }}{{ safeHTML (index $.Site.Data.svg "external-link") }}{{- end }} {{- end }}