mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
dropdown fixes, bootstrap rebuild
This commit is contained in:
@@ -8,16 +8,19 @@ forms:
|
|||||||
title: Form elements
|
title: Form elements
|
||||||
icon: check-square
|
icon: check-square
|
||||||
|
|
||||||
cards:
|
base:
|
||||||
url: cards.html
|
title: Base
|
||||||
title: Cards
|
icon: package
|
||||||
icon: file
|
children:
|
||||||
|
buttons:
|
||||||
theme:
|
url: buttons.html
|
||||||
title: Theme
|
title: Buttons
|
||||||
icon: edit-3
|
cards:
|
||||||
pages:
|
url: cards.html
|
||||||
|
title: Cards
|
||||||
|
c:
|
||||||
|
url: c.html
|
||||||
|
title: C
|
||||||
|
|
||||||
charts:
|
charts:
|
||||||
url: charts.html
|
url: charts.html
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
{% removeemptylines %}
|
{% removeemptylines %}
|
||||||
{% assign side = false %}
|
|
||||||
<ul class="navbar-nav flex-wrap{% if include.class %} {{ include.class }}{% endif %}">
|
<ul class="navbar-nav flex-wrap{% if include.class %} {{ include.class }}{% endif %}">
|
||||||
{% assign current-page = page.menu | default: layout.menu | split: '.' %}
|
{% assign current-page = page.menu | default: layout.menu | split: '.' %}
|
||||||
|
|
||||||
{% for level-1 in site.data.menu %}
|
{% for level-1 in site.data.menu %}
|
||||||
{% assign icon = level-1[1].icon %}
|
{% assign icon = level-1[1].icon %}
|
||||||
<li
|
|
||||||
class="nav-item{% if level-1[0] == current-page[0] %} active{% endif %}{% if level-1[1].children or level-1[1].docs %} {% if side %}dropright{% else %}dropdown{% endif %}{% endif %}">
|
{% assign has-children = false %}
|
||||||
<a class="nav-link{% if level-1[1].children or level-1[1].docs %} dropdown-toggle{% endif %}" {% if
|
{% if level-1[1].children or level-1[1].docs %}
|
||||||
level-1[1].children or level-1[1].docs %}href="#sidebar-{{ level-1[0] }}" data-toggle="dropdown" role="button"
|
{% assign has-children = true %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<li class="nav-item{% if level-1[0] == current-page[0] %} active{% endif %}{% if has-children %} dropdown{% endif %}">
|
||||||
|
<a class="nav-link{% if has-children %} dropdown-toggle{% endif %}" {% if has-children %}href="#navbar-{{ level-1[0] }}" data-toggle="dropdown" role="button"
|
||||||
aria-expanded="{% if level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% elsif level-1[1].toggle
|
aria-expanded="{% if level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% elsif level-1[1].toggle
|
||||||
%}href="{{ level-1[1].url }}" data-toggle="{{ level-1[1].toggle }}" {% else
|
%}href="{{ level-1[1].url }}" data-toggle="{{ level-1[1].toggle }}" {% else
|
||||||
%}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
|
%}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
|
||||||
@@ -25,9 +28,9 @@
|
|||||||
{% endunless %}
|
{% endunless %}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{% if level-1[1].children or level-1[1].docs %}
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
|
|
||||||
|
{% if has-children %}
|
||||||
|
<div class="dropdown-menu">
|
||||||
{% if level-1[1].docs %}
|
{% if level-1[1].docs %}
|
||||||
{% for d in site.data.docs %}
|
{% for d in site.data.docs %}
|
||||||
{% assign doc = site.docs | where: "slug", d.page | first %}
|
{% assign doc = site.docs | where: "slug", d.page | first %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="layout-area-menu navbar {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
|
<div class="layout-area-menu navbar navbar-expand-lg {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% include layout/menu.html top=true %}
|
{% include layout/menu.html top=true %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
33
scss/_bootstrap-components.scss
Normal file
33
scss/_bootstrap-components.scss
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@import "~bootstrap/scss/root";
|
||||||
|
@import "~bootstrap/scss/reboot";
|
||||||
|
@import "~bootstrap/scss/type";
|
||||||
|
@import "~bootstrap/scss/images";
|
||||||
|
@import "~bootstrap/scss/grid";
|
||||||
|
@import "~bootstrap/scss/tables";
|
||||||
|
@import "~bootstrap/scss/forms";
|
||||||
|
@import "~bootstrap/scss/buttons";
|
||||||
|
@import "~bootstrap/scss/transitions";
|
||||||
|
@import "~bootstrap/scss/dropdown";
|
||||||
|
@import "~bootstrap/scss/button-group";
|
||||||
|
@import "~bootstrap/scss/nav";
|
||||||
|
@import "~bootstrap/scss/navbar";
|
||||||
|
@import "~bootstrap/scss/card";
|
||||||
|
@import "~bootstrap/scss/breadcrumb";
|
||||||
|
@import "~bootstrap/scss/pagination";
|
||||||
|
@import "~bootstrap/scss/badge";
|
||||||
|
@import "~bootstrap/scss/alert";
|
||||||
|
@import "~bootstrap/scss/progress";
|
||||||
|
@import "~bootstrap/scss/list-group";
|
||||||
|
@import "~bootstrap/scss/close";
|
||||||
|
@import "~bootstrap/scss/toasts";
|
||||||
|
@import "~bootstrap/scss/modal";
|
||||||
|
@import "~bootstrap/scss/tooltip";
|
||||||
|
@import "~bootstrap/scss/popover";
|
||||||
|
@import "~bootstrap/scss/carousel";
|
||||||
|
@import "~bootstrap/scss/spinners";
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
@import "~bootstrap/scss/helpers";
|
||||||
|
|
||||||
|
// Utilities
|
||||||
|
@import "~bootstrap/scss/utilities/api";
|
||||||
4
scss/_bootstrap-config.scss
Normal file
4
scss/_bootstrap-config.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@import "~bootstrap/scss/functions";
|
||||||
|
@import "~bootstrap/scss/variables";
|
||||||
|
@import "~bootstrap/scss/mixins";
|
||||||
|
@import "~bootstrap/scss/utilities";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@import "../node_modules/bootstrap/scss/functions";
|
@import "~bootstrap/scss/functions";
|
||||||
|
|
||||||
@import "variables";
|
@import "variables";
|
||||||
@import "utilities";
|
@import "utilities";
|
||||||
|
|||||||
39
scss/_mixins-override.scss
Normal file
39
scss/_mixins-override.scss
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
@mixin caret($direction: down) {
|
||||||
|
$selector: 'after';
|
||||||
|
|
||||||
|
@if $direction == 'left' {
|
||||||
|
$selector: 'before'
|
||||||
|
}
|
||||||
|
|
||||||
|
&:#{$selector} {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: $caret-vertical-align;
|
||||||
|
width: $caret-width;
|
||||||
|
height: $caret-width;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
border-left: 1px solid;
|
||||||
|
|
||||||
|
@if $direction != 'left' {
|
||||||
|
margin-left: $caret-spacing;
|
||||||
|
} @else {
|
||||||
|
margin-right: $caret-spacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $direction == down {
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
} @else if $direction == up {
|
||||||
|
transform: rotate(135deg);
|
||||||
|
} @else if $direction == right {
|
||||||
|
transform: rotate(-135deg);
|
||||||
|
} @else {
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $direction == 'left' {
|
||||||
|
&:after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@ $google-font: "Source Sans Pro" !default;
|
|||||||
|
|
||||||
$font-family-sans-serif: $google-font, -apple-system, blinkmacsystemfont, segoe ui, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol !default;
|
$font-family-sans-serif: $google-font, -apple-system, blinkmacsystemfont, segoe ui, helvetica, arial, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol !default;
|
||||||
$font-family-serif: "Georgia", "Times New Roman", times, serif !default;
|
$font-family-serif: "Georgia", "Times New Roman", times, serif !default;
|
||||||
$font-icons: "tabler-webfont" !default;
|
|
||||||
|
|
||||||
// EXTERNAL FONTS
|
// EXTERNAL FONTS
|
||||||
$icon-fonts: () !default;
|
$icon-fonts: () !default;
|
||||||
@@ -146,6 +145,8 @@ $lead-font-weight: 400 !default;
|
|||||||
$hr-opacity: .1 !default;
|
$hr-opacity: .1 !default;
|
||||||
$hr-margin-y: 1rem !default;
|
$hr-margin-y: 1rem !default;
|
||||||
|
|
||||||
|
$caret-spacing: .4em !default;
|
||||||
|
|
||||||
//Sizing
|
//Sizing
|
||||||
$spacer: 1rem !default;
|
$spacer: 1rem !default;
|
||||||
$spacers: (
|
$spacers: (
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@import "config";
|
@import "config";
|
||||||
@import "~bootstrap/scss/bootstrap";
|
@import "bootstrap-config";
|
||||||
|
@import "mixins-override";
|
||||||
|
@import "bootstrap-components";
|
||||||
|
|
||||||
|
|
||||||
@import "fonts/webfonts";
|
@import "fonts/webfonts";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user