work in progress...

This commit is contained in:
Helmut Merz 2020-04-26 17:24:40 +02:00
parent ef404bc09b
commit 19b369f11b
3 changed files with 10 additions and 110 deletions

View file

@ -1,6 +1,7 @@
# Hugo cards # cybercards
A Hugo theme, ported from [Webjeda-cards](http://webjeda.com/cards) A Hugo theme, ported from [Hugo Cards](https://github.com/bul-ikana/hugo-cards),
which is itself ported from [Webjeda-cards](http://webjeda.com/cards)
![Screenshot](https://github.com/bul-ikana/hugo-cards/blob/master/images/screenshot.png) ![Screenshot](https://github.com/bul-ikana/hugo-cards/blob/master/images/screenshot.png)
@ -8,47 +9,12 @@ A Hugo theme, ported from [Webjeda-cards](http://webjeda.com/cards)
Responsive theme built on bootstrap. Great for showcasing content with featured images. Responsive theme built on bootstrap. Great for showcasing content with featured images.
Easily add disqus, google analytics, social links and a facebook like box.
## Configuration ## Configuration
Please see the sample [`config.toml`](https://github.com/bul-ikana/hugo-cards/blob/master/exampleSite/config.toml). Please see the exampleSite.
### Social links ### Social links
#### facebook
A link to your facebook profile or page. This will show in the footer.
#### quora
A link to your quora profile. This will show in the footer.
#### twitter
A link to your twitter profile. This will show in the footer.
#### github
A link to your github profile. This will show in the footer.
#### email #### email
Your email address. This will show in the footer and will opes as a `mailto:`. Your email address. This will show in the footer and will opes as a `mailto:`.
### Facebook like box
#### fbLikeBox
Wheter you want to show a facebook like box. Accepted values are `yes` or `no`. Leave empty for `no`
#### fbAppId
The app id you obtained from facebook developers page.
#### fbPageUrl
A link to the facebook page or profile that will be shown in the like box.
#### fbPageTitle
The title of the like box. This text will be shown while the box is loading.
### Tracking and comments
#### analytics
The Google Analytics tracking ID
#### disqus
The disqus_thread ID

View file

@ -1,2 +1,6 @@
+++ ---
+++ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

View file

@ -1,70 +0,0 @@
{{ define "main" }}
<div class="home">
<div class="row pack">
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
<div class="col-md-4 card">
<a href="{{ .Permalink }}" class="index-anchor">
<div class="panel panel-default">
{{ if .Params.img }}
<img width="100%" src="{{ .Site.BaseURL }}images/{{ .Params.img }}" alt="{{ .Title }}">
{{ else }}
<img width="100%" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="{{ .Site.Title }}">
{{ end }}
<div class="panel-body">
<h3 class="panel-title pull-left">{{ .Title | truncate 25 }}</h3><span class="post-meta pull-right"><small>{{ .Date.Format "January 2, 2006" }}</small></span>
</div>
<div class="panel-body"><small>
{{ .Summary | plainify | truncate 180 }}</small>
</div>
</div>
</a>
</div>
{{ end }}
</div>
<div class="row">
<div class="col-md-4"> </div>
<div class="col-md-4">
{{ if gt .Paginator.TotalPages 1 }}
<ul class="pagination">
{{ if .Paginator.HasPrev }}
<li><a href="{{ .Paginator.Prev.URL }}">&laquo; Prev</a></li>
{{ else }}
<li><span>&laquo; Prev</span></li>
{{ end }}
{{ $scratch := newScratch }}
{{ $scratch.Set "current" .Paginator.PageNumber }}
{{ range .Paginator.Pagers }}
{{ if eq .PageNumber ($scratch.Get "current") }}
<li class="active"><span><em>{{ .PageNumber }}</em></span></li>
{{ else }}
<li><a href="{{ .URL }}">{{ .PageNumber }}</a></li>
{{ end }}
{{ end }}
{{ if .Paginator.HasNext }}
<li><a href="{{ .Paginator.Next.URL }}">Next &raquo;</a></li>
{{ else }}
<li><span >Next &raquo;</span></li>
{{ end }}
</ul>
{{ end }}
</div>
<div class="col-md-4"> </div>
</div>
</div>
{{ end }}