From 6511170004397501080ec086708ad76aea56b9eb Mon Sep 17 00:00:00 2001 From: codecalm Date: Tue, 14 Jan 2020 21:20:31 +0100 Subject: [PATCH] tabler layouts --- _config.yml | 4 -- pages/_data/layouts.yml | 14 ++++++ pages/_includes/layout/layouts-list.html | 2 +- pages/_includes/layout/navbar.html | 6 +-- pages/_includes/layout/sidebar.html | 2 +- pages/_includes/parts/demo-layout.html | 17 +++---- pages/_layouts/default.html | 8 ++-- pages/index.html | 1 - pages/layout-dark-navigation.html | 6 +++ pages/layout-dark-topnav.html | 6 +++ pages/layout-dark.html | 6 +++ pages/layout-sidebar-dark.html | 8 ++++ pages/layout-sidebar-narrow.html | 9 ++++ pages/layout-sidebar-only.html | 7 +++ pages/layout-sidebar-right.html | 8 ++++ pages/layout-sidebar.html | 7 +++ pages/layout-test.html | 61 ------------------------ pages/search-results.html | 1 - 18 files changed, 89 insertions(+), 84 deletions(-) create mode 100644 pages/layout-dark-navigation.html create mode 100644 pages/layout-dark-topnav.html create mode 100644 pages/layout-dark.html create mode 100644 pages/layout-sidebar-dark.html create mode 100644 pages/layout-sidebar-narrow.html create mode 100644 pages/layout-sidebar-only.html create mode 100644 pages/layout-sidebar-right.html create mode 100644 pages/layout-sidebar.html delete mode 100644 pages/layout-test.html diff --git a/_config.yml b/_config.yml index c8869170c..54cb0f2c6 100644 --- a/_config.yml +++ b/_config.yml @@ -61,23 +61,19 @@ defaults: path: "*.md" values: layout: markdown - menu-layout: horizontal - scope: type: "pages" values: layout: default - menu-layout: horizontal - scope: type: "docs" values: layout: docs - menu-layout: horizontal - scope: type: "components" values: layout: component - menu-layout: horizontal colors: diff --git a/pages/_data/layouts.yml b/pages/_data/layouts.yml index e6c8dc27a..8fc2f4277 100644 --- a/pages/_data/layouts.yml +++ b/pages/_data/layouts.yml @@ -1,24 +1,35 @@ - title: Default tabler layout + page: layouts.html config: topmenu: true - title: Dark navigation + page: layout-dark-navigation.html config: topmenu: true topmenu-dark: true +- title: Dark topnav + page: layout-dark-topnav.html + config: + topmenu: true + topnav-dark: true + - title: Sidebar + page: layout-sidebar.html new: true config: sidebar: true - title: Dark sidebar + page: layout-sidebar-dark.html new: true config: sidebar: true sidebar-dark: true - title: Narrow sidebar + page: layout-sidebar-narrow.html new: true config: sidebar: true @@ -26,17 +37,20 @@ sidebar-dark: true - title: Right sidebar + page: layout-sidebar-right.html new: true config: sidebar-right: true - title: Sidebar only + page: layout-sidebar-only.html new: true config: sidebar: true hide-topnav: true - title: Dark mode + page: layout-dark.html soon: true config: sidebar: true diff --git a/pages/_includes/layout/layouts-list.html b/pages/_includes/layout/layouts-list.html index 1c0ec0878..7f826a7ab 100644 --- a/pages/_includes/layout/layouts-list.html +++ b/pages/_includes/layout/layouts-list.html @@ -4,7 +4,7 @@
diff --git a/pages/_includes/layout/navbar.html b/pages/_includes/layout/navbar.html index a098c9fc0..638347ead 100644 --- a/pages/_includes/layout/navbar.html +++ b/pages/_includes/layout/navbar.html @@ -1,10 +1,10 @@ {% assign person-id = include.person-id | default: 12 | minus: 1 %} {% assign person = site.data.people[person-id] %} -{% if include.menu-layout != 'vertical' %} -{% include layout/navbar-logo.html class="mr-4" %} -{% else %} +{% if page.sidebar %} {% include layout/navbar-search.html class="mr-4" %} +{% else %} +{% include layout/navbar-logo.html class="mr-4" %} {% endif %}