mirror of
https://github.com/Aroy-Art/Rinkusu.git
synced 2025-04-21 01:09:27 +02:00
Compare commits
2 commits
77d4252b75
...
7a13351ea2
Author | SHA1 | Date | |
---|---|---|---|
7a13351ea2 | |||
ff604db53f |
5 changed files with 78 additions and 41 deletions
|
@ -12,6 +12,21 @@ $(window).on('load', function () {
|
||||||
const observer = lozad(); // lazy loads elements with default selector as ".lozad"
|
const observer = lozad(); // lazy loads elements with default selector as ".lozad"
|
||||||
observer.observe();
|
observer.observe();
|
||||||
|
|
||||||
|
/* ========================================================================= */
|
||||||
|
/* init Masonry for blog list
|
||||||
|
/* ========================================================================= */
|
||||||
|
var grid = document.querySelector('.blog-post');
|
||||||
|
|
||||||
|
if (grid) {
|
||||||
|
var msnry = new Masonry(grid, {
|
||||||
|
percentPosition: true
|
||||||
|
});
|
||||||
|
|
||||||
|
imagesLoaded(grid).on('progress', function() {
|
||||||
|
// layout Masonry after each image loads
|
||||||
|
msnry.layout();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* ========================================================================= */
|
/* ========================================================================= */
|
||||||
/* Image Preloader
|
/* Image Preloader
|
||||||
|
@ -21,7 +36,6 @@ function imgIsLoaded(imgElement) {
|
||||||
$(imgElement).removeClass("unloaded");
|
$(imgElement).removeClass("unloaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ========================================================================= */
|
/* ========================================================================= */
|
||||||
/* Code Copy Button
|
/* Code Copy Button
|
||||||
/* ========================================================================= */
|
/* ========================================================================= */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<article class="col-lg-4 col-md-6 col-12 clearfix wow fadeInUp mb-4" data-wow-duration="500ms">
|
<article class="col-sm-6 col-lg-4 mb-4 clearfix" data-wow-duration="500ms">
|
||||||
<div class="post-block border-glow-2">
|
<div class="card post-block border-glow-2">
|
||||||
<div class="media-wrapper">
|
<div class="card-img">
|
||||||
<img class="img-fluid lozad" src="{{ .Params.Image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .Params.image | absURL }}'">
|
<img class="img-fluid" src="{{ .Params.Image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .Params.image | absURL }}'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "get_tags.html" . }}
|
{{ partial "get_tags.html" . }}
|
||||||
|
|
|
@ -10,26 +10,31 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{"<!-- Section Title -->" | safeHTML }}
|
{{"<!-- Section Title -->" | safeHTML }}
|
||||||
<dir class="title text-center wow fadeInDown">
|
<div class="title text-center wow fadeInDown">
|
||||||
<h2>{{ with i18n "blogTitle" }} {{ index (split . " ") 0 | safeHTML }} {{ end }}<span class="color">
|
<h2>{{ with i18n "blogTitle" }} {{ index (split . " ") 0 | safeHTML }} {{ end }}<span class="color">
|
||||||
{{ with i18n "blogTitle" }} {{ index (split . " ") 1 | safeHTML }} {{ end }}</span></h2>
|
{{ with i18n "blogTitle" }} {{ index (split . " ") 1 | safeHTML }} {{ end }}</span></h2>
|
||||||
<div class="border-Rinkusu"></div>
|
<div class="border-Rinkusu"></div>
|
||||||
</dir>
|
</div>
|
||||||
|
{{"<!-- /Section Title -->" | safeHTML }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "tagcloud.html" . }}
|
{{ partial "tagcloud.html" . }}
|
||||||
|
|
||||||
{{"<!-- Section Title -->" | safeHTML }}
|
<div class="row blog-post" data-masonry='{ "percentPosition": true }'>
|
||||||
{{ $paginator := .Paginate .Data.Pages}}
|
{{ $paginator := .Paginate .Data.Pages}}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ .Render "article" }}
|
{{ .Render "article" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ template "_internal/pagination.html" . }}
|
{{ template "_internal/pagination.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="/plugins/image-loaded/imagesloaded.pkgd.min.js"></script>
|
||||||
</section>
|
</section>
|
||||||
{{"<!-- /Blog Section -->" | safeHTML }}
|
{{"<!-- /Blog Section -->" | safeHTML }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -19,40 +19,49 @@
|
||||||
{{ with .title }} {{ after (len (index (split . " ") 0)) . | safeHTML }} {{ end }}</span></h2>
|
{{ with .title }} {{ after (len (index (split . " ") 0)) . | safeHTML }} {{ end }}</span></h2>
|
||||||
<div class="border-Rinkusu"></div>
|
<div class="border-Rinkusu"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="text-center mb-4">
|
||||||
|
{{ .description }}
|
||||||
|
</p>
|
||||||
{{"<!-- /Title -->" | safeHTML}}
|
{{"<!-- /Title -->" | safeHTML}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{ range .portfolio_categories }}
|
{{ range .portfolio_categories }}
|
||||||
{{ $text_color := .text_color}}
|
{{ $text_color := .text_color}}
|
||||||
<div class="row portfolio-category">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
{{"<!-- Section Title -->" | safeHTML}}
|
{{"<!-- Section Title -->" | safeHTML}}
|
||||||
<div class="title text-center">
|
<div class="pb-2 title text-center">
|
||||||
<h2 class="portfolio-category-title" style="background-color: {{ .bg_color}};">
|
<h2 class="portfolio-category-title" style="background-color: {{ .bg_color }};">
|
||||||
{{ with .name }} {{ index (split . " ") 0 | safeHTML }} {{ end }}<span style="color: {{ $text_color }};">
|
{{ with .name }} {{ index (split . " ") 0 | safeHTML }} {{ end }}
|
||||||
{{ with .name }} {{ after (len (index (split . " ") 0)) . | safeHTML }} {{ end }}</span></h2>
|
<span style="color: {{ $text_color }};">
|
||||||
|
{{ with .name }} {{ after (len (index (split . " ") 0)) . | safeHTML }} {{ end }}
|
||||||
|
</span>
|
||||||
|
</h2>
|
||||||
<div class="border-Rinkusu"></div>
|
<div class="border-Rinkusu"></div>
|
||||||
</div>
|
</div>
|
||||||
{{"<!-- /Section Title -->" | safeHTML}}
|
{{"<!-- /Section Title -->" | safeHTML}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="masonry-wrapper">
|
<div class="row portfolio-category" data-masonry='{ "percentPosition": true }'>
|
||||||
<div class="masonry">
|
|
||||||
{{ $category := .name }}
|
{{ $category := .name }}
|
||||||
{{ range .portfolio_items }}
|
{{ range .portfolio_items }}
|
||||||
{{- $original := resources.Get .image -}}
|
{{- $original := resources.Get .image -}}
|
||||||
{{ $thumb := $original.Fit "512x512" }}
|
{{ $thumb := $original.Fit "512x512" }}
|
||||||
{{ $image := $original.Fit "1080x1080" }}
|
{{ $image := $original.Fit "1080x1080" }}
|
||||||
<a class="masonry-item" href="{{ $image.RelPermalink }}" data-lightbox="{{ $category }}" data-title="{{ .name }}">
|
<div class="item col-sm-4 col-lg-3 my-2">
|
||||||
<img src="{{ $thumb.RelPermalink }}" alt="" class="masonry-content">
|
<a class="card bg-transparent" href="{{ $image.RelPermalink }}" data-lightbox="{{ $category }}" data-title="{{ .name }}">
|
||||||
|
<img class="card-img" src="{{ $thumb.RelPermalink }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<script src="{{ .image_loaded_plugin }}"></script>
|
<script src="{{ .image_loaded_plugin }}"></script>
|
||||||
</section>
|
</section>
|
||||||
{{"<!-- /Portfolio Section -->" | safeHTML}}
|
{{"<!-- /Portfolio Section -->" | safeHTML}}
|
||||||
|
|
9
static/plugins/masonry/masonry.pkgd.min.js
vendored
Normal file
9
static/plugins/masonry/masonry.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue