提交 9a48aeef 编写于 作者: C chomik

alert fixes, carousel

上级 fcb38da2
......@@ -98,10 +98,14 @@ colors:
name: Dark
variants:
success: danger
info: danger
warning: danger
danger: danger
- name: success
icon: check
- name: info
icon: info
- name: warning
icon: alert-triangle
- name: danger
icon: x-octagon
socials: [facebook, twitter, google, youtube, vimeo, dribbble, github, instagram, pinterest, vk, rss, flickr, bitbucket]
......@@ -110,9 +114,11 @@ months_long: ['January', 'Febuary', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'S
docs-menu:
- title: Getting started
pages: [index]
- title: Components
pages: [alerts, avatars, badges, buttons, carousel, spinners, steps, tabs, toasts, tooltips, typography]
intro:
title: Getting started
pages: [index]
components:
title: Components
pages: [alerts, avatars, badges, buttons, cards, carousel, spinners, steps, tabs, toasts, tooltips, typography]
......@@ -6,55 +6,7 @@ apps:
docs:
title: Documentation
icon: file-text
children:
- title: Alerts
url: '#'
- title: Avatars
url: '#'
- title: Badges
url: '#'
- title: Breadcrumb
url: '#'
- title: Buttons
url: '#'
- title: Button group
url: '#'
- title: Cards
url: '#'
- title: Charts
url: '#'
- title: Dropdowns
url: '#'
- title: Forms
url: '#'
- title: Icons
url: '#'
- title: Lists
url: '#'
- title: Modal
url: '#'
- title: Navs
url: '#'
- title: Navbar
url: '#'
- title: Pagination
url: '#'
- title: Popovers
url: '#'
- title: Progress
url: '#'
- title: Spinners
url: '#'
- title: Tables
url: '#'
- title: Toasts
url: '#'
- title: Tooltips
url: '#'
- title: Typography
url: '#'
- title: Utilities
url: '#'
docs: components
changelog:
url: changelog.html
active: true
......
......@@ -8,10 +8,10 @@ Bootstrap provides an easy way to create predefined alert messages.
{% example html %}
{% for variant in site.variants %}
{% capture text_with_variant %}
This is a {{ variant }} alert — check it out!
{% capture variant-text %}
This is a {{ variant.name }} alert — check it out!
{% endcapture %}
{% include ui/alert.html type=variant text=text_with_variant %}
{% include ui/alert.html type=variant.name text=variant-text %}
{% endfor %}
{% endexample %}
......@@ -22,10 +22,10 @@ Add the `alert-link` class to any links inside the alert box to create "matching
{% example html %}
{% for variant in site.variants %}
{% capture text_with_variant %}
This is a {{ variant }} alert — <a href="#">check it out!</a>
{% capture variant-text %}
This is a {{ variant.name }} alert — <a href="#">check it out!</a>
{% endcapture %}
{% include ui/alert.html type=variant text=text_with_variant %}
{% include ui/alert.html type=variant.name text=variant-text %}
{% endfor %}
{% endexample %}
......@@ -34,9 +34,20 @@ Add the `alert-link` class to any links inside the alert box to create "matching
{% example html %}
{% for variant in site.variants %}
{% capture text_with_variant %}
This is a {{ variant }} alert — check it out!
{% capture variant-text %}
This is a {{ variant.name }} alert — check it out!
{% endcapture %}
{% include ui/alert.html type=variant text=text_with_variant close=true %}
{% include ui/alert.html type=variant.name text=variant-text close=true %}
{% endfor %}
{% endexample %}
## Alerts with icons
{% example html %}
{% for variant in site.variants %}
{% capture variant-text %}
This is a {{ variant.name }} alert — check it out!
{% endcapture %}
{% include ui/alert.html type=variant.name icon=variant.icon text=variant-text close=true %}
{% endfor %}
{% endexample %}
---
title: Cards
description: A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options.
---
The `.card` element is simply a container with a shadow, a border, a radius, and some padding. Built with flexbox, they offer easy alignment and mix well with other Bootstrap components.
### Default card
{% example html columns=1 %}
{% include cards/card.html hide-options=true %}
{% endexample %}
### Advanced card
{% example html columns=1 %}
{% include cards/card.html show-buttons=true show-footer=true %}
{% endexample %}
### Blog post card
The best way to make your post eye-catching is adding an image to it. To do so, just add the image with the `.card-img-top` class. We've added the `.d-flex .flex-column` classes to the `.card-body` to have the author details be on the bottom of the card.
{% example html columns=1 %}
{% include cards/blog-single.html type="image" %}
{% endexample %}
### Row deck
If you want to create a couple of posts next to each other, add the `.row-deck` class to `.row`—then they will all have the same height.
{% example html columns=2 %}
<div class="row row-cards row-deck">
<div class="col-md-4">
<div class="card">
<div class="card-body">Short content</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">Extra long content of card. Lorem ipsum dolor sit amet, consetetur sadipscing elitr</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">Short content</div>
</div>
</div>
</div>
{% endexample %}
### Post card with aside image
You can also add the image on the left side of the card. All you need do to is: add the `.card-aside` class to the element with the `.card` class. Then add the image in the `.card-aside-column` element. No worries, tabler will automatically center it and scale to right size:
{% example html columns=2 %}
{% include cards/blog-single.html type="aside" liked=1 %}
{% endexample %}
### Color variations
{% example html columns=2 %}
<div class="row row-cards row-deck">
<div class="col-md-6">
{% include cards/card.html title="Card status" hide-options=true status="purple" %}
</div>
<div class="col-md-6">
{% include cards/card.html title="Card status on left side" hide-options=true status-left="blue" %}
</div>
</div>
{% endexample %}
### Card with switch
{% example html columns=1 %}
{% include cards/card.html title="Card with switch" show-switch=true %}
{% endexample %}
### Card with loader
{% example html columns=1 %}
{% include cards/card.html title="Card with loader" hide-options=true show-loader=true %}
{% endexample %}
......@@ -4,6 +4,6 @@ title: Carousel
The Carousel is a slideshow for cycling through elements.
{% example html %}
{% example html columns=1 %}
{% include ui/carousel.html show-indicators=true show-controls=true id="carousel-sample" %}
{% endexample %}
{% assign article = include.article | default: site.data.articles[0] %}
{% assign type = include.type | default: 'none' %}
{% assign author = site.data.users[article.author] %}
{% assign liked = include.liked | default: false %}
{% assign truncate = include.truncate | default: 100 %}
<div class="card{% if type == 'aside' %} card-aside{% endif %}">
{% if type == 'image' %}
<a href="#"><img class="card-img-top" src="{{ site.base }}/{{ site.data.photos[article.image].small }}" alt="{{ article.title | escape}}"></a>
{% endif %}
{% if type == 'aside' %}
<a href="#" class="card-aside-column{% if include.aside-class %} {{ include.aside-class }}{% endif %}" style="background-image: url({{ site.base }}/{{ site.data.photos[article.image].small }})"></a>
{% endif %}
<div class="card-body d-flex flex-column">
<h4><a href="#">{{ article.title }}</a></h4>
<div class="text-muted">{{ article.description | truncate: truncate }}</div>
<div class="d-flex align-items-center pt-5 mt-auto">
<div class="avatar avatar-md mr-3" style="background-image: url({{ site.base }}/{{ author.photo }})"></div>
<div>
<a href="{{ site.base }}/profile.html" class="text-default">{{ author.name }} {{ author.surname }}</a>
<small class="d-block text-muted">3 days ago</small>
</div>
<div class="ml-auto {% if liked %}text-red{% else %}text-muted{% endif %}">
<a href="javascript:void(0)" class="icon d-none d-md-inline-block ml-3"><i class="fe fe-heart mr-1"></i></a>
</div>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>
\ No newline at end of file
......@@ -13,146 +13,28 @@
{% for item in site.data.menu %}
{% assign icon = item[1].icon %}
<li class="nav-item">
<a class="nav-link{% if item[1].active %} active{% endif %}" {% if item[1].children %}href="#sidebar-{{ id }}" data-toggle="collapse" role="button" aria-expanded="false"{% else %}href="{{ site.base }}/{{ item[1].url }}"{% endif %}>
<a class="nav-link{% if item[1].active %} active{% endif %}" {% if item[1].children or item[1].docs %}href="#sidebar-{{ id }}" data-toggle="collapse" role="button" aria-expanded="false"{% else %}href="{{ site.base }}/{{ item[1].url }}"{% endif %}>
{% include ui/icon.html icon=icon %}
<span class="nav-link-text">{{ item[1].title }}</span>
{% if item[1].label %}
<span class="badge bg-primary text-white ml-auto">{{ item[1].label }}</span>
{% endif %}
</a>
{% if item[1].children %}
<div class="collapse navbar-collapse" id="sidebar-{{ id }}">
{% if item[1].children or item[1].docs %}
<div class="collapse navbar-collapse show" id="sidebar-{{ id }}">
<ul class="nav nav-sm flex-column">
{% if item[1].docs %}
{% assign docs-key = item[1].docs %}
{% for p in site.docs-menu[docs-key].pages %}
{% assign doc = site.docs | where: "slug", p | first %}
<li class="nav-item">
<a href="#" class="nav-link">
Alerts
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Avatars
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Badges
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Breadcrumb
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Buttons
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Button group
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Cards
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Charts
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Dropdowns
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Forms
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Icons
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Lists
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Modal
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Navs
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Navbar
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Page headers
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Pagination
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Popovers
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Progress
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Social post
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Spinners
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Tables
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Toasts
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Tooltips
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Typography
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
Utilities
<a href="{{ site.base }}/docs/{{ doc.slug }}.html" class="nav-link">
{{ doc.title }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
{% endif %}
......
......@@ -13,9 +13,9 @@ page-title: Documentation
</a>
{% for group in site.docs-menu %}
{{ group.title }}
{{ group[1].title }}
<div class="list-group list-group-transparent mb-0">
{% for p in group.pages %}
{% for p in group[1].pages %}
{% assign doc = site.docs | where: "slug", p | first %}
<a href="{{ site.base }}/docs/{{ doc.slug }}.html" class="list-group-item list-group-item-action{% if page.url == doc.url %} active{% endif %}">
{{ doc.title }}
......
......@@ -9,11 +9,11 @@ done: true
{% for page in site.changelog reversed %}
<div class="mb-4">
<div class="mb-2">
<span class="tag bg-blue-lt">{{ page.title }}</span>
<span class="badge bg-blue-lt">{{ page.title }}</span>
<span class="text-muted">{{ page.date | date: '%B %d, %Y' }}</span>
</div>
<div>{{ page.content }}</div>
</div>
{% endfor %}
</div>
</div>
\ No newline at end of file
</div>
......@@ -29,7 +29,6 @@
@import "ui/buttons";
@import "ui/cards";
@import "ui/avatars";
@import "ui/tags";
@import "ui/inputs";
@import "ui/inputs.custom";
@import "ui/media";
......
.tag {
display: inline-flex;
padding: .25em .75em;
font-size: px2rem(12px);
font-weight: 400;
line-height: 1.5;
color: $text-muted;
cursor: default;
user-select: none;
background-color: $body-bg;
border-radius: 3px;
@at-root a#{&} {
text-decoration: none;
cursor: pointer;
transition: .3s color, .3s background;
&:hover {
color: inherit;
background-color: rgba($text-muted, .2);
}
}
}
.tag-addon {
display: inline-block;
min-width: 1.5rem;
padding: 0 .5rem;
margin: 0 -.5rem 0 .5rem;
color: inherit;
text-align: center;
text-decoration: none;
background: rgba(#000, .06);
&:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
i {
margin: 0 -.25rem;
vertical-align: middle;
}
@at-root a#{&} {
text-decoration: none;
cursor: pointer;
transition: .3s color, .3s background;
&:hover {
color: inherit;
background: rgba(#000, .16);
}
}
}
.tag-avatar {
width: 1.5rem;
height: 1.5rem;
margin: 0 .5rem 0 -.5rem;
border-radius: 3px 0 0 3px;
}
@each $vendor, $color in $colors {
.tag-#{$vendor} {
color: #fff;
background-color: $color;
}
}
@each $vendor, $color in $theme-colors {
.tag-#{$vendor} {
color: #fff;
background-color: $color;
}
}
.tag-rounded {
border-radius: 50px;
.tag-avatar {
border-radius: 50px;
}
}
.tag-list {
margin-bottom: -.5rem;
font-size: 0;
> .tag {
margin-bottom: .5rem;
&:not(:last-child) {
margin-right: .5rem;
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册