Permalink
Browse files

rebuild

  • Loading branch information...
1 parent f3ce302 commit 32d60cf8116bb2306422066844430aaac052bacb Daisuke Tsuji committed Oct 3, 2016
View
@@ -1,21 +1,20 @@
-# The MIT License (MIT)
+The MIT License (MIT)
-Copyright (c) 2014 Daisuke Tsuji.
+Copyright (c) 2016 Daisuke Tsuji
-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:
+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 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.
+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.
View
@@ -1,63 +1,96 @@
+# What is this.
+
+This is the Bootstrap3 based theme for Hugo.
+
+[Hugo :: A fast and modern static website engine](https://gohugo.io/)
+
+## PC View
+
![screenshot](https://raw.githubusercontent.com/dim0627/hugo_theme_beg/master/images/screenshot.png)
+## SP View(Responsive)
+
+![screenshot](https://raw.githubusercontent.com/dim0627/hugo_theme_beg/master/images/responsive.png)
+
# Features
+* Responsive design
* Google Analytics
+* Thumbnail
+* Structured data(Article and Breadcrumb)
+* Twitter cards
+* OGP
* Disqus
-* Share Buttons(fb, twitter, google+, pocket)
-* Eye-catching Image
-* MicroData
-* Readable text(Customized Vertical Rhythm).
-
-# Installation
-
-[hugoThemes#Installing Themes](https://github.com/spf13/hugoThemes#installing-themes).
-# Configuration
+# `config.toml` example
-**config.yaml**
+```
+baseurl = "https://example.com/"
+title = "SiteTitle"
-``` toml
-baseurl = "http://hugo.spf13.com/"
-title = "Hugo Themes"
-author = "Steve Francia"
-copyright = "Copyright (c) 2008 - 2014, Steve Francia; all rights reserved."
-canonifyurls = true
-paginate = 3
+googleAnalytics = "UA-XXXXXXXX-XX" # Optional
+disqusShortname = "XYW"
[params]
- disqusShortname = "your disqus id." # optional
- toc = true # optional, When set to TRUE this parameter, table of contents appears in all articles.
+ dateformat = "Jan 2, 2006" # Optional # Optional
```
-**example post**
+# Frontmatter example
-``` toml
+```
+++
-title = "Getting Started with Hugo"
-description = ""
-tags = [
- "go",
- "golang",
- "hugo",
- "development",
-]
-date = "2014-04-02"
-categories = [
- "Development",
- "golang",
-]
-
-image = "image.jpg" # optional
-toc = true # optional, When set to TRUE this parameter, table of contents appears in only this article.
+date = "2016-09-28T17:00:00+09:00"
+title = "Article title here"
+thumbnail = "thumbnail.jpg" # Optional, referenced at `$HUGO_ROOT/static/images/thumbnail.jpg`
+++
+```
+
+# Header menu
-Contents here
+[Hugo \- Menus](https://gohugo.io/extras/menus/)
+
+# Shortcodes
+
+## Image
+
+```
+{{% img src="images/image.jpg" %}}
+{{% img src="images/image.jpg" class="right" %}}
+{{% img src="images/image.jpg" class="left" %}}
+{{% img src="images/image.jpg" caption="Referenced from wikipedia." href="https://en.wikipedia.org/wiki/Lorem_ipsum" %}}
```
-# Contact us
+![screenshot](https://raw.githubusercontent.com/dim0627/hugo_theme_beg/master/images/include-images.png)
+
+## Clear
+
+Break float.
+
+```
+{{% img src="images/image.jpg" class="right" %}}
+
+brabrabra # Displayed left of the image.
+
+{{% clear %}}
+
+brabrabra # Displayed below of the image.
+```
+
+# Development mode
+
+Supported development mode.
+
+```
+env HUGO_ENV="DEV" hugo server --watch --buildDrafts=true --buildFuture=true -t beg
+```
+
+This mode is
+
+* Not show Google Analytics tags.
+* Show `IsDraft`.
+* Show `WordCount`.
-Please mail to `dim0627@gmail.com` or SNS.
+![screenshot](https://raw.githubusercontent.com/dim0627/hugo_theme_beg/master/images/development-mode.png)
-[https://www.facebook.com/daisuke.tsuji.735](https://www.facebook.com/daisuke.tsuji.735)
+And set `{{ if ne (getenv "HUGO_ENV") "DEV" }} Set elements here. {{ end }}` if you want to place only in a production environment.
View
@@ -1,23 +0,0 @@
-BaseUrl: "http://example.com"
-LanguageCode: "en-us"
-Title: "Beg"
-
-Params:
- Author: "Your name."
- DateForm: "Mon, Jan 2, 2006"
- GoogleAnalyticsUserID: "Your ID."
- Facebook: "Your ID."
- Twitter: "Your ID."
- Github: "Your ID."
- ShowRelatedPost: True
- Disqus: "Your Disqus."
- SyntaxHighlightTheme: "solarized_dark.min.css"
-
-Indexes:
- tag: "tags"
-
-permalinks:
- post: /blog/:year/:month/:day/:title/
-
-MetadataFormat: "yaml"
-
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,7 @@
+{{ define "title" }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ end }}
+
+{{ define "main" }}
+<header class="page-header">
+ <h1>{{ .Title }}</h1>
+</header>
+{{ end }}
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ {{ partial "meta.html" . }}
+ <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
+ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css">
+ <title>{{ block "title" . }}{{ end }}{{ .Site.Title }}</title>
+ {{ block "meta" . }}{{ end }}
+ <link href="{{ .Site.BaseURL }}css/styles.css" rel="stylesheet">
+ </head>
+
+ <body>
+ {{ if ne (getenv "HUGO_ENV") "DEV" }}
+ <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','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ .Site.GoogleAnalytics }}', 'auto'); ga('send', 'pageview'); </script>
+ {{ end }}
+
+ <header class="l-header">
+ <nav class="navbar navbar-default">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
+ </div>
+
+ <div id="navbar" class="collapse navbar-collapse">
+ {{ range .Site.Menus }}
+ <ul class="nav navbar-nav navbar-right">
+ {{ range . }}
+ {{ if .HasChildren }}
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ {{ range .Children }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+ </li>
+ {{ else }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ {{ end }}
+ </div>
+
+ </div>
+ </nav>
+ </header>
+
+ <main>
+ <div class="container">
+ {{ block "main" . }}{{ end }}
+ </div>
+ </main>
+
+ <footer class="l-footer">
+ <div class="container">
+ <p>{{ with .Site.Copyright }}{{ . | safeHTML }}{{ else }}<span class="h-logo">&copy; {{ .Site.Title }}</span>{{ end }}</p>
+ <aside>
+ <p>Powered by <a href="https://gohugo.io/">Hugo</a>.</p>
+ <p><a href="https://github.com/dim0627/hugo_theme_beg">Beg</a> designed by <a href="http://yet.unresolved.xyz/">Daisuke Tsuji</a>.</p>
+ </aside>
+ </div>
+ </footer>
+
+ <script src="//code.jquery.com/jquery-3.1.1.min.js"></script>
+ <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
+ <script>hljs.initHighlightingOnLoad();</script>
+ </body>
+</html>
+
@@ -1,14 +1,20 @@
<article class="li">
<header>
- <div class="date">{{ with .Site.Params.DateForm }}{{ $.Date.Format . }}{{ else }}{{ $.Date.Format "Mon, Jan 2, 2006" }}{{ end }}</div>
- <div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
+ <ul class="p-facts">
+ <li><i class="fa fa-calendar" aria-hidden="true"></i><time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05JST" }}">{{ .Lastmod.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}</time></li>
+ {{ with .Section }}<li><i class="fa fa-bookmark" aria-hidden="true"></i><a href="{{ $.Site.BaseURL }}{{ . | urlize }}/">{{ . }}</a></li>{{ end }}
+ {{ if eq (getenv "HUGO_ENV") "DEV" }}
+ <li>{{ .WordCount }} Words</li>
+ {{ if .IsDraft }}<li style="color: #2196f3;">DRAFT</li>{{ end }}
+ {{ end }}
+ </ul>
+ <h2 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
- <div class="body">{{ if .Truncated }}{{ .Summary }}{{ else }}{{ .Content }}{{ end }}</div>
- {{ if .Truncated }}
+ {{ with .Params.thumbnail }}<a href="{{ $.Permalink }}" class="thumb" title="{{ $.Title }}" style="background-image: url({{ $.Site.BaseURL }}{{ . }});"></a>{{ end }}
+ <div class="summary">{{ .Summary }}</div>
+
<footer>
- <a href="{{ .Permalink }}" class="btn btn-default">Read More…</a>
+ <a href="{{ .Permalink }}" title="{{ .Title }}">Read More…</a>
</footer>
- {{ end }}
</article>
-<hr>
@@ -0,0 +1,13 @@
+<article class="li sm">
+ <header>
+ <ul class="p-facts">
+ <li><i class="fa fa-calendar" aria-hidden="true"></i><time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05JST" }}">{{ .Lastmod.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}</time></li>
+ {{ with .Section }}<li><i class="fa fa-bookmark" aria-hidden="true"></i><a href="{{ $.Site.BaseURL }}{{ . | urlize }}/">{{ . }}</a></li>{{ end }}
+ {{ if eq (getenv "HUGO_ENV") "DEV" }}
+ <li>{{ .WordCount }} Words</li>
+ {{ if .IsDraft }}<li style="color: #2196f3;">DRAFT</li>{{ end }}
+ {{ end }}
+ </ul>
+ <div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
+ </header>
+</article>
@@ -1,19 +1,25 @@
-{{ partial "default_head.html" . }}
-<div class="list">
+{{ define "title" }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ end }}
- <div class="row">
- <div class="col-md-8">
- <header class="page-title">{{ .Title }}</header>
+{{ define "main" }}
+<div class="row">
+ <div class="col-md-8">
+ {{ if not .IsHome }}
+ <header class="page-header">
+ <h1>{{ .Title }}</h1>
+ </header>
+ {{ end }}
+
+ <ul class="p-articles">
{{ range (.Paginate .Data.Pages).Pages }}
- {{ .Render "li" }}
+ <li>{{ .Render "li" }}</li>
{{ end }}
- {{ partial "pagination.html" . }}
- </div>
- <div class="col-md-4">
- {{ partial "sidebar.html" . }}
- </div>
- </div>
+ </ul>
+ {{ partial "pagination.html" . }}
+ </div>
+ <div class="col-md-4">
+ {{ partial "sidebar.html" . }}
+ </div>
</div>
-{{ partial "default_foot.html" . }}
+{{ end }}
Oops, something went wrong.

0 comments on commit 32d60cf

Please sign in to comment.