forked from autonomic-cooperative/sophie-lewis-hugo
writing: add accordion functionality
This commit is contained in:
37
layouts/partials/head.html
Normal file
37
layouts/partials/head.html
Normal file
@ -0,0 +1,37 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ $title := print .Site.Title " | " .Title }}
|
||||
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
|
||||
{{/* scss compiling */}}
|
||||
{{ $options := (dict "targetPath" "css/style.css" "outputStyle" "compressed") }}
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
<link href='{{ $style.RelPermalink }}' rel="stylesheet">
|
||||
<title>{{ $title }}</title>
|
||||
{{- partial "octocss.html" . -}}
|
||||
{{ if eq .Title "Writing" }}
|
||||
<style>
|
||||
.accordion {
|
||||
background-color: transparent;
|
||||
color: #444;
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
text-align: left;
|
||||
outline: none;
|
||||
font-size: 15px;
|
||||
transition: 0.4s;
|
||||
}
|
||||
|
||||
.acc-panel {
|
||||
padding: 0 18px;
|
||||
background-color: white;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.2s ease-out;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
</head>
|
Reference in New Issue
Block a user