mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-22 23:37:53 +00:00
theme: remove typos and superflous whitespace
This commit is contained in:
parent
42c8ec549b
commit
de7b3d8056
20 changed files with 48 additions and 155 deletions
|
@ -76,14 +76,14 @@ The mermaid configuration parameters can also be set on a specific page. In this
|
|||
|
||||
> Example:
|
||||
>
|
||||
> Mermaid is globally disabled. By default it won't be loaded by any page.
|
||||
> Mermaid is globally disabled. By default it won't be loaded by any page.
|
||||
> On page "Architecture" you need a class diagram. You can set the mermaid parameters locally to only load mermaid on this page (not on the others).
|
||||
|
||||
You also can disable mermaid for specific pages while globally enabled.
|
||||
|
||||
## Home Button Configuration
|
||||
|
||||
If the `disableLandingPage` option is set to `false`, an Home button will appear
|
||||
If the `disableLandingPage` option is set to `false`, a Home button will appear
|
||||
on the left menu. It is an alternative for clicking on the logo. To edit the
|
||||
appearance, you will have to configure two parameters for the defined languages:
|
||||
|
||||
|
@ -109,6 +109,6 @@ landingPageURL = "/"
|
|||
landingPageName = "<i class='fas fa-home'></i> Home"
|
||||
```
|
||||
|
||||
The home button is going to looks like this:
|
||||
The home button is going to look like this:
|
||||
|
||||
![Default Home Button](images/home_button_defaults.png?width=100%)
|
||||
|
|
|
@ -25,7 +25,7 @@ This theme defines the following partials :
|
|||
## Change the logo
|
||||
|
||||
Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want.
|
||||
You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition !
|
||||
You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition!
|
||||
|
||||
{{% notice note %}}
|
||||
The size of the logo will adapt automatically
|
||||
|
@ -92,7 +92,6 @@ First, create a new CSS file in your local `static/css` folder prefixed by `them
|
|||
```css
|
||||
|
||||
:root{
|
||||
|
||||
--MAIN-TEXT-color:#323232; /* Color of text by default */
|
||||
--MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
|
||||
--MAIN-LINK-color:#1C90F3; /* Color of links */
|
||||
|
@ -100,7 +99,7 @@ First, create a new CSS file in your local `static/css` folder prefixed by `them
|
|||
--MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
|
||||
|
||||
--MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */
|
||||
--MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
|
||||
--MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
|
||||
|
||||
--MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */
|
||||
--MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
|
||||
|
@ -115,7 +114,6 @@ First, create a new CSS file in your local `static/css` folder prefixed by `them
|
|||
|
||||
--MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
|
||||
--MENU-SECTION-HR-color: #20272b; /* Color of <hr> separator in menu */
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -195,7 +193,7 @@ a:hover {
|
|||
}
|
||||
```
|
||||
|
||||
Then, set the `themeVariant` value with the name of your custom theme file. That's it !
|
||||
Then, set the `themeVariant` value with the name of your custom theme file. That's it!
|
||||
|
||||
```toml
|
||||
[params]
|
||||
|
|
|
@ -43,10 +43,10 @@ Chapters are pages that contain other child pages. It has a special layout style
|
|||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core concepts behind it.
|
||||
Discover what this H(tugo theme is all about and the core concepts behind it.
|
||||
```
|
||||
|
||||
renders as
|
||||
renders as
|
||||
|
||||
![A Chapter](images/chapter.png?classes=shadow&width=60pc)
|
||||
|
||||
|
@ -69,7 +69,7 @@ hugo new basics/first-content.md
|
|||
hugo new basics/second-content/_index.md
|
||||
```
|
||||
|
||||
Feel free to edit thoses files by adding some sample content and replacing the `title` value in the beginning of the files.
|
||||
Feel free to edit those files by adding some sample content and replacing the `title` value in the beginning of the files.
|
||||
|
||||
## Launching the website locally
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ weight: 30
|
|||
|
||||
It provides:
|
||||
|
||||
- Translation strings for default values (English and French). Feel free to contribute !
|
||||
- Translation strings for default values (English and French). Feel free to contribute!
|
||||
- Automatic menu generation from multilingual content
|
||||
- In-browser language switching
|
||||
|
||||
|
@ -59,13 +59,13 @@ Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-con
|
|||
|
||||
Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values.
|
||||
|
||||
To override these values, create a new file in your local i18n folder `i18n/<idlanguage>.toml` and inspire yourself from the theme `themes/hugo-theme-relearn/i18n/en.toml`
|
||||
To override these values, create a new file in your local i18n folder `i18n/<idlanguage>.toml` and inspire yourself from the theme `themes/hugo-theme-relearn/i18n/en.toml`
|
||||
|
||||
By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/McShelby/hugo-theme-relearn/pulls) to the theme !
|
||||
By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/McShelby/hugo-theme-relearn/pulls) to the theme!
|
||||
|
||||
## Disable language switching
|
||||
|
||||
Switching the language in the browser is a great feature, but for some reasons you may want to disable it.
|
||||
Switching the language in the browser is a great feature, but for some reasons you may want to disable it.
|
||||
|
||||
Just set `disableLanguageSwitchingButton=true` in your `config.toml`
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entr
|
|||
|
||||
Example from the current website:
|
||||
|
||||
[[menu.shortcuts]]
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/McShelby/hugo-theme-relearn"
|
||||
|
@ -34,8 +34,8 @@ Example from the current website:
|
|||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`.
|
||||
However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration.
|
||||
By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`.
|
||||
However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration.
|
||||
|
||||
For example, in your local `i18n/en.toml` file, add the following content
|
||||
|
||||
|
@ -46,7 +46,7 @@ Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n tran
|
|||
|
||||
## Configuration for Multilingual mode {#i18n}
|
||||
|
||||
When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.<language-id>`.
|
||||
When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.<language-id>`.
|
||||
|
||||
|
||||
Example from the current website:
|
||||
|
@ -57,7 +57,7 @@ Example from the current website:
|
|||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/McShelby/hugo-theme-relearn"
|
||||
|
|
|
@ -95,7 +95,7 @@ Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-ma
|
|||
|
||||
```toml
|
||||
+++
|
||||
# Table of content (toc) is enabled by default. Set this parameter to true to disable it.
|
||||
# Table of contents (toc) is enabled by default. Set this parameter to true to disable it.
|
||||
# Note: Toc is always disabled for chapter pages
|
||||
disableToc = "false"
|
||||
# If set, this will be used for the page's menu entry (instead of the `title` attribute)
|
||||
|
|
|
@ -5,18 +5,18 @@ weight: 40
|
|||
tags: ["documentation", "tutorial"]
|
||||
---
|
||||
|
||||
*Relearn theme* support one default taxonomy of gohugo: the *tag* feature.
|
||||
*Relearn theme* supports one default taxonomy of Hugo: the *tag* feature.
|
||||
|
||||
## Configuration
|
||||
## Configuration
|
||||
|
||||
Just add tags to any page:
|
||||
Just add tags to any page:
|
||||
|
||||
```markdown
|
||||
---
|
||||
date: 2018-11-29T08:41:44+01:00
|
||||
title: Theme tutorial
|
||||
weight: 15
|
||||
tags: ["tutorial", "theme"]
|
||||
tags: ["tutorial", "theme"]
|
||||
---
|
||||
```
|
||||
|
||||
|
@ -25,7 +25,7 @@ tags: ["tutorial", "theme"]
|
|||
|
||||
The tags are displayed at the top of the page, in their insertion order.
|
||||
|
||||
Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag.
|
||||
Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag.
|
||||
|
||||
## List all the tags
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ renders as
|
|||
|
||||
{{%/*attachments style="grey" /*/%}}
|
||||
|
||||
renders as
|
||||
renders as
|
||||
|
||||
{{% attachments style="grey" /%}}
|
||||
|
||||
|
@ -77,7 +77,7 @@ renders as
|
|||
renders as
|
||||
|
||||
{{% attachments style="blue" /%}}
|
||||
|
||||
|
||||
{{%/*attachments style="green" /*/%}}
|
||||
|
||||
renders as
|
||||
|
|
|
@ -8,4 +8,4 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
title = "page test"
|
||||
+++
|
||||
title = "page test"
|
||||
description = "This is a page test"
|
||||
+++
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ title: Site param
|
|||
description : "Get value of site params variables in your page."
|
||||
---
|
||||
|
||||
`siteparam` shortcode is used to help you print values of site params.
|
||||
`siteparam` shortcode is used to help you print values of site params.
|
||||
|
||||
For instance, in this current site, the `editURL` variable is used in `config.toml`
|
||||
|
||||
|
|
|
@ -112,8 +112,8 @@ Hello = World
|
|||
|
||||
{{% notice warning %}}
|
||||
When using tab views with different content sets, make sure to use a common `groupId` for equal sets but distinct
|
||||
`groupId` for different sets. The `groupId` defaults to `'default'`.
|
||||
**Take this into account across the whole site!**
|
||||
`groupId` for different sets. The `groupId` defaults to `'default'`.
|
||||
**Take this into account across the whole site!**
|
||||
The tab selection is restored automatically based on the `groupId` and if it cannot find a tab item because it came
|
||||
from the `'default'` group on a different page then all tabs will be empty at first.
|
||||
{{% /notice %}}
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
|
||||
:root{
|
||||
|
||||
--MAIN-TEXT-color:#323232; /* Color of text by default */
|
||||
--MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
|
||||
--MAIN-LINK-color:#599a3e; /* Color of links */
|
||||
--MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */
|
||||
--MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */
|
||||
|
||||
--MENU-HEADER-BG-color:#74b559; /* Background color of menu header */
|
||||
--MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */
|
||||
|
||||
--MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */
|
||||
--MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */
|
||||
--MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */
|
||||
|
||||
--MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */
|
||||
--MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */
|
||||
--MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
|
||||
--MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
|
||||
|
||||
--MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */
|
||||
--MENU-SECTION-HR-color: #18211c; /* Color of <hr> separator in menu */
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--MAIN-TEXT-color) !important;
|
||||
}
|
||||
|
||||
textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus {
|
||||
border-color: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5 {
|
||||
color: var(--MAIN-TITLES-TEXT-color) !important;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--MAIN-LINK-color);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
color: var(--MAIN-ANCHOR-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.visited > a .read-icon {
|
||||
color: var(--MENU-VISITED-color);
|
||||
}
|
||||
|
||||
#body a.highlight:after {
|
||||
display: block;
|
||||
content: "";
|
||||
height: 1px;
|
||||
width: 0%;
|
||||
-webkit-transition: width 0.5s ease;
|
||||
-moz-transition: width 0.5s ease;
|
||||
-ms-transition: width 0.5s ease;
|
||||
transition: width 0.5s ease;
|
||||
background-color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
#sidebar {
|
||||
background-color: var(--MENU-SECTIONS-BG-color);
|
||||
}
|
||||
#sidebar #header-wrapper {
|
||||
background: var(--MENU-HEADER-BG-color);
|
||||
color: var(--MENU-SEARCH-BOX-color);
|
||||
border-color: var(--MENU-HEADER-BORDER-color);
|
||||
}
|
||||
#sidebar .searchbox {
|
||||
border-color: var(--MENU-SEARCH-BOX-color);
|
||||
background: var(--MENU-SEARCH-BG-color);
|
||||
}
|
||||
#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
|
||||
background: var(--MENU-SECTIONS-ACTIVE-BG-color);
|
||||
}
|
||||
#sidebar .searchbox * {
|
||||
color: var(--MENU-SEARCH-BOX-ICONS-color);
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
color: var(--MENU-SECTIONS-LINK-color);
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
color: var(--MENU-SECTIONS-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.active > a {
|
||||
background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
|
||||
color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
|
||||
}
|
||||
|
||||
#sidebar hr {
|
||||
border-color: var(--MENU-SECTION-HR-color);
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
<!-- import your comments system
|
||||
<!-- import your comments system
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
-->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- Partial intended to be overwritten with tags loaded at the end of the page loading (usually for Javascript)
|
||||
<!-- Partial intended to be overwritten with tags loaded at the end of the page loading (usually for Javascript)
|
||||
<script>
|
||||
console.log("running some javascript");
|
||||
</script>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
.autocomplete-suggestion {
|
||||
position: relative;
|
||||
|
|
|
@ -271,7 +271,7 @@ figcaption h4 {
|
|||
}
|
||||
|
||||
.is-sticky #top-bar {
|
||||
box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@media print {
|
||||
/* the header is sticky which is not suited for print;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* Tags */
|
||||
|
||||
#head-tags{
|
||||
margin-left:1em;
|
||||
margin-left:1em;
|
||||
margin-top:1em;
|
||||
}
|
||||
|
||||
|
||||
#body .tags a.tag-link {
|
||||
display: inline-block;
|
||||
line-height: 2em;
|
||||
|
@ -12,18 +12,18 @@
|
|||
position: relative;
|
||||
margin: 0 16px 8px 0;
|
||||
padding: 0 10px 0 12px;
|
||||
background: #8451a1;
|
||||
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
background: #8451a1;
|
||||
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#body .tags a.tag-link:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
@ -33,9 +33,9 @@
|
|||
height: 0;
|
||||
border-color: transparent #8451a1 transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 1em 1em 1em 0;
|
||||
border-width: 1em 1em 1em 0;
|
||||
}
|
||||
|
||||
|
||||
#body .tags a.tag-link:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
@ -45,5 +45,5 @@
|
|||
height: 5px;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 100%;
|
||||
background: #fff;
|
||||
background: #fff;
|
||||
}
|
||||
|
|
2
static/js/clipboard.min.js
vendored
2
static/js/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -27,10 +27,10 @@ function initLunr() {
|
|||
this.field("content", {
|
||||
boost: 5
|
||||
});
|
||||
|
||||
|
||||
this.pipeline.remove(lunr.stemmer);
|
||||
this.searchPipeline.remove(lunr.stemmer);
|
||||
|
||||
|
||||
// Feed lunr with each file and let lunr actually index them
|
||||
pagesIndex.forEach(function(page) {
|
||||
this.add(page);
|
||||
|
|
Loading…
Reference in a new issue