diff options
-rw-r--r-- | exampleSite/.gitignore | 1 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 16 | ||||
-rw-r--r-- | layouts/partials/blog.html | 29 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | static/img/placeholder.png | bin | 0 -> 7800 bytes |
6 files changed, 29 insertions, 23 deletions
diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore new file mode 100644 index 0000000..98478da --- /dev/null +++ b/exampleSite/.gitignore @@ -0,0 +1 @@ +themes/ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3a201bb..a4f51e1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -94,7 +94,7 @@ theme = "universal" [params.see_more] enable = true icon = "fa fa-file-code-o" - title = "Do you want to see less?" + title = "Do you want to see more?" subtitle = "We have prepared for you more than 40 different HTML pages, including 5 variations of homepage." link_url = "#" link_text = "Check other homepages" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4d21f6..ce9104c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -27,13 +27,15 @@ <section class="post"> <div class="row"> <div class="col-md-4"> - {{ if .Params.banner }} - <div class="image"> - <a href="{{ .Permalink }}"> - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt=""> - </a> - </div> - {{ end }} + <div class="image"> + <a href="{{ .Permalink }}"> + {{ if .Params.banner }} + <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt=""> + {{ else }} + <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> + {{ end }} + </a> + </div> </div> <div class="col-md-8"> <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> diff --git a/layouts/partials/blog.html b/layouts/partials/blog.html index 45dd722..122dcff 100644 --- a/layouts/partials/blog.html +++ b/layouts/partials/blog.html @@ -20,20 +20,21 @@ {{ range first 4 $posts.Pages }} <div class="col-md-3 col-sm-6"> <div class="box-image-text blog"> - {{ if isset .Params "banner" }} - <div class="top"> - <div class="image"> - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" alt="" class="img-responsive"> - </div> - - <div class="bg"></div> - <div class="text"> - <p class="buttons"> - <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> Read more</a> - </p> - </div> - </div> - {{ end }} + <div class="top"> + <div class="image"> + {{ if isset .Params "banner" }} + <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="" > + {{ else }} + <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> + {{ end }} + </div> + <div class="bg"></div> + <div class="text"> + <p class="buttons"> + <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> Read more</a> + </p> + </div> + </div> <div class="content"> <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5bf6d83..1a0691e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -23,7 +23,9 @@ <div class="image same-height-always"> <a href="#"> {{ if isset .Params "banner" }} - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" alt="" class="img-responsive"> + <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt=""> + {{ else }} + <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> {{ end }} </a> </div> diff --git a/static/img/placeholder.png b/static/img/placeholder.png Binary files differnew file mode 100644 index 0000000..83228e5 --- /dev/null +++ b/static/img/placeholder.png |