Fix theme being somehow in the wrong folder.
This commit is contained in:
12
src/themes/m10c/.editorconfig
Normal file
12
src/themes/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
|
||||
2
src/themes/m10c/.gitignore
vendored
Normal file
2
src/themes/m10c/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
public/
|
||||
exampleSite/resources/
|
||||
21
src/themes/m10c/LICENSE.md
Normal file
21
src/themes/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.
|
||||
93
src/themes/m10c/README.md
Normal file
93
src/themes/m10c/README.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# 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 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/m10c
|
||||
```
|
||||
|
||||
Add this line in the `config.toml` file:
|
||||
```toml
|
||||
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 = "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.
|
||||
|
||||
### 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)
|
||||
59
src/themes/m10c/assets/css/_base.scss
Normal file
59
src/themes/m10c/assets/css/_base.scss
Normal file
@@ -0,0 +1,59 @@
|
||||
* {
|
||||
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);
|
||||
}
|
||||
|
||||
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
src/themes/m10c/assets/css/_extra.scss
Normal file
2
src/themes/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.
|
||||
64
src/themes/m10c/assets/css/components/_app.scss
Normal file
64
src/themes/m10c/assets/css/components/_app.scss
Normal file
@@ -0,0 +1,64 @@
|
||||
.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 {
|
||||
font-size: 2em;
|
||||
color: $lightest-color;
|
||||
|
||||
a {
|
||||
margin: 0 0.1em;
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 940px) {
|
||||
h2 {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
// p {
|
||||
// clear: both;
|
||||
// text-align: left;
|
||||
// }
|
||||
// }
|
||||
|
||||
// .app-header-avatar {
|
||||
// max-width: 8rem;
|
||||
// max-height: 8rem;
|
||||
// border-radius: 100%;
|
||||
// border: .25rem solid $primary-color;
|
||||
// float: left;
|
||||
// }
|
||||
|
||||
.app-container {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
57
src/themes/m10c/assets/css/components/_border_animation.scss
Normal file
57
src/themes/m10c/assets/css/components/_border_animation.scss
Normal file
@@ -0,0 +1,57 @@
|
||||
.gradient-border {
|
||||
|
||||
margin: auto;
|
||||
// width: 50%;
|
||||
|
||||
--border-width: 0.35rem;
|
||||
|
||||
border-radius: 0.35rem;
|
||||
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: Lato, sans-serif;
|
||||
font-size: 2.5rem;
|
||||
text-transform: uppercase;
|
||||
color: white;
|
||||
background: #222;
|
||||
border-radius: var(--border-width);
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: calc(-1 * var(--border-width));
|
||||
left: calc(-1 * var(--border-width));
|
||||
z-index: -1;
|
||||
width: calc(100% + var(--border-width) * 2);
|
||||
height: calc(100% + var(--border-width) * 2);
|
||||
background: linear-gradient(
|
||||
60deg,
|
||||
hsl(224, 85%, 66%),
|
||||
hsl(269, 85%, 66%),
|
||||
hsl(314, 85%, 66%),
|
||||
hsl(359, 85%, 66%),
|
||||
hsl(44, 85%, 66%),
|
||||
hsl(89, 85%, 66%),
|
||||
hsl(134, 85%, 66%),
|
||||
hsl(179, 85%, 66%)
|
||||
);
|
||||
background-size: 300% 300%;
|
||||
background-position: 0 50%;
|
||||
border-radius: calc(2 * var(--border-width));
|
||||
animation: moveGradient 4s alternate infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes moveGradient {
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
}
|
||||
.gradient-border img {
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
border-radius: 1.5%;
|
||||
// border-radius: 50%;
|
||||
}
|
||||
7
src/themes/m10c/assets/css/components/_error_404.scss
Normal file
7
src/themes/m10c/assets/css/components/_error_404.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.error-404 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.error-404-title {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
6
src/themes/m10c/assets/css/components/_icon.scss
Normal file
6
src/themes/m10c/assets/css/components/_icon.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.125em;
|
||||
}
|
||||
24
src/themes/m10c/assets/css/components/_pagination.scss
Normal file
24
src/themes/m10c/assets/css/components/_pagination.scss
Normal file
@@ -0,0 +1,24 @@
|
||||
.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: block;
|
||||
padding: 0.285em 0.8em;
|
||||
}
|
||||
|
||||
&.active {
|
||||
.page-link {
|
||||
color: $lightest-color;
|
||||
border-radius: 2em;
|
||||
background: $primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
25
src/themes/m10c/assets/css/components/_post.scss
Normal file
25
src/themes/m10c/assets/css/components/_post.scss
Normal file
@@ -0,0 +1,25 @@
|
||||
.post-title {
|
||||
color: $lightest-color;
|
||||
}
|
||||
|
||||
.post-content {
|
||||
& > pre,
|
||||
.highlight {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
& > pre,
|
||||
.highlight > pre,
|
||||
.highlight > div {
|
||||
border-left: 0.4em solid rgba($primary-color, .8);
|
||||
padding: .5em 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
17
src/themes/m10c/assets/css/components/_posts_list.scss
Normal file
17
src/themes/m10c/assets/css/components/_posts_list.scss
Normal file
@@ -0,0 +1,17 @@
|
||||
.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: block;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
15
src/themes/m10c/assets/css/components/_tag.scss
Normal file
15
src/themes/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);
|
||||
}
|
||||
}
|
||||
28
src/themes/m10c/assets/css/components/_tags_list.scss
Normal file
28
src/themes/m10c/assets/css/components/_tags_list.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
.tags-list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tags-list-item {
|
||||
list-style: none;
|
||||
padding: 0.4em 0;
|
||||
&: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;
|
||||
}
|
||||
}
|
||||
}
|
||||
22
src/themes/m10c/assets/css/main.scss
Normal file
22
src/themes/m10c/assets/css/main.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
$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';
|
||||
@import 'components/border_animation';
|
||||
|
||||
|
||||
// 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';
|
||||
1
src/themes/m10c/data/m10c/icons.json
Normal file
1
src/themes/m10c/data/m10c/icons.json
Normal file
File diff suppressed because one or more lines are too long
7
src/themes/m10c/layouts/404.html
Normal file
7
src/themes/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 }}
|
||||
50
src/themes/m10c/layouts/_default/baseof.html
Normal file
50
src/themes/m10c/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!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" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<a class="gradient-border" href="{{ .Site.BaseURL }}"><img class="app-header-avatar" src="{{ .Site.Params.avatar | default "avatar.png" | relURL }}" alt="{{ .Site.Params.author | default "John Doe" }}" /></a>
|
||||
<h2>{{ .Site.Title }}</h2>
|
||||
{{- 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">
|
||||
{{ 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>
|
||||
24
src/themes/m10c/layouts/_default/list.html
Normal file
24
src/themes/m10c/layouts/_default/list.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="posts-list">
|
||||
{{ range where .Paginator.Pages "Type" "!=" "page" }}
|
||||
{{ if not .Params.hidden }}
|
||||
<li class="posts-list-item">
|
||||
<a class="posts-list-item-title" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<span class="posts-list-item-description">
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
|
||||
{{ .PublishDate.Format "Jan 2, 2006" }}
|
||||
{{ if not .Site.Params.noreadingtime }}
|
||||
-
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||
{{ .ReadingTime }} min read
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" $ }}
|
||||
</article>
|
||||
{{ end }}
|
||||
37
src/themes/m10c/layouts/_default/single.html
Normal file
37
src/themes/m10c/layouts/_default/single.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{ 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>
|
||||
{{ if not .Site.Params.noreadingtime }}
|
||||
<div>
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
|
||||
{{ .ReadingTime }} min read
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- with .Params.tags }}
|
||||
<div>
|
||||
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
|
||||
{{- range . -}}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
|
||||
<a class="tag" href="{{ .Permalink }}">{{ .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 }}
|
||||
18
src/themes/m10c/layouts/_default/terms.html
Normal file
18
src/themes/m10c/layouts/_default/terms.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{ define "main" }}
|
||||
{{if not .Page.Params.hidden}}
|
||||
<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.Permalink }}">
|
||||
({{ .Count }})
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
11
src/themes/m10c/layouts/partials/icon.html
Normal file
11
src/themes/m10c/layouts/partials/icon.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- if isset .ctx.Site.Data.m10c.icons .name -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-{{ .name }}">
|
||||
<title>{{ .title | default .name }}</title>
|
||||
{{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }}
|
||||
</svg>
|
||||
{{- else -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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
src/themes/m10c/layouts/partials/pagination.html
Normal file
27
src/themes/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,3 @@
|
||||
<div class="toc" class="well col-md-4 col-sm-6">
|
||||
{{ .Page.TableOfContents }}
|
||||
</div>
|
||||
@@ -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{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{max-width:15rem;max-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}@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{border-left:.4em solid rgba(87,204,138,.8);padding-left:1em}.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.88e7083eff65effb7485b6e6f38d10afbec25093a6fac42d734ce9024d3defbd.css","MediaType":"text/css","Data":{"Integrity":"sha256-iOcIPv9l7/t0hbbm840Qr77CUJOm+sQtc0zpAk09770="}}
|
||||
24
src/themes/m10c/scripts/update_feather_icons.sh
Executable file
24
src/themes/m10c/scripts/update_feather_icons.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
FEATHER_PATH=`dirname "$0"`/feather
|
||||
|
||||
# Clone feather repository
|
||||
git clone --depth=1 git@github.com:feathericons/feather.git $FEATHER_PATH
|
||||
|
||||
pushd $FEATHER_PATH
|
||||
|
||||
# Install dependencies
|
||||
yarn
|
||||
|
||||
mkdir dist
|
||||
|
||||
# Generate icons.json
|
||||
npx babel-node bin/build-icons-json.js
|
||||
|
||||
# Copy icons.json into theme data
|
||||
cp dist/icons.json ../../data/m10c/icons.json
|
||||
|
||||
popd
|
||||
|
||||
# Remove the repository
|
||||
rm -rf $FEATHER_PATH
|
||||
BIN
src/themes/m10c/static/avatar.png
Normal file
BIN
src/themes/m10c/static/avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
17
src/themes/m10c/theme.toml
Normal file
17
src/themes/m10c/theme.toml
Normal file
@@ -0,0 +1,17 @@
|
||||
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://"
|
||||
tags = ["blog","personal","blog", "dark"]
|
||||
features = [
|
||||
"minimalistic blog",
|
||||
"social icons",
|
||||
"editable colors"
|
||||
]
|
||||
min_version = 0.55
|
||||
|
||||
[author]
|
||||
name = "vaga"
|
||||
homepage = "https://vaga.io"
|
||||
|
||||
Reference in New Issue
Block a user