template
This commit is contained in:
38
ODOO4projects/themes/editor-hugo/layouts/_default/about.html
Normal file
38
ODOO4projects/themes/editor-hugo/layouts/_default/about.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="col-lg-12 my-5">
|
||||
<div class="row align-items-end mb-4 mb-lg-5">
|
||||
{{ if .Params.image }}
|
||||
<div class="col-xl-3 col-lg-4">
|
||||
<div class="pr-3">
|
||||
<img loading="lazy" class="img-fluid" style="max-width:250px" src="{{ .Params.image | absURL }}" alt="Author">
|
||||
</div>
|
||||
</div>
|
||||
{{ else if .Params.email }}
|
||||
<div class="col-xl-3 col-lg-4">
|
||||
<img loading="lazy" class="img-fluid" style="max-width:250px" src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=250&pg&d=identicon">
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="col-lg-7 mt-5 mt-lg-0">
|
||||
<p class="h5 mb-3">{{ i18n `about_me` }}</p>
|
||||
<h3 class="font-primary text-dark mb-0" style="line-height:1.5">{{ .Params.summary }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content mb-5 pb-1">{{ .Content }}</div>
|
||||
|
||||
{{ if .Params.partners.enable }}
|
||||
{{ with .Params.partners }}
|
||||
<p class="h4 mb-3 text-dark">{{ .title | markdownify}}</p>
|
||||
|
||||
<ul class="list-inline partner-logos">
|
||||
{{ range .partner_logos }}
|
||||
<li class="list-inline-item"><img loading="lazy" src="{{. | absURL}}"></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,37 @@
|
||||
<article class="card post-card">
|
||||
{{ with .Params.images }}
|
||||
<div class="post-slider slider-sm">
|
||||
{{ range . }}
|
||||
<div><img loading="lazy" class="w-100" src="{{ . | absURL }}" alt=""></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="card-body mb-3">
|
||||
{{ with .Params.tags }}
|
||||
<ul class="card-meta-tag list-inline mb-1">
|
||||
{{ range . }}
|
||||
<li class="list-inline-item"><a href="{{site.BaseURL}}tags/{{.| urlize}}/">{{.}}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<h3 class="h4 mb-2">
|
||||
<a class="post-title" href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
|
||||
</h3>
|
||||
|
||||
<p class="mb-0">{{ .Plain | truncate 70 }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<ul class="card-meta list-inline mb-0">
|
||||
{{ with site.GetPage "/about" }}
|
||||
<li class="list-inline-item">
|
||||
<span class="text-light">by:</span>
|
||||
<a href="{{ .Permalink }}" class="card-meta-author">{{ with .Params.name }}{{ index (split . " ") 0 }}{{ end }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="list-inline-item">
|
||||
<span class="card-meta-date">{{.PublishDate.Format "Jan 02, 2006"}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
|
||||
PROJECT: Editor Hugo
|
||||
VERSION: 1.0.0
|
||||
AUTHOR: Gethugothemes
|
||||
AUTHOR WEBSITE: https://gethugothemes.com
|
||||
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.LanguageCode | default `en-US` }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
{{ partialCached "style.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ partialCached "preloader.html" . }}
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
{{ if .IsHome }}
|
||||
<section class="page-content">
|
||||
<div class="container-fluid pl-3 pl-md-0 pr-3 pr-lg-4">
|
||||
<div class="row no-gutters">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ else }}
|
||||
|
||||
<section class="page-content section" style="border-left:1px solid #eee">
|
||||
<div class="container px-3 px-lg-4">
|
||||
<div class="row justify-content-center">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid px-3 px-lg-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 mt-4 pt-2">
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "script.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ partial "page-header.html" . }}
|
||||
|
||||
<div class="col-12 mb-5">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="pr-0 pr-lg-4">
|
||||
<div class="content mb-5">
|
||||
{{.Content | markdownify}}
|
||||
</div>
|
||||
<h4 class="mb-3"><a class="text-underline text-primary" href="mailto:{{site.Params.email}}">{{site.Params.email}}</a></h4>
|
||||
<p class="mb-2">{{site.Params.address}}</p>
|
||||
<p class="mb-2"><a href="tel:{{site.Params.mobile}}">{{site.Params.mobile}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mt-5 mt-lg-0">
|
||||
<form method="POST" action="{{ site.Params.contact_form_action | safeURL}}" class="row">
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control mb-4" placeholder="Name" name="name" id="name">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control mb-4" placeholder="Email" name="email" id="email">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<input type="text" class="form-control mb-4" placeholder="Subject" name="subject" id="subject">
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<textarea name="message" id="message" class="form-control mb-4" placeholder="Type You Message Here"
|
||||
rows="5"></textarea>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button class="btn btn-primary" type="submit">{{ i18n `send_message` }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
14
ODOO4projects/themes/editor-hugo/layouts/_default/index.json
Normal file
14
ODOO4projects/themes/editor-hugo/layouts/_default/index.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||
|
||||
{{ with .Params.images }}
|
||||
{{ range first 1 . }}
|
||||
{{ $.Scratch.Set "image" (. | absURL) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $image:= $.Scratch.Get "image" }}
|
||||
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "image" $image "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
|
||||
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
||||
123
ODOO4projects/themes/editor-hugo/layouts/_default/list.html
Normal file
123
ODOO4projects/themes/editor-hugo/layouts/_default/list.html
Normal file
@@ -0,0 +1,123 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<!-- checking blog -->
|
||||
{{ if or (eq .Section "post") (eq .Section "posts") (eq .Section "blog") (eq .Section "blogs") (eq .Section "news") }}
|
||||
{{ partial "page-header.html" . }}
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
{{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||
{{ .Render "article" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
{{"<!-- pagination -->" | safeHTML }}
|
||||
{{ $paginator := .Paginator }}
|
||||
<!-- Number of links either side of the current page. -->
|
||||
{{ $adjacent_links := 2 }}
|
||||
<!-- $max_links = ($adjacent_links * 2) + 1 -->
|
||||
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
|
||||
<!-- $lower_limit = $adjacent_links + 1 -->
|
||||
{{ $lower_limit := (add $adjacent_links 1) }}
|
||||
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
|
||||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
|
||||
<!-- If there's more than one page. -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<nav class="mb-3">
|
||||
<ul class="pagination justify-content-center">
|
||||
<!-- Previous page. -->
|
||||
{{ if $paginator.HasPrev }}
|
||||
<li class="page-item"><a class="page-link arrow" href="{{ $paginator.Prev.URL }}" aria-label="Pagination Arrow">
|
||||
<i class="fas fa-angle-left"></i>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
<!-- Page numbers. -->
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $.Scratch.Set "page_number_flag" false }}
|
||||
<!-- Advanced page numbers. -->
|
||||
{{ if gt $paginator.TotalPages $max_links }}
|
||||
<!-- Lower limit pages. -->
|
||||
<!-- If the user is on a page which is in the lower limit. -->
|
||||
{{ if le $paginator.PageNumber $lower_limit }}
|
||||
<!-- If the current loop page is less than max_links. -->
|
||||
{{ if le .PageNumber $max_links }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Upper limit pages. -->
|
||||
<!-- If the user is on a page which is in the upper limit. -->
|
||||
{{ else if ge $paginator.PageNumber $upper_limit }}
|
||||
<!-- If the current loop page is greater than total pages minus $max_links -->
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Middle pages. -->
|
||||
{{ else }}
|
||||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- Simple page numbers. -->
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
<!-- Output page numbers. -->
|
||||
{{ if eq ($.Scratch.Get "page_number_flag") true }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" class="page-link{{ if eq . $paginator }} active {{ end }}">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- Next page. -->
|
||||
{{ if $paginator.HasNext }}
|
||||
<li class="page-item"><a class="page-link arrow" href="{{ $paginator.Next.URL }}" aria-label="Pagination Arrow">
|
||||
<i class="fas fa-angle-right"></i>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- taxonomie page -->
|
||||
{{ else if or (eq .Section "categories") (eq .Section "tags")}}
|
||||
{{ partial "page-header.html" . }}
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
{{ range .Data.Pages }}
|
||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||
{{ .Render "article" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- regular page -->
|
||||
{{ else }}
|
||||
|
||||
{{ partial "page-header.html" . }}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<div class="content">
|
||||
{{.Content}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
<!-- /regular page -->
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,51 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<section class="page-header">
|
||||
<div class="my-4 py-5">
|
||||
<h4 class="title">{{ i18n "search_result_for" }}
|
||||
<span class="mark">
|
||||
<script>
|
||||
var keyword = (window.location.search).substr(3);
|
||||
var result = keyword.replace("+", " ");
|
||||
document.write(result);
|
||||
</script>
|
||||
</span>
|
||||
</h4>
|
||||
</div>
|
||||
</section>
|
||||
<div class="row" id="search-results"></div>
|
||||
<script id="search-result-template" type="text/x-js-template">
|
||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||
<article class="card post-card" id="summary-${key}">
|
||||
<a href="${link}">
|
||||
${ isset image }<img loading="lazy" class="w-100" src="${image}" alt="${title}">${end}
|
||||
</a>
|
||||
<div class="card-body mb-3">
|
||||
<h3 class="h4 mb-2">
|
||||
<a class="post-title" href="${link}" title="${title}">${title}</a>
|
||||
</h3>
|
||||
|
||||
<p class="mb-0">${snippet}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<ul class="card-meta list-inline mb-0">
|
||||
<li class="list-inline-item">
|
||||
<span class="card-meta-date">{{ i18n "category" }}: ${categories}</span>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<span class="card-meta-date">{{ i18n "tag" }}: ${tags}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
{{ "<!-- Search index -->" | safeHTML }}
|
||||
<script>
|
||||
var indexURL = {{"index.json" | absLangURL}}
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,84 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<!-- checking blog -->
|
||||
{{ if or (eq .Section "post") (eq .Section "posts") (eq .Section "blog") (eq .Section "blogs") (eq .Section "news") (eq .Section "categories") (eq .Section "tags") }}
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="mb-4 mt-4 mt-md-0">
|
||||
{{ with .Params.images }}
|
||||
<div class="post-slider">
|
||||
{{ range . }}
|
||||
<div><img loading="lazy" class="w-100" src="{{ . | absURL }}" alt=""></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.tags }}
|
||||
<ul class="card-meta-tag list-inline mt-3">
|
||||
{{ range . }}
|
||||
<li class="list-inline-item"><a href="{{site.BaseURL}}tags/{{.| urlize}}/">{{.}}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
<h2 class="h3 mt-2 mb-3 post-title">{{ .Title }}</h2>
|
||||
|
||||
<ul class="card-meta list-inline mb-0">
|
||||
{{ with site.GetPage "/about" }}
|
||||
<li class="list-inline-item">
|
||||
<span class="text-light">by:</span>
|
||||
<a href="{{ .Permalink }}" class="card-meta-author">{{ .Params.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="list-inline-item">
|
||||
<span class="card-meta-date">{{.PublishDate.Format "Jan 02, 2006"}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- comments -->
|
||||
{{ if site.Config.Services.Disqus.Shortname }}
|
||||
<div class="border p-4 mt-5">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4 mt-5 mt-lg-0">
|
||||
<div class="pl-0 pl-lg-3">
|
||||
{{ $widget:= site.Params.widgets.sidebar }}
|
||||
{{- partial "widgets/widget-wrapper" ( dict "Widgets" $widget "Scope" . ) -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="single-post-similer">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h3 class="text-dark font-weight-bold mb-4 pb-2">{{i18n "you_may_also_like"}}</h3>
|
||||
</div>
|
||||
{{ $related := ( where site.RegularPages "Type" "in" site.Params.mainSections ) | intersect (where site.Pages ".Title" "!=" .Title) | union (site.RegularPages.RelatedIndices . "tags" ) }}
|
||||
{{ range first 3 $related }}
|
||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||
{{ .Render "article" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- regular page -->
|
||||
{{ else }}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">{{ partial "page-header.html" . }}</div>
|
||||
<div class="content">
|
||||
{{.Content}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- /regular page -->
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- Redirect to homepage -->
|
||||
<script>window.location.replace("{{ site.BaseURL | relLangURL }}");</script>
|
||||
Reference in New Issue
Block a user