feat: theme and resources
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8);text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}pre{font-size:1rem;line-height:1.2em;margin:0;overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{width:15rem;height:15rem;border-radius:100%;border:.5rem solid #57cc8a}.app-container{padding:2.5rem}.app-header-social{display:flex;align-items:center;justify-content:center;font-size:2em;color:#fff}.app-header-social a:not(:last-child){margin-right:.4em}.app-header-title{color:#fff;display:block;font-size:2em;margin:.67em 0;font-weight:700}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;margin-top:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-meta>div{display:flex;align-items:center;flex-wrap:wrap;gap:.2em;font-size:.8em}.post-meta>div>.icon{margin-right:.4em}.post-content>pre,.post-content .highlight{margin:1em 0}.post-content>pre,.post-content .highlight>pre,.post-content .highlight>div{border-left:.4em solid rgba(87,204,138,.8);padding:1em}.post-content blockquote{border-left:.4em solid rgba(87,204,138,.8);margin:1em 0;padding:.5em 1em;background:#242930}.post-content blockquote p{margin:.5em 0}.post-content img{max-width:100%}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:flex;align-items:center;font-size:.8em}.posts-list-item-description>.icon{margin-right:.4em}.posts-list-item-separator{margin:0 .4em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{display:flex;align-items:center;list-style:none;padding:.4em 0}.tags-list-item>.icon{margin-right:.4em}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Target":"css/main.min.5b1fcc8902588589c4767187402a3c29f8b8d7a6fdef6d9f8f77045bb0d14fee.css","MediaType":"text/css","Data":{"Integrity":"sha256-Wx/MiQJYhYnEdnGHQCo8Kfi416b9722fj3cEW7DRT+4="}}
|
||||||
12
themes/hugo-theme-m10c/.editorconfig
Normal file
12
themes/hugo-theme-m10c/.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
4
themes/hugo-theme-m10c/.gitignore
vendored
Normal file
4
themes/hugo-theme-m10c/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
public/
|
||||||
|
exampleSite/resources/
|
||||||
|
.hugo_build.lock
|
||||||
|
node_modules/
|
||||||
21
themes/hugo-theme-m10c/LICENSE.md
Normal file
21
themes/hugo-theme-m10c/LICENSE.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019 Fabien Casters
|
||||||
|
|
||||||
|
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.
|
||||||
104
themes/hugo-theme-m10c/README.md
Normal file
104
themes/hugo-theme-m10c/README.md
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# m10c theme
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A Hugo minimalistic theme for bloggers
|
||||||
|
|
||||||
|
Main features:
|
||||||
|
|
||||||
|
- Fully responsive
|
||||||
|
- Twitter Cards, Open Graph, Disqus and Google Analytics supported (see Hugo docs)
|
||||||
|
- Customizable colors
|
||||||
|
- Customizable picture and description
|
||||||
|
- Customizable menu on sidebar
|
||||||
|
- Customizable social media links on sidebar
|
||||||
|
- Optimized for performance 100/100 on Lighthouse
|
||||||
|
- All Feather and Simple Icons icons included
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
Create a new Hugo site:
|
||||||
|
```bash
|
||||||
|
$ hugo new site [path]
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone this repository into `themes/` directory:
|
||||||
|
```bash
|
||||||
|
$ cd [path]
|
||||||
|
$ git clone https://github.com/vaga/hugo-theme-m10c.git themes/hugo-theme-m10c
|
||||||
|
```
|
||||||
|
|
||||||
|
Add this line in the `config.toml` file:
|
||||||
|
```toml
|
||||||
|
theme = "hugo-theme-m10c"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
In your `config.toml` file, define the following variables in `params`:
|
||||||
|
|
||||||
|
- `author`: Name of the author
|
||||||
|
- `description`: Short description of the author
|
||||||
|
- `avatar`: Path of file containing the author avatar image
|
||||||
|
- `menu_item_separator`: Separator between each menu item. HTML allowed (default: " - ")
|
||||||
|
- `favicon`: Absolute path of your favicon.ico file (default: "/favicon.ico")
|
||||||
|
|
||||||
|
To add a menu item, add the following lines in `menu`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "tags"
|
||||||
|
name = "Tags"
|
||||||
|
url = "/tags/"
|
||||||
|
```
|
||||||
|
|
||||||
|
[Read Hugo documentations](https://gohugo.io/content-management/menus/#readout) for more informations about menu
|
||||||
|
|
||||||
|
To add a social link, add the following lines in `params`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[[params.social]]
|
||||||
|
icon = "brand-github"
|
||||||
|
name = "My Github"
|
||||||
|
url = "https://github.com/vaga"
|
||||||
|
```
|
||||||
|
|
||||||
|
To change theme colors, add the following lines in `params`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[params.style]
|
||||||
|
darkestColor = "#d35050"
|
||||||
|
darkColor = "#212121"
|
||||||
|
lightColor = "#f5e3e0"
|
||||||
|
lightestColor = "#f5f5f5"
|
||||||
|
primaryColor = "#ffffff"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want the above theme colors, you can see the [exampleSite/config.toml](/exampleSite/config.toml) file.
|
||||||
|
|
||||||
|
### Icons
|
||||||
|
|
||||||
|
This theme uses two libraries for icons:
|
||||||
|
|
||||||
|
- [Feather](https://feathericons.com/) is used for application-related icons.
|
||||||
|
- [Simple Icons](https://simpleicons.org) is used for brand icons.
|
||||||
|
|
||||||
|
To differentiate brand icons from regular ones, the prefix `brand-` is added
|
||||||
|
to all icons from the Simple Icons library. (e.g., brand-github, brand-x, brand-mastodon...)
|
||||||
|
|
||||||
|
### Styling
|
||||||
|
|
||||||
|
To override styles using scss, add a file called `_extra.scss` to `[path]/assets/css/`
|
||||||
|
|
||||||
|
**Note:** Hugo releases come in two versions, `hugo` and `hugo_extended`. You need `hugo_extended` to automatically compile your scss.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This theme is released under the [**MIT**](/LICENSE.md) License.
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
|
||||||
|
- [Feather](https://feathericons.com/) - [MIT](https://github.com/feathericons/feather/blob/master/LICENSE)
|
||||||
|
- [Simple Icons](https://simpleicons.org) - [CC0 1.0](https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md)
|
||||||
65
themes/hugo-theme-m10c/assets/css/_base.scss
Normal file
65
themes/hugo-theme-m10c/assets/css/_base.scss
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: sans-serif;
|
||||||
|
background: $dark-color;
|
||||||
|
color: $light-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: $lightest-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $primary-color;
|
||||||
|
transition: color 0.35s;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $lightest-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Browsers seem to use a smaller default font-size with monospaced code
|
||||||
|
// blocks (like 80% of the size of normal text) and that looks pretty bad with
|
||||||
|
// small inline code-blocks in the middle of normal text (mainly because of
|
||||||
|
// the very noticeable difference in x-height). This CSS corrects that problem.
|
||||||
|
code {
|
||||||
|
font-family: monospace,monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
color: rgba($light-color, .8);
|
||||||
|
|
||||||
|
// Fixes iOS font sizing anomaly
|
||||||
|
text-size-adjust: 100%;
|
||||||
|
-ms-text-size-adjust: 100%;
|
||||||
|
-moz-text-size-adjust: 100%;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.2em;
|
||||||
|
margin: 0;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
// A larger monospaced block of text (that isn't mixed with normal text)
|
||||||
|
// generally looks heavier than normal text with the same font size. For this
|
||||||
|
// reason using a smaller monospaced font size makes sense in this situation.
|
||||||
|
code {
|
||||||
|
font-size: .8em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: rgba($light-color, .25);
|
||||||
|
}
|
||||||
|
::-moz-selection {
|
||||||
|
background: rgba($light-color, .25);
|
||||||
|
}
|
||||||
2
themes/hugo-theme-m10c/assets/css/_extra.scss
Normal file
2
themes/hugo-theme-m10c/assets/css/_extra.scss
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// Do not add any CSS to this file in the theme sources.
|
||||||
|
// This file can be overridden to add project-specific CSS.
|
||||||
51
themes/hugo-theme-m10c/assets/css/components/_app.scss
Normal file
51
themes/hugo-theme-m10c/assets/css/components/_app.scss
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
.app-header {
|
||||||
|
padding: 2.5em;
|
||||||
|
background: $darkest-color;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-header-avatar {
|
||||||
|
width: 15rem;
|
||||||
|
height: 15rem;
|
||||||
|
border-radius: 100%;
|
||||||
|
border: 0.5rem solid $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
padding: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-header-social {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 2em;
|
||||||
|
color: $lightest-color;
|
||||||
|
|
||||||
|
a:not(:last-child) {
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-header-title {
|
||||||
|
color: $lightest-color;
|
||||||
|
display: block;
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 940px) {
|
||||||
|
.app-header {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 20rem;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
max-width: 65rem;
|
||||||
|
margin-left: 20rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.error-404 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-404-title {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
6
themes/hugo-theme-m10c/assets/css/components/_icon.scss
Normal file
6
themes/hugo-theme-m10c/assets/css/components/_icon.scss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
margin-top: -0.125em;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
.pagination {
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 0.8em;
|
||||||
|
text-align: center;
|
||||||
|
margin: 3em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-item {
|
||||||
|
display: inline-block;
|
||||||
|
.page-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content:center;
|
||||||
|
width: 1.8rem;
|
||||||
|
height: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
.page-link {
|
||||||
|
color: $lightest-color;
|
||||||
|
border-radius: 2em;
|
||||||
|
background: $primary-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
44
themes/hugo-theme-m10c/assets/css/components/_post.scss
Normal file
44
themes/hugo-theme-m10c/assets/css/components/_post.scss
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
.post-title {
|
||||||
|
color: $lightest-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-meta > div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.2em;
|
||||||
|
font-size: 0.8em;
|
||||||
|
|
||||||
|
> .icon {
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-content {
|
||||||
|
& > pre,
|
||||||
|
.highlight {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > pre,
|
||||||
|
.highlight > pre,
|
||||||
|
.highlight > div {
|
||||||
|
border-left: 0.4em solid rgba($primary-color, .8);
|
||||||
|
padding: 1em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left: 0.4em solid rgba($primary-color, .8);
|
||||||
|
margin: 1em 0em;
|
||||||
|
padding: .5em 1em;
|
||||||
|
background: $darkest-color;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: .5em 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
.posts-list {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-list-item {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0.4em 0;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-list-item-description {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 0.8em;
|
||||||
|
|
||||||
|
> .icon {
|
||||||
|
margin-right: 0.4em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-list-item-separator {
|
||||||
|
margin: 0 0.4em;
|
||||||
|
}
|
||||||
15
themes/hugo-theme-m10c/assets/css/components/_tag.scss
Normal file
15
themes/hugo-theme-m10c/assets/css/components/_tag.scss
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.tag {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0.2em;
|
||||||
|
padding: 0 0.6em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
border-radius: 0.2em;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
transition: color 0.35s, background 0.35s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transition: color 0.25s, background 0.05s;
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
34
themes/hugo-theme-m10c/assets/css/components/_tags_list.scss
Normal file
34
themes/hugo-theme-m10c/assets/css/components/_tags_list.scss
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
.tags-list {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags-list-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0.4em 0;
|
||||||
|
|
||||||
|
> .icon {
|
||||||
|
margin-right: .4em;
|
||||||
|
}
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 450px) {
|
||||||
|
.tags-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags-list-item {
|
||||||
|
width: calc(50% - 1em);
|
||||||
|
&:nth-child(even) {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
&:nth-last-child(2) {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
themes/hugo-theme-m10c/assets/css/main.scss
Normal file
20
themes/hugo-theme-m10c/assets/css/main.scss
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
$darkest-color: {{ .Site.Params.style.darkestColor | default "#242930" }};
|
||||||
|
$dark-color: {{ .Site.Params.style.darkColor | default "#353b43" }};
|
||||||
|
$light-color: {{ .Site.Params.style.lightColor | default "#afbac4" }};
|
||||||
|
$lightest-color: {{ .Site.Params.style.lightestColor | default "#ffffff" }};
|
||||||
|
$primary-color: {{ .Site.Params.style.primaryColor | default "#57cc8a" }};
|
||||||
|
|
||||||
|
@import 'base';
|
||||||
|
|
||||||
|
@import 'components/app';
|
||||||
|
@import 'components/error_404';
|
||||||
|
@import 'components/icon';
|
||||||
|
@import 'components/pagination';
|
||||||
|
@import 'components/post';
|
||||||
|
@import 'components/posts_list';
|
||||||
|
@import 'components/tag';
|
||||||
|
@import 'components/tags_list';
|
||||||
|
|
||||||
|
// The last 'extra' import can optionally be overridden on a per project
|
||||||
|
// basis by creating a <HUGO_PROJECT>/assets/css/_extra.scss file.
|
||||||
|
@import 'extra';
|
||||||
4
themes/hugo-theme-m10c/config.toml
Normal file
4
themes/hugo-theme-m10c/config.toml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
extended = true
|
||||||
|
min = "0.128.0"
|
||||||
3505
themes/hugo-theme-m10c/data/m10c/icons.json
Normal file
3505
themes/hugo-theme-m10c/data/m10c/icons.json
Normal file
File diff suppressed because one or more lines are too long
BIN
themes/hugo-theme-m10c/images/cover.png
Normal file
BIN
themes/hugo-theme-m10c/images/cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
BIN
themes/hugo-theme-m10c/images/screenshot.png
Normal file
BIN
themes/hugo-theme-m10c/images/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
themes/hugo-theme-m10c/images/tn.png
Normal file
BIN
themes/hugo-theme-m10c/images/tn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 157 KiB |
7
themes/hugo-theme-m10c/layouts/404.html
Normal file
7
themes/hugo-theme-m10c/layouts/404.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<div class="error-404">
|
||||||
|
<h1 class="error-404-title">O{{ partial "icon.html" (dict "ctx" $ "name" "frown") }}ps... </h1>
|
||||||
|
<p>The link you followed may be broken, or the page may have been removed.</p>
|
||||||
|
<a href="{{ "/" | relURL }}">Go home {{ partial "icon.html" (dict "ctx" $ "name" "arrow-right") }}</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
53
themes/hugo-theme-m10c/layouts/_default/baseof.html
Normal file
53
themes/hugo-theme-m10c/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||||
|
<head>
|
||||||
|
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} // {{ .Site.Title }}{{ end }}</title>
|
||||||
|
<link rel="shortcut icon" href="{{ .Site.Params.favicon | default "/favicon.ico" }}" />
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
{{ hugo.Generator }}
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="author" content="{{ .Site.Params.author | default "John Doe" }}" />
|
||||||
|
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
|
||||||
|
{{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | css.Sass | resources.Minify | resources.Fingerprint -}}
|
||||||
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||||
|
{{ with .OutputFormats.Get "rss" -}}
|
||||||
|
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ template "_internal/google_analytics.html" . }}
|
||||||
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
|
{{ template "_internal/opengraph.html" . }}
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="app-header">
|
||||||
|
<a href="{{ "" | relURL }}"><img class="app-header-avatar" src="{{ .Site.Params.avatar | default "avatar.jpg" | relURL }}" alt="{{ .Site.Params.author | default "John Doe" }}" /></a>
|
||||||
|
<span class="app-header-title">{{ .Site.Title }}</span>
|
||||||
|
{{- with .Site.Menus.main }}
|
||||||
|
<nav class="app-header-menu">
|
||||||
|
{{- range $key, $item := . }}
|
||||||
|
{{- if ne $key 0 }}
|
||||||
|
{{ $.Site.Params.menu_item_separator | default " - " | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
|
<a class="app-header-menu-item" href="{{ $item.URL }}">{{ $item.Name }}</a>
|
||||||
|
{{- end }}
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
||||||
|
<p>{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}</p>
|
||||||
|
{{- with .Site.Params.social }}
|
||||||
|
<div class="app-header-social">
|
||||||
|
{{ range . }}
|
||||||
|
<a href="{{ .url }}" target="_blank" rel="noreferrer noopener me">
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" .icon "title" .name) }}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</header>
|
||||||
|
<main class="app-container">
|
||||||
|
{{ block "main" . }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
21
themes/hugo-theme-m10c/layouts/_default/list.html
Normal file
21
themes/hugo-theme-m10c/layouts/_default/list.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article>
|
||||||
|
{{ with .Title -}}<h1>{{- . -}}</h1>{{- end }}
|
||||||
|
{{ with .Content -}}<div class="post-content">{{- . -}}</div>{{- end }}
|
||||||
|
<ul class="posts-list">
|
||||||
|
{{ range where .Paginator.Pages "Type" "!=" "page" }}
|
||||||
|
<li class="posts-list-item">
|
||||||
|
<a class="posts-list-item-title" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
<span class="posts-list-item-description">
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
|
||||||
|
{{ .PublishDate.Format "Jan 2, 2006" }}
|
||||||
|
<span class="posts-list-item-separator">-</span>
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||||
|
{{ .ReadingTime }} min read
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ partial "pagination.html" $ }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
35
themes/hugo-theme-m10c/layouts/_default/single.html
Normal file
35
themes/hugo-theme-m10c/layouts/_default/single.html
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article class="post">
|
||||||
|
<header class="post-header">
|
||||||
|
<h1 class ="post-title">{{ .Title }}</h1>
|
||||||
|
{{- if ne .Type "page" }}
|
||||||
|
<div class="post-meta">
|
||||||
|
<div>
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
|
||||||
|
{{ .PublishDate.Format "Jan 2, 2006" }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||||
|
{{ .ReadingTime }} min read
|
||||||
|
</div>
|
||||||
|
{{- with .Params.tags }}
|
||||||
|
<div>
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
|
||||||
|
{{- range . -}}
|
||||||
|
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
|
||||||
|
<a class="tag" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</header>
|
||||||
|
<div class="post-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
<div class="post-footer">
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
16
themes/hugo-theme-m10c/layouts/_default/terms.html
Normal file
16
themes/hugo-theme-m10c/layouts/_default/terms.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
<ul class="tags-list">
|
||||||
|
{{ range .Data.Terms.ByCount }}
|
||||||
|
<li class="tags-list-item">
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
|
||||||
|
<a class="tags-list-item-title" href="{{ .Page.RelPermalink }}">
|
||||||
|
({{ .Count }})
|
||||||
|
{{ .Page.Title }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
8
themes/hugo-theme-m10c/layouts/partials/icon.html
Normal file
8
themes/hugo-theme-m10c/layouts/partials/icon.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{{- if isset .ctx.Site.Data.m10c.icons .name -}}
|
||||||
|
{{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }}
|
||||||
|
{{- else -}}
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-link">
|
||||||
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
||||||
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||||
|
</svg>
|
||||||
|
{{- end -}}
|
||||||
27
themes/hugo-theme-m10c/layouts/partials/pagination.html
Normal file
27
themes/hugo-theme-m10c/layouts/partials/pagination.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{{ with $.Paginator }}
|
||||||
|
{{ if gt .TotalPages 1 }}
|
||||||
|
<ul class="pagination">
|
||||||
|
{{ with .Prev }}
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ .URL }}">
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "arrow-left") }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Pagers }}
|
||||||
|
<li class="page-item{{ if eq .PageNumber $.Paginator.PageNumber }} active{{ end }}">
|
||||||
|
<a class="page-link" href="{{ .URL }}">
|
||||||
|
{{ .PageNumber }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Next }}
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ .URL }}">
|
||||||
|
{{ partial "icon.html" (dict "ctx" $ "name" "arrow-right") }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8)}pre{font-size:1rem;line-height:1.2em;margin:0;overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{width:15rem;height:15rem;border-radius:100%;border:.5rem solid #57cc8a}.app-container{padding:2.5rem}.app-header-social{font-size:2em;color:#fff}.app-header-social a{margin:0 .1em}.app-header-title{color:#fff;display:block;font-size:2em;margin:.67em 0;font-weight:700}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;vertical-align:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:block;padding:.285em .8em}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-content>pre,.post-content .highlight{margin:1em 0}.post-content>pre,.post-content .highlight>pre,.post-content .highlight>div{border-left:.4em solid rgba(87,204,138,.8);padding:1em}.post-content blockquote{border-left:.4em solid rgba(87,204,138,.8);margin:1em 0;padding:.5em 1em;background:#242930}.post-content blockquote p{margin:.5em 0}.post-content img{max-width:100%}.post-meta{font-size:.8em}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:block;font-size:.8em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{list-style:none;padding:.4em 0}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Target":"css/main.min.0fb49e70a30412f97ddfc418e18fefef1d9fcdebe45f634dbbba768b00fe1eec.css","MediaType":"text/css","Data":{"Integrity":"sha256-D7SecKMEEvl938QY4Y/v7x2fzevkX2NNu7p2iwD+Huw="}}
|
||||||
10
themes/hugo-theme-m10c/scripts/icons/package.json
Normal file
10
themes/hugo-theme-m10c/scripts/icons/package.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "node update_icons.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"feather-icons": "^4.29.2",
|
||||||
|
"simple-icons": "^13.14.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
themes/hugo-theme-m10c/scripts/icons/update_icons.js
Normal file
23
themes/hugo-theme-m10c/scripts/icons/update_icons.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import fs from 'fs'
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
|
import * as simpleIcons from 'simple-icons'
|
||||||
|
import { icons as featherIcons } from 'feather-icons'
|
||||||
|
|
||||||
|
const icons = {};
|
||||||
|
|
||||||
|
for (const key in featherIcons) {
|
||||||
|
const icon = featherIcons[key]
|
||||||
|
icons[icon.name] = `<svg class="icon icon-${icon.name}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>${icon.name}</title>${icon.contents}</svg>`
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const key in simpleIcons) {
|
||||||
|
const icon = simpleIcons[key]
|
||||||
|
icons['brand-' + icon.slug] = `<svg class="icon icon-brand-${icon.slug}" viewBox="0 0 24 24" fill="currentColor"><title>${icon.title}</title><path d="${icon.path}"/></svg>`
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(import.meta.dirname, '../../data/m10c/icons.json'),
|
||||||
|
JSON.stringify(icons, null, 2),
|
||||||
|
'utf8',
|
||||||
|
)
|
||||||
26
themes/hugo-theme-m10c/scripts/icons/yarn.lock
Normal file
26
themes/hugo-theme-m10c/scripts/icons/yarn.lock
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
classnames@^2.2.5:
|
||||||
|
version "2.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
|
||||||
|
integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==
|
||||||
|
|
||||||
|
core-js@^3.1.3:
|
||||||
|
version "3.38.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.38.1.tgz#aa375b79a286a670388a1a363363d53677c0383e"
|
||||||
|
integrity sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==
|
||||||
|
|
||||||
|
feather-icons@^4.29.2:
|
||||||
|
version "4.29.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/feather-icons/-/feather-icons-4.29.2.tgz#b03a47588a1c400f215e884504db1c18860d89f8"
|
||||||
|
integrity sha512-0TaCFTnBTVCz6U+baY2UJNKne5ifGh7sMG4ZC2LoBWCZdIyPa+y6UiR4lEYGws1JOFWdee8KAsAIvu0VcXqiqA==
|
||||||
|
dependencies:
|
||||||
|
classnames "^2.2.5"
|
||||||
|
core-js "^3.1.3"
|
||||||
|
|
||||||
|
simple-icons@^13.14.0:
|
||||||
|
version "13.14.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/simple-icons/-/simple-icons-13.14.0.tgz#5b6d9eaf739b4a55d3ece0548247b5ba69621d65"
|
||||||
|
integrity sha512-eUl/xnY9/BN/UPthZYi5tPQtHFxbqxO0lS/nMaG2QJAXRzXqLWnQHoJZdrV4+TZ2tb7JO3qqFCkg8UVVgTuKOQ==
|
||||||
8
themes/hugo-theme-m10c/scripts/update_icons.sh
Executable file
8
themes/hugo-theme-m10c/scripts/update_icons.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
pushd `dirname "$0"`/icons
|
||||||
|
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
popd
|
||||||
BIN
themes/hugo-theme-m10c/static/avatar.jpg
Normal file
BIN
themes/hugo-theme-m10c/static/avatar.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
15
themes/hugo-theme-m10c/theme.toml
Normal file
15
themes/hugo-theme-m10c/theme.toml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name = "m10c"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://github.com/vaga/hugo-theme-m10c/blob/master/LICENSE.md"
|
||||||
|
description = "A minimalistic (m10c) theme for bloggers"
|
||||||
|
homepage = "https://github.com/vaga/hugo-theme-m10c"
|
||||||
|
tags = ["blog", "minimalistic", "minimal", "responsive", "dark"]
|
||||||
|
features = [
|
||||||
|
"minimalistic blog",
|
||||||
|
"social icons",
|
||||||
|
"editable colors"
|
||||||
|
]
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "vaga"
|
||||||
|
homepage = "https://vaga.io"
|
||||||
Reference in New Issue
Block a user