Compare commits

..

No commits in common. "aee652e0456fcadeea76c3113f946bd556ccb585" and "e385e4ee4d3c6c888dfd99d0a7d3e1d050c1adde" have entirely different histories.

5 changed files with 25 additions and 46 deletions

View file

@ -1,11 +0,0 @@
function scrollDown() {
var scroller = document.getElementById("scroller");
var height = scroller.offsetHeight;
scroller.scrollBy(0, height);
}
function scrollUp() {
var scroller = document.getElementById("scroller");
var height = scroller.offsetHeight;
scroller.scrollBy(0, -1 * height);
}

View file

@ -153,21 +153,9 @@ header {
justify-content: center; justify-content: center;
position: relative; position: relative;
width: 100%; width: 100%;
bottom: 0;
padding: 2rem; padding: 2rem;
font-size: x-large; font-size: x-large;
.down {
bottom: 0;
}
.up {
top: 0;
}
i {
color: {{ .Site.Params.color.secondary }};
cursor: pointer;
}
} }
.totop { .totop {
@ -309,14 +297,6 @@ header {
} }
} }
} }
:last-child {
.scroll-indicator.down {
display: none;
}
}
} }
article { article {

View file

@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
<div id="scroller" class="scroller"> <div class="scroller">
<section> <section>
<div class="profile card"> <div class="profile card">
{{ if .Params.image }} {{ if .Params.image }}
@ -13,23 +13,22 @@
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ .Content }} {{ .Content }}
{{ if .Params.social }} {{ if .Params.social }}
<div class="social"> <div class="social">
{{ range .Params.social }} {{ range .Params.social }}
{{ partial "components/icon.html" . }} {{ partial "components/icon.html" . }}
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>
</div> </div>
<div class="scroll-indicator down"> <div class="scroll-indicator">
<i class="icon-angle-down" onclick="scrollDown()"></i> <a href="#">
<i class="icon-angle-down"></i>
</a>
</div> </div>
</section> </section>
{{ range where .Site.RegularPages "Section" "projects"}} {{ range where .Site.RegularPages "Section" "projects"}}
<section> <section>
<div class="scroll-indicator up">
<i class="icon-angle-up" onclick="scrollUp()"></i>
</div>
<div class="card"> <div class="card">
{{ if .Params.image }} {{ if .Params.image }}
<div class="image"> <div class="image">
@ -50,8 +49,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="scroll-indicator down"> <div class="scroll-indicator">
<i class="icon-angle-down" onclick="scrollDown()"></i> <a href="#">
<i class="icon-angle-down"></i>
</a>
</div> </div>
</section> </section>
{{ end }} {{ end }}

View file

@ -21,7 +21,7 @@ caption: string
{{ $ext := path.Ext $url }} {{ $ext := path.Ext $url }}
{{ $name := path.Base (replace $url $ext "") }} {{ $name := path.Base (replace $url $ext "") }}
{{ $dir := path.Dir $url }} {{ $dir := path.Dir $url }}
{{ $mediaWidthControl := "(min-width: 1240px) 50vw, 70vw" }} {{ $mediaWidthControl := "(min-width: 1240px) 50px, 70vw" }}
<a href="{{ $url }}"> <a href="{{ $url }}">
<picture> <picture>

View file

@ -1,3 +1,12 @@
{{- with resources.Get "js/main.js" | minify | fingerprint }} {{- with resources.Get "js/main.js" }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> {{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }} {{- end }}