Merge pull request #133 from zjedi/pr/css-refactor
CSS refactor, introduced variables for easier theming
This commit is contained in:
commit
1978e67256
17 changed files with 876 additions and 1121 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -10,7 +10,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -20,6 +20,7 @@ jobs:
|
|||
uses: peaceiris/actions-hugo@v2.6.0
|
||||
with:
|
||||
hugo-version: latest
|
||||
extended: true
|
||||
|
||||
- name: Build local ./exampleSite
|
||||
run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://zjedi.github.io/hugo-scroll/
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
public
|
||||
exampleSite/public
|
||||
exampleSite/resources
|
||||
node_modules
|
||||
*.lock
|
||||
*.lock
|
||||
40
README.md
40
README.md
|
|
@ -1,4 +1,4 @@
|
|||
<h1 align=center>Hugo Scroll <a href="https://zjedi.github.io/hugo-scroll/" rel="nofollow">Demo</a></h1>
|
||||
<h1 align=center>Hugo Scroll 📜 <a href="https://zjedi.github.io/hugo-scroll/" rel="nofollow">Demo</a></h1>
|
||||
|
||||
Clean, responsive, single-page [Hugo](https://gohugo.io/) website theme.
|
||||
|
||||
|
|
@ -9,7 +9,19 @@ Clean, responsive, single-page [Hugo](https://gohugo.io/) website theme.
|
|||
Promo image which may be a bit outdated:<br/>
|
||||

|
||||
|
||||
## Installation
|
||||
## ⭐ Feature highlights
|
||||
- Responseive to screen size/shape
|
||||
- SEO friendly
|
||||
- Customizable
|
||||
- [Fork Awesome Icons][fork-awesome-icons] out of the box
|
||||
- Header logo
|
||||
- Visual guards to guarantee readability
|
||||
- External links
|
||||
- JS/CSS Assets optimized (Minification, Fingerpriting, pipeline-processed
|
||||
into single file)
|
||||
- git info in footer (opt-in)
|
||||
|
||||
## 🔑 Installation
|
||||
If you already have a Hugo site on your machine, you can simply add this theme via
|
||||
```
|
||||
git submodule add https://github.com/zjedi/hugo-scroll.git themes/hugo-scroll
|
||||
|
|
@ -35,7 +47,20 @@ You can add **a new section to the homepage** by running `hugo new homepage/my-n
|
|||
|
||||
To create **a page separate from the homepage**, run `hugo new my-new-page.md`
|
||||
|
||||
## Features
|
||||
|
||||
## 🔧 Feature details 🔨
|
||||
|
||||
### Customizing CSS
|
||||
Add a [`custom_head.html`](https://github.com/zjedi/hugo-scroll/blob/master/exampleSite/layouts/partials/custom_head.html) file to your `layouts/partials` directory.
|
||||
- You can use `<style>` tag to embed the overrides (better performance-wise)
|
||||
- Alternatively you can `<link>` your own `custom.css`
|
||||
|
||||
`CSS` variables `var(--some-var-name)` from `assets\css\variables.scss` can be overridden by adding
|
||||
```scss
|
||||
:root {
|
||||
--some-var-name: blue!important;
|
||||
}
|
||||
```
|
||||
### Icons
|
||||
This theme includes the full set of [Fork Awesome 1.2.0 Icons][fork-awesome-icons]. Use the `{{<icon>}}`-[shortcode][hugo-shortcodes] with the respective "fa fa-ICONNAME"-`class` to use an icon directly in your `.markdown` files à la
|
||||
```markdown
|
||||
|
|
@ -59,10 +84,9 @@ Referencing and showing icons in front of the link text is possible with a new p
|
|||
Visit as at {{<extlink icon="fa fa-instagram" text="Instagram" href="https://www.instagram.com/yourInstagramName/">}}
|
||||
```
|
||||
|
||||
### Customizing CSS
|
||||
Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you may add a `<style>`-tag _or_ you may add a `<link>`-tag referencing your own `custom.css` (in case you prefer to have a separate `.css`-file). Checkout the [`custom_head.html`](https://github.com/zjedi/hugo-scroll/blob/master/exampleSite/layouts/partials/custom_head.html)-file from the `exampleSite`-directory to get started and to find more detailed instructions.
|
||||
|
||||
## Issues / Feedback / Contributing
|
||||
|
||||
## 🐛 Issues / 💡 Feedback / 👑 Contributing
|
||||
[Discussion](https://github.com/zjedi/hugo-scroll/discussions) for Q&A (when unsure),
|
||||
[Issues](https://github.com/zjedi/hugo-scroll/issues) for tracking,
|
||||
[Pull Requests](https://github.com/zjedi/hugo-scroll/pulls) for contributions.
|
||||
|
|
@ -70,10 +94,10 @@ Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you
|
|||
|
||||
See [contributing guideline](https://github.com/zjedi/hugo-scroll/blob/master/contributing.md) for more.
|
||||
|
||||
## Special Thanks 🎁
|
||||
## 👏 Special Thanks
|
||||
- [Jan Raasch](https://www.janraasch.com), original author of theme
|
||||
- [Yonatan Wolowelsky](https://github.com/grmmph), author of [GhostScroll](https://github.com/grmmph/GhostScroll) theme, which formed the basis of this [Hugo](https://gohugo.io/) theme.
|
||||
- [Pexels](https://www.pexels.com), for supplying those wonderful _free_ stock photos on the [exampleSite](https://github.com/zjedi/hugo-scroll/tree/master/exampleSite).
|
||||
- [Pexels](https://www.pexels.com), for supplying _free_ stock photos.
|
||||
|
||||
|
||||
[hugo-setup-guide]: https://gohugo.io/getting-started/installing
|
||||
|
|
|
|||
11
assets/css/_index.scss
Normal file
11
assets/css/_index.scss
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// CSS variables
|
||||
@import "./variables.scss";
|
||||
|
||||
// Theme layout and skelet styling
|
||||
@import "./theme.scss";
|
||||
|
||||
// Content-related styles
|
||||
@import "./content.scss";
|
||||
|
||||
// Media queries for responsiveness (optimizations for various screen sizes)
|
||||
@import "./responsiveness.scss"
|
||||
290
assets/css/content.scss
Normal file
290
assets/css/content.scss
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
html {
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
font-size: 62.5%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
font-family: "Roboto Slab", serif;
|
||||
font-size: 2rem;
|
||||
line-height: 1.6em;
|
||||
color: var(--section-light-text-color);
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
color: #222;
|
||||
background: #d6edff;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: #222;
|
||||
background: #d6edff;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/** =========== Headings =========== */
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
text-rendering: optimizeLegibility;
|
||||
line-height: 1;
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
h3,h4,h5,h6 {
|
||||
text-rendering: optimizeLegibility;
|
||||
line-height: 120%;
|
||||
margin-top: 0;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
margin-bottom: 0%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 5rem;
|
||||
line-height: 1.2em;
|
||||
letter-spacing: -2px;
|
||||
text-indent: -3px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 4rem;
|
||||
line-height: 1.2em;
|
||||
letter-spacing: -1px;
|
||||
text-indent: -2px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
p{
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
/** ======== Links ========= */
|
||||
a {
|
||||
color: inherit;
|
||||
transition: all ease 0.3s;
|
||||
-webkit-transition: all ease 0.3s;
|
||||
-moz-transition: all ease 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: var(--sticky-menu-text-color);
|
||||
}
|
||||
|
||||
// Fix font awesome icons
|
||||
&.fa {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
/** ======== Lists ====================== */
|
||||
dl {
|
||||
margin: 1.6em 0;
|
||||
|
||||
dt {
|
||||
float: left;
|
||||
width: 180px;
|
||||
overflow: hidden;
|
||||
clear: left;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-left: 200px;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin: 1em 0;
|
||||
|
||||
// Second level of lists
|
||||
ol, ul {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/** ======== Content semantics ============= */
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid var(--color-text);
|
||||
margin: 1.5em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/** Helper to be inserted by JS before quotations*/
|
||||
.quo {
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 1em 0 1em -2.2em;
|
||||
padding: 0 0 0 1em;
|
||||
color: var(--section-uni-quote);
|
||||
|
||||
p {
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
small {
|
||||
display: inline-block;
|
||||
margin: 0.8em 0 0.8em 1.5em;
|
||||
font-size: 0.9em;
|
||||
color: #ccc;
|
||||
|
||||
&:before {
|
||||
content: "\2014 \00A0";
|
||||
}
|
||||
}
|
||||
|
||||
cite {
|
||||
font-weight: bold;
|
||||
|
||||
a {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mark {
|
||||
background-color: var(--sticky-menu-text-color);
|
||||
filter: brightness(125%);
|
||||
}
|
||||
|
||||
code, tt {
|
||||
color: var(--section-light-text-color);
|
||||
background-color: var(--section-uni-code-bg-color);
|
||||
border-radius: 3px;
|
||||
font-family: Inconsolata, monospace, sans-serif;
|
||||
font-size: 0.75em;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
code {
|
||||
color: var(--section-light-text-color);
|
||||
background-color: var(--section-uni-code-bg-color);
|
||||
border-radius: 3px;
|
||||
font-family: Inconsolata, monospace, sans-serif;
|
||||
font-size: 0.75em;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: var(--section-light-text-color);
|
||||
color: #e2e2e2;
|
||||
border: 1px solid #343434;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
font-family: Inconsolata, monospace, sans-serif;
|
||||
font-size: 0.9em;
|
||||
margin: 1.6em 0;
|
||||
padding: 10px;
|
||||
white-space: pre;
|
||||
overflow-x: scroll;
|
||||
width: 100%;
|
||||
|
||||
code, tt {
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
font-size: inherit;
|
||||
white-space: -moz-pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
kbd {
|
||||
color: var(--section-light-text-color);
|
||||
background: var(--section-uni-code-bg-color);
|
||||
border: var(--section-light-text-color) 1px solid;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.4em;
|
||||
padding: 1px 8px;
|
||||
text-shadow: #fff 0 1px 0;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 0 #fff inset;
|
||||
}
|
||||
|
||||
/** ======== Tables ========= */
|
||||
table {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-spacing: 0;
|
||||
margin: 1.6em 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
background-color: transparent;
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 8px;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
thead {
|
||||
th,
|
||||
td {
|
||||
border-bottom: 1px solid var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
tbody>tr:nth-child(even) {
|
||||
background-color: #fff5;
|
||||
background-blend-mode: lighten;
|
||||
}
|
||||
|
||||
&.plain tbody>tr:nth-child(odd)>td,
|
||||
&.plain tbody>tr:nth-child(odd)>th {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/** ======== Github integration ========= */
|
||||
.gist {
|
||||
table {
|
||||
margin: 0;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.line-number {
|
||||
min-width: 25px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
43
assets/css/generic.css
Normal file
43
assets/css/generic.css
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/* Utilities - These things get used a lot */
|
||||
|
||||
/**
|
||||
Hides stuff
|
||||
*/
|
||||
.hidden {
|
||||
text-indent: -9999px;
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
Creates a responsive wrapper that makes our content scale nicely
|
||||
*/
|
||||
.inner {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/**
|
||||
Centres vertically yo. (IE8+)
|
||||
*/
|
||||
.vertical {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/**
|
||||
Floating tools
|
||||
*/
|
||||
.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
161
assets/css/responsiveness.scss
Normal file
161
assets/css/responsiveness.scss
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
|
||||
/* ==========================================================================
|
||||
8. Media Queries - Smaller than 1130px
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (max-width: 1130px) {
|
||||
.fixed-nav {
|
||||
opacity: 1;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 99999;
|
||||
background: var(--color-background);
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
a.fn-item {
|
||||
display: inline;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.post-holder {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#site-head {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
min-height: 240px;
|
||||
padding: 15% 0;
|
||||
height: 100%;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
|
||||
.blog-title {
|
||||
font-size: 4rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.blog-description {
|
||||
font-size: 2.2rem;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.post {
|
||||
font-size: 0.9em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.post-template .post {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.post-template .post-header {
|
||||
padding: 40px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 4.8rem;
|
||||
text-indent: -2px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 3.8rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 3.3rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
9. Media Queries - Smaller than 500px
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.fixed-nav {
|
||||
display: none;
|
||||
}
|
||||
.post-holder {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#blog-logo img{
|
||||
max-height: 80px;
|
||||
}
|
||||
|
||||
.inner,
|
||||
.pagination {
|
||||
width: auto;
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.post {
|
||||
width: auto;
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
font-size: 0.8em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
#site-head {
|
||||
padding: 10% 0;
|
||||
height: 65%;
|
||||
}
|
||||
|
||||
#header-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.btn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.blog-title {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.blog-description {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
font-size: 3rem;
|
||||
line-height: 1.1em;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 2.3rem;
|
||||
}
|
||||
|
||||
.post-template .post {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.post-template .post-header {
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.site-footer {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
246
assets/css/theme.scss
Normal file
246
assets/css/theme.scss
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
body {
|
||||
--color-text: var(--section-light-text-color);
|
||||
--color-background: var(--section-light-bg-color);
|
||||
}
|
||||
/* ===== Cover =======*/
|
||||
|
||||
#blog-logo {
|
||||
display: block;
|
||||
max-height: 100px;
|
||||
width: auto;
|
||||
margin: 0 auto;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
#site-head {
|
||||
position: relative;
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 0rem;
|
||||
text-align: center;
|
||||
color: var(--cover-text-color);
|
||||
background: var(--section-light-bg-color) no-repeat center center;
|
||||
background-size: cover;
|
||||
|
||||
.title-and-description-guard {
|
||||
margin: auto;
|
||||
padding: 0.6em;
|
||||
background-color: var(--cover-title-and-description-guard-bg-color);
|
||||
border-radius: 25px;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.blog-title {
|
||||
margin: 10px 0 10px 0;
|
||||
font-size: 5rem;
|
||||
letter-spacing: -1px;
|
||||
text-shadow: var(--cover-title-text-shadow);
|
||||
}
|
||||
|
||||
.blog-description {
|
||||
margin: 0;
|
||||
font-size: 2.5rem;
|
||||
line-height: 1.5em;
|
||||
font-weight: 400;
|
||||
font-family: "Roboto Slab", serif;
|
||||
letter-spacing: 0;
|
||||
text-shadow: var(--cover-title-text-shadow);
|
||||
}
|
||||
|
||||
// Landing screen menu
|
||||
a.btn {
|
||||
text-decoration: none;
|
||||
background-color: var(--highlight);
|
||||
color: var(--highlight-contrast);
|
||||
border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
padding: 10px 20px 10px 20px;
|
||||
position: relative;
|
||||
margin-top: 2rem;
|
||||
cursor: pointer;
|
||||
font-family: "Oswald", sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-weight: lighter;
|
||||
|
||||
&:hover {
|
||||
color: var(--highlight-inverse-contrast);
|
||||
background-color: var(--highlight-inverse);
|
||||
}
|
||||
}
|
||||
|
||||
/** The arrow button to scroll to content */
|
||||
#header-arrow {
|
||||
font-size: 140px;
|
||||
margin: -10px auto;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: -120px;
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
transition: all ease 0.3s;
|
||||
-webkit-transition: all ease 0.3s;
|
||||
-moz-transition: all ease 0.3s;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ========== Sticky menus ===========
|
||||
.fixed-nav {
|
||||
display: none;
|
||||
opacity: 1;
|
||||
position: fixed;
|
||||
top: 40px;
|
||||
left: 2%;
|
||||
z-index: 99999;
|
||||
font-family: "Open Sans Condensed", sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.5rem;
|
||||
line-height: 130%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.fn-item {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
color: var(--sticky-menu-text-color);
|
||||
}
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ========= Content ==========*/
|
||||
.post-title {
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.post-holder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-text);
|
||||
position: relative;
|
||||
|
||||
&.dark {
|
||||
// override variables for alternative style
|
||||
--color-text: var(--section-dark-text-color);
|
||||
--color-background: var(--section-dark-bg-color);
|
||||
|
||||
background-color: var(--section-dark-bg-color);
|
||||
color: var(--section-dark-text-color);
|
||||
|
||||
// Fix <hr> color
|
||||
hr {
|
||||
border-color: var(--section-dark-text-color);
|
||||
}
|
||||
|
||||
// On alt posts move the triangle to the right and match the background the color
|
||||
.post-after {
|
||||
left: unset;
|
||||
right: 6%;
|
||||
border-top-color: var(--section-dark-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* The triangular parts between posts */
|
||||
.post-after {
|
||||
position: absolute;
|
||||
bottom: -40px;
|
||||
z-index: 1;
|
||||
left: 6%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 60px solid transparent;
|
||||
border-right: 60px solid transparent;
|
||||
border-top: 50px solid var(--color-background);
|
||||
border-radius: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Every post, on every page, gets this style on its <article> tag
|
||||
Not inside the post holder as this also applies for single pages
|
||||
*/
|
||||
.post {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
max-width: 700px;
|
||||
margin: 0rem auto;
|
||||
padding-bottom: 4rem;
|
||||
padding-top: 4rem;
|
||||
height: 70%;
|
||||
word-break: break-word;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
/* ======= Single pages =========== */
|
||||
.post-template {
|
||||
|
||||
// Tweak the .post wrapper style
|
||||
.post {
|
||||
margin-top: 0;
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
// Kill that stylish little circle that was on the border
|
||||
.post:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Insert some mad padding up in the header for better spacing
|
||||
.post-header {
|
||||
padding: 60px 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep large images within the bounds of the post-width
|
||||
.post-content img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
||||
/** ========== Site footer ============ */
|
||||
.site-footer {
|
||||
background: var(--footer-color-background);
|
||||
color: var(--footer-color);
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 1.3rem;
|
||||
position: relative;
|
||||
margin: 0rem 0 0 0;
|
||||
padding: 1rem 0;
|
||||
|
||||
line-height: 1.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-footer a {
|
||||
color: var(--footer-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.site-footer a:hover {
|
||||
color: var(--sticky-menu-text-color);
|
||||
}
|
||||
41
assets/css/variables.scss
Normal file
41
assets/css/variables.scss
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
:root {
|
||||
|
||||
/* === Cover / Landing area === */
|
||||
--cover-text-color: #37501a;
|
||||
/* Used for Landing screen menu buttons, but potentially usable for highlighting other things */
|
||||
--highlight: #86c440;
|
||||
--highlight-contrast: var(--cover-text-color);
|
||||
/*iverse colors used for :hover */
|
||||
--highlight-inverse: var(--cover-text-color);
|
||||
--highlight-inverse-contrast: white;
|
||||
|
||||
/* visual guard around title and description, when the feature is enabled */
|
||||
--cover-title-and-description-guard-bg-color: rgba(255, 255, 255, 0.6);
|
||||
--cover-title-text-shadow: white 0px 0px 7px;
|
||||
|
||||
|
||||
/* === sticky top/left navigation menus === */
|
||||
--sticky-menu-text-color: #9fd067;
|
||||
|
||||
|
||||
/* === Alternating content (post) sections === */
|
||||
/* Light section - text color */
|
||||
--section-light-text-color: #3a4145;
|
||||
/* Light section - background color */
|
||||
--section-light-bg-color: #f2efe8;
|
||||
|
||||
/* Dark section - text color */
|
||||
--section-dark-text-color: var(--section-light-bg-color);
|
||||
/* Dark section - background color */
|
||||
--section-dark-bg-color: #b80135;
|
||||
|
||||
/* Light&Dark section >quote. Supressive color, compared to 'Light section - text color'*/
|
||||
--section-uni-quote: grey;
|
||||
/* Light&Dark section `code` a bit darker than 'Light section - background color' */
|
||||
--section-uni-code-bg-color: #e0ded7;
|
||||
|
||||
|
||||
/* === Footer === */
|
||||
--footer-color-background: #22343a;
|
||||
--footer-color: #bbc7cc;
|
||||
}
|
||||
9
assets/js/css-vars-ponyfill.min.js
vendored
Normal file
9
assets/js/css-vars-ponyfill.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -6,8 +6,10 @@ header_menu: true
|
|||
|
||||

|
||||
|
||||
##### Professionel Experience
|
||||
##### Professional Experience
|
||||
|
||||
A lot, but let us get into the details with some lorem ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent feugiat lectus et magna placerat tincidunt. Nullam sit amet lectus vitae elit mollis rhoncus non eget lorem. Ut tempor sed dui quis volutpat.
|
||||
|
||||
----
|
||||
|
||||
In ultrices, est at lobortis pretium, magna quam mollis neque, id viverra odio est sit amet lorem. Mauris efficitur nunc vel lectus porttitor, sit amet sodales quam eleifend. Duis et felis ut mauris dignissim efficitur. Aliquam non sem eros. Integer elit ante, bibendum id hendrerit vitae, vestibulum eget risus. Nunc efficitur nisl in iaculis vestibulum.
|
||||
|
|
|
|||
|
|
@ -3,4 +3,12 @@ title: "Welcome"
|
|||
weight: 1
|
||||
---
|
||||
|
||||
Hi there. This section will not show up in the header menu above. Other than that, there's really not much to see here. I did however append some generated »Lorem ipsum«-paragraphs for you. Enjoy!
|
||||
`Hugo-Scroll` theme alternates colors of sections that are placed on single page.
|
||||
The landing screen is meant to be visually striking.
|
||||
|
||||
Single-page approach is oriented towards small to medium content length, that won't overwhelm the user.
|
||||
You can also delegate lengthier, less important or more sizeable content to [dedicated pages](services).
|
||||
|
||||
> The belly rules the mind. --- spanish proverb
|
||||
|
||||
By the way this welcome section won't show in the cover menu.
|
||||
|
|
@ -17,11 +17,8 @@ That is the important part, right? You want to know what I can do for you. This
|
|||
|
||||
### Nutrition Coaching
|
||||
|
||||
This is not an easy task. You will likely have to pay money for this. You know what - let us look at a nice picture first.
|
||||
|
||||

|
||||
|
||||
Wow. That was nice, right? Well, call me and let us talk.
|
||||
This is not an easy task.
|
||||
You will likely have to pay money for this.
|
||||
|
||||
### Chef Consulting
|
||||
|
||||
|
|
@ -29,6 +26,4 @@ I can raise your table culture!
|
|||
|
||||

|
||||
|
||||
Want to learn more about my services?
|
||||
|
||||
Check out [dedicated page](services) with more details.
|
||||
Want to learn more about my services? See [dedicated page](services) with more details.
|
||||
|
|
@ -1,50 +1,23 @@
|
|||
<!-- A partial to be overwritten by the user.
|
||||
Its content will appear before the closing </head>-tag -->
|
||||
|
||||
|
||||
<!-- Custom CSS via inline styles
|
||||
You may use this template to add custom CSS to your site like so: -->
|
||||
<!--
|
||||
<style>
|
||||
:root {
|
||||
/* see variables.scss for more variables*/
|
||||
|
||||
<!-- <style>
|
||||
/* Links */
|
||||
a:hover {
|
||||
color: #b6b84c;
|
||||
}
|
||||
/*
|
||||
--section-light-text-color: #3a4145!important;
|
||||
--section-light-bg-color: #ffdb8c!important;
|
||||
--section-dark-bg-color: #035e00!important;
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
-->
|
||||
|
||||
/* Header Buttons on Startpage */
|
||||
a.btn {
|
||||
color: white;
|
||||
background-color: #ced067;
|
||||
}
|
||||
a.btn:hover {
|
||||
background-color: #b6b84c;
|
||||
}
|
||||
|
||||
/* Scroll Menu on Startpage */
|
||||
a.fn-item.active {
|
||||
color: #b6b84c;
|
||||
}
|
||||
a.fn-item:hover {
|
||||
color: #ced067;
|
||||
}
|
||||
|
||||
/* Content / Sections */
|
||||
.post-holder.odd {
|
||||
background: #B80135;
|
||||
color: white;
|
||||
}
|
||||
.post-holder {
|
||||
background: #f2efe8;
|
||||
}
|
||||
body {
|
||||
color: #3A4145;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.site-footer {
|
||||
color: #BBC7CC;
|
||||
background-color: #22343A;
|
||||
}
|
||||
</style> -->
|
||||
|
||||
<!-- Custom CSS via "custom.css"-file
|
||||
If you would rather place your custom CSS into
|
||||
|
|
@ -61,6 +34,7 @@
|
|||
<!-- Custom link-tags for different icons
|
||||
Generated via https://favicon.io/favicon-generator/ -->
|
||||
|
||||
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
|
|
|
|||
|
|
@ -13,10 +13,14 @@
|
|||
<!-- The main JavaScript files for HugoScroll -->
|
||||
{{ $scriptIcons := resources.Get "js/icons.js" }}
|
||||
{{ $scriptIndex := resources.Get "js/index.js" }}
|
||||
{{ $js := slice $scriptJquery $scriptIcons $scriptIndex | resources.Concat "js/script.js" | resources.Minify | resources.Fingerprint }}
|
||||
{{ $scriptPolyfill := resources.Get "js/css-vars-ponyfill.min.js" }}
|
||||
{{ $js := slice $scriptJquery $scriptIcons $scriptIndex $scriptPolyfill | resources.Concat "js/script.js" | resources.Minify | resources.Fingerprint }}
|
||||
|
||||
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" ></script>
|
||||
|
||||
<!-- activate css-vars-ponyfill.min.js -->
|
||||
<script>cssVars();</script>
|
||||
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_body.html into
|
||||
your local /layouts/partials-directory -->
|
||||
|
|
|
|||
|
|
@ -19,12 +19,14 @@
|
|||
<meta name="MobileOptimized" content="320" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
{{ $stylesheetFA := resources.Get "css/fork-awesome.css" }}
|
||||
{{ $stylesheetNormalize := resources.Get "css/normalize.css" }}
|
||||
{{ $stylesheetFA := resources.Get "css/fork-awesome.css" }}
|
||||
{{ $stylesheetFonts := resources.Get "css/fonts.css" }}
|
||||
{{ $stylesheetScreen := resources.Get "css/screen.css" }}
|
||||
{{ $stylesheet := slice $stylesheetNormalize $stylesheetFA $stylesheetFonts $stylesheetScreen | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}
|
||||
{{ $stylesheetGeneric := resources.Get "css/generic.css" }}
|
||||
|
||||
{{ $stylesheetScreen := ( resources.Get "css/_index.scss" | resources.ToCSS ) }}
|
||||
|
||||
{{ $stylesheet := slice $stylesheetNormalize $stylesheetFA $stylesheetFonts $stylesheetGeneric $stylesheetScreen | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $stylesheet.Permalink }}" type="text/css" integrity="{{ $stylesheet.Data.Integrity }}" />
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue