Skip to content

Commit

Permalink
add theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlok committed Apr 7, 2016
1 parent 4b5e05b commit 4b54cc7
Show file tree
Hide file tree
Showing 24 changed files with 1,176 additions and 0 deletions.
1 change: 1 addition & 0 deletions themes/angels-ladder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
20 changes: 20 additions & 0 deletions themes/angels-ladder/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2015 Asuka Suzuki

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.
106 changes: 106 additions & 0 deletions themes/angels-ladder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Angel's Ladder

## Overview

Angel's Ladder is a simple blog theme for Hugo.

* Simple and clean design
* Responsive design
* Pagination
* Tagging
* Disqus
* Source code highlighting
* Google Analytics

## Screenshot

All of the display [here](https://github.com/tanksuzuki/angels-ladder/tree/master/images/tn_full.png).

![](https://raw.githubusercontent.com/tanksuzuki/angels-ladder/master/images/readme.png?token=ALXg6utVKJxUhSjlO_-voAEgA75oYTseks5VXtd1wA%3D%3D)


## Installation

Clone this repository to your hugo theme directory.

```
cd themes
git clone https://github.com/tanksuzuki/angels-ladder
hugo server -t angels-ladder -D -w
```


## Configuration

To take full advantage of the features in this theme, you can add variables to your site config file.

The following is the example configuration.

```
baseurl = "http://tanksuzuki.com/"
languageCode = "ja"
title = "TANKSUZUKI.COM"
disqusShortname = "tanksuzuki"
[Params]
subtitle = "I would like to be a layer 3 switch."
facebook = "https://facebook.com/foobar"
twitter = "https://twitter.com/foobar"
github = "https://github.com/foobar"
showsRSS = true
profile = "/images/profile.png"
copyright = "Written by Asuka Suzuki"
analytics = "UA-XXXXXXXX-X"
shareThis = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
```

Details of each parameter are as follows.

| Parameter | Required | Comment |
| :--- | :--- | :--- |
| baseurl | yes | Enter the title of your site. |
| languageCode | yes | Enter the language code of HTML. Example: en, ja. |
| title | yes | Enter the title of your site. |
| disqusShortname | no | Enter the short name of the disqus. If you do not enter, disqus section is hidden. |
| subtitle | no | Enter the subtitle of your site. If you do not enter, subtitle is hidden. |
| facebook | no | Enter the URL of Facebook. If you do not enter, the link is hidden. |
| twitter | no | Enter the URL of Twitter. If you do not enter, the link is hidden. |
| github | no | Enter the URL of Github. If you do not enter, the link is hidden. |
| showsRSS | no | Enter true to show the URL of RSS. If you enter false or nothing, the link is hidden. |
| profile | no | Enter the path to the profile image. If you do not enter, profile section will be hidden. |
| copyright | no | Enter the copyright notice. If you do not enter, copyright display is hidden. |
| analytics | no | Enter the tracking ID of Google analytics. If you do not enter, the analysis will be skipped. |
| shareThis | no | Enter the publisher key of ShareThis. If you do not enter, the ShareThis buttons are hidden. |


## Style Customization

To change the theme color, edit the `layouts/static/theme.less`.
Then compile the LESS file by using [one of LESS compilers](http://leafo.net/lessphp/editor.html),
and replace the content of `layouts/static/theme.css` with the compiled CSS.

The default theme color is `#29abe2`.
Please change the favorite color.

```
/* Theme color
--------------------------------------------------*/
@color: #29abe2;
```

For original styles, please edit the `layouts/static/custom.css`.


## License

Open sourced under the [MIT license](https://github.com/tanksuzuki/angels-ladder/blob/master/LICENSE.md).


## Author

Asuka Suzuki


## Contact

Please contact me via [email](https://github.com/tanksuzuki) / [Twitter](https://twitter.com/tanksuzuki) :smile:
Empty file.
Binary file added themes/angels-ladder/images/readme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/angels-ladder/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/angels-ladder/images/tn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/angels-ladder/images/tn_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions themes/angels-ladder/layouts/_default/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'tanksuzuki';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
20 changes: 20 additions & 0 deletions themes/angels-ladder/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ partial "header.html" . }}

<!-- Main Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<main id="list" role="main">
<div class="article-header light-gray"><h1>#{{ .Title }}</h1></div>
{{ range .Data.Pages }}
<div class="summary">
<h2><a href="{{ .RelPermalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a></h2>
<div class="meta">
{{ .Date.Format "Jan 2, 2006" }} &nbsp;
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</div>
</div>
{{ end }}
</main>

{{ partial "footer.html" . }}
43 changes: 43 additions & 0 deletions themes/angels-ladder/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{ partial "header.html" . }}

<!-- Main Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<main id="single" role="main">
<div class="article-header">
<h1>{{ .Title }}</h1>
<div class="meta">
{{ .Date.Format "Jan 2, 2006" }} &nbsp;
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</div>
</div>
<article>
{{ .Content }}

<!-- ShareThis Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
{{ with .Site.Params.shareThis }}
<div id="share-this" class="col span_10">
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_googleplus_large' displayText='Google +'></span>
<span class='st_pocket_large' displayText='Pocket'></span>
<span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_email_large' displayText='Email'></span>
</div>
{{ end }}
</article>
{{ partial "disqus.html" . }}
</main>

<nav class="pagination-single">
{{ if .Next }}
<span class="previous">&larr; <a href="{{ .Next.RelPermalink }}" rel="prev">{{ .Next.Title }}</a></span>
{{ end }}
{{ if .Prev }}
<span class="next"><a href="{{ .Prev.RelPermalink }}" rel="next">{{ .Prev.Title }}</a> &rarr;</span>
{{ end }}
</nav>

{{ partial "footer.html" . }}
31 changes: 31 additions & 0 deletions themes/angels-ladder/layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{ partial "header.html" . }}


<!-- Main Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<main id="index" role="main">
<div class="article-header light-gray"><h1>Recent Articles</h1></div>
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
<div class="summary">
<h2><a href="{{ .RelPermalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a></h2>
<div class="meta">
{{ .Date.Format "Jan 2, 2006" }} &nbsp;
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</div>
</div>
{{ end }}
</main>


<!-- Paginator Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<nav>
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ template "_internal/pagination.html" . }}
</nav>


{{ partial "footer.html" . }}
15 changes: 15 additions & 0 deletions themes/angels-ladder/layouts/partials/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

{{ with .Site.DisqusShortname }} <aside><div id="disqus_thread"></div></aside> {{ end }}

<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = '{{ .Site.DisqusShortname }}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
27 changes: 27 additions & 0 deletions themes/angels-ladder/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

<!-- Footer Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<footer role="contentinfo">
<div style="text-align:center;">
{{ with .Site.Params.profile }}<img src="{{ . }}" width="64" height="64"><br>{{ end }}
{{ .Site.Params.copyright }}
</div>
</footer>


</div>

<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

{{ with .Site.Params.analytics }}<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 }}

</body>
</html>
68 changes: 68 additions & 0 deletions themes/angels-ladder/layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

<!DOCTYPE html>
<html lang="{{.Site.LanguageCode}}">
<head>

<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="UTF-8">
<title>
{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} | {{ .Site.Title }}{{ end }}
</title>


<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1,initial-scale=1">

<!-- HTTPS Canonical URL
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="canonical" href="{{ .Permalink }}"/>

<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="/css/sanitize.css">
<link rel="stylesheet" href="/css/responsive.css">
<link rel="stylesheet" href="/css/highlight_monokai.css">
<link rel="stylesheet" href="/css/theme.css">
<link rel="stylesheet" href="/css/custom.css">

<!-- RSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="{{ .Site.BaseURL }}index.xml" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .Site.BaseURL }}index.xml" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />

<!-- ShareThis Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
{{ with .Site.Params.shareThis }}
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: '{{ . }}', doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>
{{ end }}


</head>



<body>
<div class="container">

<!-- Header Section Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<header role="banner">
<div class="row gutters">
<div id="site-title" class="col span_6">
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
{{ with .Site.Params.subtitle }}<h2>{{ . }}</h2>{{ end }}
</div>
<div id="social" class="col span_6">
<ul>
{{ with .Site.Params.twitter }}<li><a href="{{ . }}" target="_blank">Twitter</a></li>{{ end }}
{{ with .Site.Params.facebook }}<li><a href="{{ . }}" target="_blank">Facebook</a></li>{{ end }}
{{ with .Site.Params.github }}<li><a href="{{ . }}" target="_blank">GitHub</a></li>{{ end }}
{{ if .Site.Params.showsRSS }}<li><a href="{{ .Site.BaseURL }}index.xml" type="application/rss+xml" target="_blank">RSS</a></li>{{ end }}
</ul>
</div>
</div>
</header>
Empty file.
Loading

0 comments on commit 4b54cc7

Please sign in to comment.