Init
This commit is contained in:
25
themes/agico-hugo/layouts/partials/components/accordion.html
Executable file
25
themes/agico-hugo/layouts/partials/components/accordion.html
Executable file
@@ -0,0 +1,25 @@
|
||||
{{ $title:= .Title }}
|
||||
{{ $content:= .Content }}
|
||||
{{ $class:= .Class }}
|
||||
{{ $headerClass:= .HeaderClass }}
|
||||
{{ $bodyClass:= .BodyClass }}
|
||||
|
||||
|
||||
<div class="accordion {{ $class }}">
|
||||
<button class="accordion-header {{ $headerClass }}" data-accordion>
|
||||
{{ $title | markdownify }}
|
||||
<svg
|
||||
class="accordion-icon"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 512 512"
|
||||
xmlspace="preserve">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="accordion-content {{ $bodyClass }}">
|
||||
<p>{{ $content | markdownify }}</p>
|
||||
</div>
|
||||
</div>
|
||||
33
themes/agico-hugo/layouts/partials/components/page-header.html
Executable file
33
themes/agico-hugo/layouts/partials/components/page-header.html
Executable file
@@ -0,0 +1,33 @@
|
||||
{{ "<!-- page-header -->" | safeHTML }}
|
||||
<section class="page-title page-title-overlay bg-cover" {{ partial `bg-image.html` (dict `Src` .Params.page_header_image
|
||||
) | safeHTMLAttr }}>
|
||||
<div>
|
||||
<div class="container">
|
||||
<div class="row" data-aos="fade-in" data-aos-delay="1">
|
||||
<div class="col-lg-7">
|
||||
<h1 class="text-white position-relative">{{ .Title }}<span class="watermark-sm">{{ .Params.Watermark
|
||||
}}</span>
|
||||
</h1>
|
||||
{{ with .Params.Description }}<p class="text-white pt-4">{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
<!-- <div class="col-lg-3 ms-auto align-self-end">
|
||||
<nav class="position-relative zindex-1" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb justify-content-sm-end bg-transparent">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}" class="text-white">{{ with .Site.Params.Home }} {{ . }} {{
|
||||
end
|
||||
}}</a>
|
||||
</li>
|
||||
{{ if or (eq .Section "post") (eq .Section "blog") (eq .Section "career") }}
|
||||
<li class="breadcrumb-item text-white" aria-current="page">{{ .Params.watermark }}</li>
|
||||
{{ else }}
|
||||
<li class="breadcrumb-item text-white" aria-current="page">{{ .Title }}</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</nav>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ "<!-- /page-header -->" | safeHTML }}
|
||||
33
themes/agico-hugo/layouts/partials/components/services.html
Executable file
33
themes/agico-hugo/layouts/partials/components/services.html
Executable file
@@ -0,0 +1,33 @@
|
||||
{{"<!-- service -->" | safeHTML }}
|
||||
{{ with .Params.service }}
|
||||
{{ if .enable }}
|
||||
<section class="section pb-0" id="services">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 mx-auto pe-md-4">
|
||||
<h2 class="section-title" data-aos="fade-up">{{ .title }}</h2>
|
||||
<p class="subtitle pb-4" data-aos="fade-up" data-aos-delay="200">{{ .subtitle | markdownify }}</p>
|
||||
</div>
|
||||
{{ range $index, $element:= .service_item }}
|
||||
{{ $delay := mul $index 100 }}
|
||||
<div class="col-xl-4 col-lg-6 col-md-6 mb-4" data-aos="fade-up" data-aos-delay="{{$delay}}">
|
||||
<div class="card border-0 shadow rounded-xs py-3 px-2 text-center hover-bg-primary">
|
||||
<div class="card-body">
|
||||
<i class="icon-lg icon-{{ .icon_color }} icon-bg-{{ .icon_color }} icon-bg-circle mb-3">
|
||||
<i class="{{ .icon }}"></i>
|
||||
</i>
|
||||
<h3 class="mt-4 mb-3">{{ .title }}</h3>
|
||||
<p>{{ .content | markdownify }}</p>
|
||||
{{ if .link }}
|
||||
<a class="btn btn-sm btn-outline-primary px-4" href="{{ .link }}"><i class="fas fa-sm fa-info-circle"></i>{{ i18n "more_info" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{"<!-- service -->" | safeHTML }}
|
||||
53
themes/agico-hugo/layouts/partials/components/sidebar.html
Executable file
53
themes/agico-hugo/layouts/partials/components/sidebar.html
Executable file
@@ -0,0 +1,53 @@
|
||||
<div class="col-lg-4">
|
||||
<div class="rounded-sm shadow bg-white pb-4">
|
||||
<div class="widget">
|
||||
<form action="{{ `search`| relLangURL }}">
|
||||
<div class="position-relative">
|
||||
<input id="search-query" name="s" type="search" placeholder="{{ i18n "search" }}"
|
||||
class="border-bottom form-control rounded-0 px-0">
|
||||
<button class="search-btn" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "category" }}</h5>
|
||||
{{- if isset .Site.Taxonomies "categories" }}
|
||||
{{- if not (eq (len .Site.Taxonomies.categories) 0) }}
|
||||
<ul class="list-styled list-bordered">
|
||||
{{- range $name, $items := .Site.Taxonomies.categories }}
|
||||
<li><a class="text-color d-inline-block py-2"
|
||||
href="{{ `categories/` | relLangURL }}{{ $name | urlize | lower }}">{{ $name | title | humanize }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "latest_article" }}</h5>
|
||||
<ul class="list-unstyled list-bordered">
|
||||
{{ range first 3 (where site.RegularPages "Section" "in" site.Params.mainSections ) }}
|
||||
<li class="article py-3">
|
||||
{{ partial "image.html" (dict "Src" .Params.Image "Alt" "post-thumb" "Class" `object-fit-cover rounded me-3` "Size" "200x") }}
|
||||
<div class="media-body d-inline-block">
|
||||
<h5 class="h6 mt-0"><a href="{{ .Permalink }}" class="text-dark">{{ .Title }}</a></h5>
|
||||
<p class="mb-0 text-color">{{ .PublishDate.Format "Jan 02, 2006" }}</p>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<h5>{{ i18n "tags" }}</h5>
|
||||
{{- if isset .Site.Taxonomies "tags" }}
|
||||
{{- if not (eq (len .Site.Taxonomies.tags) 0) }}
|
||||
<ul class="list-inline tag-list mt-4">
|
||||
{{- range $name, $items := .Site.Taxonomies.tags }}
|
||||
<li class="list-inline-item mb-3"><a href="{{ `tags/` | relLangURL }}{{ $name | urlize | lower }}"
|
||||
class="text-color shadow-sm">{{ $name | humanize }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
themes/agico-hugo/layouts/partials/components/subscription.html
Executable file
27
themes/agico-hugo/layouts/partials/components/subscription.html
Executable file
@@ -0,0 +1,27 @@
|
||||
{{"<!-- subscription -->" | safeHTML }}
|
||||
{{ if .Site.Params.subscription.enable }}
|
||||
{{ with .Site.Params.subscription }}
|
||||
<section class="subscription">
|
||||
<div class="container my-4">
|
||||
<div class="subscription-wrapper col-lg-10 align-items-center mx-auto">
|
||||
<div class="d-flex position-relative mx-5 justify-content-between align-items-center flex-column flex-md-row text-md-left">
|
||||
<h4 class="text-white flex-fill">{{ i18n "subscribe_newsletter" | safeHTML }}</h4>
|
||||
<form action="{{ .mailchimp_form_action }}" method="post"
|
||||
name="mc-embedded-subscribe-form" target="_blank" novalidate class="row flex-fill">
|
||||
<div class="col-lg-7 my-md-2 my-2">
|
||||
<input type="email" class="form-control text-white px-4 border-0 w-100 text-center text-md-left" placeholder="{{ i18n "your_email" }}" name="EMAIL" required>
|
||||
</div>
|
||||
<div class="col-lg-5 my-md-2 my-2">
|
||||
<button type="submit" name="subscribe" class="btn btn-outline-white text-white border-0 w-100">{{ i18n "subscribe_now" | safeHTML }}</button>
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true">
|
||||
<input type="text" name="{{ .mailchimp_form_name }}" tabindex="-1">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{"<!-- /subscription -->" | safeHTML }}
|
||||
Reference in New Issue
Block a user