1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-12 22:32:21 +04:00

taqbler layout refactoring

This commit is contained in:
codecalm
2019-07-01 22:59:32 +02:00
parent 736b4ac035
commit c9a4cb2cac
7 changed files with 30 additions and 45 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
{% assign menu = page.menu | default: layout.menu %}
<div class="navbar navbar-side{% if include.dark %} navbar-dark{% endif %}{% if page.nav-position == 'right' %} navbar-right{% endif %}{% if include.folded %} navbar-folded{% endif %} navbar-sticky">
<aside class="d-none d-lg-flex navbar navbar-side{% if include.dark %} navbar-dark{% endif %}{% if page.nav-position == 'right' %} navbar-right{% endif %}{% if include.folded %} navbar-folded{% endif %}">
{% include layout/sidenav-content.html menu=menu %}
</div>
</aside>
+2 -9
View File
@@ -1,11 +1,4 @@
<header class="navbar navbar-expand-md{% if include.dark %} navbar-dark{% endif %}{% if include.sticky %} navbar-sticky{% endif %}">
{% include parts/navbar.html logo=true search=true user-menu=1 person=1 dark=include.dark %}
<header class="navbar navbar-expand-lg{% if include.dark %} navbar-dark{% endif %}{% if include.sticky %} navbar-sticky{% endif %}">
{% include parts/navbar.html logo=true search=true user-menu=1 person=1 dark=include.dark fluid=include.fluid %}
</header>
{% if page.nav-position == "top" or page.nav-position == "all" %}
<div class="navbar navbar-expand-md">
<div class="container">
{% include layout/menu.html top=true %}
</div>
</div>
{% endif %}
+1 -1
View File
@@ -97,7 +97,7 @@
</li>
{% endif %}
<li class="nav-item d-none d-md-flex">
<li class="nav-item d-none d-lg-flex mr-3">
<a href="https://github.com/tabler/tabler" class="btn btn-sm btn-outline-primary" target="_blank">Source code</a>
</li>
+1 -1
View File
@@ -23,7 +23,7 @@
{% include layout/css.html %}
{% include layout/js.html %}
</head>
<body class="d-flex flex-column antialiased {% if page.dark-theme %} theme-dark{% endif %}{% if layout.body-class %} {{ layout.body-class }}{% endif %}{% if page.body-class %} {{ page.body-class }}{% endif %}">
<body class="antialiased {% if page.dark-theme %} theme-dark{% endif %}{% if layout.body-class %} {{ layout.body-class }}{% endif %}{% if page.body-class %} {{ page.body-class }}{% endif %}">
{{ content}}
+19 -26
View File
@@ -2,35 +2,28 @@
layout: base
---
{% if page.header-primary %}
{% include layout/topnav.html dark=page.header-dark sticky=page.header-sticky %}
{% endif %}
{% include layout/topnav.html dark=page.header-dark sticky=true fluid=true %}
<div class="d-flex h-auto min-h-screen">
<div class="d-flex flex-fill">
{% if page.nav-position == "all" %}
{% include layout/sidenav.html dark=true folded=true %}
{% endif %}
<div class="d-flex flex-row">
{% if page.nav-position == "left" or page.nav-position == "right" %}
{% include layout/sidenav.html dark=page.sidenav-dark folded=page.sidenav-folded %}
{% endif %}
{% if page.nav-position == "left" or page.nav-position == "right" or page.nav-position == "all" %}
{% include layout/sidenav.html dark=page.sidenav-dark folded=page.sidenav-folded %}
{% endif %}
<main class="d-flex flex-column flex-fill max-w-full">
{% include layout/topnav.html dark=page.header-dark sticky=page.header-sticky %}
<div class="main-content flex-fill d-flex flex-column max-w-full">
{% unless page.header-primary %}
{% include layout/topnav.html dark=page.header-dark sticky=page.header-sticky %}
{% endunless %}
<div class="d-flex flex-fill max-w-full">
<div class="flex-fill px-lg-2 mw-100{% if page.blank %} d-flex align-items-center{% endif %}">
<div class="container{% if page.container-size %} container-{{ page.container-size }}{% endif %}{% if page.fluid %}-fluid{% endif %} my-4">
{% include layout/page-title.html %}
{{ content }}
</div>
</div>
{% if page.nav-position == "top" or page.nav-position == "all" %}
<div class="d-none d-lg-flex navbar navbar-expand-md">
<div class="container">
{% include layout/menu.html top=true %}
</div>
</div>
</div>
{% endif %}
<div class="container{% if page.container-size %} container-{{ page.container-size }}{% endif %}{% if page.fluid %}-fluid{% endif %} my-4">
<!--{% include layout/page-title.html %}-->
{{ content }}
</div>
</main>
</div>
-6
View File
@@ -1,6 +0,0 @@
---
nav-position: all
page-title: Dashboard
---
{% include_cached layout/homepage.html %}
+5
View File
@@ -329,3 +329,8 @@ Utils
display: none;
}
}
.navbar-toggler-icon {
outline: 1px solid red;
}