Permalink
Browse files

Replace .Scratch with =

  • Loading branch information...
hanzei committed Aug 30, 2018
1 parent 8c70285 commit 8e5766e51f0764fdcb381c25d7511801f53de9ac
Showing with 13 additions and 15 deletions.
  1. +6 −7 layouts/partials/home/projects.html
  2. +6 −7 layouts/projects/list.html
  3. +1 −1 theme.toml
@@ -10,18 +10,17 @@ <h2 class="title is-2 has-text-centered">
{{ $totalProjects := (len .Pages) }}
{{ $numberOfProjectsToShow := .Site.Params.home.numberOfProjectsToShow | default $totalProjects }}
{{ range $index, $element := .Pages.ByWeight | first $numberOfProjectsToShow }}
{{ $width := "302x" }}
{{ $columWidth := "is-one-third" }}
{{ if .Site.Params.projects.useTwoColumns }}
{{ .Scratch.Set "width" "490x" }}
<div class="column is-half">
{{ else }}
{{ .Scratch.Set "width" "302x" }}
<div class="column is-one-third">
{{ end }}
{{ $columWidth = "is-half" }}
{{ $width = "490x" }}
{{ end}}
<div class="column {{ $columWidth }}">
<div class="card" data-target="#project-{{ $index }}">
<div class="card-image">
<figure class="image is-3by2">
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
{{ $width := ( .Scratch.Get "width" ) }}
{{ with .Resources.ByType "image" }}
{{ range first 1 (sort . "Params.weight") }}
{{ $image := .Resize $width }}
View
@@ -7,18 +7,17 @@
<div class="columns is-multiline">
{{ $numberOfPages := len .Pages}}
{{ range .Pages.ByWeight }}
{{ $width := "302x" }}
{{ $columWidth := "is-one-third" }}
{{ if .Site.Params.projects.useTwoColumns }}
{{ .Scratch.Set "width" "490x" }}
<div class="column is-half">
{{ else }}
{{ .Scratch.Set "width" "302x" }}
<div class="column is-one-third">
{{ end }}
{{ $columWidth = "is-half" }}
{{ $width = "490x" }}
{{ end}}
<div class="column {{ $columWidth }}">
<div class="card">
<div class="card-image">
<figure class="image is-3by2">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
{{ $width := ( .Scratch.Get "width" ) }}
{{ with .Resources.ByType "image" }}
{{ range first 1 (sort . "Params.weight") }}
{{ $image := .Resize $width }}
View
@@ -5,7 +5,7 @@ description = "Minimal, single page, smooth scrolling theme for Hugo."
homepage = "https://github.com/vickylai/hugo-theme-introduction"
tags = ["blog", "bulma", "clean", "dark", "disqus", "font awesome", "gallery", "minimal", "minimalist", "mobile", "multilingual", "one page", "personal", "responsive", "simple", "single page", "starter", "syntax highlighting", "projects", "white" ]
features = ["responsive", "blog", "portfolio", "gallery"]
min_version = "0.46"
min_version = "0.48"
[author]
name = "Vicky Lai"

0 comments on commit 8e5766e

Please sign in to comment.