diff options
author | diwao <diwao@me.com> | 2017-06-28 13:27:11 +0300 |
---|---|---|
committer | diwao <diwao@me.com> | 2017-06-28 13:27:11 +0300 |
commit | 82e125ed2dab2775523ef20455562ffc43021700 (patch) | |
tree | 35b4a568ca8d800216ceccb454f879f07676ba93 | |
parent | a198ad7db1ad566fad48273695a9b26cb8c62a9b (diff) |
first commit
-rw-r--r-- | .editorconfig | 12 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .scss-lint.yml | 245 | ||||
-rw-r--r-- | LICENSE.md | 20 | ||||
-rw-r--r-- | archetypes/default.md | 10 | ||||
-rwxr-xr-x | gulpfile.js | 48 | ||||
-rw-r--r-- | layouts/404.html | 6 | ||||
-rw-r--r-- | layouts/_default/list.html | 12 | ||||
-rw-r--r-- | layouts/_default/single.html | 51 | ||||
-rw-r--r-- | layouts/index.html | 24 | ||||
-rw-r--r-- | layouts/partials/footer.html | 64 | ||||
-rw-r--r-- | layouts/partials/header.html | 63 | ||||
-rw-r--r-- | package.json | 26 | ||||
-rw-r--r-- | src/scss/modules/_footer.scss | 58 | ||||
-rw-r--r-- | src/scss/modules/_header.scss | 29 | ||||
-rw-r--r-- | src/scss/modules/_list.scss | 71 | ||||
-rw-r--r-- | src/scss/modules/_other.scss | 27 | ||||
-rw-r--r-- | src/scss/modules/_single.scss | 109 | ||||
-rw-r--r-- | src/scss/modules/_variables.scss | 14 | ||||
-rw-r--r-- | src/scss/style.scss | 39 | ||||
-rw-r--r-- | static/css/style.css | 234 | ||||
-rw-r--r-- | static/image/theme/favicon.ico | bin | 0 -> 5430 bytes | |||
-rwxr-xr-x | static/image/theme/logo.jpeg | bin | 0 -> 56544 bytes | |||
-rwxr-xr-x | static/image/theme/og.png | bin | 0 -> 33641 bytes | |||
-rw-r--r-- | static/js/script.js | 1 | ||||
-rw-r--r-- | theme.toml | 21 |
26 files changed, 1186 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4a7ea30 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09235d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# node_modulesを除外 +node_modules/ diff --git a/.scss-lint.yml b/.scss-lint.yml new file mode 100644 index 0000000..6168219 --- /dev/null +++ b/.scss-lint.yml @@ -0,0 +1,245 @@ +scss_files: '/src/**/*.scss' + +exclude: '' + +linters: + BangFormat: + enabled: true + space_before_bang: true + space_after_bang: false + + BemDepth: + enabled: true + max_elements: 1 + + BorderZero: + enabled: true + convention: zero # or `none` + + ChainedClasses: + enabled: false + + ColorKeyword: + enabled: true + + ColorVariable: + enabled: true + + Comment: + enabled: true + style: silent + + DebugStatement: + enabled: true + + DeclarationOrder: + enabled: true + + DisableLinterReason: + enabled: false + + DuplicateProperty: + enabled: true + + ElsePlacement: + enabled: true + style: same_line # or 'new_line' + + EmptyLineBetweenBlocks: + enabled: true + ignore_single_line_blocks: true + + EmptyRule: + enabled: true + + ExtendDirective: + enabled: false + + FinalNewline: + enabled: true + present: true + + HexLength: + enabled: true + style: short # or 'long' + + HexNotation: + enabled: true + style: lowercase # or 'uppercase' + + HexValidation: + enabled: true + + IdSelector: + enabled: true + + ImportantRule: + enabled: true + + ImportPath: + enabled: true + leading_underscore: false + filename_extension: false + + Indentation: + enabled: true + allow_non_nested_indentation: false + character: space # or 'tab' + width: 2 + + LeadingZero: + enabled: true + style: exclude_zero # or 'include_zero' + + MergeableSelector: + enabled: true + force_nesting: true + + NameFormat: + enabled: true + allow_leading_underscore: true + convention: [hyphenated_lowercase, 'camel_case'] + + NestingDepth: + enabled: true + max_depth: 5 + ignore_parent_selectors: false + + PlaceholderInExtend: + enabled: true + + PrivateNamingConvention: + enabled: false + prefix: _ + + PropertyCount: + enabled: false + include_nested: false + max_properties: 10 + + PropertySortOrder: + enabled: true + ignore_unspecified: false + min_properties: 2 + separate_groups: false + + PropertySpelling: + enabled: true + extra_properties: [] + disabled_properties: [] + + PropertyUnits: + enabled: true + global: [ + 'ch', 'em', 'ex', 'rem', # Font-relative lengths + 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths + 'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths + 'deg', 'grad', 'rad', 'turn', # Angle + 'ms', 's', # Duration + 'Hz', 'kHz', # Frequency + 'dpi', 'dpcm', 'dppx', # Resolution + '%'] # Other + properties: {} + + PseudoElement: + enabled: true + + QualifyingElement: + enabled: true + allow_element_with_attribute: false + allow_element_with_class: false + allow_element_with_id: false + + SelectorDepth: + enabled: true + max_depth: 3 + + SelectorFormat: + enabled: true + convention: [hyphenated_lowercase, 'strict_BEM', 'camel_case'] + + Shorthand: + enabled: true + allowed_shorthands: [1, 2, 3] + + SingleLinePerProperty: + enabled: true + allow_single_line_rule_sets: true + + SingleLinePerSelector: + enabled: true + + SpaceAfterComma: + enabled: true + style: one_space # or 'no_space', or 'at_least_one_space' + + SpaceAfterPropertyColon: + enabled: true + style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned' + + SpaceAfterPropertyName: + enabled: true + + SpaceAfterVariableColon: + enabled: false + style: one_space # or 'no_space', 'at_least_one_space' or 'one_space_or_newline' + + SpaceAfterVariableName: + enabled: true + + SpaceAroundOperator: + enabled: true + style: one_space # or 'at_least_one_space', or 'no_space' + + SpaceBeforeBrace: + enabled: true + style: space # or 'new_line' + allow_single_line_padding: false + + SpaceBetweenParens: + enabled: true + spaces: 0 + + StringQuotes: + enabled: false + style: single_quotes # or double_quotes + + TrailingSemicolon: + enabled: true + + TrailingWhitespace: + enabled: true + + TrailingZero: + enabled: false + + TransitionAll: + enabled: false + + UnnecessaryMantissa: + enabled: true + + UnnecessaryParentReference: + enabled: true + + UrlFormat: + enabled: true + + UrlQuotes: + enabled: true + + VariableForProperty: + enabled: false + properties: [] + + VendorPrefix: + enabled: true + identifier_list: base + additional_identifiers: [] + excluded_identifiers: [] + + ZeroUnit: + enabled: true + + Compass::*: + enabled: false diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..722e637 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2017 Daisuke Iwao + +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. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..3246aba --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,10 @@ ++++ +author = "" +categories = ["", ""] +date = "" +image = "" +layout = "post" +tags = ["", ""] +url = "" + ++++ diff --git a/gulpfile.js b/gulpfile.js new file mode 100755 index 0000000..f972ca2 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,48 @@ +'use strict'; + +// モジュール読み込み +const gulp = require('gulp'); +const notify = require('gulp-notify'); +const plumber = require('gulp-plumber'); +const sass = require('gulp-sass'); +const autoprefixer = require('gulp-autoprefixer'); + +// オプション +const sassOptions = { + options: { + outputStyle: 'compressed', + sourceMap: false, + sourceComment: false + } +}; + +const autoprefixerOptions = { + options: { + browsers: ['last 3 version', 'ie >= 9', 'Android 4.0'] + } +}; + +// 各タスク読み込み +gulp.task('style', function(){ + const src = './src/scss/*.scss'; + const dest = './static/css'; + return gulp.src(src) + .pipe(plumber({ + errorHandler: notify.onError('Error: <%= error.message %>') + })) + .pipe(sass(sassOptions)) + .pipe(autoprefixer(autoprefixerOptions)) + .pipe(gulp.dest(dest)) + // .pipe(browserSync.stream()) + .pipe(notify({ + title: 'scssをコンパイルしました!', + message: new Date(), + sound: 'Glass' + }) + ); +}); + +// デフォルトタスク +gulp.task('default', function(){ + gulp.watch('./src/scss/*.scss', ['style']); +}); diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..12739e5 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,6 @@ +{{ partial "header.html" . }} +<main class="main"> + <h2>404 Page not found.</h2> + <p>お探しのページは見つかりませんでした。入力したURLが間違っているかページが削除された可能性があります。</p> + <p>URLをご確認のうえ再読み込みを行うか、<a href="/">トップページ</a>へとお戻りくださいm(_ _)m</p> +</main> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..c2f8e16 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,12 @@ +<article class="card pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> + <a class="card__thumb" href="{{ .Permalink }}"> + <img src="{{ if and (.Params.image) (ne .Params.image "") }}{{ .Site.BaseURL }}{{ .Params.image }}{{ else }}{{ .Site.BaseURL }}image/theme/og.png{{ end }}" alt=""> + </a> + <a href="{{ .Permalink }}"> + <h3>{{ .Title }}</h3> + </a> + <span> + <time datetime="{{ .Date.Format " 2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Date.Format "2006.01.02" }}</time> + </span> + <p >{{ if .IsPage }}{{ .Summary }}...{{ else }}{{ .Site.Params.description }}{{ end }}</p> +</article> diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..a74c2c0 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,51 @@ +{{ partial "header.html" . }} +<main class="main main--single"> + <!-- post --> + <article class="post" itemscope itemtype="http://schema.org/BlogPosting"> + <h1 class="post__title">{{ .Title }}</h1> + <p class="post__date"> + <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Date.Format "2006.01.02" }}</time> + </p> + <div class="post-content"> + {{ .Content }} + </div> + </article> + <!-- /post --> + <hr class="post-hr"> + <!-- post-nav --> + <nav class="post-nav"> + <ol class="pure-g"> + {{ if .NextInSection }} + <li class="pure-u-1 pure-u-md-1-2 post-nav-prev"> + <a href="{{.NextInSection.Permalink}}"> + <span class="post-nav-label">新しい記事</span> + <span class="post-nav-title"> + {{ .NextInSection.Title }} + </span> + </a> + </li> + {{ else }} + <li class="pure-u-1 pure-u-md-1-2 post-nav-prev"> + </li> + {{ end }} + {{ if .PrevInSection }} + <li class="pure-u-1 pure-u-md-1-2 post-nav-next"> + <a href="{{.PrevInSection.Permalink}}"> + <span class="post-nav-label">古い記事</span> + <span class="post-nav-title"> + {{ .PrevInSection.Title }} + </span> + </a> + </li> + {{ else }} + <li class="pure-u-1 pure-u-md-1-2 post-nav-next"> + </li> + {{ end }} + </ol> + <div class="post-nav-back"> + <a class="pure-button" href="/">記事一覧へ戻る</a> + </div> + </nav> +<!-- /post-nav --> +</main> +{{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..055258b --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,24 @@ +{{ partial "header.html" . }} +<main class="main"> + <section class="articles"> + <h2>Recent Post</h2> + <div class="pure-g"> + {{ range (.Paginator 12).Pages }} + {{ .Render "list" }} + {{ end }} + </div> + </section> + + {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} + <nav class="pagination"> + {{ if .Paginator.HasPrev }} + <a class="pagination__link pagination__link--prev" href="{{ .Paginator.Prev.URL }}">< Prev</a> + {{ end }} + <span class="pagination__current">{{ .Paginator.PageNumber}} / {{ .Paginator.TotalPages }} Page</span> + {{ if .Paginator.HasNext }} + <a class="pagination__link pagination__link--next" href="{{ .Paginator.Next.URL }}">Next ></a> + {{ end }} + </nav> + {{ end }} +</main> +{{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..995d452 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,64 @@ + <footer class="footer"> + <section class="author"> + <h2>Author</h2> + <div class="pure-g"> + <div class="author__image pure-u-1-5 pure-u-md-1-8"> + <img src="{{ .Site.BaseURL }}{{ .Site.Author.image }}" alt=""> + </div> + <div class="author__info pure-u-4-5 pure-u-md-7-8"> + <h3>{{ .Site.Author.author }}</h3> + <p>{{ .Site.Author.profile }}</p> + <ul class="author__links"> + {{ if and (.Site.Params.github) (ne .Site.Params.github "") }} + <li> + <a href="https://github.com/{{.Site.Params.github}}" target="_blank"> + <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxMDI0IiB3aWR0aD0iMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNTEyIDBDMjI5LjI1IDAgMCAyMjkuMjUgMCA1MTJjMCAyMjYuMjUgMTQ2LjY4OCA0MTguMTI1IDM1MC4xNTYgNDg1LjgxMiAyNS41OTQgNC42ODggMzQuOTM4LTExLjEyNSAzNC45MzgtMjQuNjI1IDAtMTIuMTg4LTAuNDY5LTUyLjU2Mi0wLjcxOS05NS4zMTJDMjQyIDkwOC44MTIgMjExLjkwNiA4MTcuNSAyMTEuOTA2IDgxNy41Yy0yMy4zMTItNTkuMTI1LTU2Ljg0NC03NC44NzUtNTYuODQ0LTc0Ljg3NS00Ni41MzEtMzEuNzUgMy41My0zMS4xMjUgMy41My0zMS4xMjUgNTEuNDA2IDMuNTYyIDc4LjQ3IDUyLjc1IDc4LjQ3IDUyLjc1IDQ1LjY4OCA3OC4yNSAxMTkuODc1IDU1LjYyNSAxNDkgNDIuNSA0LjY1NC0zMyAxNy45MDQtNTUuNjI1IDMyLjUtNjguMzc1QzMwNC45MDYgNzI1LjQzOCAxODUuMzQ0IDY4MS41IDE4NS4zNDQgNDg1LjMxMmMwLTU1LjkzOCAxOS45NjktMTAxLjU2MiA1Mi42NTYtMTM3LjQwNi01LjIxOS0xMy0yMi44NDQtNjUuMDk0IDUuMDYyLTEzNS41NjIgMCAwIDQyLjkzOC0xMy43NSAxNDAuODEyIDUyLjUgNDAuODEyLTExLjQwNiA4NC41OTQtMTcuMDMxIDEyOC4xMjUtMTcuMjE5IDQzLjUgMC4xODggODcuMzEyIDUuODc1IDEyOC4xODggMTcuMjgxIDk3LjY4OC02Ni4zMTIgMTQwLjY4OC01Mi41IDE0MC42ODgtNTIuNSAyOCA3MC41MzEgMTAuMzc1IDEyMi41NjIgNS4xMjUgMTM1LjUgMzIuODEyIDM1Ljg0NCA1Mi42MjUgODEuNDY5IDUyLjYyNSAxMzcuNDA2IDAgMTk2LjY4OC0xMTkuNzUgMjQwLTIzMy44MTIgMjUyLjY4OCAxOC40MzggMTUuODc1IDM0Ljc1IDQ3IDM0Ljc1IDk0Ljc1IDAgNjguNDM4LTAuNjg4IDEyMy42MjUtMC42ODggMTQwLjUgMCAxMy42MjUgOS4zMTIgMjkuNTYyIDM1LjI1IDI0LjU2MkM4NzcuNDM4IDkzMCAxMDI0IDczOC4xMjUgMTAyNCA1MTIgMTAyNCAyMjkuMjUgNzk0Ljc1IDAgNTEyIDB6Ii8+PC9zdmc+" alt=""> + </a> + </li> + {{ end }} + {{ if and (.Site.Params.twitter) (ne .Site.Params.twitter "") }} + <li> + <a href="https://twitter.com/{{.Site.Params.twitter}}" target="_blank"> + <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI1MDAi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0xMS43NjQxLDUuMjI5MjIgLTI0LjQxNTg2LDguNzcxNDYgLTM3LjcsMTAuMzUgMTMuNTYzNDYsLTguMTE5OSAyMy45NzA2MSwtMjAuOTgxNjYgMjguODc1LC0zNi4zMjUgLTEyLjY4NjUyLDcuNTI4NzcgLTI2LjczOTkzLDEzLjAwMDg1IC00MS43LDE1Ljk1IC0xMS45NzE5NywtMTIuNzU3OTggLTI5LjA0MTM3LC0yMC43MjUgLTQ3LjkyNSwtMjAuNzI1IC0wLjU2NjQ2LDAgLTEuMTM2OTgsLTAuMDE0MyAtMS43LDAgeiIgaWQ9InJlY3QyOTg5IiBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIi8+PC9nPjwvc3ZnPg==" alt=""> + </a> + </li> + {{ end }} + <li> + {{ if and (.Site.Params.facebook) (ne .Site.Params.facebook "") }} + <a href="https://www.facebook.com/{{.Site.Params.facebook}}" target="_blank"> + <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI1MDAiIGlkPSJzdmcyIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI1MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiIHhtb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> + </section> + <small>©{{ .Site.Title }}</small> + </footer> + </div> +{{ with .Site.Params.googlecustomsearch }} +<script> + (function() { + var cx = '{{ . }}'; + var gcse = document.createElement('script'); + gcse.type = 'text/javascript'; + gcse.async = true; + gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(gcse, s); + })(); +</script>{{ end }} +{{ with .Site.Params.googleanalytics }}<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', '{{ . }}', 'auto'); + ga('send', 'pageview'); +</script>{{ end }} +<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script> +<script>hljs.initHighlightingOnLoad();</script> +<script src="{{ .Site.BaseURL }}js/script.js"></script> +</body> +</html> diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..a5da11d --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html lang="ja"> +<head> +<meta charset="utf-8"> +<title>{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title> +{{ .Hugo.Generator }} +<meta name="viewport" content="width=device-width, initial-scale=1"> +<meta name="author" content="diwao"> +{{ if eq $isHomePage true }} +<meta name="description" content="{{ .Site.Params.description }}"> +{{ else }} +<meta name="description" content="{{ .Summary }}"> +{{ end }} +<meta name="keywords" content="{{ .Site.Params.keywords }}"> +<meta property="og:site_name" content="{{ .Site.Title }}"> +<meta property="og:title" content="{{ .Title }}"> +<meta property="og:url" content="{{ .Permalink }}"> +{{ if and (.Params.image) (ne .Params.image "") }} +<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.image }}"> +{{ else }} +<meta property="og:image" content="{{ .Site.BaseURL }}image/theme/og.png"> +{{ end }} +{{ if eq $isHomePage true }} +<meta property="og:description" content="{{ .Site.Params.description }}"> +{{ else }} +<meta property="og:description" content="{{ .Summary }}"> +{{ end }} +<meta property="og:type" content="blog"> +<meta property="og:locale" content="ja_JP"> +<meta name="twitter:card" content="summary_large_image"> +<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}"> +<meta name="twitter:title" content="{{ .Title }}"> +<meta name="twitter:url" content="{{ .Permalink }}"> +{{ if eq $isHomePage true }} +<meta name="twitter:description" content="{{ .Site.Params.description }}"> +{{ else }} +<meta name="twitter:description" content="{{ .Summary }}"> +{{ end }} +{{ if and (.Params.image) (ne .Params.image "") }} +<meta name="twitter:image:src" content="{{ .Site.BaseURL }}{{ .Params.image }}"> +{{ else }} +<meta name="twitter:image:src" content="{{ .Site.BaseURL }}image/theme/og.png"> +{{ end }} +<link rel="shortcut icon" href="{{ .Site.BaseURL }}image/theme/favicon.ico"> +<link href="https://fonts.googleapis.com/earlyaccess/sawarabigothic.css" rel="stylesheet" /> +<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/atom-one-dark.min.css"> +<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css"> +<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css"> +<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css"> +<link rel="alternate" href="{{ .Site.BaseURL }}index.xml" type="application/rss+xml" title="{{ .Site.Title }}"> +</head> +<body> + <div id="wrap" class="wrap"> + <header class="header"> + {{ if eq $isHomePage true }} + <h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>{{ end }}{{ if eq $isHomePage false }}<div class="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>{{ end }} + <p class="site-desc">{{ .Site.Params.description }}</p> + {{ if .Site.Params.googlecustomsearch }} + <div class="search"> + <gcse:searchbox-only></gcse:searchbox-only> + </div> + {{ end }} + </header> diff --git a/package.json b/package.json new file mode 100644 index 0000000..2607446 --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "hestia-pure", + "version": "1.0.0", + "description": "Pure CSSを使ったHugo用のテーマ", + "main": "gulpfile.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/diwao/hestia-pure.git" + }, + "author": "diwao", + "license": "MIT", + "bugs": { + "url": "https://github.com/diwao/hestia-pure/issues" + }, + "homepage": "https://github.com/diwao/hestia-pure#readme", + "devDependencies": { + "gulp": "^3.9.1", + "gulp-autoprefixer": "^4.0.0", + "gulp-notify": "^3.0.0", + "gulp-plumber": "^1.1.0", + "gulp-sass": "^3.1.0" + } +} diff --git a/src/scss/modules/_footer.scss b/src/scss/modules/_footer.scss new file mode 100644 index 0000000..1a63e3c --- /dev/null +++ b/src/scss/modules/_footer.scss @@ -0,0 +1,58 @@ +@charset "UTF-8"; + +.footer { + background-color: slategray; + margin-top: 5em; + padding: 1em 0 3em; + text-align: center; + + small { + font-size: 1em; + } +} + +.author { + align-items: center; + margin: 0 auto; + max-width: 760px; + padding: 0 5%; + text-align: left; +} + +.author__image img { + border-radius: 50%; + width: 100%; +} + +.author__info { + padding-left: 5%; + + h3 { + margin-top: 0; + } +} + +.author__links { + display: flex; + list-style: none; + padding: 0; + + li { + height: 30px; + margin-left: .8em; + width: 30px; + } + + a { + &:hover { + img { + transform: rotate(360deg); + } + } + } + + img { + transition: .6s all; + width: 100%; + } +} diff --git a/src/scss/modules/_header.scss b/src/scss/modules/_header.scss new file mode 100644 index 0000000..e9a5a47 --- /dev/null +++ b/src/scss/modules/_header.scss @@ -0,0 +1,29 @@ +@charset "UTF-8"; + +.header { + margin-bottom: 3em; + padding-top: 1em; + text-align: center; + + a { + color: $color-key; + text-decoration: none; + } +} + +.site-title { + display: block; + font-size: 2em; + font-weight: bold; + margin: .67em 0; +} + +.search { + margin: 0 auto; + width: 300px; + + * { + box-sizing: content-box; + // font-size: 1rem; + } +} diff --git a/src/scss/modules/_list.scss b/src/scss/modules/_list.scss new file mode 100644 index 0000000..5d37c18 --- /dev/null +++ b/src/scss/modules/_list.scss @@ -0,0 +1,71 @@ +@charset "UTF-8"; + +.articles { + padding: 0 5%; +} + +.card { + margin-bottom: 2%; + padding: 2%; + + a { + color: inherit; + display: block; + text-decoration: none; + } + + h3, + p, + span { + font-family: $font-family-base; + } + + h3 { + margin-bottom: .5em; + } + + p { + color: #797979; + } + + &__thumb { + display: block; + overflow: hidden; + padding-top: 52.65%; + position: relative; + + &:hover img { + transform: translate(-50%, -50%) scale(1.2); + } + + img { + left: 50%; + max-width: 100%; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + transition: .3s all; + } + } +} + +.pagination { + font-size: 1.2em; + text-align: center; + + &__link { + display: inline-block; + + &--prev { + margin-right: 10px; + } + + &--next { + margin-left: 10px; + } + } + + &__current { + display: inline-block; + } +} diff --git a/src/scss/modules/_other.scss b/src/scss/modules/_other.scss new file mode 100644 index 0000000..39c2c4a --- /dev/null +++ b/src/scss/modules/_other.scss @@ -0,0 +1,27 @@ +@charset "UTF-8"; + +.amazlet-box { + font-size: 1rem; + margin: 40px 0; +} + +.app-data, +.appfom1 { + margin: 40px 0; +} + +.appbanner { + margin: 40px 0; +} + +.kaerebalink-box { + margin: 40px 0 20px; +} + +.ShareInfo { + margin: 20px 0; +} + +.booklink-box { + margin: 40px 0; +} diff --git a/src/scss/modules/_single.scss b/src/scss/modules/_single.scss new file mode 100644 index 0000000..abfabb3 --- /dev/null +++ b/src/scss/modules/_single.scss @@ -0,0 +1,109 @@ +@charset "UTF-8"; + +.post, +.post-aside, +.post-nav { + padding: 0 5%; +} + +.post-content { + margin-bottom: 3em; + + img { + border: 1px solid #eee; + display: block; + margin: 2em auto 3em; + max-width: 100%; + } + + p { + line-height: 1.8; + // word-wrap: break-word; + } + + h2, + h3, + h4 { + margin-top: 3em; + } + + h2 { + border-left: 5px solid $color-key; + padding-left: .5em; + } + + > p code { + background-color: #282c34; + border-radius: 3px; + color: #abb2bf; + font-family: monospace, 'Courier New', Courier, Monaco; + font-size: 90%; + margin: 0 .5em; + padding: 2px 4px; + // vertical-align: middle; + } + + blockquote { + background-color: #ccc; + font-style: italic; + margin: 30px 0; + padding: 30px; + + a { + font-size: .8em; + } + } +} + +.post-hr { + border-top: 1px solid #eee; + margin: 25px auto; +} + +.post-ad { + margin: 10% auto 0; + text-align: center; + + &__head { + display: block; + font-size: .8em; + } + + &__body { + display: inline-block; + } +} + +.post-nav { + ol { + padding: 0; + } + + a { + font-family: $font-family-base; + font-size: 1em; + text-decoration: none; + } +} + +.post-nav-label { + display: block; + font-weight: bold; +} + +.post-nav-title { + text-decoration: underline; +} + +.post-nav-prev { + padding-right: 2.5%; +} + +.post-nav-next { + padding-left: 2.5%; + text-align: right; +} + +.post-nav-back { + text-align: center; +} diff --git a/src/scss/modules/_variables.scss b/src/scss/modules/_variables.scss new file mode 100644 index 0000000..d34cb4e --- /dev/null +++ b/src/scss/modules/_variables.scss @@ -0,0 +1,14 @@ +@charset "UTF-8"; + +//=================================== +// color +//=================================== +// $color-key: #4052a4; +$color-key: hsl(14, 100%, 53%); +$color-link: hsl(217, 71%, 53%); + +//=================================== +// font +//=================================== +$font-family-base: "Sawarabi Gothic", Meiryo, 'メイリオ', "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "YuGothic", "游ゴシック", Helvetica, Arial, sans-serif; +$font-family-en: "Avenir Next", Helvetica, Arial, sans-serif; diff --git a/src/scss/style.scss b/src/scss/style.scss new file mode 100644 index 0000000..edc42e1 --- /dev/null +++ b/src/scss/style.scss @@ -0,0 +1,39 @@ +@charset "UTF-8"; + +@import './modules/variables'; + +*, +*::after, +*::before { + box-sizing: border-box; +} + +body { font-family: $font-family-base; } +a { + color: $color-link; + transition: .3s all; + + &:hover { + opacity: .6; + text-decoration: none; + } +} + +.wrap { + overflow: hidden; +} + +.main { + margin: 0 auto; + max-width: 1080px; + + &.main--single { + max-width: 760px; + } +} + +@import './modules/header'; +@import './modules/footer'; +@import './modules/list'; +@import './modules/single'; +@import './modules/other'; diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..84d3774 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,234 @@ +@charset "UTF-8"; +*, +*::after, +*::before { + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +body { + font-family: "Sawarabi Gothic", Meiryo, "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "YuGothic", "游ゴシック", Helvetica, Arial, sans-serif; } + +a { + color: #3273dc; + -webkit-transition: .3s all; + transition: .3s all; } + a:hover { + opacity: .6; + text-decoration: none; } + +.wrap { + overflow: hidden; } + +.main { + margin: 0 auto; + max-width: 1080px; } + .main.main--single { + max-width: 760px; } + +.header { + margin-bottom: 3em; + padding-top: 1em; + text-align: center; } + .header a { + color: #ff470f; + text-decoration: none; } + +.site-title { + display: block; + font-size: 2em; + font-weight: bold; + margin: .67em 0; } + +.search { + margin: 0 auto; + width: 300px; } + .search * { + -webkit-box-sizing: content-box; + box-sizing: content-box; } + +.footer { + background-color: slategray; + margin-top: 5em; + padding: 1em 0 3em; + text-align: center; } + .footer small { + font-size: 1em; } + +.author { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin: 0 auto; + max-width: 760px; + padding: 0 5%; + text-align: left; } + +.author__image img { + border-radius: 50%; + width: 100%; } + +.author__info { + padding-left: 5%; } + .author__info h3 { + margin-top: 0; } + +.author__links { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + list-style: none; + padding: 0; } + .author__links li { + height: 30px; + margin-left: .8em; + width: 30px; } + .author__links a:hover img { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } + .author__links img { + -webkit-transition: .6s all; + transition: .6s all; + width: 100%; } + +.articles { + padding: 0 5%; } + +.card { + margin-bottom: 2%; + padding: 2%; } + .card a { + color: inherit; + display: block; + text-decoration: none; } + .card h3, + .card p, + .card span { + font-family: "Sawarabi Gothic", Meiryo, "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "YuGothic", "游ゴシック", Helvetica, Arial, sans-serif; } + .card h3 { + margin-bottom: .5em; } + .card p { + color: #797979; } + .card__thumb { + display: block; + overflow: hidden; + padding-top: 52.65%; + position: relative; } + .card__thumb:hover img { + -webkit-transform: translate(-50%, -50%) scale(1.2); + transform: translate(-50%, -50%) scale(1.2); } + .card__thumb img { + left: 50%; + max-width: 100%; + position: absolute; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + -webkit-transition: .3s all; + transition: .3s all; } + +.pagination { + font-size: 1.2em; + text-align: center; } + .pagination__link { + display: inline-block; } + .pagination__link--prev { + margin-right: 10px; } + .pagination__link--next { + margin-left: 10px; } + .pagination__current { + display: inline-block; } + +.post, +.post-aside, +.post-nav { + padding: 0 5%; } + +.post-content { + margin-bottom: 3em; } + .post-content img { + border: 1px solid #eee; + display: block; + margin: 2em auto 3em; + max-width: 100%; } + .post-content p { + line-height: 1.8; } + .post-content h2, + .post-content h3, + .post-content h4 { + margin-top: 3em; } + .post-content h2 { + border-left: 5px solid #ff470f; + padding-left: .5em; } + .post-content > p code { + background-color: #282c34; + border-radius: 3px; + color: #abb2bf; + font-family: monospace, 'Courier New', Courier, Monaco; + font-size: 90%; + margin: 0 .5em; + padding: 2px 4px; } + .post-content blockquote { + background-color: #ccc; + font-style: italic; + margin: 30px 0; + padding: 30px; } + .post-content blockquote a { + font-size: .8em; } + +.post-hr { + border-top: 1px solid #eee; + margin: 25px auto; } + +.post-ad { + margin: 10% auto 0; + text-align: center; } + .post-ad__head { + display: block; + font-size: .8em; } + .post-ad__body { + display: inline-block; } + +.post-nav ol { + padding: 0; } + +.post-nav a { + font-family: "Sawarabi Gothic", Meiryo, "メイリオ", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "YuGothic", "游ゴシック", Helvetica, Arial, sans-serif; + font-size: 1em; + text-decoration: none; } + +.post-nav-label { + display: block; + font-weight: bold; } + +.post-nav-title { + text-decoration: underline; } + +.post-nav-prev { + padding-right: 2.5%; } + +.post-nav-next { + padding-left: 2.5%; + text-align: right; } + +.post-nav-back { + text-align: center; } + +.amazlet-box { + font-size: 1rem; + margin: 40px 0; } + +.app-data, +.appfom1 { + margin: 40px 0; } + +.appbanner { + margin: 40px 0; } + +.kaerebalink-box { + margin: 40px 0 20px; } + +.ShareInfo { + margin: 20px 0; } + +.booklink-box { + margin: 40px 0; } diff --git a/static/image/theme/favicon.ico b/static/image/theme/favicon.ico Binary files differnew file mode 100644 index 0000000..1feff00 --- /dev/null +++ b/static/image/theme/favicon.ico diff --git a/static/image/theme/logo.jpeg b/static/image/theme/logo.jpeg Binary files differnew file mode 100755 index 0000000..b2c9476 --- /dev/null +++ b/static/image/theme/logo.jpeg diff --git a/static/image/theme/og.png b/static/image/theme/og.png Binary files differnew file mode 100755 index 0000000..247a6bc --- /dev/null +++ b/static/image/theme/og.png diff --git a/static/js/script.js b/static/js/script.js new file mode 100644 index 0000000..658b70d --- /dev/null +++ b/static/js/script.js @@ -0,0 +1 @@ +// 自由に編集してください diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..e945b7a --- /dev/null +++ b/theme.toml @@ -0,0 +1,21 @@ +# theme.toml template for a Hugo theme +# See https://github.com/spf13/hugoThemes#themetoml for an example + +name = "Hestia Pure" +license = "MIT" +licenselink = "https://github.com/diwao/hestia-pure/blob/master/LICENSE.md" +description = "" +homepage = "http://diwao.com/hestia-pure/" +tags = ["", ""] +features = ["", ""] +min_version = 0.18 + +[author] + name = "diwao" + homepage = "http://diwao.com/" + +# If porting an existing theme +[original] + name = "" + homepage = "" + repo = "" |