mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-05-20 20:11:53 +02:00
enh: slim baseof template; add new partials for matches
This commit is contained in:
parent
deb4c8af58
commit
f95bfdf3de
5 changed files with 141 additions and 66 deletions
|
@ -16,76 +16,15 @@
|
||||||
{{ partial "partials/header/basic.html" . }}
|
{{ partial "partials/header/basic.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
{{ if .Site.Params.homePageVideo }}
|
{{- partial "video.html" . -}}
|
||||||
<style>
|
|
||||||
@media screen and (min-width: 1023px) {
|
|
||||||
.video-margin {
|
|
||||||
margin-top: 97vh;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="lg:absolute inset-0 w-full lg:w-screen h-screen">
|
|
||||||
<video class="h-full mx-auto object-cover" autoplay loop muted>
|
|
||||||
<source src="{{ .Site.Params.homePageVideo }}" data-src="{{ .Site.Params.homePageVideo }}" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<!-- <div id="the-top" class="absolute flex self-center">
|
|
||||||
<a class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
|
||||||
href="#main-content"><span
|
|
||||||
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
|
||||||
"nav.skip_to_main" }}</a> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="relative flex flex-col grow">
|
<div class="relative flex flex-col grow">
|
||||||
<main id="main-content" class="grow video-margin">
|
<main id="main-content" class="grow">
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
<h2 class="mt-8 text-2xl font-extrabold mb-10">Sponsors</h2>
|
{{- partial "sponsors.html" . -}}
|
||||||
{{ $images := .Site.Params.sponsors }}
|
{{- partial "next-match.html" . -}}
|
||||||
<link rel="stylesheet" href="css/infinite.css">
|
{{- partial "last-match.html" . -}}
|
||||||
<script src="js/main.js"></script>
|
|
||||||
<div class="marquee-wrapper" style="user-select: none;">
|
|
||||||
<div class="marquee-content scrollingX">
|
|
||||||
{{ $num := 0 }}
|
|
||||||
{{ range $images }}
|
|
||||||
<div class="card-testimonial flex items-center">
|
|
||||||
<article>
|
|
||||||
<picture>
|
|
||||||
{{ if .site }}
|
|
||||||
<a href="{{ .site }}" target="_blank"><img src="{{ .img }}" alt="{{ .img }}"></a>
|
|
||||||
{{ else }}
|
|
||||||
<img src="{{ .img }}" alt="{{ .img }}">
|
|
||||||
{{ end }}
|
|
||||||
</picture>
|
|
||||||
{{ if .name }}
|
|
||||||
<article class="short-description"><p class="text-center mt-1">{{ .name }}</p></article>
|
|
||||||
{{ end }}
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
{{ $num = add $num 1 }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $num := 0 }}
|
|
||||||
{{ range $images }}
|
|
||||||
<div class="card-testimonial flex items-center">
|
|
||||||
<article>
|
|
||||||
<picture>
|
|
||||||
{{ if .site }}
|
|
||||||
<a href="{{ .site }}" target="_blank"><img src="{{ .img }}" alt="{{ .img }}"></a>
|
|
||||||
{{ else }}
|
|
||||||
<img src="{{ .img }}" alt="{{ .img }}">
|
|
||||||
{{ end }}
|
|
||||||
</picture>
|
|
||||||
{{ if .name }}
|
|
||||||
<article class="short-description">
|
|
||||||
<p class="text-center mt-1">{{ .name }}</p>
|
|
||||||
</article>
|
|
||||||
{{ end }}
|
|
||||||
</article>
|
|
||||||
</div>
|
|
||||||
{{ $num = add $num 1 }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||||
|
|
35
layouts/partials/last-match.html
Normal file
35
layouts/partials/last-match.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<h2 class="mt-8 text-2xl font-extrabold mb-10">Ultima Partita</h2>
|
||||||
|
{{ $match := .Site.Params.last_match }}
|
||||||
|
<section class="flex flex-col flex-nowrap items-center gap-5 sm:flex-row">
|
||||||
|
<div class="h-full text-center flex flex-1 flex-grow justify-center">
|
||||||
|
<img src="./teams/{{ $match.home_logo }}" alt="" width="80rem"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow p-6">
|
||||||
|
{{ if strings.Contains $match.home "Saviors" }}
|
||||||
|
<h1 class="text-2xl font-extrabold" style="color: #1c8a37">{{ $match.home }}</h2>
|
||||||
|
{{ else }}
|
||||||
|
<h1 class="text-2xl font-extrabold">{{ $match.home }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow">
|
||||||
|
<h1 class="text-2xl not-italic font-extrabold" style="color: #95c11f">{{ $match.result }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow p-6">
|
||||||
|
{{ if strings.Contains $match.visitors "Saviors" }}
|
||||||
|
<h1 class="text-2xl font-extrabold" style="color: #1c8a37">{{ $match.visitors }}</h2>
|
||||||
|
{{ else }}
|
||||||
|
<h1 class="text-2xl font-extrabold">{{ $match.visitors }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex flex-1 flex-grow justify-center">
|
||||||
|
<img src="./teams/{{ $match.visitors_logo }}" alt="" width="80rem"/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div style="background-color: #1c8a37" class="h-[2px] mt-2 mb-2"></div>
|
||||||
|
<div class="flex items-center justify-center">
|
||||||
|
<p class="text-sm h-full text-center">{{ $match.when_where }}</p>
|
||||||
|
</div>
|
35
layouts/partials/next-match.html
Normal file
35
layouts/partials/next-match.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<h2 class="mt-8 text-2xl font-extrabold mb-10">Prossima Partita</h2>
|
||||||
|
{{ $match := .Site.Params.next_match }}
|
||||||
|
<section class="flex flex-col flex-nowrap items-center gap-5 sm:flex-row">
|
||||||
|
<div class="h-full text-center flex flex-1 flex-grow justify-center">
|
||||||
|
<img src="./teams/{{ $match.home_logo }}" alt="" class="h-16 w-16" width="80rem"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow p-6">
|
||||||
|
{{ if strings.Contains $match.home "Saviors" }}
|
||||||
|
<h1 class="text-2xl font-extrabold" style="color: #1c8a37">{{ $match.home }}</h2>
|
||||||
|
{{ else }}
|
||||||
|
<h1 class="text-2xl font-extrabold">{{ $match.home }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow">
|
||||||
|
<h1 class="text-2xl not-italic font-extrabold" style="color: #95c11f">{{ $match.result }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex-1 flex-grow p-6">
|
||||||
|
{{ if strings.Contains $match.visitors "Saviors" }}
|
||||||
|
<h1 class="text-2xl font-extrabold" style="color: #1c8a37">{{ $match.visitors }}</h2>
|
||||||
|
{{ else }}
|
||||||
|
<h1 class="text-2xl font-extrabold">{{ $match.visitors }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="h-full text-center flex flex-1 flex-grow justify-center">
|
||||||
|
<img src="./teams/{{ $match.visitors_logo }}" alt="" width="80rem"/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div style="background-color: #1c8a37" class="h-[2px] mt-2 mb-2"></div>
|
||||||
|
<div class="flex items-center justify-center">
|
||||||
|
<p class="text-sm h-full text-center">{{ $match.when_where }}</p>
|
||||||
|
</div>
|
47
layouts/partials/sponsors.html
Normal file
47
layouts/partials/sponsors.html
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<h2 class="mt-8 text-2xl font-extrabold mb-10">Sponsors</h2>
|
||||||
|
{{ $images := .Site.Params.sponsors }}
|
||||||
|
<link rel="stylesheet" href="css/infinite.css" />
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
<div class="marquee-wrapper" style="user-select: none">
|
||||||
|
<div class="marquee-content scrollingX">
|
||||||
|
{{ $num := 0 }} {{ range $images }}
|
||||||
|
<div class="card-testimonial flex items-center">
|
||||||
|
<article>
|
||||||
|
<picture>
|
||||||
|
{{ if .site }}
|
||||||
|
<a href="{{ .site }}" target="_blank"
|
||||||
|
><img src="{{ .img }}" alt="{{ .img }}"
|
||||||
|
/></a>
|
||||||
|
{{ else }}
|
||||||
|
<img src="{{ .img }}" alt="{{ .img }}" />
|
||||||
|
{{ end }}
|
||||||
|
</picture>
|
||||||
|
{{ if .name }}
|
||||||
|
<article class="short-description">
|
||||||
|
<p class="text-center mt-1">{{ .name }}</p>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
{{ $num = add $num 1 }} {{ end }} {{ $num := 0 }} {{ range $images }}
|
||||||
|
<div class="card-testimonial flex items-center">
|
||||||
|
<article>
|
||||||
|
<picture>
|
||||||
|
{{ if .site }}
|
||||||
|
<a href="{{ .site }}" target="_blank"
|
||||||
|
><img src="{{ .img }}" alt="{{ .img }}"
|
||||||
|
/></a>
|
||||||
|
{{ else }}
|
||||||
|
<img src="{{ .img }}" alt="{{ .img }}" />
|
||||||
|
{{ end }}
|
||||||
|
</picture>
|
||||||
|
{{ if .name }}
|
||||||
|
<article class="short-description">
|
||||||
|
<p class="text-center mt-1">{{ .name }}</p>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
{{ $num = add $num 1 }} {{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
19
layouts/partials/video.html
Normal file
19
layouts/partials/video.html
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{ if .Site.Params.homePageVideo }}
|
||||||
|
<style>
|
||||||
|
@media screen and (min-width: 1023px) {
|
||||||
|
.video-margin {
|
||||||
|
margin-top: 97vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="lg:absolute inset-0 w-full lg:w-screen h-screen">
|
||||||
|
<video class="h-full mx-auto object-cover" autoplay loop muted>
|
||||||
|
<source
|
||||||
|
src="{{ .Site.Params.homePageVideo }}"
|
||||||
|
data-src="{{ .Site.Params.homePageVideo }}"
|
||||||
|
type="video/mp4"
|
||||||
|
/>
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
<div class="relative video-margin"></div>
|
||||||
|
{{ end }}
|
Loading…
Add table
Reference in a new issue