Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md58
-rw-r--r--exampleSite/data/carousel/customizable.yaml1
-rw-r--r--exampleSite/data/carousel/features.yaml1
-rw-r--r--layouts/partials/carousel.html22
4 files changed, 49 insertions, 33 deletions
diff --git a/README.md b/README.md
index 15841cf..6868188 100644
--- a/README.md
+++ b/README.md
@@ -17,30 +17,37 @@ This Hugo theme was ported from [Bootstrapious](http://bootstrapious.com/p/unive
## Table of Contents
-* [Features](#features)
-* [Installation](#installation)
-* [Configuration](#configuration)
- * [Style](#style)
- * [Comments](#comments)
- * [Google Analytics](#google-analytics)
- * [Contact form](#contact-form)
- * [Menu](#menu)
- * [Sidebar widgets](#sidebar-widgets)
- * [Blog post thumbnails](#blog-post-thumbnails)
- * [Top bar](#top-bar)
- * [Landing page](#landing-page)
- * [Carousel](#carousel)
- * [Features](#features)
- * [Testimonials](#testimonials)
- * [See more](#see-more)
- * [Clients](#clients)
- * [Recent posts](#recent-posts)
- * [Footer](#footer)
- * [Meta tags](#meta-tags)
-* [Usage](#usage)
-* [Contributing](#contributing)
-* [License](#license)
-* [Thanks](#thanks)
+- [Universal Theme for Hugo](#universal-theme-for-hugo)
+ - [Table of Contents](#table-of-contents)
+ - [Features](#features)
+ - [Installation](#installation)
+ - [Configuration](#configuration)
+ - [Language](#language)
+ - [Style](#style)
+ - [Comments](#comments)
+ - [Google Analytics](#google-analytics)
+ - [Logo](#logo)
+ - [Contact form](#contact-form)
+ - [Menu](#menu)
+ - [Sidebar widgets](#sidebar-widgets)
+ - [Top bar](#top-bar)
+ - [Blog post thumbnails](#blog-post-thumbnails)
+ - [Landing page](#landing-page)
+ - [Carousel](#carousel)
+ - [Features](#features-1)
+ - [Testimonials](#testimonials)
+ - [See more](#see-more)
+ - [Clients](#clients)
+ - [Recent posts](#recent-posts)
+ - [Footer](#footer)
+ - [About us](#about-us)
+ - [Recent posts](#recent-posts-1)
+ - [Contact](#contact)
+ - [Meta tags](#meta-tags)
+ - [Usage](#usage)
+ - [Contributing](#contributing)
+ - [License](#license)
+ - [Thanks](#thanks)
## Features
@@ -377,9 +384,10 @@ description: >
<li>Easily to change fonts</li>
</ul>
image: "img/carousel/template-easy-code.png"
+href: "https://devcows.github.io/hugo-universal-theme/"
```
-The `weight` field determines the position of the entry. `title` is a text-only field. The `description` field accepts HTML code. And the `image` must contain the relative path to the image inside the `static` directory.
+The `weight` field determines the position of the entry. `title` is a text-only field. The `description` field accepts HTML code. The `image` must contain the relative path to the image inside the `static` directory. The optional `href` field contains a relative or absolute url that the user will be redirected to when clicking the carousel (specific to each carousel item).
Once the carousel is configured, some options can be defined like: auto play, speed, etc. in the `config.toml` file.
diff --git a/exampleSite/data/carousel/customizable.yaml b/exampleSite/data/carousel/customizable.yaml
index 6112d05..29fbdc9 100644
--- a/exampleSite/data/carousel/customizable.yaml
+++ b/exampleSite/data/carousel/customizable.yaml
@@ -6,3 +6,4 @@ description: >
<li>Easily to change fonts</li>
</ul>
image: "img/carousel/template-easy-code.png"
+href: "https://devcows.github.io/hugo-universal-theme/"
diff --git a/exampleSite/data/carousel/features.yaml b/exampleSite/data/carousel/features.yaml
index 8b30ab2..f5db1b1 100644
--- a/exampleSite/data/carousel/features.yaml
+++ b/exampleSite/data/carousel/features.yaml
@@ -8,3 +8,4 @@ description: >
<li>+ 11 extra pages showing template features</li>
</ul>
image: "img/carousel/template-mac.png"
+href: "faq"
diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html
index be6c6f0..a329dc2 100644
--- a/layouts/partials/carousel.html
+++ b/layouts/partials/carousel.html
@@ -10,15 +10,21 @@
data-pagination-speed="{{ default 1000 .Site.Params.CarouselHomepage.pagination_speed }}">
{{ range sort .Site.Data.carousel "weight" }}
<div class="item">
- <div class="row">
- <div class="col-sm-5 right">
- <h1>{{ .title }}</h1>
- {{ .description | safeHTML }}
+ {{ if .href }}
+ <a href="{{ .href }}">
+ {{ end }}
+ <div class="row">
+ <div class="col-sm-5 right">
+ <h1>{{ .title }}</h1>
+ {{ .description | safeHTML }}
+ </div>
+ <div class="col-sm-7">
+ <img class="img-responsive" src="{{ .image }}" alt="">
+ </div>
</div>
- <div class="col-sm-7">
- <img class="img-responsive" src="{{ .image }}" alt="">
- </div>
- </div>
+ {{ if .href }}
+ </a>
+ {{ end }}
</div>
{{ end }}
</div>