aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'themes/terrassa/layouts/partials')
-rw-r--r--themes/terrassa/layouts/partials/cta-btn.html4
-rw-r--r--themes/terrassa/layouts/partials/footer.html66
-rw-r--r--themes/terrassa/layouts/partials/hamburger-menu.html18
-rw-r--r--themes/terrassa/layouts/partials/head.html21
-rw-r--r--themes/terrassa/layouts/partials/header.html14
-rw-r--r--themes/terrassa/layouts/partials/hero.html10
-rw-r--r--themes/terrassa/layouts/partials/menu.html13
-rw-r--r--themes/terrassa/layouts/partials/scripts.html8
-rw-r--r--themes/terrassa/layouts/partials/section.html6
-rw-r--r--themes/terrassa/layouts/partials/sections.html10
-rw-r--r--themes/terrassa/layouts/partials/separator.html3
-rw-r--r--themes/terrassa/layouts/partials/styles.html9
12 files changed, 182 insertions, 0 deletions
diff --git a/themes/terrassa/layouts/partials/cta-btn.html b/themes/terrassa/layouts/partials/cta-btn.html
new file mode 100644
index 0000000..1d7b73f
--- /dev/null
+++ b/themes/terrassa/layouts/partials/cta-btn.html
@@ -0,0 +1,4 @@
+<a href="{{ $.Site.BaseURL }}{{ $.Site.Params.cta.link }}" class="ripple-btn cta__btn" alt="{{ $.Site.Params.cta.cta }}"
+ aria-label="{{ $.Site.Params.cta.cta }}}">
+ {{ .Site.Params.cta.cta }}
+</a> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/footer.html b/themes/terrassa/layouts/partials/footer.html
new file mode 100644
index 0000000..b2b27bc
--- /dev/null
+++ b/themes/terrassa/layouts/partials/footer.html
@@ -0,0 +1,66 @@
+<footer class="footer">
+ {{ if $.Site.Params.social }}
+ {{ $items := $.Site.Params.social }}
+ {{ $len := (len $items) }}
+
+ {{ if gt $len 0 }}
+ <div class="footer__social">
+ {{ range $k, $v := $items }}
+ {{ if $v}}
+ <a href="{{ $v }}" class="footer__social__link" alt="{{ $k }}" target="_blank" aria-label="{{ $v }}" rel="noopener">
+ <span>
+ <i class="fab fa-{{ $k }}"></i>
+ </span>
+ </a>
+ {{ end }}
+ {{ end }}
+ </div>
+ {{ end }}
+ {{ end }}
+
+ <address class="footer__contact">
+ {{ if $.Site.Params.contact.email }}
+ <p class="footer__contact__item">
+ <span><i class="far fa-envelope"></i></span>
+ <a href="mailto:{{ $.Site.Params.contact.email}}" class="footer__contact__link" alt="Email">
+ {{ $.Site.Params.contact.email }}
+ </a>
+ </p>
+ {{ end }}
+
+ {{ if $.Site.Params.contact.phone }}
+ <p class="footer__contact__item">
+ <span><i class="fas fa-phone"></i></span>
+ <a href="tel:{{ $.Site.Params.contact.phone }}" class="footer__contact__link" alt="Phone">
+ {{ $.Site.Params.contact.phone }}
+ </a>
+ </p>
+ {{ end }}
+
+ {{ if $.Site.Params.contact.skype }}
+ <p class="footer__contact__item">
+ <span><i class="fab fa-skype"></i></span>
+ <a href="skype:{{ $.Site.Params.contact.skype }}" class="footer__contact__link" alt="Skype">
+ {{ $.Site.Params.contact.skype }}
+ </a>
+ </p>
+ {{ end }}
+
+ {{ if $.Site.Params.contact.address }}
+ <p class="footer__contact__item">
+ <span><i class="fas fa-map-marker-alt"></i></span>
+ {{ $.Site.Params.contact.address }}
+ </p>
+ {{ end }}
+ </address>
+
+ <div class="copy">
+ {{ if $.Site.Params.copy.copy }}
+ <p>{{ $.Site.Params.copy.copy }}</p>
+ {{ else }}
+ <p>© {{ now.Format "2006" }} - {{ $.Site.Title }}</p>
+ {{ end }}
+ </div>
+
+ {{ partial "scripts.html" . }}
+</footer> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/hamburger-menu.html b/themes/terrassa/layouts/partials/hamburger-menu.html
new file mode 100644
index 0000000..40a9ad8
--- /dev/null
+++ b/themes/terrassa/layouts/partials/hamburger-menu.html
@@ -0,0 +1,18 @@
+<nav class="hamburger-menu" aria-label="mobile-menu">
+ <div class="toggle">
+ <input type="checkbox" class="hamburger__toggle" id="hamburgerToggle" name="hamburger toggle" aria-label="Hamburguer menu">
+ <label class="hamburger__toggle__icon" for="hamburgerToggle">
+ <i class="fas fa-bars"></i>
+ </label>
+
+ <ul class="hamburger__items" aria-label="mobile-menu">
+ {{ range .Site.Menus.main }}
+ <li class="hamburger__items__item" aria-label="{{ .Name }}">
+ <a href="{{ .URL }}" class="hamburger__items__item__link" alt="{{ .Name }}" role="menuitem">
+ {{ .Name }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+</nav> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/head.html b/themes/terrassa/layouts/partials/head.html
new file mode 100644
index 0000000..a2885d2
--- /dev/null
+++ b/themes/terrassa/layouts/partials/head.html
@@ -0,0 +1,21 @@
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="robots" content="index, follow">
+ <meta name="googlebot" content="index, follow, noarchive">
+ <title>{{ .Site.Title }} - {{ .Title }}</title>
+ <link rel="icon" href="{{ $.Site.BaseURL }}{{ $.Site.Params.favicon }}">
+ <meta name="description" content="{{ $.Site.Params.description }}">
+
+ {{ .Hugo.Generator }}
+
+ {{ if .Site.GoogleAnalytics }}
+ {{ template "_internal/google_analytics.html" . }}
+ {{ end }}
+
+ {{ template "_internal/twitter_cards.html" . }}
+ {{ template "_internal/opengraph.html" . }}
+
+ <!-- CSS -->
+ {{ partial "styles.html" . }}
+</head> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/header.html b/themes/terrassa/layouts/partials/header.html
new file mode 100644
index 0000000..73142ae
--- /dev/null
+++ b/themes/terrassa/layouts/partials/header.html
@@ -0,0 +1,14 @@
+<header class="header">
+ <div class="header__title">
+ <a href="{{ $.Site.BaseURL }}" class="header__title__link" alt="Home">
+ {{ if $.Site.Params.logo }}
+ <img src="{{ $.Site.BaseURL }}{{ $.Site.Params.logo }}" class="header__title__logo" alt="{{ $.Site.Title }}">
+ {{ else }}
+ {{ $.Site.Title }}
+ {{ end }}
+ </a>
+ </div>
+
+ {{ partial "menu.html" . }}
+ {{ partial "hamburger-menu.html" . }}
+</header>
diff --git a/themes/terrassa/layouts/partials/hero.html b/themes/terrassa/layouts/partials/hero.html
new file mode 100644
index 0000000..138d674
--- /dev/null
+++ b/themes/terrassa/layouts/partials/hero.html
@@ -0,0 +1,10 @@
+<main class="hero" {{ if $.Params.images }} style="background-image: url('{{ $.Site.BaseURL }}images/{{ print (index $.Params.images 0) }}');"
+ {{ end }}>
+ <div class="hero__caption" {{ if $.Site.Params.hero.textColor }} style="color: {{ $.Site.Params.hero.textColor }};"
+ {{ end }}>
+ {{ .Content }}
+ {{ if .Site.Params.cta.show }}
+ {{ partial "cta-btn.html" . }}
+ {{ end }}
+ </div>
+</main> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/menu.html b/themes/terrassa/layouts/partials/menu.html
new file mode 100644
index 0000000..abfb92b
--- /dev/null
+++ b/themes/terrassa/layouts/partials/menu.html
@@ -0,0 +1,13 @@
+<nav class="menu" aria-label="menu">
+ <ul class="menu__items" aria-label="menu">
+ {{ $current := . }}
+ {{ range .Site.Menus.main }}
+ <li class="menu__items__item" aria-label="{{ .Name }}">
+ <a href="{{ .URL }}" class="menu__items__item__link {{ if $current.IsMenuCurrent "main" . }}active{{ end }}"
+ alt="{{ .Name }}" role="menuitem">
+ {{ .Name }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+</nav> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/scripts.html b/themes/terrassa/layouts/partials/scripts.html
new file mode 100644
index 0000000..46beb79
--- /dev/null
+++ b/themes/terrassa/layouts/partials/scripts.html
@@ -0,0 +1,8 @@
+{{ $header := resources.Get "js/header.js" }}
+{{ $form := resources.Get "js/form.js" }}
+{{ $bundle := slice $header $form | resources.Concat "js/bundle.js" }}
+{{ $js := $bundle | resources.Minify | resources.Fingerprint "sha512" }}
+
+<script src="{{ $js.Permalink }}"></script>
+<script defer src="https://use.fontawesome.com/releases/v5.6.1/js/all.js" integrity="sha384-R5JkiUweZpJjELPWqttAYmYM1P3SNEJRM6ecTQF05pFFtxmCO+Y1CiUhvuDzgSVZ"
+ crossorigin="anonymous"></script> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/section.html b/themes/terrassa/layouts/partials/section.html
new file mode 100644
index 0000000..ef05877
--- /dev/null
+++ b/themes/terrassa/layouts/partials/section.html
@@ -0,0 +1,6 @@
+<section class="section">
+ <h1 class="section__title">{{ .Title }}</h1>
+ <div class="section__content">
+ {{ .Content }}
+ </div>
+</section> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/sections.html b/themes/terrassa/layouts/partials/sections.html
new file mode 100644
index 0000000..6d4cfc3
--- /dev/null
+++ b/themes/terrassa/layouts/partials/sections.html
@@ -0,0 +1,10 @@
+{{ $items := (where $.Site.RegularPages "Type" "sections") }}
+{{ $len := (len $items) }}
+
+{{ range $i, $e := $items }}
+{{ partial "section.html" .}}
+
+{{ if ne (add $i 1) $len }}
+{{ partial "separator.html" . }}
+{{ end }}
+{{ end}} \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/separator.html b/themes/terrassa/layouts/partials/separator.html
new file mode 100644
index 0000000..e890b22
--- /dev/null
+++ b/themes/terrassa/layouts/partials/separator.html
@@ -0,0 +1,3 @@
+<div class="separator">
+ <i class="fas fa-circle"></i>
+</div> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/styles.html b/themes/terrassa/layouts/partials/styles.html
new file mode 100644
index 0000000..4dd5827
--- /dev/null
+++ b/themes/terrassa/layouts/partials/styles.html
@@ -0,0 +1,9 @@
+{{ $reset := resources.Get "css/reset.css" }}
+{{ $base := resources.Get "css/base.css" }}
+{{ $style := resources.Get "css/style.css" }}
+{{ $media := resources.Get "css/media-queries.css" }}
+{{ $animations := resources.Get "css/animations.css" }}
+{{ $bundle := slice $reset $base $style $media $animations | resources.Concat "css/bundle.css" }}
+{{ $css := $bundle | resources.Minify | resources.Fingerprint "sha512" }}
+
+<link rel="stylesheet" href="{{ $css.Permalink }}"> \ No newline at end of file