From fa1c9643bd1af8dbab1de1da76629b52abfe1711 Mon Sep 17 00:00:00 2001 From: Rieko Tsunoda Date: Thu, 18 Jul 2019 21:19:00 +0900 Subject: [PATCH] [fix] sidebar topics can be shown, [add]sidebar css file #11 --- themes/cns_hp_theme/layouts/index.html | 6 ++-- .../layouts/partials/sidebar.html | 16 ++++++---- themes/cns_hp_theme/static/css/sidebar.css | 31 +++++++++++++++++++ .../static/css/split_container.css | 31 ------------------- 4 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 themes/cns_hp_theme/static/css/sidebar.css diff --git a/themes/cns_hp_theme/layouts/index.html b/themes/cns_hp_theme/layouts/index.html index ee394f0..4e01b97 100644 --- a/themes/cns_hp_theme/layouts/index.html +++ b/themes/cns_hp_theme/layouts/index.html @@ -62,12 +62,12 @@ 次へ - + - {{ partial "sidebar.html" }} + {{ partial "sidebar.html" .}} - + {{ partial "footer.html" . }} diff --git a/themes/cns_hp_theme/layouts/partials/sidebar.html b/themes/cns_hp_theme/layouts/partials/sidebar.html index 176f89a..95f79ed 100644 --- a/themes/cns_hp_theme/layouts/partials/sidebar.html +++ b/themes/cns_hp_theme/layouts/partials/sidebar.html @@ -1,7 +1,10 @@ + + + diff --git a/themes/cns_hp_theme/static/css/sidebar.css b/themes/cns_hp_theme/static/css/sidebar.css new file mode 100644 index 0000000..d3edc03 --- /dev/null +++ b/themes/cns_hp_theme/static/css/sidebar.css @@ -0,0 +1,31 @@ +/* + css file for sidebar + layouts/partial/sidebar.html + */ + +.sidebar { + display: block; + position: -webkit-sticky; + position: sticky; + top: 200px; + width: 320px; + height: 600px; + right: 15px; + color: #000; +} +/* +.sidebar__item { + border: solid 8px red; + box-sizing: border-box; +} +.sidebar__item--fixed { + border: solid 8px red; + box-sizing: border-box; + +} +.links { + border: solid 8px red; + box-sizing: border-box; + +} +*/ diff --git a/themes/cns_hp_theme/static/css/split_container.css b/themes/cns_hp_theme/static/css/split_container.css index 1027e5d..6388700 100644 --- a/themes/cns_hp_theme/static/css/split_container.css +++ b/themes/cns_hp_theme/static/css/split_container.css @@ -10,35 +10,4 @@ width: 100%; text-align: center; } -/* -.sidebar { - width: 320px; -} -*/ - -.sidebar { - display: block; - position: -webkit-sticky; - position: sticky; - top: 200px; - width: 320px; - height: 600px; - right: 15px; - color: #000; -} -/* -.sidebar__item { - border: solid 8px red; - box-sizing: border-box; -} -.sidebar__item--fixed { - border: solid 8px red; - box-sizing: border-box; - -} -.links { - border: solid 8px red; - box-sizing: border-box; -} -*/ -- GitLab