Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4969cd4
Showing
42 changed files
with
1,565 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 pdevty | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Material-Design | ||
|
||
Material-Design is a material design theme for [Hugo](http://gohugo.io/). | ||
|
||
## Features | ||
|
||
- Material Design | ||
- Google Analytics | ||
- Pagination | ||
- Disqus | ||
- Social links (Twitter, Facebook, GitHub) | ||
- Tags | ||
- Categories | ||
- Highlighting source code | ||
|
||
## Installation | ||
|
||
```shell | ||
$ mkdir themes | ||
$ cd themes | ||
$ git clone https://github.com/pdevty/material-design | ||
``` | ||
|
||
## Configuration | ||
|
||
`config.toml` | ||
|
||
```toml | ||
theme="material-design" | ||
baseurl = "Your Site URL" | ||
languageCode = "en-us" | ||
title = "Your Site Title" | ||
MetaDataFormat = "toml" | ||
paginate = 9 | ||
disqusShortname = "Your Disqus Name" | ||
copyright = "© 2015 Copyright Text" | ||
|
||
[params] | ||
description = "Your Site Description" | ||
twitter = "Your Twitter Name" | ||
github = "Your Github Name" | ||
facebook = "Your facebook Name" | ||
headerCover = "images/default.png" | ||
footerCover = "images/default.png" | ||
googleAnalyticsUserID = "Your Analytics User Id" | ||
``` | ||
|
||
## Usage | ||
|
||
```shell | ||
$ hugo server -t material-design -w -D | ||
``` | ||
|
||
## Contributing | ||
|
||
1. Fork it | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create new Pull Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
+++ | ||
Description = "" | ||
Tags = [] | ||
Categories = [] | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ partial "header.html" . }} | ||
|
||
<div class="container"> | ||
<div class="section"> | ||
|
||
{{ partial "content.html" . }} | ||
|
||
{{ partial "pagination.html" .Paginator }} | ||
|
||
</div> | ||
</div> | ||
|
||
{{ partial "footer.html" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{{ partial "header.html" . }} | ||
{{ $baseurl := .Site.BaseUrl }} | ||
|
||
<div class="container"> | ||
<div class="section"> | ||
|
||
<div class="row"> | ||
<div class="col s12"> | ||
<div class="card-panel"> | ||
<h4>{{ .Title }}</h4> | ||
<p> | ||
{{if .Params.categories }} | ||
{{ range $index, $category := .Params.categories }} | ||
<a href="{{$baseurl}}categories/{{ $category | urlize }}/">{{ $category }}</a> | ||
{{ end }} | ||
{{end}} | ||
</p> | ||
<p>{{ .Content }}</p> | ||
<p>{{ .Date.Format "2 Jan 2006" }} | ||
{{if .Params.tags }} | ||
{{ range $index, $tag := .Params.tags }} | ||
<a href="{{$baseurl}}tags/{{ $tag | urlize }}/">#{{ $tag }}</a> | ||
{{ end }} | ||
{{end}} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col s3 m1"> | ||
{{if .Prev}} | ||
<a class="btn-floating btn-large waves-effect waves-light" href="{{ .Prev.Permalink }}"><i class="mdi-navigation-arrow-back"></i></a> | ||
{{else}} | ||
<a class="btn-floating btn-large disabled"><i class="mdi-navigation-arrow-back"></i></a> | ||
{{end}} | ||
</div> | ||
<div class="col s6 m10 center"> </div> | ||
<div class="col s3 m1"> | ||
{{if .Next}} | ||
<a class="btn-floating btn-large waves-effect waves-light" href="{{ .Next.Permalink }}"><i class="mdi-navigation-arrow-forward"></i></a> | ||
{{else}} | ||
<a class="btn-floating btn-large disabled"><i class="mdi-navigation-arrow-forward"></i></a> | ||
{{end}} | ||
</div> | ||
</div> | ||
|
||
{{ with .Site.DisqusShortname }} | ||
{{ partial "disqus.html" . }} | ||
{{ end }} | ||
|
||
</div> | ||
</div> | ||
|
||
{{ partial "footer.html" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ partial "header.html" . }} | ||
|
||
<div class="container"> | ||
<div class="section"> | ||
|
||
{{ partial "content.html" . }} | ||
|
||
{{ partial "pagination.html" .Paginator }} | ||
|
||
</div> | ||
</div> | ||
|
||
{{ partial "footer.html" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{ $baseurl := .Site.BaseUrl }} | ||
<div class="row"> | ||
{{range $index, $page := .Paginator.Pages}} | ||
{{ if and (modBool $index 3) (ne 0 $index) }} | ||
</div> | ||
<div class="row"> | ||
{{ end }} | ||
<div class="col m4 s12"> | ||
<div class="card-panel"> | ||
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4> | ||
<p> | ||
{{if .Params.categories }} | ||
{{ range $index, $category := .Params.categories }} | ||
<a href="{{$baseurl}}categories/{{ $category | urlize }}/">{{ $category }}</a> | ||
{{ end }} | ||
{{end}} | ||
</p> | ||
<p>{{ .Summary }}</p> | ||
<p> | ||
{{ .Date.Format "2 Jan 2006" }} | ||
{{if .Params.tags }} | ||
{{ range $index, $tag := .Params.tags }} | ||
<a href="{{$baseurl}}tags/{{ $tag | urlize }}/">#{{ $tag }}</a> | ||
{{ end }} | ||
{{end}} | ||
</p> | ||
</div> | ||
</div> | ||
{{ end }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div id="disqus_thread"></div> | ||
<script type="text/javascript"> | ||
|
||
(function() { | ||
// Don't ever inject Disqus on localhost--it creates unwanted | ||
// discussions from 'localhost:1313' on your Disqus account... | ||
if (window.location.hostname == "localhost") | ||
return; | ||
|
||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
var disqus_shortname = '{{ . }}'; | ||
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="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<footer class="page-footer"> | ||
<div class="footer-copyright"> | ||
<div class="container"> | ||
{{.Site.Copyright}} | ||
</div> | ||
</div> | ||
</footer> | ||
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | ||
<script src="{{.Site.BaseUrl}}js/materialize.min.js"></script> | ||
<script src="{{.Site.BaseUrl}}js/init.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
{{with .Site.Params.googleAnalyticsUserID }} | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{.Site.LanguageCode}}"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/> | ||
<title>{{ .Title }}</title> | ||
<link href="{{.Site.BaseUrl}}css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/> | ||
<link href="{{.Site.BaseUrl}}css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/styles/default.min.css"> | ||
<style type="text/css"> | ||
footer.page-footer{background-image: url({{.Site.BaseUrl}}{{.Site.Params.footerCover}});} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="index-banner" class="parallax-container"> | ||
<div class="section no-pad-bot"> | ||
<div class="container"> | ||
<h1 class="header center teal-text text-lighten-2"><a href="{{.Site.BaseUrl}}">{{.Site.Title}}</a></h1> | ||
<div class="row center"> | ||
<h5 class="header col s12 light">{{.Site.Params.description}}</h5> | ||
</div> | ||
<div class="row center"> | ||
{{if .Site.Params.github}} | ||
<a href="https://github.com/{{ .Site.Params.github }}"><img src="{{.Site.BaseUrl}}images/github2-dreamstale35.png"></a> | ||
{{end}} | ||
{{if .Site.Params.facebook}} | ||
<a href="https://www.facebook.com/{{.Site.Params.facebook}}"><img src="{{.Site.BaseUrl}}images/facebook-dreamstale25.png"></a> | ||
{{end}} | ||
{{if .Site.Params.twitter}} | ||
<a href="https://twitter.com/{{.Site.Params.twitter}}"><img src="{{.Site.BaseUrl}}images/twitter-dreamstale71.png"></a> | ||
{{end}} | ||
<a href="{{.Site.BaseUrl}}index.xml"><img src="{{.Site.BaseUrl}}images/feed-dreamstale27.png"></a> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="parallax"><img src="{{.Site.BaseUrl}}{{.Site.Params.headerCover}}"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="row"> | ||
<div class="col s3 m1"> | ||
{{if .HasPrev}} | ||
<a class="btn-floating btn-large waves-effect waves-light" href="{{ .Prev.Url }}"><i class="mdi-navigation-arrow-back"></i></a> | ||
{{else}} | ||
<a class="btn-floating btn-large disabled"><i class="mdi-navigation-arrow-back"></i></a> | ||
{{end}} | ||
</div> | ||
<div class="col s6 m10 center"> </div> | ||
<div class="col s3 m1"> | ||
{{if .HasNext}} | ||
<a class="btn-floating btn-large waves-effect waves-light" href="{{ .Next.Url }}"><i class="mdi-navigation-arrow-forward"></i></a> | ||
{{else}} | ||
<a class="btn-floating btn-large disabled"><i class="mdi-navigation-arrow-forward"></i></a> | ||
{{end}} | ||
</div> | ||
</div> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* Custom Stylesheet */ | ||
|
||
nav ul a, | ||
nav .brand-logo { | ||
color: #444; | ||
} | ||
p { | ||
line-height: 2rem; | ||
} | ||
|
||
.button-collapse { | ||
color: #26a69a; | ||
} | ||
|
||
.parallax-container { | ||
min-height: 380px; | ||
line-height: 0; | ||
height: auto; | ||
color: rgba(255,255,255,.9); | ||
} | ||
.parallax-container .section { | ||
width: 100%; | ||
} | ||
|
||
@media only screen and (max-width : 992px) { | ||
.parallax-container .section { | ||
position: absolute; | ||
top: 40%; | ||
} | ||
#index-banner .section { | ||
top: 10%; | ||
} | ||
} | ||
|
||
@media only screen and (max-width : 600px) { | ||
#index-banner .section { | ||
top: 0; | ||
} | ||
} | ||
|
||
|
||
.icon-block { | ||
padding: 0 15px; | ||
} | ||
|
||
footer.page-footer { | ||
margin: 0; | ||
} |
Oops, something went wrong.