Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Severin <severinderek@gmail.com>2021-08-08 15:59:49 +0300
committerDerek Severin <severinderek@gmail.com>2021-08-08 15:59:49 +0300
commitd4fe5c1c2a349897f9ef06e01f413e1b44418da3 (patch)
tree6256bfc031f02ff6df2413c1547ad909c98f189e
parentb54a49e1108614e82a3c7be7e2b84da5124457bd (diff)
XS columns in projects section
-rw-r--r--layouts/_default/limage.html23
1 files changed, 10 insertions, 13 deletions
diff --git a/layouts/_default/limage.html b/layouts/_default/limage.html
index f165f4c..658b5f4 100644
--- a/layouts/_default/limage.html
+++ b/layouts/_default/limage.html
@@ -1,23 +1,20 @@
-
{{/* Get the number of columns from config */}}
-{{ $.Scratch.Set "col_lg" "col-lg-4" }}
+{{ $col_lg := "col-lg-2" }}
{{ with $.Site.Params.projects.nb_columns }}
{{ $nb_cols := div 12 (int .) }}
- {{ $.Scratch.Set "col_lg" (print "col-lg-" $nb_cols) }}
+ {{ $col_lg = print "col-lg-" $nb_cols }}
{{ end }}
-{{ $col_lg := $.Scratch.Get "col_lg" }}
-{{ $.Scratch.Delete "col_lg" }}
-
-{{ $.Scratch.Set "col_sm" "col-sm-6" }}
+{{ $col_sm := "col-sm-3" }}
{{ with $.Site.Params.projects.nb_columns_small }}
{{ $nb_cols := div 12 (int .) }}
- {{ $.Scratch.Set "col_sm" (print "col-sm-" $nb_cols) }}
+ {{ $col_sm = print "col-sm-" $nb_cols }}
{{ end }}
-{{ $col_sm := $.Scratch.Get "col_sm" }}
-{{ $.Scratch.Delete "col_sm" }}
-
-{{ $class := print $col_lg " " $col_sm }}
-
+{{ $col_xs := "col-xs-6" }}
+{{ with $.Site.Params.projects.nb_columns_xsmall }}
+ {{ $nb_cols := div 12 (int .) }}
+ {{ $col_xs = print "col-xs-" $nb_cols }}
+{{ end }}
+{{ $class := print $col_lg " " $col_sm " " $col_xs }}
<div class="{{ $class }}">
{{ $path := replace .File.Dir "\\" "/" }}
<a href="/{{ $path }}" class="project-box project-link">