diff options
author | iCyris <cyris1015@gmail.com> | 2019-01-26 09:23:40 +0300 |
---|---|---|
committer | iCyris <cyris1015@gmail.com> | 2019-01-26 09:23:40 +0300 |
commit | fa31adbbf989916b32cadf7d33a4bb7ec20fe4cc (patch) | |
tree | f5fe55beaf29c8ddeb945f6702f8d096758a2feb | |
parent | 5ba20a40ef5aa59d327207c256c3924fa07e8905 (diff) |
update readme (beta)
-rw-r--r-- | README.md | 85 | ||||
-rw-r--r-- | layouts/_default/li.html | 26 | ||||
-rw-r--r-- | layouts/index.html | 8 | ||||
-rw-r--r-- | layouts/pages/single.html | 1 | ||||
-rw-r--r-- | layouts/partials/head.html | 1 | ||||
-rw-r--r-- | layouts/partials/header.html | 39 | ||||
-rw-r--r-- | layouts/partials/header_index.html | 35 | ||||
-rw-r--r-- | layouts/partials/navbar.html | 8 | ||||
-rw-r--r-- | static/scss/custom.css | 0 | ||||
-rw-r--r-- | static/scss/highlight.css.map | 7 | ||||
-rw-r--r-- | static/scss/style.css.map | 7 |
11 files changed, 108 insertions, 109 deletions
@@ -1,4 +1,85 @@ -# hugo-theme-yuki -Now it's under designing. +# Yuki [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/iCyris/hugo-theme-yuki/blob/master/LICENSE) + +❄️ Hugo theme yuki. She is as pure as the snow. + +[Demo](https://cyris.pen.moe) + +[Screenshots]() + +## Features + +* Responsive +* Syntax highlighting with highlightjs +* Social links(Customize) +* Custom Page +* Support for Related Content +* Support for tags +* Google Analytics +* SCSS + +## Table of Contents + +* [Quick Start](#quick-start) +* [Usage](#usage) +* [Development](#development) +* [License](#license) + +## Quick Start + +In your hugo site directory, run: + +```shell +$ mkdir themes +$ cd themes +$ git clone https://github.com/iCyris/hugo-theme-yuki +``` + +## Usage + +Use hugo's -t hugo-theme-yuki or --theme=hugo-theme-yuki option with hugo commands. + +e.g. + +```shell +$ hugo server -t hugo-theme-yuki +``` + +### Configuration + +Please see the sample [`config.toml`](https://github.com/iCyris/hugo-theme-yuki/tree/master/exampleSite/config.toml). + +### Creating Posts + +Posts should generally go under a `content/posts` directory. Typically you would run: + +````sh +hugo new posts/your-new-post.md +```` + +For posts to appear on your site, you may need `draft = false` in the post's front matter or use the `--buildDrafts` option when building. + +### Creating Custom Pages + +Custom pages such as an About page should preferably go under `content/pages` or be present at the root of the `content` directory. + +````sh +hugo new pages/about.md +```` + +## Development + +This theme is built and improved upon by open source [contributions](https://github.com/nishanths/cocoa-hugo-theme/graphs/contributors). Pull requests, bug fixes, and new features are welcome! + +If you're contributing CSS changes, there are two ways: + +1. Simply make changes on `themes/hugo-theme-yuki/static/scss/custom.css`, the style will be overwrited. +2. Use [sass](https://sass-lang.com/). Directly make changes on the `*.scss` files and recompile `style.scss` or `highlight.scss`. + +## License + +Licensed under the MIT License. See the [LICENSE](https://github.com/iCyris/hugo-theme-yuki/blob/master/LICENSE) file for more details. + + + diff --git a/layouts/_default/li.html b/layouts/_default/li.html deleted file mode 100644 index 4a0785b..0000000 --- a/layouts/_default/li.html +++ /dev/null @@ -1,26 +0,0 @@ -<article class="c-article p-list-article"> - <header> - <h2 class="c-title c-article__title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - <p class="c-article__meta"> - Posted on - <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> - {{ .Date.Format "Jan 2, 2006" }} - </time> - </p> - </header> - <div class="c-article__summary"> - {{ .Summary | plainify | safeHTML }} - </div> - {{ if .Truncated }} - <a href="{{ .Permalink }}" class="c-article__btn p-list-article__btn">Read more</a> - {{ end }} -</article> - -<!-- tags --> -{{ range $name, $taxonomy := .Site.Taxonomies.tags }} -<a href="/tags/{{ $name | urlize }}">{{ $name }}</a> -{{ end }} - - - - diff --git a/layouts/index.html b/layouts/index.html index c0f46ab..2107215 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,7 @@ -{{ partial "header_index.html" . }} +{{ partial "header.html" . }} <!-- Display image --> -<div class="index-displayImg" style="background-image: url(/images/display.png)"></div> +<div class="index-displayImg" style='background-image: url("{{ .Site.Params.displayImg }}")'></div> <!-- SNS --> <div class="index-line u-font"> @@ -35,9 +35,7 @@ </div> <div class="index-paginate"> - -</div> - +</div> {{ partial "footer.html" . }}
\ No newline at end of file diff --git a/layouts/pages/single.html b/layouts/pages/single.html index ce3d609..3004c34 100644 --- a/layouts/pages/single.html +++ b/layouts/pages/single.html @@ -10,4 +10,5 @@ </article> </div> </div> + {{ partial "footer.html" . }}
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e187753..a376789 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -19,6 +19,7 @@ <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.13.1/build/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> <link rel="stylesheet" href="/scss/highlight.css"> + <link rel="stylesheet" href="/scss/custom.css"> <!-- Google Analytics --> {{ with .Site.Params.ga_api_key }} <script> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5b00bec..bb28746 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,35 +1,20 @@ {{ partial "head.html" . }} <body> - <div class="header"> - <div class="site-logo__wrap"> - <div id="site-button"> - <div></div> - </div> - <div class="site-logo"> - <a href="/"> +<div class="header"> + <div class="site-logo__wrap"> + <div id="site-button"> + <div></div> + </div> + {{ $currentPage := . }} + <div class='{{ if eq $currentPage.URL "/" }} site-logo site-logo__index {{ else }} site-logo {{ end }}'> + <a href="/"> {{- with .Site.Params.logo -}} <img src="{{ . | absURL }}" /> {{- end -}} - </a> - </div> - </div> - <div class="site-nav u-font" id="nav-bar"> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/">HOME</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/posts">BLOG</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/pages/about">ABOUT</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/tags">TAG</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/pages/links">FRIENDS</a> - </div> + </a> </div> </div> - <div class="main">
\ No newline at end of file + {{ partial "navbar.html" . }} +</div> +<div class="main">
\ No newline at end of file diff --git a/layouts/partials/header_index.html b/layouts/partials/header_index.html deleted file mode 100644 index 106a3da..0000000 --- a/layouts/partials/header_index.html +++ /dev/null @@ -1,35 +0,0 @@ -{{ partial "head.html" . }} - -<body> - <div class="header"> - <div class="site-logo__wrap"> - <div id="site-button"> - <div></div> - </div> - <div class="site-logo site-logo__index"> - <a href="/"> - {{- with .Site.Params.logo -}} - <img src="{{ . | absURL }}" /> - {{- end -}} - </a> - </div> - </div> - <div class="site-nav site-nav__index u-font" id="nav-bar"> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/">HOME</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/posts">BLOG</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/pages/about">ABOUT</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/tags">TAG</a> - </div> - <div class="site-nav__wrap"> - <a class="site-nav__el" href="/pages/links">FRIENDS</a> - </div> - </div> - </div> - <div class="main">
\ No newline at end of file diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html new file mode 100644 index 0000000..cf617d3 --- /dev/null +++ b/layouts/partials/navbar.html @@ -0,0 +1,8 @@ +{{ $currentNode := . }} +<div class='{{ if eq $currentNode.URL "/" }} site-nav site-nav__index u-font {{ else }} site-nav u-font {{ end }}' id="nav-bar"> + {{ range .Site.Menus.main }} + <div class="site-nav__wrap"> + <a class="site-nav__el" href="{{ .URL }}" >{{ .Name }}</a> + </div> + {{ end }} +</div>
\ No newline at end of file diff --git a/static/scss/custom.css b/static/scss/custom.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/static/scss/custom.css diff --git a/static/scss/highlight.css.map b/static/scss/highlight.css.map deleted file mode 100644 index 2d61135..0000000 --- a/static/scss/highlight.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAAA;;GAEG;AACH,KAAM;EACJ,MAAM,EAAE,QAAQ;EAChB,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,OAAO;;AAEtB,gBAAiB;EACf,WAAW,EAAE,kCAAkC;EAC/C,SAAS,EAAE,KAAK", -"sources": ["highlight.scss"], -"names": [], -"file": "highlight.css" -}
\ No newline at end of file diff --git a/static/scss/style.css.map b/static/scss/style.css.map deleted file mode 100644 index 2cfd198..0000000 --- a/static/scss/style.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAAA;;GAEG;AAQH;;GAEG;AACH,OAAQ;EACN,WAAW,EAAE,4CAA4C;;ACd3D;;GAEG;AACH,CAAE;EACA,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;;AAEX,IAAK;EACH,WAAW,EAAE,qDAAqD;EAClE,SAAS,EAAE,IAAI;;AAEjB,KAAM;EACJ,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EAAE,MAAM,EAAE,IAAI;EACzB,IAAI,EAAE,CAAC;EAAE,GAAG,EAAE,CAAC;EACf,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,IAAI;;AAElB,CAAE;EACA,eAAe,EAAE,IAAI;EACrB,KAAK,EDjBY,OAAO;ECkBxB,UAAU,EAAE,cAAc;EAC1B,OAAQ;IAAE,KAAK,EDlBQ,OAAO;;ACoBhC,OAAQ;EACN,MAAM,EAAE,WAAW;EACnB,SAAS,EAAE,UAAU;EACrB,KAAK,EDtBa,OAAO;ECuBzB,SAAE;IACA,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,GAAG;IAChB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,UAAU;IACrB,cAAc,EAAE,GAAG;;AClCvB;;GAEG;AACH,gBAAiB;EACf,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;E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AAU,EAAE,KAAK;EACjB,sBAAG;IACD,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,IAAI;IAAE,MAAM,EAAE,IAAI;IACzB,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,OAAO;IAChB,cAAc,EAAE,GAAG;;ACZvB;;EAEE;AACF,OAAQ;EACN,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,CAAC;EAAE,MAAM,EAAE,CAAC;EAClB,UAAU,EAAE,IAAI;;AAElB,eAAgB;EACd,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,iBAAiC;;AAE/C,UAAW;EACT,OAAO,EAAE,OAAO;EAChB,SAAS,EAAE,KAAK;EAChB,KAAK,ENVY,OAAO;EMWxB,YAAE;IAAE,KAAK,ENXQ,OAAO;;AON1B;;GAEG;AACH,iBAGC;EAFC,IAAK;IAAC,OAAO,EAAE,CAAC;EAChB,EAAG;IAAC,OAAO,EAAE,CAAC;AAEhB,kBAGC;EAFC,IAAK;IAAC,OAAO,EAAE,CAAC;EAChB,EAAG;IAAC,OAAO,EAAE,CAAC;AAEhB,iBAKC;EAJC,EAAG;IAAC,SAAS,EAAE,iBAAiB;EAChC,GAAI;IAAC,SAAS,EAAE,cAAc;EAC9B,GAAI;IAAC,SAAS,EAAE,iBAAiB;EACjC,IAAK;IAAC,SAAS,EAAE,cAAc", -"sources": ["config/_config.scss","pages/_base.scss","pages/_header.scss","pages/_index.scss","pages/_post.scss","pages/_custom.scss","pages/_footer.scss","keyframes/_keyframes.scss"], -"names": [], -"file": "style.css" -}
\ No newline at end of file |