From 101c17fe87cd7fbd20330692fd8a247a1b17ca79 Mon Sep 17 00:00:00 2001 From: Jacek Lebioda <jacek.lebioda@uni.lu> Date: Fri, 9 Aug 2019 15:29:10 +0200 Subject: [PATCH] Added accordion scss code to the theme --- _sass/elixir/_accordion.scss | 62 ++++++++++++++++++++++++++++++++++++ elixir-theme.gemspec | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 _sass/elixir/_accordion.scss diff --git a/_sass/elixir/_accordion.scss b/_sass/elixir/_accordion.scss new file mode 100644 index 0000000..a076ba1 --- /dev/null +++ b/_sass/elixir/_accordion.scss @@ -0,0 +1,62 @@ +.accordion { + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 4px -2px rgba(0,0,0,0.5); + + .accordion-item { + width: 100%; + color: #f3efef; + overflow: hidden; + + label { + display: flex; + padding: 1em; + background: #2c3e50; + justify-content: space-between; + font-weight: bold; + cursor: pointer; + border-bottom: solid 1px white; + + &:hover { + background: #1a252f; + } + + &:after { + content: "\276F"; + width: 1em; + height: 1em; + text-align: center; + transition: all .35s; + } + } + + input { + position: absolute; + opacity: 0; + z-index: -1; + + &:checked + label { + background: #1a252f; + } + + &:checked + label:after { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + } + + &:checked ~ .accordion-content { + max-height: 100vh; + padding: 1em; + } + } + + .accordion-content { + max-height: 0; + padding: 0 1em; + color: #2c3e50; + background: white; + transition: all .35s; + font-size: larger; + } + } +} diff --git a/elixir-theme.gemspec b/elixir-theme.gemspec index a406b9f..4a46f20 100644 --- a/elixir-theme.gemspec +++ b/elixir-theme.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-elixir-theme" - spec.version = "0.7.1" + spec.version = "0.7.2" spec.authors = ["jacek.lebioda"] spec.email = ["jacek.lebioda@uni.lu"] -- GitLab