initialisation finale
This commit is contained in:
29
layouts/index.html
Normal file
29
layouts/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="section bd-masthead">
|
||||
<div class="container-xxl">
|
||||
<div class="col-md-8 mx-auto text-center my-5">
|
||||
<img class="d-block mx-auto mb-3" src="{{ `images/logo.svg` | relURL }}" width="150" height="150" alt="Bootstrap">
|
||||
<h1 class="display-4 fw-semibold mb-3">{{ .Site.Title }}</h1>
|
||||
<p class="lead mb-4">{{ .Site.Params.Description }}</p>
|
||||
<a class="btn btn-bd-primary btn-lg px-4 mb-2" href="https://github.com/filipecarneiro/hugo-bootstrap-theme" role="button">Get Started</a>
|
||||
<p class="text-muted mb-0">Open-source MIT Licensed.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section container">
|
||||
{{ partial "features" . }}
|
||||
</section>
|
||||
|
||||
<section class="section container">
|
||||
<h3 class="text-secondary text-center my-5">Latest Posts</h3>
|
||||
{{ partial "latest-posts" . }}
|
||||
</section>
|
||||
|
||||
<section class="section container">
|
||||
<h3 class="text-secondary text-center my-5">Featured Pages</h3>
|
||||
{{ partial "featured-pages" . }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
||||
30
layouts/partials/featured-pages.html
Normal file
30
layouts/partials/featured-pages.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="row row-cols-1 g-4">
|
||||
|
||||
{{ range .Site.Taxonomies.tags.featured }}
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
<a class="stretched-link text-primary text-decoration-none" href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h4>
|
||||
<p class="text-text">
|
||||
{{ with .Params.description }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
{{ .Summary | truncate 400 }}
|
||||
{{ end }}
|
||||
</p>
|
||||
<p class="text-text text-muted">
|
||||
<small>
|
||||
{{ .Lastmod | time.Format ":date_long" }}
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
42
layouts/partials/features.html
Normal file
42
layouts/partials/features.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- Featueres section -->
|
||||
|
||||
<div class="row justify-content-center text-center mt-lg-3">
|
||||
<div class="col-lg-4">
|
||||
<svg xmlns='http://www.w3.org/2000/svg' class='feather text-violet feather-big' width="4em" height="4em">
|
||||
<use href="{{ `images/feather/feather-sprite.svg#shield` | relURL }}"/>
|
||||
</svg>
|
||||
<h2 class="h2">Security aware <small class="d-none">🛡️</small></h2>
|
||||
<p>Get A+ scores on <a href="https://observatory.mozilla.org/" target="_blank" rel="noopener">Mozilla Observatory</a>
|
||||
out of the box. Easily change the default Security Headers to suit your needs.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<svg xmlns='http://www.w3.org/2000/svg' class='feather text-violet feather-big' width="4em" height="4em">
|
||||
<use href="{{ `images/feather/feather-sprite.svg#zap` | relURL }}"/>
|
||||
</svg>
|
||||
<h2 class="h2">Fast by default <small class="d-none">🚀</small></h2>
|
||||
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=1f990bcb2d769bb4e82e7fc7a8be2b1f" target="_blank" rel="noopener">Google Lighthouse</a>
|
||||
by default. Hugo Bootstrap Theme removes unused css, prefetches links, and lazy loads images.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<svg xmlns='http://www.w3.org/2000/svg' class='feather text-violet feather-big' width="4em" height="4em">
|
||||
<use href="{{ `images/feather/feather-sprite.svg#trending-up` | relURL }}"/>
|
||||
</svg>
|
||||
<h2 class="h2">SEO-ready <small class="d-none">📈</small></h2>
|
||||
<p>Use sensible defaults for structured data, <a href="https://ogp.me/" target="_blank" rel="noopener">open graph</a>, and <a href="https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards" target="_blank" rel="noopener">Twitter cards</a>. Or easily change the Search Engine Optimization settings to your liking.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center text-center mt-lg-3">
|
||||
<div class="col-lg-4">
|
||||
<h2 class="h2">Hugo <small class="d-none">🦉</small></h2>
|
||||
<p><a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h2 class="h2">Bootstrap <small class="d-none">✨</small></h2>
|
||||
<p>Powerful, extensible, and feature-packed <a href="https://getbootstrap.com/" target="_blank" rel="noopener">frontend toolkit</a>. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins.</p>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h2 class="h2">Page layouts <small class="d-none">🧰</small></h2>
|
||||
<p>Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.</p>
|
||||
</div>
|
||||
</div>
|
||||
34
layouts/partials/latest-posts.html
Normal file
34
layouts/partials/latest-posts.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
|
||||
|
||||
{{ range first 3 (where .Site.RegularPages.ByDate.Reverse "Section" "post" ) }}
|
||||
<div class="col">
|
||||
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
<a class="stretched-link text-primary text-decoration-none" href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h4>
|
||||
{{ with .Params.authors }}
|
||||
<p class="card-subtitle text-muted">
|
||||
by {{ index . 0 }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="card-text mt-3">
|
||||
{{ with .Params.description }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
{{ .Summary | truncate 200 }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small class="text-muted">{{ .Date | time.Format ":date_long" }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user