Update variables names to camelCase format for consistency (#473)

This commit is contained in:
Clément Pannetier
2020-11-04 18:28:31 +01:00
committed by GitHub
parent 0ff1b0fb4c
commit c5fbd48e91
15 changed files with 48 additions and 48 deletions

View File

@@ -45,7 +45,7 @@
{{ end }}
{{ end }}
{{ if or (eq .Site.Params.colorscheme "auto") (eq .Site.Params.colorscheme "dark") }}
{{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
{{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
@@ -91,9 +91,9 @@
</head>
{{ $csClass := "colorscheme-light" }}
{{ if eq .Site.Params.colorscheme "dark" }}
{{ if eq .Site.Params.colorScheme "dark" }}
{{ $csClass = "colorscheme-dark" }}
{{ else if eq .Site.Params.colorscheme "auto" }}
{{ else if eq .Site.Params.colorScheme "auto" }}
{{ $csClass = "colorscheme-auto" }}
{{ end }}
<body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"
@@ -110,7 +110,7 @@
{{ partial "footer.html" . }}
</main>
{{ if not .Site.Params.hidecolorschemetoggle }}
{{ if not .Site.Params.hideColorSchemeToggle }}
{{ if .Site.IsServer }}
{{ $script := resources.Get "js/dark-mode.js" }}
<script src="{{ $script.RelPermalink }}"></script>

View File

@@ -1,4 +1,4 @@
{{ if not .Site.Params.hidecolorschemetoggle }}
{{ if not .Site.Params.hideColorSchemeToggle }}
<div class="float-container">
<a id="dark-mode-toggle" class="colorscheme-toggle">
<i class="fa fa-adjust fa-fw" aria-hidden="true"></i>

View File

@@ -1,7 +1,7 @@
{{ if not .Site.Params.hideFooter | default false }}
<footer class="footer">
<section class="container">
{{ with .Site.Params.footercontent | safeHTML }}
{{ with .Site.Params.footerContent | safeHTML }}
<p>{{ . }}</p>
{{ end }}
{{ if not .Site.Params.hideCopyright }}
@@ -10,7 +10,7 @@
{{ .Site.Params.since }} -
{{ end }}
{{ now.Year }}
{{ with .Site.Params.Author }} {{ . }} {{ end }}
{{ with .Site.Params.author }} {{ . }} {{ end }}
{{ end }}
{{ if not .Site.Params.hideCredits }}
{{ if not .Site.Params.hideCopyright }} · {{ end }}

View File

@@ -1,7 +1,7 @@
<section class="container centered">
<div class="about">
{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
{{ with .Site.Params.avatarurl }}
{{ with .Site.Params.avatarURL }}
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
{{ end }}
{{ end }}

View File

@@ -12,7 +12,7 @@
{{ range .Paginator.Pages }}
<li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>

View File

@@ -1,4 +1,4 @@
{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoUrl "" )) (eq (.Params.disable_comments | default false) false) -}}
{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoURL "" )) (eq (.Params.disableComments | default false) false) -}}
<div id="commento"></div>
<script src="{{ .Site.Params.commentoUrl }}/js/commento.js"></script>
<script src="{{ .Site.Params.commentoURL }}/js/commento.js"></script>
{{- end -}}

View File

@@ -1,3 +1,3 @@
{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disable_comments | default false) false) -}}
{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}}
{{ template "_internal/disqus.html" . }}
{{- end -}}

View File

@@ -12,7 +12,7 @@
{{ range first (add $maxItems 1) $series.Pages }}
{{ if ne .RelPermalink $currentPageUrl }}
<li>
<a href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
<a href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
{{ end }}

View File

@@ -1,4 +1,4 @@
<li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li>

View File

@@ -28,8 +28,8 @@
</header>
<div>
{{ if .Params.featured_image }}
<img src='{{ .Params.featured_image }}' alt="Featured image"/>
{{ if .Params.featuredImage }}
<img src='{{ .Params.featuredImage }}' alt="Featured image"/>
{{ end }}
{{ .Content }}
</div>