diff options
author | Bala Ramadurai <bala@balaramadurai.net> | 2017-08-14 18:30:42 +0300 |
---|---|---|
committer | Bala Ramadurai <bala@balaramadurai.net> | 2017-08-14 18:30:42 +0300 |
commit | c147550ffc0efd37651feed939ec2ef0e28b9545 (patch) | |
tree | 0beef2fbe63314aa9b923fd994288d8fb58b6727 /layouts | |
parent | fa0ac681de2f4a58d08e3540a6e83c8cdc6d18ca (diff) |
New features
- Multiple author support added (Taxonomy)
- mailchimp integration added
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 8 | ||||
-rw-r--r-- | layouts/partials/article_footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/widgets.html | 2 | ||||
-rw-r--r-- | layouts/partials/widgets/author.html | 20 | ||||
-rw-r--r-- | layouts/partials/widgets/mailchimp.html | 25 | ||||
-rw-r--r-- | layouts/partials/widgets/tag_cloud.html | 1 |
7 files changed, 56 insertions, 6 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 83c9b78..56b676c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,10 +7,10 @@ {{ partial "head" . }} {{ partial "nav" . }} <div class="page-title-wrap"> - <div class="container clearfix"> - <h3 class="page-title">{{ if not .IsHome }}{{ .Title }} {{ end }}</h3><!-- .page-title --> - </div> - </div> + <div class="container clearfix"> + <h3 class="page-title">{{ if not .IsHome }}{{ .Title }} {{ end }}</h3><!-- .page-title --> + </div> + </div> </header> <div id="main" class="container clearfix"> diff --git a/layouts/partials/article_footer.html b/layouts/partials/article_footer.html index 4017e1f..0330faf 100644 --- a/layouts/partials/article_footer.html +++ b/layouts/partials/article_footer.html @@ -6,7 +6,7 @@ <span class="byline"> <span class="author vcard"> {{ $url := printf "author/%s" (.Params.author | urlize | lower) }} - <!-- I'll enable this someday when I learn more about taxonomies in Hugo :) - Bala <a class="url fn n" href="{{ $url | absURL }}">-->{{ .Params.author | lower }}<!--</a> --> + <a class="url fn n" href="{{ $url | absURL }}">{{ .Params.author | lower }}</a> </span> </span> {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3ea86a0..d4c16e9 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,9 @@ <div id="site-generator"> <div class="container"> <div class="copyright">© {{now.Format "2006"}} - {{ with .Site.Params.copyright }}{{ . | markdownify}}{{ end }} Powered by <a href="http://gohugo.io">Hugo</a>. Original theme by <a href="http://colorlib.com/wp/travelify/">Colorlib</a> adapted for Hugo by <a href="http://balaramadurai.net">Dr. Bala Ramadurai</a>.</div><!-- .copyright --><div class="footer-right"></div><div style="clear:both;"> + {{ with .Site.Params.copyright }}{{ . | markdownify}}{{ end }} Powered by <a href="http://gohugo.io">Hugo</a>. Original theme by <a href="http://colorlib.com/wp/travelify/">Colorlib</a> adapted for Hugo by <a href="http://balaramadurai.net">Dr. Bala Ramadurai</a>. + </div><!-- .copyright --> + <div class="footer-right"></div><div style="clear:both;"> </div> </div><!-- .container --> </div><!-- #site-generator --> diff --git a/layouts/partials/widgets.html b/layouts/partials/widgets.html index 94db12b..bcf236d 100644 --- a/layouts/partials/widgets.html +++ b/layouts/partials/widgets.html @@ -1,8 +1,10 @@ {{ if not .Params.widgets }} <div id="secondary"> + {{ partial "widgets/mailchimp" . }} {{ partial "widgets/search" . }} {{ partial "widgets/categories" . }} {{ partial "widgets/archive" . }} {{ partial "widgets/tag_cloud" . }} + {{ partial "widgets/author" . }} </div><!-- #secondary --> {{ end }} diff --git a/layouts/partials/widgets/author.html b/layouts/partials/widgets/author.html new file mode 100644 index 0000000..035c904 --- /dev/null +++ b/layouts/partials/widgets/author.html @@ -0,0 +1,20 @@ +{{ if .Site.Params.widgets.author }} +{{ if isset .Site.Taxonomies "author" }} +{{ if not (eq (len .Site.Taxonomies.author) 0) }} +<div class="widget"> + + <h3 class="widget-title">{{ with .Site.Data.l10n.authors.Title }}{{.}} {{ end }} + </h3> + + <div class="panel-body"> + <ul class="nav nav-pills nav-stacked"> + {{ range $name, $items := .Site.Taxonomies.author.ByCount }} + <li><a href="{{ $.Site.BaseURL }}author/{{ $items.Name | urlize | lower }}"><i class="fa fa-user"></i> {{ $items.Name }} ({{ $items.Count }})</a> + </li> + {{ end }} + </ul> + </div> +</div> +{{ end }} +{{ end }} +{{ end }} diff --git a/layouts/partials/widgets/mailchimp.html b/layouts/partials/widgets/mailchimp.html new file mode 100644 index 0000000..e0adc76 --- /dev/null +++ b/layouts/partials/widgets/mailchimp.html @@ -0,0 +1,25 @@ +{{ if isset .Site.Params.widgets "mailchimp" }} +{{ if isset .Site.Params.widgets "mailchimpform" }} +{{ if .Site.Params.widgets.mailchimp }} +<aside id="blog_subscription-2" class="widget"><h3 class="widget-title">{{with .Site.Data.l10n.widgets.mailchimp.title}}{{.}}{{end}}</h3> + <form action="{{ .Site.Params.widgets.mailchimpform }}" method="post"> + <div> + <p>{{with .Site.Data.l10n.widgets.mailchimp.subscribe_text}}{{.}}{{end}}</p> + </div> + <p> + <input name="EMAIL" placeholder="Email Address" type="email"> + </p> + <p> + <input name="FNAME" value="" placeholder="First Name" type="name"> + </p> + + <p > + <input value="Subscribe" type="submit"> + </p> + </form> + +</aside> + +{{ end }} +{{ end }} +{{ end }} diff --git a/layouts/partials/widgets/tag_cloud.html b/layouts/partials/widgets/tag_cloud.html index 64d1300..a92be5a 100644 --- a/layouts/partials/widgets/tag_cloud.html +++ b/layouts/partials/widgets/tag_cloud.html @@ -14,6 +14,7 @@ <a href="{{ $baseurl }}tags/{{ $name | urlize }}" style="font-size: {{ add ($value.Count) $mag_factor }}px;" title="{{ ($value.Count) }} topics"> <!--a href="{{ $baseurl }}/tags/{{ $name | urlize }}"--> {{ $name | title }} + </a> {{ end }} {{ end }} </div> |