Added theme back properly
This commit is contained in:
21
themes/hugo-uno/layouts/_default/list.html
Normal file
21
themes/hugo-uno/layouts/_default/list.html
Normal file
@ -0,0 +1,21 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<h2>{{ .Key }}</h2>
|
||||
<ul id="list">
|
||||
{{range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }} {{ if .GetParam "draft"}}DRAFT{{end}}</a>
|
||||
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
15
themes/hugo-uno/layouts/_default/single.html
Normal file
15
themes/hugo-uno/layouts/_default/single.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<div class="post">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
36
themes/hugo-uno/layouts/_default/terms.html
Normal file
36
themes/hugo-uno/layouts/_default/terms.html
Normal file
@ -0,0 +1,36 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<section id="main">
|
||||
<div>
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
<style type="text/css">
|
||||
#double ul{
|
||||
width:760px;
|
||||
margin-bottom:20px;
|
||||
overflow:hidden;
|
||||
}
|
||||
#double li{
|
||||
line-height:1.5em;
|
||||
float:left;
|
||||
display:inline;
|
||||
width:50%;
|
||||
}
|
||||
</style>
|
||||
<ul id="double">
|
||||
{{ $data := .Data }}
|
||||
{{ range $key, $value := .Data.Terms }}
|
||||
<li>
|
||||
<a href="{{ $key | urlize }}">{{ $key }}</a> {{ len $value }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
24
themes/hugo-uno/layouts/index.html
Normal file
24
themes/hugo-uno/layouts/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<section id="main">
|
||||
<div>
|
||||
{{ range first 10 .Data.Pages }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</br>
|
||||
<h4>
|
||||
<a href="{{ .Site.BaseURL }}/post/">Archive</a>
|
||||
</h4>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" .}}
|
||||
{{ partial "script.html" .}}
|
||||
</body>
|
||||
</html>
|
14
themes/hugo-uno/layouts/pages/single.html
Normal file
14
themes/hugo-uno/layouts/pages/single.html
Normal file
@ -0,0 +1,14 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<div class="post">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
37
themes/hugo-uno/layouts/partials/comments.html
Normal file
37
themes/hugo-uno/layouts/partials/comments.html
Normal file
@ -0,0 +1,37 @@
|
||||
{{ if .Site.Params.muut }}
|
||||
<section class="post-comments">
|
||||
<a class="muut" href="https://muut.com/i/{{ .Site.Params.muut }}/comments:{{ .Title }}">Comments</a>
|
||||
<script src="//cdn.muut.com/1/moot.min.js"></script>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.discourse }}
|
||||
<div id="discourse-comments"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var discourseUrl = {{ .Site.Params.discourse }},
|
||||
discourseEmbedUrl = {{ .Permalink }};
|
||||
|
||||
(function() {
|
||||
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
|
||||
d.src = discourseUrl + 'javascripts/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.disqus }}
|
||||
<div id="disqus_thread"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var disqusUsername = {{ .Site.Params.disqus }};
|
||||
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
|
||||
s.src = '//' + disqusUsername + '.disqus.com/embed.js';
|
||||
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
||||
{{ end }}
|
1
themes/hugo-uno/layouts/partials/footer.html
Normal file
1
themes/hugo-uno/layouts/partials/footer.html
Normal file
@ -0,0 +1 @@
|
||||
<footer class="footer"></footer>
|
20
themes/hugo-uno/layouts/partials/head.html
Normal file
20
themes/hugo-uno/layouts/partials/head.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<!-- Enable responsiveness on mobile devices-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<title> {{ .Title }} · {{ .Site.Title }} </title>
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/uno.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/lightGallery.css" />
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<!-- RSS -->
|
||||
<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<!-- Script -->
|
||||
<script src="{{ .Site.BaseURL }}/js/jquery.min.js"></script>
|
||||
<script src="{{ .Site.BaseURL }}/js/main.min.js">
|
||||
</script>
|
||||
</head>
|
0
themes/hugo-uno/layouts/partials/script.html
Normal file
0
themes/hugo-uno/layouts/partials/script.html
Normal file
13
themes/hugo-uno/layouts/partials/sharing.html
Normal file
13
themes/hugo-uno/layouts/partials/sharing.html
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="sharing">
|
||||
<a href="https://twitter.com/intent/tweet?status={{ .Title }}-{{ .Permalink }}" target="_blank" title="Follow me on Twitter" class="twitter">
|
||||
<span class="fa fa-twitter-square fa-3x"></span></a>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Join me on Facebook" class="facebook">
|
||||
<span class="fa fa-facebook-square fa-3x"></span></a>
|
||||
<a href="https://plus.google.com/share?url={{ .Permalink }}" target="_blank" title="Google+" class="googleplus">
|
||||
<span class="fa fa-google-plus-square fa-3x"></span></a>
|
||||
<a href="http://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="LinkedIn" class="linkedin">
|
||||
<span class="fa fa-linkedin-square fa-3x"></span></a>
|
||||
<a href="http://www.reddit.com/submit?url={{ .Permalink }}" target="_blank" title="Reddit" class="reddit"><span class="fa fa-reddit-square fa-3x"></span></a>
|
||||
<a href="http://www.stumbleupon.com/submit?url={{ .Permalink }}" target="_blank" title="StumbleUpon" class="stumbleupon"><span class="fa fa-stumbleupon fa-3x">
|
||||
</span></a>
|
||||
</div>
|
73
themes/hugo-uno/layouts/partials/sidebar.html
Normal file
73
themes/hugo-uno/layouts/partials/sidebar.html
Normal file
@ -0,0 +1,73 @@
|
||||
<div id="scriptHeader">
|
||||
<span class="mobile btn-mobile-menu">
|
||||
<i class="fa fa-bars btn-mobile-menu__icon"></i>
|
||||
<i class="fa fa-times btn-mobile-close__icon hidden"> </i>
|
||||
</span>
|
||||
<header class="
|
||||
{{ if .IsNode }}
|
||||
{{ if or (eq .URL "/post/") (in .URL "/tags/") (in .URL "/categories/") }}
|
||||
panel-cover panel-cover--collapsed
|
||||
{{ else }}
|
||||
panel-cover
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
panel-cover panel-cover--collapsed
|
||||
{{ end }}" {{ if .Site.Params.cover }} style="background-image: url({{ .Site.Params.cover }})" {{ end }}>
|
||||
<div class="panel-main">
|
||||
<div class="panel-main__inner panel-inverted">
|
||||
<div class="panel-main__content"> {{ if .Site.Params.logo }}
|
||||
<a href="{{ .Site.BaseURL }}/" title="link to homepage for {{ .Site.Title }}"> <img src="{{ .Site.Params.logo }}" width="80" alt="{{ .Site.Title }} logo" class="panel-cover__logo logo" /> </a> {{ end }}
|
||||
<h1 class="panel-cover__title panel-title">
|
||||
<a href="{{ .Site.BaseURL }}/" title="link to homepage for {{ .Site.Title }}">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
<hr class="panel-cover__divider" />
|
||||
<p class="panel-cover__description"> {{ if .Site.Params.description }} {{ .Site.Params.description }} {{ else }} This site is built using <a href="http://gohugo.io">hugo</a> and the theme is built by <a href="http://fredrikloch.me">Fredrik</a> if you enjoy it, it is available at <a href="https://github.com/SenjinDarashiva/hugo-uno">github</a> {{end}} </p>
|
||||
<hr class="panel-cover__divider panel-cover__divider--secondary" />
|
||||
<div class="navigation-wrapper">
|
||||
<nav class="cover-navigation cover-navigation--primary">
|
||||
<ul class="navigation">
|
||||
<li class="navigation__item"><a href="{{ .Site.BaseURL }}#blog" title="link to {{ .Site.Title }} blog" class="blog-button">Blog</a> </li></br>
|
||||
{{ if .Site.Params.cv }}<li class="navigation__item"><a href="{{ .Site.Params.cv }}" title="link to my CV " class="blog-button">CV</a> </li></br> {{ end }}
|
||||
{{ if .Site.Params.legalnotice }}<li class="navigation__item"><a href="{{ .Site.Params.legalnotice }}" title="link to the legal notice " class="blog-button">Legal notice</a> </li></br> {{ end }}
|
||||
</ul>
|
||||
</nav> {{ partial "social.html" . }} </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-cover--overlay"></div>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
<noscript>
|
||||
<style>
|
||||
#scriptHeader {display:none;}
|
||||
.navigation-wrapper{
|
||||
display: block;
|
||||
top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<header class="panel-cover panel-cover--collapsed" style="background-image: url({{ .Site.Params.cover }})">
|
||||
<div class="panel-main">
|
||||
<div class="panel-main__inner panel-inverted">
|
||||
<div class="panel-main__content"> {{ if .Site.Params.logo }}
|
||||
<a href="{{ .Site.BaseURL }}/" title="link to homepage for {{ .Site.Title }}"> <img src="{{ .Site.Params.logo }}" width="80" alt="{{ .Site.Title }} logo" class="panel-cover__logo logo" /> </a> {{ end }}
|
||||
<h1 class="panel-cover__title panel-title">
|
||||
<a href="{{ .Site.BaseURL }}/" title="link to homepage for {{ .Site.Title }}">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
<hr class="panel-cover__divider" />
|
||||
<p class="panel-cover__description"> {{ if .Site.Params.description }} {{ .Site.Params.description }} {{ else }} This site is built using <a href="http://gohugo.io">hugo</a> and the theme is built by <a href="http://fredrikloch.me">Fredrik</a> if you enjoy it, it is available at <a href="https://github.com/SenjinDarashiva/hugo-uno">github</a> {{end}} </p>
|
||||
<hr class="panel-cover__divider panel-cover__divider--secondary" />
|
||||
<div class="navigation-wrapper">
|
||||
<nav class="cover-navigation cover-navigation--primary">
|
||||
<ul class="navigation">
|
||||
<li class="navigation__item"><a href="{{ .Site.BaseURL }}/#blog" title="link to {{ .Site.Title }} blog" class="blog-button">Blog</a> </li></br>
|
||||
{{ if .Site.Params.cv }}<li class="navigation__item"><a href="{{ .Site.Params.cv }}" title="link to my CV " class="blog-button">CV</a> </li></br> {{ end }}
|
||||
{{ if .Site.Params.legalnotice }}<li class="navigation__item"><a href="{{ .Site.Params.legalnotice }}" title="link to the legal notice " class="blog-button">Legal notice</a> </li></br> {{ end }}
|
||||
</ul>
|
||||
</nav> {{ partial "social.html" . }} </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-cover--overlay"></div>
|
||||
</div>
|
||||
</header>
|
||||
</noscript>
|
27
themes/hugo-uno/layouts/partials/social.html
Normal file
27
themes/hugo-uno/layouts/partials/social.html
Normal file
@ -0,0 +1,27 @@
|
||||
<nav class="cover-navigation navigation--social">
|
||||
<ul class="navigation"> {{ if .Site.Params.twitter }}
|
||||
<!-- Twitter -->
|
||||
<li class="navigation__item">
|
||||
<a href="http://twitter.com/{{ .Site.Params.twitter }}" title="@{{ .Site.Params.twitter }} on Twitter"> <i class='fa fa-twitter'></i> <span class="label">Twitter</span> </a>
|
||||
</li> {{ end }} {{ if .Site.Params.bitbucket }}
|
||||
<!-- Bitbucket -->
|
||||
<li class="navigation__item">
|
||||
<a href="https://bitbucket.org/{{ .Site.Params.bitbucket }}" title="{{ .Site.Params.bitbucket }} on bitbucket"> <i class='fa fa-bitbucket'></i> <span class="label">Bitbucket</span> </a>
|
||||
</li> {{ end }} {{ if .Site.Params.github }}
|
||||
<!-- github -->
|
||||
<li class="navigation__item">
|
||||
<a href="https://github.com/{{ .Site.Params.github }}" title="{{ .Site.Params.github }} on github"> <i class='fa fa-github'></i> <span class="label">Github</span> </a>
|
||||
</li> {{ end }} </br> {{ if .Site.Params.flickr }}
|
||||
<!-- Flickr -->
|
||||
<li class="navigation__item">
|
||||
<a href="http://www.flickr.com/photos/{{ .Site.Params.flickr }}/" title="{{ .Site.Params.flickr }} on flickr"> <i class='fa fa-flickr'></i> <span class="label">Flickr</span> </a>
|
||||
</li> {{ end }} {{ if .Site.Params.linkedin }}
|
||||
<!-- Linkedin -->
|
||||
<li class="navigation__item">
|
||||
<a href="https://www.linkedin.com/in/{{ .Site.Params.linkedin }}" title="Linkedin"> <i class='fa fa-linkedin'></i> <span class="label">Linkedin</span> </a>
|
||||
</li> {{ end }} {{ if .Site.Params.email }}
|
||||
<!-- Email -->
|
||||
<li class="navigation__item">
|
||||
<a href="mailto:{{ .Site.Params.email }}" title="Email {{ .Site.Params.email }}"> <i class='fa fa-envelope-o'></i> <span class="label">Email</span> </a>
|
||||
</li> {{ end }} </ul>
|
||||
</nav>
|
18
themes/hugo-uno/layouts/post/single.html
Normal file
18
themes/hugo-uno/layouts/post/single.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<div class="post">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "sharing.html" .}}
|
||||
{{ partial "comments.html" .}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
13
themes/hugo-uno/layouts/post/summary.html
Normal file
13
themes/hugo-uno/layouts/post/summary.html
Normal file
@ -0,0 +1,13 @@
|
||||
<article class="post">
|
||||
<header>
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a> </h2>
|
||||
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - Read in {{ .ReadingTime }} Min </div>
|
||||
</header>
|
||||
<div class="summary">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
<footer>
|
||||
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
|
||||
</footer>
|
||||
</article>
|
||||
{{ partial "script.html" .}}
|
21
themes/hugo-uno/layouts/rss.xml
Normal file
21
themes/hugo-uno/layouts/rss.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Title }} on {{ .Site.Title }} </title>
|
||||
<generator uri="https://gohugo.io">Hugo</generator>
|
||||
<link>{{ .Permalink }}</link>
|
||||
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
|
||||
{{ with .Site.Author.name }}<author>{{.}}</author>{{end}}
|
||||
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
|
||||
<updated>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</updated>
|
||||
{{ range first 15 .Data.Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</pubDate>
|
||||
{{with .Site.Author.name}}<author>{{.}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
96
themes/hugo-uno/layouts/shortcodes/barchart.html
Normal file
96
themes/hugo-uno/layouts/shortcodes/barchart.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!--
|
||||
chart.js bar chart shortlist
|
||||
|
||||
Params:
|
||||
name: css #id of your slider
|
||||
url: path or url of your chart data json
|
||||
includejs: include needed js files
|
||||
-->
|
||||
{{ if $.Get "includejs" }}
|
||||
<script src="{{ $.Page.Site.BaseURL }}/js/Chart.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Get "url" }}
|
||||
{{ $url := . }}
|
||||
{{ with $.Get "name" }}
|
||||
{{ $name := . }}
|
||||
<canvas id="{{ $name }}" width="860" height="400"></canvas>
|
||||
{{ $data := getJSON $url }}
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById("{{ $name }}").getContext("2d");
|
||||
var data = {
|
||||
labels: [{{ range $data.data.labels }}{{ $responsive := . }}{{ . }},{{ end }} ],
|
||||
datasets: [
|
||||
{{ range $data.data.datasets }}
|
||||
{{ $dataset := . }}
|
||||
{
|
||||
{{ if isset $dataset "label" }}label: {{ index $dataset "label" }},{{ end }}
|
||||
fillColor: {{ index $dataset "fillColor" }},
|
||||
strokeColor: {{ index $dataset "strokeColor" }},
|
||||
highlightFill: {{ index $dataset "highlightFill" }},
|
||||
highlightStroke: {{ index $dataset "highlightStroke" }},
|
||||
data: [{{ range $dataset.data }}{{ $responsive := . }}{{ . }},{{ end }} ],
|
||||
},
|
||||
{{ end }}
|
||||
]
|
||||
};
|
||||
{{ if isset $data "options" }}
|
||||
var options = {
|
||||
{{ if isset $data.options "animation" }} animation: {{ index $data.options "animation"}}, {{ end }}
|
||||
{{ if isset $data.options "animationSteps" }} animationSteps: {{ index $data.options "animationSteps"}}, {{ end }}
|
||||
{{ if isset $data.options "animationEasing" }} animationEasing: {{ index $data.options "animationEasing"}}, {{ end }}
|
||||
{{ if isset $data.options "showScale" }} showScale: {{ index $data.options "showScale"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleOverride" }} scaleOverride: {{ index $data.options "scaleOverride"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleSteps" }} scaleSteps: {{ index $data.options "scaleSteps"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleLineColor" }} scaleLineColor: {{ index $data.options "scaleLineColor"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleLineWidth" }} scaleLineWidth: {{ index $data.options "scaleLineWidth"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleShowLabels" }} scaleShowLabels: {{ index $data.options "scaleShowLabels"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleLabel" }} scaleLabel: {{ index $data.options "scaleLabel"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleIntegersOnly" }} scaleIntegersOnly: {{ index $data.options "scaleIntegersOnly"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleBeginAtZero" }} scaleBeginAtZero: {{ index $data.options "scaleBeginAtZero"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleFontFamily" }} scaleFontFamily: {{ index $data.options "scaleFontFamily"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleFontSize" }} scaleFontSize: {{ index $data.options "scaleFontSize"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleFontStyle" }} scaleFontStyle: {{ index $data.options "scaleFontStyle"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleFontColor" }} scaleFontColor: {{ index $data.options "scaleFontColor"}}, {{ end }}
|
||||
{{ if isset $data.options "responsive" }} responsive: {{ index $data.options "responsive"}}, {{ end }}
|
||||
{{ if isset $data.options "maintainAspectRatio" }} maintainAspectRatio: {{ index $data.options "maintainAspectRatio"}}, {{ end }}
|
||||
{{ if isset $data.options "showTooltips" }} showTooltips: {{ index $data.options "showTooltips"}}, {{ end }}
|
||||
{{ if isset $data.options "customTooltips" }} customTooltips: {{ index $data.options "customTooltips"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipEvents" }} tooltipEvents: {{ index $data.options "tooltipEvents"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipFillColor" }} tooltipFillColor: {{ index $data.options "tooltipFillColor"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipFontFamily" }} tooltipFontFamily: {{ index $data.options "tooltipFontFamily"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipFontSize" }} tooltipFontSize: {{ index $data.options "tooltipFontSize"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipFontStyle" }} tooltipFontStyle: {{ index $data.options "tooltipFontStyle"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipFontColor" }} tooltipFontColor: {{ index $data.options "tooltipFontColor"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipTitleFontFamily" }} tooltipTitleFontFamily: {{ index $data.options "tooltipTitleFontFamily"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipTitleFontSize" }} tooltipTitleFontSize: {{ index $data.options "tooltipTitleFontSize"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipTitleFontStyle" }} tooltipTitleFontStyle: {{ index $data.options "tooltipTitleFontStyle"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipTitleFontColor" }} tooltipTitleFontColor: {{ index $data.options "tooltipTitleFontColor"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipYPadding" }} tooltipYPadding: {{ index $data.options "tooltipYPadding"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipXPadding" }} tooltipXPadding: {{ index $data.options "tooltipXPadding"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipCaretSize" }} tooltipCaretSize: {{ index $data.options "tooltipCaretSize"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipCornerRadius" }} tooltipCornerRadius: {{ index $data.options "tooltipCornerRadius"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipXOffset" }} tooltipXOffset: {{ index $data.options "tooltipXOffset"}}, {{ end }}
|
||||
{{ if isset $data.options "tooltipTemplate" }} tooltipTemplate: {{ index $data.options "tooltipTemplate"}}, {{ end }}
|
||||
{{ if isset $data.options "multiTooltipTemplate" }} multiTooltipTemplate: {{ index $data.options "multiTooltipTemplate"}}, {{ end }}
|
||||
{{ if isset $data.options "onAnimationProgress" }} onAnimationProgress: {{ index $data.options "onAnimationProgress"}}, {{ end }}
|
||||
{{ if isset $data.options "onAnimationComplete" }} onAnimationComplete: {{ index $data.options "onAnimationComplete"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleShowGridLines" }} scaleShowGridLines: {{ index $data.options "scaleShowGridLines"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleGridLineColor" }} scaleGridLineColor: {{ index $data.options "scaleGridLineColor"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleGridLineWidth" }} scaleGridLineWidth: {{ index $data.options "scaleGridLineWidth"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleShowHorizontalLines" }} scaleShowHorizontalLines: {{ index $data.options "scaleShowHorizontalLines"}}, {{ end }}
|
||||
{{ if isset $data.options "scaleShowVerticalLines" }} scaleShowVerticalLines: {{ index $data.options "scaleShowVerticalLines"}}, {{ end }}
|
||||
{{ if isset $data.options "barShowStroke" }} barShowStroke: {{ index $data.options "barShowStroke"}}, {{ end }}
|
||||
{{ if isset $data.options "barStrokeWidth" }} barStrokeWidth: {{ index $data.options "barStrokeWidth"}}, {{ end }}
|
||||
{{ if isset $data.options "barValueSpacing" }} barValueSpacing: {{ index $data.options "barValueSpacing"}}, {{ end }}
|
||||
{{ if isset $data.options "barDatasetSpacing" }} barDatasetSpacing: {{ index $data.options "barDatasetSpacing"}}, {{ end }}
|
||||
{{ if isset $data.options "legendTemplate" }} legendTemplate: {{ index $data.options "legendTemplate"}}, {{ end }}
|
||||
};
|
||||
var myLineChart = new Chart(ctx).Bar(data, options)
|
||||
{{ else }}
|
||||
var myLineChart = new Chart(ctx).Bar(data)
|
||||
{{ end}}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
7
themes/hugo-uno/layouts/shortcodes/chart.html
Normal file
7
themes/hugo-uno/layouts/shortcodes/chart.html
Normal file
@ -0,0 +1,7 @@
|
||||
<div>
|
||||
<canvas id="{{ .Get "id"}}" width="{{ .Get "width" }}" height="{{ .Get "height" }}"></canvas>
|
||||
{{ if .Get "js" }}
|
||||
<script src="{{ .Get "js" }}"></script>
|
||||
<script src="../../js/Chart.min.js"></script>
|
||||
{{ end }}
|
||||
</div>
|
104
themes/hugo-uno/layouts/shortcodes/linechart.html
Normal file
104
themes/hugo-uno/layouts/shortcodes/linechart.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!--
|
||||
chart.js line chart shortcode
|
||||
|
||||
Params:
|
||||
name: css #id of your slider
|
||||
url: path or url of your chart data json
|
||||
includejs: include needed js files
|
||||
-->
|
||||
{{ if $.Get "includejs" }}
|
||||
<script src="{{ $.Page.Site.BaseURL }}/js/Chart.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Get "url" }}
|
||||
{{ $url := . }}
|
||||
{{ with $.Get "name" }}
|
||||
{{ $name := . }}
|
||||
<canvas id="{{ $name }}" width="860" height="400"></canvas>
|
||||
{{ $data := getJSON $url }}
|
||||
|
||||
<script>
|
||||
var ctx = document.getElementById("{{ $name }}").getContext("2d");
|
||||
var data = {
|
||||
labels: [{{ range $data.data.labels }}{{ $responsive := . }}{{ . }},{{ end }} ],
|
||||
datasets: [
|
||||
{{ range $data.data.datasets }}
|
||||
{{ $dataset := . }}
|
||||
{
|
||||
{{ if isset $dataset "label" }}label: {{ index $dataset "label" }},{{ end }}
|
||||
fillColor: {{ index $dataset "fillColor" }},
|
||||
strokeColor: {{ index $dataset "strokeColor" }},
|
||||
highlightFill: {{ index $dataset "highlightFill" }},
|
||||
highlightStroke: {{ index $dataset "highlightStroke" }},
|
||||
pointColor: {{ index $dataset "pointColor" }},
|
||||
pointStrokeColor: {{ index $dataset "pointStrokeColor" }},
|
||||
pointHighlightFill: {{ index $dataset "pointHighlightFill" }},
|
||||
pointHighlightStroke: {{ index $dataset "pointHighlightStroke" }},
|
||||
data: [{{ range $dataset.data }}{{ $responsive := . }}{{ . }},{{ end }} ],
|
||||
},
|
||||
{{ end }}
|
||||
]
|
||||
};
|
||||
{{ if isset $data "options" }}
|
||||
var options = {
|
||||
{{ if isset $data.options "animation:" }}animation:: {{ index $data.options "animation:"}},{{end}}
|
||||
{{ if isset $data.options "animationSteps" }}animationSteps: {{ index $data.options "animationSteps"}},{{end}}
|
||||
{{ if isset $data.options "animationEasing" }}animationEasing: {{ index $data.options "animationEasing"}},{{end}}
|
||||
{{ if isset $data.options "showScale" }}showScale: {{ index $data.options "showScale"}},{{end}}
|
||||
{{ if isset $data.options "scaleOverride" }}scaleOverride: {{ index $data.options "scaleOverride"}},{{end}}
|
||||
{{ if isset $data.options "scaleSteps" }}scaleSteps: {{ index $data.options "scaleSteps"}},{{end}}
|
||||
{{ if isset $data.options "scaleLineColor" }}scaleLineColor: {{ index $data.options "scaleLineColor"}},{{end}}
|
||||
{{ if isset $data.options "scaleLineWidth" }}scaleLineWidth: {{ index $data.options "scaleLineWidth"}},{{end}}
|
||||
{{ if isset $data.options "scaleShowLabels" }}scaleShowLabels: {{ index $data.options "scaleShowLabels"}},{{end}}
|
||||
{{ if isset $data.options "scaleLabel" }}scaleLabel: {{ index $data.options "scaleLabel"}},{{end}}
|
||||
{{ if isset $data.options "scaleIntegersOnly" }}scaleIntegersOnly: {{ index $data.options "scaleIntegersOnly"}},{{end}}
|
||||
{{ if isset $data.options "scaleBeginAtZero" }}scaleBeginAtZero: {{ index $data.options "scaleBeginAtZero"}},{{end}}
|
||||
{{ if isset $data.options "scaleFontFamily" }}scaleFontFamily: {{ index $data.options "scaleFontFamily"}},{{end}}
|
||||
{{ if isset $data.options "scaleFontSize" }}scaleFontSize: {{ index $data.options "scaleFontSize"}},{{end}}
|
||||
{{ if isset $data.options "scaleFontStyle" }}scaleFontStyle: {{ index $data.options "scaleFontStyle"}},{{end}}
|
||||
{{ if isset $data.options "scaleFontColor" }}scaleFontColor: {{ index $data.options "scaleFontColor"}},{{end}}
|
||||
{{ if isset $data.options "responsive" }}responsive: {{ index $data.options "responsive"}},{{end}}
|
||||
{{ if isset $data.options "maintainAspectRatio" }}maintainAspectRatio: {{ index $data.options "maintainAspectRatio"}},{{end}}
|
||||
{{ if isset $data.options "showTooltips" }}showTooltips: {{ index $data.options "showTooltips"}},{{end}}
|
||||
{{ if isset $data.options "customTooltips" }}customTooltips: {{ index $data.options "customTooltips"}},{{end}}
|
||||
{{ if isset $data.options "tooltipEvents" }}tooltipEvents: {{ index $data.options "tooltipEvents"}},{{end}}
|
||||
{{ if isset $data.options "tooltipFillColor" }}tooltipFillColor: {{ index $data.options "tooltipFillColor"}},{{end}}
|
||||
{{ if isset $data.options "tooltipFontFamily" }}tooltipFontFamily: {{ index $data.options "tooltipFontFamily"}},{{end}}
|
||||
{{ if isset $data.options "tooltipFontSize" }}tooltipFontSize: {{ index $data.options "tooltipFontSize"}},{{end}}
|
||||
{{ if isset $data.options "tooltipFontStyle" }}tooltipFontStyle: {{ index $data.options "tooltipFontStyle"}},{{end}}
|
||||
{{ if isset $data.options "tooltipFontColor" }}tooltipFontColor: {{ index $data.options "tooltipFontColor"}},{{end}}
|
||||
{{ if isset $data.options "tooltipTitleFontFamily" }}tooltipTitleFontFamily: {{ index $data.options "tooltipTitleFontFamily"}},{{end}}
|
||||
{{ if isset $data.options "tooltipTitleFontSize" }}tooltipTitleFontSize: {{ index $data.options "tooltipTitleFontSize"}},{{end}}
|
||||
{{ if isset $data.options "tooltipTitleFontStyle" }}tooltipTitleFontStyle: {{ index $data.options "tooltipTitleFontStyle"}},{{end}}
|
||||
{{ if isset $data.options "tooltipTitleFontColor" }}tooltipTitleFontColor: {{ index $data.options "tooltipTitleFontColor"}},{{end}}
|
||||
{{ if isset $data.options "tooltipYPadding" }}tooltipYPadding: {{ index $data.options "tooltipYPadding"}},{{end}}
|
||||
{{ if isset $data.options "tooltipXPadding" }}tooltipXPadding: {{ index $data.options "tooltipXPadding"}},{{end}}
|
||||
{{ if isset $data.options "tooltipCaretSize" }}tooltipCaretSize: {{ index $data.options "tooltipCaretSize"}},{{end}}
|
||||
{{ if isset $data.options "tooltipCornerRadius" }}tooltipCornerRadius: {{ index $data.options "tooltipCornerRadius"}},{{end}}
|
||||
{{ if isset $data.options "tooltipXOffset" }}tooltipXOffset: {{ index $data.options "tooltipXOffset"}},{{end}}
|
||||
{{ if isset $data.options "tooltipTemplate" }}tooltipTemplate: {{ index $data.options "tooltipTemplate"}},{{end}}
|
||||
{{ if isset $data.options "multiTooltipTemplate" }}multiTooltipTemplate: {{ index $data.options "multiTooltipTemplate"}},{{end}}
|
||||
{{ if isset $data.options "onAnimationProgress" }}onAnimationProgress: {{ index $data.options "onAnimationProgress"}},{{end}}
|
||||
{{ if isset $data.options "onAnimationComplete" }}onAnimationComplete: {{ index $data.options "onAnimationComplete"}},{{end}}
|
||||
{{ if isset $data.options "scaleGridLineColor" }}scaleGridLineColor: {{ index $data.options "scaleGridLineColor"}},{{end}}
|
||||
{{ if isset $data.options "scaleGridLineWidth" }}scaleGridLineWidth: {{ index $data.options "scaleGridLineWidth"}},{{end}}
|
||||
{{ if isset $data.options "scaleShowHorizontalLines" }}scaleShowHorizontalLines: {{ index $data.options "scaleShowHorizontalLines"}},{{end}}
|
||||
{{ if isset $data.options "scaleShowVerticalLines" }}scaleShowVerticalLines: {{ index $data.options "scaleShowVerticalLines"}},{{end}}
|
||||
{{ if isset $data.options "bezierCurve" }}bezierCurve: {{ index $data.options "bezierCurve"}},{{end}}
|
||||
{{ if isset $data.options "bezierCurveTension" }}bezierCurveTension: {{ index $data.options "bezierCurveTension"}},{{end}}
|
||||
{{ if isset $data.options "pointDot" }}pointDot: {{ index $data.options "pointDot"}},{{end}}
|
||||
{{ if isset $data.options "pointDotRadius" }}pointDotRadius: {{ index $data.options "pointDotRadius"}},{{end}}
|
||||
{{ if isset $data.options "pointDotStrokeWidth" }}pointDotStrokeWidth: {{ index $data.options "pointDotStrokeWidth"}},{{end}}
|
||||
{{ if isset $data.options "pointHitDetectionRadius" }}pointHitDetectionRadius: {{ index $data.options "pointHitDetectionRadius"}},{{end}}
|
||||
{{ if isset $data.options "datasetStroke" }}datasetStroke: {{ index $data.options "datasetStroke"}},{{end}}
|
||||
{{ if isset $data.options "datasetStrokeWidth" }}datasetStrokeWidth: {{ index $data.options "datasetStrokeWidth"}},{{end}}
|
||||
{{ if isset $data.options "datasetFill" }}datasetFill: {{ index $data.options "datasetFill"}},{{end}}
|
||||
{{ if isset $data.options "legendTemplate" }}legendTemplate: {{ index $data.options "legendTemplate"}},{{end}}
|
||||
};
|
||||
var myLineChart = new Chart(ctx).Line(data, options)
|
||||
{{ else }}
|
||||
var myLineChart = new Chart(ctx).Line(data)
|
||||
{{ end}}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
1
themes/hugo-uno/layouts/shortcodes/relLink.html
Normal file
1
themes/hugo-uno/layouts/shortcodes/relLink.html
Normal file
@ -0,0 +1 @@
|
||||
<a href="{{ .Page.Site.BaseURL }}/{{ index .Params 0 }}">{{ index .Params 1 }}</a>
|
18
themes/hugo-uno/layouts/taxonomy/tags.html
Normal file
18
themes/hugo-uno/layouts/taxonomy/tags.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
<div class="content-wrapper__inner">
|
||||
<section id="main">
|
||||
<ul id="list">
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }} {{ if .GetParam "draft"}}DRAFT{{end}}</a>
|
||||
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{{ partial "script.html" .}}
|
||||
</html>
|
Reference in New Issue
Block a user