diff options
Merge pull request #522 from picturepan2/0.5.5 v0.5.5
0.5.5
124 files changed, 6813 insertions, 5677 deletions
diff --git a/docs/src/_docs-layout.pug b/docs/src/_docs-layout.pug deleted file mode 100644 index 23a3f5b..0000000 --- a/docs/src/_docs-layout.pug +++ /dev/null @@ -1,99 +0,0 @@ -extends _layout.pug -include _mixins.pug - -block content - .docs-container.off-canvas.off-canvas-sidebar-show - .docs-navbar - a.off-canvas-toggle.btn.btn-link.btn-action(href='#sidebar') - i.icon.icon-menu - a.btn.btn-primary(href='https://github.com/picturepan2/spectre' target='_blank') GitHub - #sidebar.docs-sidebar.off-canvas-sidebar - .docs-brand - a.docs-logo(href='index.html') - img(src='img/spectre-logo.svg' alt='Spectre.css CSS Framework') - h2 SPECTRE - .docs-nav - .accordion-container - +docs-accordion( - 'getting-started', - 'Getting started', - {url: '#introduction', name: 'Introduction'}, - {url: '#installation', name: 'Installation'}, - {url: '#custom', name: 'Custom version'}, - {url: '#browsers', name: 'Browser support'}, - {url: '#whatsnew', name: 'What\'s new'} - ) - +docs-accordion( - 'elements', - 'Elements', - {url: '#typography', name: 'Typography'}, - {url: '#tables', name: 'Tables'}, - {url: '#buttons', name: 'Buttons'}, - {url: '#forms', name: 'Forms'}, - {url: '#icons', name: 'Icons'}, - {url: '#labels', name: 'Labels'}, - {url: '#code', name: 'Code'}, - {url: '#media', name: 'Media'} - ) - +docs-accordion( - 'layout', - 'Layout', - {url: '#grid', name: 'Flexbox grid'}, - {url: '#responsive', name: 'Responsive'}, - {url: '#navbar', name: 'Navbar'} - ) - +docs-accordion( - 'components', - 'Components', - {url: '#accordions', name: 'Accordions'}, - {url: '#avatars', name: 'Avatars'}, - {url: '#badges', name: 'Badges'}, - {url: '#bars', name: 'Bars'}, - {url: '#breadcrumbs', name: 'Breadcrumbs'}, - {url: '#cards', name: 'Cards'}, - {url: '#chips', name: 'Chips'}, - {url: '#empty', name: 'Empty states'}, - {url: '#menu', name: 'Menu'}, - {url: '#modals', name: 'Modals'}, - {url: '#nav', name: 'Nav'}, - {url: '#pagination', name: 'Pagination'}, - {url: '#panels', name: 'Panels'}, - {url: '#popovers', name: 'Popovers'}, - {url: '#steps', name: 'Steps'}, - {url: '#tabs', name: 'Tabs'}, - {url: '#tiles', name: 'Tiles'}, - {url: '#toasts', name: 'Toasts'}, - {url: '#tooltips', name: 'Tooltips'} - ) - +docs-accordion( - 'utilities', - 'Utilities', - {url: '#colors', name: 'Colors'}, - {url: '#cursors', name: 'Cursors'}, - {url: '#display', name: 'Display'}, - {url: '#divider', name: 'Divider'}, - {url: '#loading', name: 'Loading'}, - {url: '#position', name: 'Position'}, - {url: '#shapes', name: 'Shapes'}, - {url: '#text', name: 'Text'} - ) - +docs-accordion( - 'experimentals', - 'Experimentals', - {url: '#autocomplete', name: 'Autocomplete'}, - {url: '#calendars', name: 'Calendars'}, - {url: '#carousels', name: 'Carousels'}, - {url: '#comparison', name: 'Comparison sliders'}, - {url: '#filters', name: 'Filters'}, - {url: '#meters', name: 'Meters'}, - {url: '#off-canvas', name: 'Off-canvas'}, - {url: '#parallax', name: 'Parallax'}, - {url: '#progress', name: 'Progress'}, - {url: '#sliders', name: 'Sliders'}, - {url: '#timelines', name: 'Timelines'} - ) - - a.off-canvas-overlay(href='#close') - .off-canvas-content - #content.docs-content - block docs-content
\ No newline at end of file diff --git a/docs/src/_layout.pug b/docs/src/_layout.pug deleted file mode 100644 index ad32f32..0000000 --- a/docs/src/_layout.pug +++ /dev/null @@ -1,33 +0,0 @@ -block variables - - var title = 'Spectre.css - A Lightweight, Responsive and Modern CSS Framework' - - var description = '' - -doctype html -html(lang='en') - head - title= title - meta(charset='utf-8') - meta(name='robots' content='index, follow') - meta(name='viewport' content='width=device-width, initial-scale=1.0, shrink-to-fit=no') - meta(http-equiv='x-ua-compatible' content='ie=edge') - meta(name='author' content='Yan Zhu') - link(rel='shortcut icon' href='img/favicons/favicon.ico') - link(rel='icon' href='img/favicons/favicon.png') - link(rel='stylesheet' href='dist/spectre.min.css') - link(rel='stylesheet' href='dist/spectre-icons.min.css') - link(rel='stylesheet' href='dist/spectre-exp.min.css') - link(rel='stylesheet' href='dist/docs.min.css') - - body - block content - - script. - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-2702768-8', 'auto'); - ga('send', 'pageview'); - -
\ No newline at end of file diff --git a/docs/src/contents/_ad-c.pug b/docs/src/_layout/_ad-c.pug index 79b3e2c..79b3e2c 100644 --- a/docs/src/contents/_ad-c.pug +++ b/docs/src/_layout/_ad-c.pug diff --git a/docs/src/contents/_ad-g.pug b/docs/src/_layout/_ad-g.pug index c227ea8..c227ea8 100644 --- a/docs/src/contents/_ad-g.pug +++ b/docs/src/_layout/_ad-g.pug diff --git a/docs/src/_layout/_docs-layout.pug b/docs/src/_layout/_docs-layout.pug new file mode 100644 index 0000000..a935fc1 --- /dev/null +++ b/docs/src/_layout/_docs-layout.pug @@ -0,0 +1,106 @@ +extends _layout.pug +include _mixins.pug + +block content + .docs-container.off-canvas.off-canvas-sidebar-show + .docs-navbar + a.off-canvas-toggle.btn.btn-link.btn-action(href='#sidebar') + i.icon.icon-menu + .btns + a.btn.btn-primary.float-right(href='https://github.com/picturepan2/spectre' target='_blank') GitHub + a.btn.mr-1.float-right(href='https://www.paypal.me/picturepan2' target='_blank') Sponsor + + #sidebar.docs-sidebar.off-canvas-sidebar + .docs-brand + if slug != parent + a.docs-logo(href='../index.html') + img(src='../img/spectre-logo.svg' alt='Spectre.css CSS Framework') + h2 SPECTRE + else + a.docs-logo(href='index.html') + img(src='img/spectre-logo.svg' alt='Spectre.css CSS Framework') + h2 SPECTRE + .docs-nav + .accordion-container + +docs-accordion( + 'getting-started', + 'Getting started', + {url: 'installation', name: 'Installation'}, + {url: 'custom', name: 'Custom version'}, + {url: 'browsers', name: 'Browser support'}, + {url: 'whatsnew', name: 'What\'s new'} + ) + +docs-accordion( + 'elements', + 'Elements', + {url: 'typography', name: 'Typography'}, + {url: 'tables', name: 'Tables'}, + {url: 'buttons', name: 'Buttons'}, + {url: 'forms', name: 'Forms'}, + {url: 'icons', name: 'Icons'}, + {url: 'labels', name: 'Labels'}, + {url: 'code', name: 'Code'}, + {url: 'media', name: 'Media'} + ) + +docs-accordion( + 'layout', + 'Layout', + {url: 'grid', name: 'Flexbox grid'}, + {url: 'responsive', name: 'Responsive'}, + {url: 'navbar', name: 'Navbar'} + ) + +docs-accordion( + 'components', + 'Components', + {url: 'accordions', name: 'Accordions'}, + {url: 'avatars', name: 'Avatars'}, + {url: 'badges', name: 'Badges'}, + {url: 'bars', name: 'Bars'}, + {url: 'breadcrumbs', name: 'Breadcrumbs'}, + {url: 'cards', name: 'Cards'}, + {url: 'chips', name: 'Chips'}, + {url: 'empty', name: 'Empty states'}, + {url: 'menu', name: 'Menu'}, + {url: 'modals', name: 'Modals'}, + {url: 'nav', name: 'Nav'}, + {url: 'pagination', name: 'Pagination'}, + {url: 'panels', name: 'Panels'}, + {url: 'popovers', name: 'Popovers'}, + {url: 'steps', name: 'Steps'}, + {url: 'tabs', name: 'Tabs'}, + {url: 'tiles', name: 'Tiles'}, + {url: 'toasts', name: 'Toasts'}, + {url: 'tooltips', name: 'Tooltips'} + ) + +docs-accordion( + 'utilities', + 'Utilities', + {url: 'colors', name: 'Colors'}, + {url: 'cursors', name: 'Cursors'}, + {url: 'display', name: 'Display'}, + {url: 'divider', name: 'Divider'}, + {url: 'loading', name: 'Loading'}, + {url: 'position', name: 'Position'}, + {url: 'shapes', name: 'Shapes'}, + {url: 'text', name: 'Text'} + ) + +docs-accordion( + 'experimentals', + 'Experimentals', + {url: 'autocomplete', name: 'Autocomplete'}, + {url: 'calendars', name: 'Calendars'}, + {url: 'carousels', name: 'Carousels'}, + {url: 'comparison', name: 'Comparison sliders'}, + {url: 'filters', name: 'Filters'}, + {url: 'meters', name: 'Meters'}, + {url: 'off-canvas', name: 'Off-canvas'}, + {url: 'parallax', name: 'Parallax'}, + {url: 'progress', name: 'Progress'}, + {url: 'sliders', name: 'Sliders'}, + {url: 'timelines', name: 'Timelines'} + ) + + a.off-canvas-overlay(href='#close') + .off-canvas-content + #content.docs-content + block docs-content
\ No newline at end of file diff --git a/docs/src/_footer.pug b/docs/src/_layout/_footer.pug index 82a5b2e..82a5b2e 100644 --- a/docs/src/_footer.pug +++ b/docs/src/_layout/_footer.pug diff --git a/docs/src/_layout/_layout.pug b/docs/src/_layout/_layout.pug new file mode 100644 index 0000000..53dca0e --- /dev/null +++ b/docs/src/_layout/_layout.pug @@ -0,0 +1,57 @@ +block global + - var domain = 'https://picturepan2.github.io/spectre/' + - var url = domain + +block variables + - var slug = '' + - var parent = '' + - var title = 'Spectre.css - A Lightweight, Responsive and Modern CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +if slug == parent + if slug == 'index' + - var url = domain + else + - var url = domain + slug + '.html' +else + - var url = domain + parent + '/' + slug + '.html' + +doctype html +html(lang='en') + head + title= title + meta(charset='utf-8') + meta(name='robots' content='index, follow') + meta(name='viewport' content='width=device-width, initial-scale=1.0, shrink-to-fit=no') + meta(http-equiv='x-ua-compatible' content='ie=edge') + meta(name='description' content= description) + meta(name='author' content='Yan Zhu') + if slug != parent + link(rel='shortcut icon' href='../img/favicons/favicon.ico') + link(rel='icon' href='../img/favicons/favicon.png') + link(rel='stylesheet' href='../dist/spectre.min.css') + link(rel='stylesheet' href='../dist/spectre-icons.min.css') + link(rel='stylesheet' href='../dist/spectre-exp.min.css') + link(rel='stylesheet' href='../dist/docs.min.css') + else + link(rel='shortcut icon' href='img/favicons/favicon.ico') + link(rel='icon' href='img/favicons/favicon.png') + link(rel='stylesheet' href='dist/spectre.min.css') + link(rel='stylesheet' href='dist/spectre-icons.min.css') + link(rel='stylesheet' href='dist/spectre-exp.min.css') + link(rel='stylesheet' href='dist/docs.min.css') + link(rel='canonical' href= url) + + body + block content + + script. + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-2702768-8', 'auto'); + ga('send', 'pageview'); + +
\ No newline at end of file diff --git a/docs/src/_mixins.pug b/docs/src/_layout/_mixins.pug index fa08cf6..4d75f85 100644 --- a/docs/src/_mixins.pug +++ b/docs/src/_layout/_mixins.pug @@ -1,12 +1,15 @@ mixin docs-accordion(id, name, ...pages) .accordion - input(id='accordion-' + id type='checkbox' name='docs-accordion-checkbox' hidden='' checked=(current === id ? true : false)) + input(id='accordion-' + id type='checkbox' name='docs-accordion-checkbox' hidden='' checked=(parent === id ? true : false)) label.accordion-header.c-hand(for='accordion-' + id)= name .accordion-body ul.menu.menu-nav each page in pages li.menu-item - a(href=id + '.html' + page.url)= page.name + if slug != parent + a(href='../' + id + '/' + page.url + '.html')= page.name + else + a(href=id + '/' + page.url + '.html')= page.name mixin docs-heading(id, name) .container(id=id) diff --git a/docs/src/components.pug b/docs/src/components.pug index 9f0ee6a..fa7d1cd 100644 --- a/docs/src/components.pug +++ b/docs/src/components.pug @@ -1,87 +1,193 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables - - var title = 'Components - Spectre.css CSS Framework' - - var description = '' - - var current = 'components' + - var slug = 'components' + - var parent = 'components' + - var title = 'components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Accordions - +docs-heading('accordions', 'Accordions') - include contents/_ad-g.pug - include contents/accordions.pug - - //- Avatars - +docs-heading('avatars', 'Avatars') - include contents/avatars.pug + +docs-heading('components', 'Components') + include _layout/_ad-g.pug - //- Badges - +docs-heading('badges', 'Badges') - include contents/badges.pug + p + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p + | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. - //- Bars - +docs-heading('bars', 'Bars') - include contents/bars.pug - - //- Breadcrumbs - +docs-heading('breadcrumbs', 'Breadcrumbs') - include contents/breadcrumbs.pug + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Accordions + .card-body + | Used to toggle sections of content + .card-footer + a.btn.btn-primary(href="components/accordions.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Avatars + .card-body + | User profile pictures + .card-footer + a.btn.btn-primary(href="components/avatars.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Badges + .card-body + | Used as unread number indicators + .card-footer + a.btn.btn-primary(href="components/badges.html") View - //- Cards - +docs-heading('cards', 'Cards') - include contents/_ad-c.pug - include contents/cards.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Bars + .card-body + | Progress of a task or the value within the known range + .card-footer + a.btn.btn-primary(href="components/bars.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Breadcrumbs + .card-body + | Navigational hierarchies to indicate current location + .card-footer + a.btn.btn-primary(href="components/breadcrumbs.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Cards + .card-body + | Flexible content containers + .card-footer + a.btn.btn-primary(href="components/cards.html") View - //- Chips - +docs-heading('chips', 'Chips') - include contents/chips.pug - - //- Empty states - +docs-heading('empty', 'Empty states') - include contents/empty.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Chips + .card-body + | Complex entities in small blocks + .card-footer + a.btn.btn-primary(href="components/chips.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Empty states + .card-body + | Navigational hierarchies to indicate current location + .card-footer + a.btn.btn-primary(href="components/empty.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Menu + .card-body + | Vertical list of links or buttons for actions and navigation + .card-footer + a.btn.btn-primary(href="components/menu.html") View - //- Menu - +docs-heading('menu', 'Menu') - include contents/menu.pug - - //- Modals - +docs-heading('modals', 'Modals') - include contents/modals.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Modals + .card-body + | Flexible dialog prompts + .card-footer + a.btn.btn-primary(href="components/modals.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Nav + .card-body + | Vertical list of links + .card-footer + a.btn.btn-primary(href="components/nav.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Pagination + .card-body + | Vertical list of links or buttons for actions and navigation + .card-footer + a.btn.btn-primary(href="components/pagination.html") View - //- Nav - +docs-heading('nav', 'Nav') - include contents/nav.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Panels + .card-body + | Flexible view container with auto-expand content section + .card-footer + a.btn.btn-primary(href="components/panels.html") View - //- Pagination - +docs-heading('pagination', 'Pagination') - include contents/pagination.pug - - //- Panels - +docs-heading('panels', 'Panels') - include contents/panels.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Popovers + .card-body + | Small overlay content containers + .card-footer + a.btn.btn-primary(href="components/popovers.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Steps + .card-body + | Progress indicators of a sequence of task steps + .card-footer + a.btn.btn-primary(href="components/steps.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Tabs + .card-body + | Switch between different views + .card-footer + a.btn.btn-primary(href="components/tabs.html") View - //- Popovers - +docs-heading('popovers', 'Popovers') - include contents/popovers.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Tiles + .card-body + | Repeatable or embeddable information blocks + .card-footer + a.btn.btn-primary(href="components/tiles.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Toasts + .card-body + | Progress indicators of a sequence of task steps + .card-footer + a.btn.btn-primary(href="components/toasts.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Tooltips + .card-body + | Context information labels that appear on hover and focus + .card-footer + a.btn.btn-primary(href="components/tooltips.html") View + + include _layout/_ad-c.pug - //- Steps - +docs-heading('steps', 'Steps') - include contents/steps.pug - - //- Tabs - +docs-heading('tabs', 'Tabs') - include contents/tabs.pug - - //- Tiles - +docs-heading('tiles', 'Tiles') - include contents/tiles.pug - - //- Toasts - +docs-heading('toasts', 'Toasts') - include contents/toasts.pug - - //- Tooltips - +docs-heading('tooltips', 'Tooltips') - include contents/tooltips.pug - - include _footer.pug
\ No newline at end of file + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/accordions.pug b/docs/src/components/accordions.pug new file mode 100644 index 0000000..a3c8fcf --- /dev/null +++ b/docs/src/components/accordions.pug @@ -0,0 +1,129 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'accordions' + - var parent = 'components' + - var title = 'Accordions - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('accordions', 'Accordions') + include ../_layout/_ad-g.pug + + p Accordions are used to toggle sections of content. + + .docs-demo.columns + .column.col-6.col-md-12 + .accordion + input#accordion-1(type="radio" name="accordion-radio" hidden="" checked="") + label.accordion-header.c-hand(for="accordion-1") + i.icon.icon-arrow-right.mr-1 + | Elements + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Element 1 + li.menu-item + a(href="#accordions") Element 2 + .accordion + input#accordion-2(type="radio" name="accordion-radio" hidden="") + label.accordion-header.c-hand(for="accordion-2") + i.icon.icon-arrow-right.mr-1 + | Layout + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Layout 1 + li.menu-item + a(href="#accordions") Layout 2 + .accordion + input#accordion-3(type="radio" name="accordion-radio" hidden="") + label.accordion-header.c-hand(for="accordion-3") + i.icon.icon-arrow-right.mr-1 + | Components + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Component 1 + li.menu-item + a(href="#accordions") Component 2 + .column.col-6.col-md-12 + .accordion + input#accordion-4(type="checkbox" name="accordion-checkbox" hidden="" checked="") + label.accordion-header.c-hand(for="accordion-4") + | Elements + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Element 1 + li.menu-item + a(href="#accordions") Element 2 + .accordion + input#accordion-5(type="checkbox" name="accordion-checkbox" hidden="") + label.accordion-header.c-hand(for="accordion-5") + | Layout + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Layout 1 + li.menu-item + a(href="#accordions") Layout 2 + .accordion + input#accordion-6(type="checkbox" name="accordion-checkbox" hidden="") + label.accordion-header.c-hand(for="accordion-6") + | Components + .accordion-body + ul.menu.menu-nav + li.menu-item + a(href="#accordions") Component 1 + li.menu-item + a(href="#accordions") Component 2 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- standard Accordions example --> + <div class="accordion"> + <input type="checkbox" id="accordion-1" name="accordion-checkbox" hidden> + <label class="accordion-header" for="accordion-1"> + <i class="icon icon-arrow-right mr-1"></i> + Title + </label> + <div class="accordion-body"> + <!-- Accordions content --> + </div> + </div> + + <!-- mutually exclusive Accordions example (with same input names) --> + <div class="accordion"> + <input type="radio" id="accordion-1" name="accordion-radio" hidden> + <label class="accordion-header" for="accordion-1"> + Title + </label> + <div class="accordion-body"> + <!-- Accordions content --> + </div> + </div> + + p + | Alternatively, you can use #[code details] and #[code summary] instead of #[code input] radio or checkbox trick. + | Add the #[code open] attribute to #[code details] to expand it. + | Microsoft Edge support is #[a(href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/detailssummary/" target="_blank") under consideration]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- details and summary Accordions example --> + <details class="accordion" open> + <summary class="accordion-header"> + <i class="icon icon-arrow-right mr-1"></i> + Title + </summary> + <div class="accordion-body"> + <!-- Accordions content --> + </div> + </details> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/avatars.pug b/docs/src/components/avatars.pug new file mode 100644 index 0000000..a513648 --- /dev/null +++ b/docs/src/components/avatars.pug @@ -0,0 +1,114 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'avatars' + - var parent = 'components' + - var title = 'Avatars - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('avatars', 'Avatars') + include ../_layout/_ad-g.pug + + p Avatars are user profile pictures. + + .docs-demo.columns + .column.col-6.col-xs-12 + figure.avatar.avatar-xl + img(src="../img/avatar-1.png" alt="Avatar XL") + figure.avatar.avatar-lg + img(src="../img/avatar-2.png" alt="Avatar LG") + figure.avatar + img(src="../img/avatar-3.png" alt="Avatar") + figure.avatar.avatar-sm + img(src="../img/avatar-4.png" alt="Avatar SM") + figure.avatar.avatar-xs + img(src="../img/avatar-5.png" alt="Avatar XS") + .column.col-6.col-xs-12 + figure.avatar.avatar-xl(data-initial="YZ") + figure.avatar.avatar-lg(data-initial="YZ") + figure.avatar(data-initial="YZ") + figure.avatar.avatar-sm(data-initial="YZ") + figure.avatar.avatar-xs(data-initial="YZ") + + p + | Add the #[code avatar] class to #{'<img>'} element. + | There are 4 additional sizes available, including #[code avatar-xl](64px), #[code avatar-lg](48px), #[code avatar-sm](24px), and #[code avatar-xs](16px). + | By default, the avatar size is 32px. + p + | For users who don't have profile pictures, you may use their initials for avatars. + | Add the #[code avatar] class and avatar size class to #{'<div>'} element. + | The #[code data-initial] attribute is the name appear inside the avatar. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- Basic avatar examples --> + <figure class="avatar avatar-xl"> + <img src="img/avatar-1.png" alt="..."> + </figure> + + <figure class="avatar avatar-xl" data-initial="YZ" style="background-color: #5755d9;"></figure> + + <!-- Show initals when avatar image is unavailable or not fully loaded --> + <figure class="avatar avatar-xl" data-initial="YZ" style="background-color: #5755d9;"> + <img src="img/avatar-1.png" alt="..."> + </figure> + + .docs-demo.columns + .column.col-6.col-xs-12 + figure.avatar.avatar-xl + img(src="../img/avatar-1.png" alt="Avatar") + img.avatar-icon(src="../img/avatar-2.png" alt="Avatar") + figure.avatar.avatar-lg + img(src="../img/avatar-2.png" alt="Avatar") + img.avatar-icon(src="../img/avatar-3.png" alt="Avatar") + figure.avatar + img(src="../img/avatar-3.png" alt="Avatar") + img.avatar-icon(src="../img/avatar-4.png" alt="Avatar") + figure.avatar.avatar-sm + img(src="../img/avatar-4.png" alt="Avatar") + img.avatar-icon(src="../img/avatar-5.png" alt="Avatar") + figure.avatar.avatar-xs + img(src="../img/avatar-5.png" alt="Avatar") + img.avatar-icon(src="../img/avatar-1.png" alt="Avatar") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <figure class="avatar avatar-xl"> + <img src="img/avatar-1.png" alt="..."> + <img src="img/avatar-5.png" class="avatar-icon" alt="..."> + </figure> + + +docs-subheading('avatars-presence', 'Avatar presence') + + .docs-demo.columns + .column.col-6.col-xs-12 + figure.avatar.avatar-xl(data-initial="YZ") + i.avatar-presence.online + figure.avatar.avatar-lg(data-initial="YZ") + i.avatar-presence.busy + figure.avatar(data-initial="YZ") + i.avatar-presence.away + figure.avatar.avatar-sm(data-initial="YZ") + i.avatar-presence.offline + figure.avatar.avatar-xs(data-initial="YZ") + i.avatar-presence.online + + p + | Avatars support presence indicators. + | You can add an #{'<i>'} element with the #[code avatar-presence] class, and add #[code online], #[code busy] or #[code away] class for different status colors. + | The default is gray which means offline. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <figure class="avatar avatar-xl"> + <img src="img/avatar-1.png" alt="..."> + <i class="avatar-presence online"></i> + </figure> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/badges.pug b/docs/src/components/badges.pug new file mode 100644 index 0000000..f6232a2 --- /dev/null +++ b/docs/src/components/badges.pug @@ -0,0 +1,75 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'badges' + - var parent = 'components' + - var title = 'Badges - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('badges', 'Badges') + include ../_layout/_ad-g.pug + + p Badges are often used as unread number indicators. + + .docs-demo.columns + .column.col-3.col-xs-6 + span.badge(data-badge="") + | Notifications + .column.col-3.col-xs-6 + span.badge(data-badge="8") + | Notifications + .column.col-3.col-xs-6 + span.badge(data-badge="88") + | Notifications + .column.col-3.col-xs-6 + span.badge(data-badge="888") + | Notifications + + p + | Add the #[code badge] class to non self closing elements. + | And add the #[code data-badge] attribute to define the content of a badge. + | The badge will appear in the top-right direction of the element. + p + | If there is no #[code data-badge] or the attribute is not specified, the badge will appear as a dot. + + .docs-demo.columns + .column.col-sm-12 + button.btn.badge(data-badge="") Button + button.btn.badge(data-badge="8") Button + .column.col-sm-12 + button.btn.btn-primary.badge(data-badge="") Button + button.btn.btn-primary.badge(data-badge="8") Button + .column.col-sm-12 + figure.avatar.avatar-xl.badge(data-badge="8" data-initial="YZ") + img(src="../img/avatar-1.png" alt="YZ") + figure.avatar.avatar-lg.badge(data-badge="8" data-initial="YZ") + img(src="../img/avatar-2.png" alt="YZ") + figure.avatar.badge(data-badge="8" data-initial="YZ") + img(src="../img/avatar-3.png" alt="YZ") + + p + | Badges support #[code button] and #[code avatars] elements as well. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <span class="badge"> + Notifications + </span> + + <span class="badge" data-badge="8"> + Notifications + </span> + + <button class="btn badge" data-badge="8"> + Button + </button> + + <figure class="avatar badge" data-badge="8" data-initial="YZ"> + <img src="img/avatar-3.png" alt="YZ"> + </figure> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/bars.pug b/docs/src/components/bars.pug new file mode 100644 index 0000000..31d8418 --- /dev/null +++ b/docs/src/components/bars.pug @@ -0,0 +1,98 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'bars' + - var parent = 'components' + - var title = 'Bars - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('bars', 'Bars') + include ../_layout/_ad-g.pug + + p + | Bars represent the progress of a task or the value within the known range. + | Bars are custom components for displaying HTML5 #{'<progress>'}, #{'<meter>'} and input range elements. + + .docs-demo.columns + .column.col-8.col-xs-12 + .bar.bar-sm + .bar-item.tooltip(data-tooltip="25%" role="progressbar" style="width:25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100") + .column.col-8.col-xs-12 + .bar + .bar-item.tooltip(data-tooltip="50%" role="progressbar" style="width:50%;") + .column.col-8.col-xs-12 + .bar + .bar-item.tooltip(data-tooltip="25%" role="progressbar" style="width:25%;") 25% + .bar-item.tooltip(data-tooltip="15%" role="progressbar" style="width:15%;background:#817fe3;") 15% + .bar-item.tooltip(data-tooltip="10%" role="progressbar" style="width:10%;background:#aaa9eb;") 10% + .bar-item.tooltip(data-tooltip="15%" role="progressbar" style="width:15%;") 15% + + p + | Add a container element with the #[code bar] class. + | And add child elements with the #[code bar-item] class. + | The width percentage value is needed for every #[code bar-item]. + + p + | There is the #[code bar-sm] class for thinner Bars. + | Also, you could use #[a(href="#tooltips") Tooltips] for any #[code bar-item]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- normal bars --> + <div class="bar bar-sm"> + <div class="bar-item" role="progressbar" style="width:25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div> + </div> + + <!-- multi-bars --> + <div class="bar"> + <div class="bar-item tooltip" data-tooltip="25%" style="width:25%;">25%</div> + <div class="bar-item" style="width:15%;background:#818bd5;">15%</div> + </div> + + +docs-subheading('bars-slider', 'Slider bars') + + .docs-demo.columns + .column.col-8.col-xs-12 + .bar.bar-slider + .bar-item(role="progressbar" style="width:50%;") + button.bar-slider-btn.btn.tooltip(data-tooltip="50%" role="slider") + .column.col-8.col-xs-12 + .bar.bar-slider + .bar-item(role="progressbar" style="width:15%;") + button.bar-slider-btn.btn.tooltip(data-tooltip="25%" role="slider") + .bar-item(role="progressbar" style="width:65%;") + button.bar-slider-btn.btn.tooltip(data-tooltip="65%" role="slider") + + p + | You can add the #[code bar-slider] class to the Bars container. + | And add child elements with the #[code bar-item] class and #[code bar-slider-btn] inside bar-item. + | You need to set the #[code bar-item] width manually to have the slider point. + + p + | If there are two #[code bar-item] divs in one bar-slider, you will have a range slider. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- normal slider --> + <div class="bar bar-slider"> + <div class="bar-item" role="progressbar" style="width:25%;"> + <button class="bar-slider-btn btn" role="slider"></button> + </div> + </div> + + <!-- range slider --> + <div class="bar bar-slider"> + <div class="bar-item" role="progressbar" style="width:15%;"> + <button class="bar-slider-btn btn" role="slider"></button> + </div> + <div class="bar-item" role="progressbar" style="width:65%;"> + <button class="bar-slider-btn btn" role="slider"></button> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/breadcrumbs.pug b/docs/src/components/breadcrumbs.pug new file mode 100644 index 0000000..c6f4ffe --- /dev/null +++ b/docs/src/components/breadcrumbs.pug @@ -0,0 +1,61 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'breadcrumbs' + - var parent = 'components' + - var title = 'Breadcrumbs - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('breadcrumbs', 'Breadcrumbs') + include ../_layout/_ad-g.pug + + p Breadcrumbs are used as navigational hierarchies to indicate current location. + + .docs-demo.columns + .column.col-12 + ul.breadcrumb + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings + .column.col-12 + ul.breadcrumb + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Change avatar") Change avatar + .column.col-12 + ul.breadcrumb + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home + li.breadcrumb-item + a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings + li.breadcrumb-item + | Search result: + a.tooltip(href="#breadcrumbs" data-tooltip="Search result: Spectre") Spectre + + p + | Add a container element with the #[code breadcrumb] class. + | And add child elements with the #[code breadcrumb-item] class. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="breadcrumb"> + <li class="breadcrumb-item"> + <a href="#">Home</a> + </li> + <li class="breadcrumb-item"> + <a href="#">Settings</a> + </li> + <li class="breadcrumb-item"> + <a href="#">Change avatar</a> + </li> + </ul> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/cards.pug b/docs/src/components/cards.pug new file mode 100644 index 0000000..7dbcd83 --- /dev/null +++ b/docs/src/components/cards.pug @@ -0,0 +1,110 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'cards' + - var parent = 'components' + - var title = 'Cards - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('cards', 'Cards') + include ../_layout/_ad-g.pug + + p Cards are flexible content containers. + + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-image + img.img-responsive(src="../img/osx-el-capitan.jpg" alt="OS X El Capitan") + .card-header + .card-title.h5 Microsoft + .card-subtitle.text-gray Software and hardware + .card-body + | Empower every person and every organization on the planet to achieve more. + .card-footer + a.btn.btn-primary(href="#cards") Do + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Hardware and software + .card-image + img.img-responsive(src="../img/osx-yosemite.jpg" alt="OS X Yosemite") + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-footer + .btn-group.btn-group-block + button.btn.btn-primary Buy + button.btn Buy + button.btn Buy + .column.col-6.col-xs-12 + .card + .card-image + img.img-responsive(src="../img/macos-sierra-2.jpg" alt="macOS Sierra") + .card-header + button.btn.btn-primary.float-right + i.icon.icon-plus + .card-title.h5 Google I/O + .card-subtitle.text-gray Software and hardware + .card-body + | An immersive, three-day experience focused on exploring the next generation of technology, mobile and beyond. + .column.col-6.col-xs-12 + .card + .card-image + img.img-responsive(src="../img/osx-el-capitan-2.jpg" alt="OS X El Capitan") + .card-footer + a.btn.btn-primary(href="#cards") Buy + a.btn.btn-link(href="#cards") Share + .card-body + strong Surface Studio + | . Turn your desk into a Studio. Surface Studio is designed for the creative process. + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Hardware and software + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-image + img.img-responsive(src="../img/macos-sierra.jpg" alt="macOS Sierra") + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Google + .card-subtitle.text-gray Software and hardware + .card-body + | Organize the world’s information and make it universally accessible and useful. + .card-image + img.img-responsive(src="../img/osx-yosemite-2.jpg" alt="OS X Yosemite") + .card-footer + a.btn.btn-primary(href="#cards") Search + a.btn.btn-link(href="#cards") Share + + p + | Add a container element with the #[code card] class. + | And add child elements with the #[code card-image], #[code card-header], #[code card-body] and/or #[code card-footer] classes. + | The #[code card-image] can be placed in any position. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="card"> + <div class="card-image"> + <img src="img/osx-el-capitan.jpg" class="img-responsive"> + </div> + <div class="card-header"> + <div class="card-title h5">...</div> + <div class="card-subtitle text-gray">...</div> + </div> + <div class="card-body"> + ... + </div> + <div class="card-footer"> + <button class="btn btn-primary">...</button> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/chips.pug b/docs/src/components/chips.pug new file mode 100644 index 0000000..18bcf9d --- /dev/null +++ b/docs/src/components/chips.pug @@ -0,0 +1,60 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'chips' + - var parent = 'components' + - var title = 'Chips - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('chips', 'Chips') + include ../_layout/_ad-g.pug + + p Chips are complex entities in small blocks. + + .docs-demo.columns + .column.col-12 + span.chip + | Crime + span.chip + | Drama + span.chip + | Biography + a.btn.btn-clear(href="#" aria-label="Close" role="button") + span.chip + | Mystery + a.btn.btn-clear(href="#" aria-label="Close" role="button") + .column.col-12 + .chip + figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") + | Tony Stark + .chip + img.avatar.avatar-sm(src="../img/avatar-1.png" alt="Thor Odinson") + | Thor Odinson + .chip + img.avatar.avatar-sm(src="../img/avatar-4.png" alt="Steve Rogers") + | Steve Rogers + + p + | Add a container element with the #[code chip] class. + | And add child text element, buttons or avatars with the #[code avatar] class. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <span class="chip">Crime</span> + + <span class="chip"> + Biography + <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> + </span> + + <div class="chip"> + <img src="img/avatar-1.png" class="avatar avatar-sm"> + Yan Zhu + <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/empty.pug b/docs/src/components/empty.pug new file mode 100644 index 0000000..b23ce8c --- /dev/null +++ b/docs/src/components/empty.pug @@ -0,0 +1,66 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'empty' + - var parent = 'components' + - var title = 'Empty states - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('empty', 'Empty states') + include ../_layout/_ad-g.pug + + p + | Empty states/blank slates are commonly used as placeholders for first time use, empty data and error screens. + + .docs-demo.columns + .column.col-12 + .empty + .empty-icon + i.icon.icon-3x.icon-mail + p.empty-title.h5 You have no new messages + p.empty-subtitle Click the button to start a conversation + .empty-action + button.btn.btn-primary Send a message + .column.col-12 + .empty + .empty-icon + i.icon.icon-3x.icon-mail + p.empty-title.h5 You've successfully signed up + p.empty-subtitle Click the button to invite your friends + .empty-action + button.btn.btn-primary Invite your friends + .empty-action + button.btn.btn-link Skip + .column.col-12 + .empty + .empty-icon + i.icon.icon-3x.icon-people + p.empty-title.h5 You are not following anyone + p.empty-subtitle Start to meet new friends + .empty-action.input-group.input-inline + input.form-input(type="text" placeholder="") + button.btn.btn-primary.input-group-btn Search + + p + | An empty state component can include icons, messages (title and subtitle messages) and action buttons or any combination of those elements. + | Add #[code empty-icon], #[code empty-title], #[code empty-subtitle] or #[code empty-action] to the elements. + | HTML structure is exampled below. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="empty"> + <div class="empty-icon"> + <i class="icon icon-people"></i> + </div> + <p class="empty-title h5">You have no new messages</p> + <p class="empty-subtitle">Click the button to start a conversation.</p> + <div class="empty-action"> + <button class="btn btn-primary">Send a message</button> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/menu.pug b/docs/src/components/menu.pug new file mode 100644 index 0000000..e358056 --- /dev/null +++ b/docs/src/components/menu.pug @@ -0,0 +1,200 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'menu' + - var parent = 'components' + - var title = 'Menu - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('menu', 'Menu') + include ../_layout/_ad-g.pug + + p Menus are vertical list of links or buttons for actions and navigation. + + .docs-demo.columns + .column.col-4.col-xs-12 + ul.menu + li.menu-item + .tile.tile-centered + .tile-icon + img.avatar(src="../img/avatar-4.png" alt="Avatar") + .tile-content + | Steve Rogers + li.divider + li.menu-item + .menu-badge + label.label.label-primary 2 + a.active(href="#menus") + | My profile + li.menu-item + a(href="#menus") + | Settings + li.menu-item + a(href="#menus") + | Logout + .column.col-4.col-xs-12 + ul.menu + li.divider(data-content="LINKS") + li.menu-item + a(href="#menus") Slack + li.menu-item + a(href="#menus") Hipchat + li.menu-item + a(href="#menus") Skype + .column.col-4.col-xs-12 + ul.menu + li.menu-item + label.form-checkbox + input(type="checkbox" checked="") + i.form-icon + | form-checkbox + li.menu-item + label.form-radio + input(type="radio" checked="") + i.form-icon + | form-radio + li.menu-item + label.form-switch + input(type="checkbox" checked="") + i.form-icon + | form-switch + + p + | Add a container element with the #[code menu] class. + | And add child elements with the #[code menu-item] class. + | You can separate menu items with a #[code divider]. + | Spectre.css does not include JavaScript code, you will need to implement your JS to interact with the menus. + p + | Menus also have #[a(href="elements.html#forms" target="_blank") Form controls] (checkbox, radio and checkbox) support. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="menu"> + <!-- menu header text --> + <li class="divider" data-content="LINKS"> + </li> + <!-- menu item standard --> + <li class="menu-item"> + <a href="#"> + <i class="icon icon-link"></i> Slack + </a> + </li> + <!-- menu item with form control --> + <li class="menu-item"> + <label class="form-checkbox"> + <input type="checkbox"> + <i class="form-icon"></i> form-checkbox + </label> + </li> + <!-- menu divider --> + <li class="divider"></li> + <!-- menu item with badge --> + <li class="menu-item"> + <div class="menu-badge"> + <label class="label label-primary">2</label> + </div> + <a href="#"> + <i class="icon icon-link"></i> Settings + </a> + </li> + </ul> + + +docs-subheading('menu-dropdown', 'Dropdown menu') + + p The dropdown is a combination of buttons and menus. + + .docs-demo.columns + .column.col-xs-12 + .dropdown + .btn-group + a.btn.btn-primary dropdown button + a.btn.btn-primary.dropdown-toggle(tabindex="0") + i.icon.icon-caret + ul.menu + li.menu-item + a(href="#dropdowns") + | Slack + li.menu-item + a(href="#dropdowns") + | Hipchat + li.menu-item + a(href="#dropdowns") + | Skype + .column.col-xs-12 + .dropdown + a.btn.btn-link.dropdown-toggle(tabindex="0") + | dropdown button + i.icon.icon-caret + ul.menu + li.menu-item + a(href="#dropdowns") + | Slack + li.menu-item + a(href="#dropdowns") + | Hipchat + li.menu-item + a(href="#dropdowns") + | Skype + + p + | Dropdown menus component is built entirely in CSS. It is triggered by #[code :focus] event. + p + | Add a container element with the #[code dropdown] class. + | And add a focusable element with the #[code dropdown-toggle] class for the button and a #[code menu] component right next to it. + | You also need to add #[code tabindex] to make the buttons focusable. + p + | If the dropdown is close to the right edge of the browser, you can add the #[code dropdown-right] class to the container to prevent it appearing off screen. + + .docs-demo.columns + .column.col-xs-12.text-right + .dropdown.dropdown-right + a.btn.btn-primary.dropdown-toggle(tabindex="0") + | dropdown button + i.icon.icon-caret + ul.menu.text-left + li.menu-item + a(href="#dropdowns") Slack + li.menu-item + a(href="#dropdowns") Hipchat + li.menu-item + a(href="#dropdowns") Skype + + p + | Also, you can implement your JS to interact with the dropdown menus by adding the #[code active] class to the #[code dropdown] container. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- basic dropdown button --> + <div class="dropdown"> + <a href="#" class="btn btn-link dropdown-toggle" tabindex="0"> + dropdown menu <i class="icon icon-caret"></i> + </a> + <!-- menu component --> + <ul class="menu"> + ... + </ul> + </div> + + <!-- dropdown button group --> + <div class="dropdown"> + <div class="btn-group"> + <a href="#" class="btn"> + dropdown button + </a> + <a href="#" class="btn dropdown-toggle" tabindex="0"> + <i class="icon icon-caret"></i> + </a> + + <!-- menu component --> + <ul class="menu"> + ... + </ul> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/modals.pug b/docs/src/components/modals.pug new file mode 100644 index 0000000..f084864 --- /dev/null +++ b/docs/src/components/modals.pug @@ -0,0 +1,157 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'modals' + - var parent = 'components' + - var title = 'Modals - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('modals', 'Modals') + include ../_layout/_ad-g.pug + + p Modals are flexible dialog prompts. + + .docs-demo.columns + .column + a.btn.btn-primary(href="#example-modal-1") Open Modal + #example-modal-1.modal + a.modal-overlay(href="#modals" aria-label="Close") + .modal-container(role="document") + .modal-header + a.btn.btn-clear.float-right(href="#modals" aria-label="Close") + .modal-title.h5 Modal title + .modal-body + .content + p This is the content inside the modal. + h4 Lorem ipsum + p + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. + p + | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. + h4 Cupcake ipsum + p + | Jelly-o sesame snaps halvah croissant oat cake cookie. Cheesecake bear claw topping. Chupa chups apple pie carrot cake chocolate cake caramels. + p + | De braaaiiiins apocalypsi gorger omero prefrontal cortex undead survivor fornix dictum mauris. Hi brains mindless mortuis limbic cortex soulless creaturas optic nerve. + h4 Candy ipsum + p + | Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar. + p + | Caerphilly swiss fromage frais. Brie cheese and wine fromage frais chalk and cheese danish fontina smelly cheese who moved my cheese cow. + .modal-footer + button.btn.btn-primary Share + a.btn.btn-link(href="#modals") Close + + p + | Add a container element with the #[code modal] class. + | And add a real container #[code modal-container] and overlay #[code modal-overlay] inside it. + | You can add child elements with the #[code modal-header], #[code modal-body] and #[code modal-footer] - any or all of them. + p + | Spectre.css does not include JavaScript code, you will need to implement your JS to interact with modals. + | To make a modal appear, add the #[code active] class to the #[code modal] container. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="modal active" id="modal-id"> + <a href="#close" class="modal-overlay" aria-label="Close"></a> + <div class="modal-container"> + <div class="modal-header"> + <a href="#close" class="btn btn-clear float-right" aria-label="Close"></a> + <div class="modal-title h5">Modal title</div> + </div> + <div class="modal-body"> + <div class="content"> + <!-- content here --> + </div> + </div> + <div class="modal-footer"> + ... + </div> + </div> + </div> + + +docs-subheading('modals-sizes', 'Modal sizes') + + .docs-demo.columns + .column.col-6.col-xs-12 + a.btn.btn-primary(href="#example-modal-2") Open small size Modal + #example-modal-2.modal.modal-sm + a.modal-overlay(href="#modals-sizes" aria-label="Close") + .modal-container(role="document") + .modal-header + a.btn.btn-clear.float-right(href="#modals-sizes" aria-label="Close") + .modal-title.h5 Modal title + .modal-body + .content + form + .form-group + label.form-label(for="input-example-7") Name + input#input-example-7.form-input(type="text" placeholder="Name") + .form-group + label.form-label Gender + label.form-radio + input(type="radio" name="gender") + i.form-icon + | Male + label.form-radio + input(type="radio" name="gender" checked="") + i.form-icon + | Female + .modal-footer + button.btn.btn-primary Submit + a.btn.btn-link(href="#modals-sizes" aria-label="Close") Close + + p + | Use the #[code modal-sm] class for a smaller modal dialog. + | The container max width is #[code 320px]. + + .docs-demo.columns + .column + a.btn.btn-primary(href="#example-modal-3") Open large size Modal + #example-modal-3.modal.modal-lg + a.modal-overlay(href="#modals-sizes" aria-label="Close") + .modal-container(role="document") + .modal-header + a.btn.btn-clear.float-right(href="#modals-sizes" aria-label="Close") + .modal-title.h5 Modal title + .modal-body + .content + p This is the content inside the modal. + h4 Lorem ipsum + p + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. + p + | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. + h4 Cupcake ipsum + p + | Jelly-o sesame snaps halvah croissant oat cake cookie. Cheesecake bear claw topping. Chupa chups apple pie carrot cake chocolate cake caramels. + p + | De braaaiiiins apocalypsi gorger omero prefrontal cortex undead survivor fornix dictum mauris. Hi brains mindless mortuis limbic cortex soulless creaturas optic nerve. + h4 Candy ipsum + p + | Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar. + p + | Caerphilly swiss fromage frais. Brie cheese and wine fromage frais chalk and cheese danish fontina smelly cheese who moved my cheese cow. + .modal-footer + button.btn.btn-primary Share + a.btn.btn-link(href="#modals-sizes") Close + + p + | Use the #[code modal-lg] class for a full size modal. + | The container max width is #[code 960px]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="modal modal-sm"> + <a href="#close" class="modal-overlay" aria-label="Close"></a> + <div class="modal-container"> + <!-- modal structure here --> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/nav.pug b/docs/src/components/nav.pug new file mode 100644 index 0000000..3ee2097 --- /dev/null +++ b/docs/src/components/nav.pug @@ -0,0 +1,73 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'nav' + - var parent = 'components' + - var title = 'Nav - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('nav', 'Nav') + include ../_layout/_ad-g.pug + + .docs-demo.columns + .column.col-6.col-xs-12 + ul.nav + li.nav-item + a(href="#nav") Elements + li.nav-item.active + a(href="#nav") Layout + ul.nav + li.nav-item + a(href="#nav") Flexbox grid + li.nav-item + a(href="#nav") Responsive + li.nav-item + a(href="#nav") Navbar + li.nav-item + a(href="#nav") Empty states + li.nav-item + a(href="#nav") Components + li.nav-item + a(href="#nav") Utilities + + p + | Add a container element with the #[code nav] class. + | And add child elements with the #[code nav-item] class. + | The #[code nav-item] with the #[code active] class will be highlighted. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="nav"> + <li class="nav-item"> + <a href="#">Elements</a> + </li> + <li class="nav-item active"> + <a href="#">Layout</a> + <ul class="nav"> + <li class="nav-item"> + <a href="#">Flexbox grid</a> + </li> + <li class="nav-item"> + <a href="#">Responsive</a> + </li> + <li class="nav-item"> + <a href="#">Navbar</a> + </li> + <li class="nav-item"> + <a href="#">Empty states</a> + </li> + </ul> + </li> + <li class="nav-item"> + <a href="#">Components</a> + </li> + <li class="nav-item"> + <a href="#">Utilities</a> + </li> + </ul> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/pagination.pug b/docs/src/components/pagination.pug new file mode 100644 index 0000000..c20f8b2 --- /dev/null +++ b/docs/src/components/pagination.pug @@ -0,0 +1,118 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'pagination' + - var parent = 'components' + - var title = 'Pagination - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('pagination', 'Pagination') + include ../_layout/_ad-g.pug + + .docs-demo.columns + .column.col-xs-12 + ul.pagination + li.page-item + a(href="#pagination") Prev + li.page-item + a(href="#pagination") 1 + li.page-item + span ... + li.page-item + a(href="#pagination") 4 + li.page-item.active + a(href="#pagination") 5 + li.page-item + a(href="#pagination") 6 + li.page-item + span ... + li.page-item + a(href="#pagination") 9 + li.page-item + a(href="#pagination") Next + .column.col-xs-12 + ul.pagination + li.page-item.disabled + a(href="#pagination" tabindex="-1") Prev + li.page-item.active + a(href="#pagination") 1 + li.page-item + a(href="#pagination") 2 + li.page-item + a(href="#pagination") 3 + li.page-item + span ... + li.page-item + a(href="#pagination") 9 + li.page-item + a(href="#pagination") Next + + p + | Add a container element with the #[code pagination] class. + | And add child elements with the #[code page-item] class. + | The #[code page-item] with the #[code active] class will be highlighted. + | You can add the #[code disabled] class to the #[code page-item] to have unclickable page links. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="pagination"> + <li class="page-item disabled"> + <a href="#" tabindex="-1">Previous</a> + </li> + <li class="page-item active"> + <a href="#">1</a> + </li> + <li class="page-item"> + <a href="#">2</a> + </li> + <li class="page-item"> + <a href="#">3</a> + </li> + <li class="page-item"> + <span>...</span> + </li> + <li class="page-item"> + <a href="#">12</a> + </li> + <li class="page-item"> + <a href="#">Next</a> + </li> + </ul> + + .docs-demo.columns + .column.col-12 + ul.pagination + li.page-item.page-prev + a(href="#pagination") + .page-item-subtitle Previous + .page-item-title.h5 Getting started + li.page-item.page-next + a(href="#pagination") + .page-item-subtitle Next + .page-item-title.h5 Layout + + p You could use previous and next pagination to navigate. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="pagination"> + <li class="page-item page-prev"> + <a href="#"> + <div class="page-item-subtitle">Previous</div> + <div class="page-item-title h5">Getting started</div> + </a> + </li> + <li class="page-item page-next"> + <a href="#"> + <div class="page-item-subtitle">Next</div> + <div class="page-item-title h5">Layout</div> + </a> + </li> + </ul> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/panels.pug b/docs/src/components/panels.pug new file mode 100644 index 0000000..487b8d4 --- /dev/null +++ b/docs/src/components/panels.pug @@ -0,0 +1,130 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'panels' + - var parent = 'components' + - var title = 'Panels - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('panels', 'Panels') + include ../_layout/_ad-g.pug + + p Panels are flexible view container with auto-expand content section. + + .docs-demo.columns + .column.col-6.col-xs-12 + .panel + .panel-header.text-center + figure.avatar.avatar-lg + img(src="../img/avatar-2.png" alt="Avatar") + .panel-title.h5.mt-10 Bruce Banner + .panel-subtitle THE HULK + nav.panel-nav + ul.tab.tab-block + li.tab-item.active + a(href="#panels") + | Profile + li.tab-item + a(href="#panels") + | Files + li.tab-item + a(href="#panels") + | Tasks + .panel-body + .tile.tile-centered + .tile-content + .tile-title.text-bold E-mail + .tile-subtitle bruce.banner@hulk.com + .tile-action + button.btn.btn-link.btn-action.btn-lg.tooltip.tooltip-left(data-tooltip="Edit E-mail") + i.icon.icon-edit + .tile.tile-centered + .tile-content + .tile-title.text-bold Skype + .tile-subtitle bruce.banner + .tile-action + button.btn.btn-link.btn-action.btn-lg + i.icon.icon-edit + .tile.tile-centered + .tile-content + .tile-title.text-bold Location + .tile-subtitle Dayton, Ohio + .tile-action + button.btn.btn-link.btn-action.btn-lg + i.icon.icon-edit + .panel-footer + button.btn.btn-primary.btn-block Save + .column.col-6.col-xs-12 + .panel + .panel-header + .panel-title.h6 Comments + .panel-body + .tile + .tile-icon + figure.avatar + img(src="../img/avatar-1.png" alt="Avatar") + .tile-content + p.tile-title.text-bold Thor Odinson + p.tile-subtitle + | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... + .tile + .tile-icon + figure.avatar + img(src="../img/avatar-2.png" alt="Avatar") + .tile-content + p.tile-title.text-bold Bruce Banner + p.tile-subtitle The Strategic Homeland Intervention, Enforcement, and Logistics Division... + .tile + .tile-icon + figure.avatar(data-initial="TS") + .tile-content + p.tile-title.text-bold Tony Stark + p.tile-subtitle + | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... + .tile + .tile-icon + figure.avatar + img(src="../img/avatar-4.png" alt="Avatar") + .tile-content + p.tile-title.text-bold Steve Rogers + p.tile-subtitle The Strategic Homeland Intervention, Enforcement, and Logistics Division... + .tile + .tile-icon + figure.avatar + img(src="../img/avatar-3.png" alt="Avatar") + .tile-content + p.tile-title.text-bold Natasha Romanoff + p.tile-subtitle + | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... + .panel-footer + .input-group + input.form-input(type="text" placeholder="Hello") + button.btn.btn-primary.input-group-btn Send + + p + | Add a container element with the #[code panel] class. + | And add child elements with the #[code panel-header], #[code panel-nav], #[code panel-body] and/or #[code panel-footer] classes. + | The #[code panel-body] can be auto expanded and vertically scrollable. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="panel"> + <div class="panel-header"> + <div class="panel-title">Comments</div> + </div> + <div class="panel-nav"> + <!-- navigation components: tabs, breadcrumbs or pagination --> + </div> + <div class="panel-body"> + <!-- contents --> + </div> + <div class="panel-footer"> + <!-- buttons or inputs --> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/popovers.pug b/docs/src/components/popovers.pug new file mode 100644 index 0000000..25bfe20 --- /dev/null +++ b/docs/src/components/popovers.pug @@ -0,0 +1,99 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'popovers' + - var parent = 'components' + - var title = 'Popovers - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('popovers', 'Popovers') + include ../_layout/_ad-g.pug + + p Popovers are small overlay content containers. Popovers component is built entirely in CSS. + + .docs-demo.columns + .column.col-3.col-sm-6 + .popover + a.btn.btn-primary(href="#popovers") + | top popover + .popover-container + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Software and hardware + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-footer + button.btn.btn-primary Buy + .column.col-3.col-sm-6 + .popover.popover-right + a.btn.btn-primary(href="#popovers") + | right popover + .popover-container + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Software and hardware + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-footer + button.btn.btn-primary Buy + .column.col-3.col-sm-6 + .popover.popover-bottom + a.btn.btn-primary(href="#popovers") + | bottom popover + .popover-container + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Software and hardware + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-footer + button.btn.btn-primary Buy + .column.col-3.col-sm-6 + .popover.popover-left + a.btn.btn-primary(href="#popovers") + | left popover + .popover-container + .card + .card-header + .card-title.h5 Apple + .card-subtitle.text-gray Software and hardware + .card-body + | To make a contribution to the world by making tools for the mind that advance humankind. + .card-footer + button.btn.btn-primary Buy + + p + | Wrap an element by a container with the #[code popover] class. + | And add a container with the #[code popover-container] next to the element. + | You can use #[a(href="#cards") Cards] component inside the #[code popover-container]. + p + | Also, you can add the #[code popover-right], #[code popover-bottom] or #[code popover-left] class to define the position. + | By default, the popovers appear above the element. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="popover popover-right"> + <button class="btn btn-primary">right popover</button> + <div class="popover-container"> + <div class="card"> + <div class="card-header"> + ... + </div> + <div class="card-body"> + ... + </div> + <div class="card-footer"> + ... + </div> + </div> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/steps.pug b/docs/src/components/steps.pug new file mode 100644 index 0000000..57f0feb --- /dev/null +++ b/docs/src/components/steps.pug @@ -0,0 +1,62 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'steps' + - var parent = 'components' + - var title = 'Steps - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('steps', 'Steps') + include ../_layout/_ad-g.pug + + p Steps are progress indicators of a sequence of task steps. + + .docs-demo.columns + .column.col-12 + ul.step + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 1 Tooltip") + li.step-item.active + a.tooltip(href="#steps" data-tooltip="Step 2 Tooltip") + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 3 Tooltip") + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 4 Tooltip") + .column.col-12 + ul.step + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 1 Tooltip") Step 1 + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 2 Tooltip") Step 2 + li.step-item.active + a.tooltip(href="#steps" data-tooltip="Step 3 Tooltip") Step 3 + li.step-item + a.tooltip(href="#steps" data-tooltip="Step 4 Tooltip") Step 4 + + p + | Add a container element with the #[code step] class. + | And add child elements with the #[code step-item] class. + | The #[code step-item] with the #[code active] class will be highlighted and indicate the current state of progress. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="step"> + <li class="step-item"> + <a href="#" class="tooltip" data-tooltip="Step 1">Step 1</a> + </li> + <li class="step-item active"> + <a href="#" class="tooltip" data-tooltip="Step 2">Step 2</a> + </li> + <li class="step-item"> + <a href="#" class="tooltip" data-tooltip="Step 3">Step 3</a> + </li> + <li class="step-item"> + <a href="#" class="tooltip" data-tooltip="Step 4">Step 4</a> + </li> + </ul> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/tabs.pug b/docs/src/components/tabs.pug new file mode 100644 index 0000000..0050682 --- /dev/null +++ b/docs/src/components/tabs.pug @@ -0,0 +1,148 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'tabs' + - var parent = 'components' + - var title = 'Tabs - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('tabs', 'Tabs') + include ../_layout/_ad-g.pug + + p Tabs enable quick switch between different views. + + .docs-demo.columns + .column.col-6.col-sm-12 + ul.tab + li.tab-item.active + a(href="#tabs") + | Music + li.tab-item + a(href="#tabs") + | Playlists + li.tab-item + a(href="#tabs") + | Radio + li.tab-item + a(href="#tabs") + | Store + .column.col-6.col-sm-12 + ul.tab.tab-block + li.tab-item.active + a(href="#tabs") + | Music + li.tab-item + a(href="#tabs") + | Playlists + li.tab-item + a(href="#tabs") + | Radio + + p + | Add a container element with the #[code tab] class. + | And add child elements with the #[code tab-item] class. + | You can add the #[code tab-block] class for a full-width tab. + | The #[code tab-item] or its child #{'<a>'} with the #[code active] class will be highlighted. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="tab tab-block"> + <li class="tab-item active"> + <a href="#">Music</a> + </li> + <li class="tab-item"> + <a href="#" class="active">Playlists</a> + </li> + <li class="tab-item"> + <a href="#">Radio</a> + </li> + <li class="tab-item"> + <a href="#">Connect</a> + </li> + </ul> + + .docs-demo.columns + .column.col-sm-12 + ul.tab + li.tab-item.active + a.badge(href="#tabs" data-badge="999") + | Music + li.tab-item + a(href="#tabs") + | Playlists + li.tab-item + a(href="#tabs") + | Radio + .column.col-sm-12 + ul.tab.tab-block + li.tab-item.active + a.badge(href="#tabs" data-badge="9") + | Music + li.tab-item + a.badge(href="#tabs" data-badge="99") + | Playlists + li.tab-item + a(href="#tabs") + | Radio + + p + | If you need #[code badges] on tabs, you can add badge class to the element within #[code tab-item]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="tab tab-block"> + <li class="tab-item active"> + <a href="#" class="badge" data-badge="9"> + Music + </a> + </li> + </ul> + + .docs-demo.columns + .column.col-12 + ul.tab + li.tab-item.active + a(href="#tabs") + | Music + span.btn.btn-clear + li.tab-item + a(href="#tabs") + | Playlists + li.tab-item + a(href="#tabs") + | Radio + li.tab-item + a(href="#tabs") + | Store + li.tab-item.tab-action + .input-group.input-inline + input.form-input.input-sm(type="text" placeholder="search") + button.btn.btn-primary.btn-sm.input-group-btn Search + + p + | You could add a search box or buttons inside a tab. + | Add the #[code tab-action] class to the #[code tab-item]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <ul class="tab"> + <li class="tab-item active"> + <a href="#"> + Music + </a> + </li> + <li class="tab-item tab-action"> + <div class="input-group input-inline"> + <input class="form-input input-sm" type="text" placeholder="search"> + <button class="btn btn-primary btn-sm input-group-btn">Search</button> + </div> + </li> + </ul> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/tiles.pug b/docs/src/components/tiles.pug new file mode 100644 index 0000000..a2e8827 --- /dev/null +++ b/docs/src/components/tiles.pug @@ -0,0 +1,108 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'tiles' + - var parent = 'components' + - var title = 'Tiles - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('tiles', 'Tiles') + include ../_layout/_ad-g.pug + + p Tiles are repeatable or embeddable information blocks. + + .docs-demo.columns + .column.col-9.col-sm-12 + .tile + .tile-icon + figure.avatar.avatar-lg + img(src="../img/avatar-3.png" alt="Avatar") + .tile-content + p.tile-title The Avengers + p.tile-subtitle + | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... + .tile-action + button.btn.btn-primary Join + button.btn Contact + .column.col-9.col-sm-12 + .tile + .tile-icon + figure.avatar.avatar-lg + img(src="../img/avatar-2.png" alt="Avatar") + .tile-content + p.tile-title The S.H.I.E.L.D. + p.tile-subtitle The Strategic Homeland Intervention, Enforcement, and Logistics Division... + p + button.btn.btn-primary.btn-sm Join + button.btn.btn-sm Contact + + p + | Add a container with the #[code tile] class. + | And add child elements with the #[code tile-icon], #[code tile-content] or/and #[code tile-action] classes. + | The #[code tile-icon] and #[code tile-action] are optional. + p + | There are #[code tile-title] and #[code tile-subtitle] classes for title and subtitle text styles. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="tile"> + <div class="tile-icon"> + <div class="example-tile-icon"> + <i class="icon icon-file centered"></i> + </div> + </div> + <div class="tile-content"> + <p class="tile-title">The Avengers</p> + <p class="tile-subtitle">Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...</p> + </div> + <div class="tile-action"> + <button class="btn btn-primary">Join</button> + </div> + </div> + + +docs-subheading('tiles-compact', 'Compact tiles') + + p + | There is compact version of Tiles component, which is often used as contact and file info blocks. + p + | Add the #[code tile-centered] class to the container #[code tile]. + | The #[code tile-icon], #[code tile-content] and #[code tile-action] will be vertically centered. + + .docs-demo.columns + .column.col-6.col-md-9.col-xs-12 + .tile.tile-centered + .tile-icon + .example-tile-icon + i.icon.icon-mail.centered + .tile-content + .tile-title spectre-docs.pdf + small.tile-subtitle.text-gray 14MB · Public · 1 Jan, 2017 + .tile-action + button.btn.btn-link.btn-action + i.icon.icon-more-vert + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="tile tile-centered"> + <div class="tile-icon"> + <div class="example-tile-icon"> + <i class="icon icon-file centered"></i> + </div> + </div> + <div class="tile-content"> + <div class="tile-title">spectre-docs.pdf</div> + <small class="tile-subtitle text-gray">14MB · Public · 1 Jan, 2017</small> + </div> + <div class="tile-action"> + <button class="btn btn-link"> + <i class="icon icon-more-vert"></i> + </button> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/toasts.pug b/docs/src/components/toasts.pug new file mode 100644 index 0000000..d1d9bb9 --- /dev/null +++ b/docs/src/components/toasts.pug @@ -0,0 +1,65 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'toasts' + - var parent = 'components' + - var title = 'Toasts - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('toasts', 'Toasts') + include ../_layout/_ad-g.pug + + p Toasts are used to show alert or information to users. + + .docs-demo.columns + .column.col-9.col-sm-12 + .toast + button.btn.btn-clear.float-right + h6 Toast Title + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. + .column.col-9.col-sm-12 + .toast.toast-primary + button.btn.btn-clear.float-right + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + p + | Add a container element with the #[code toast] class. + | You can add any text within the container, and even icons. + | You may also add a close button with the #[code btn-clear] class if you need. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="toast"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + </div> + + .docs-demo.columns + .column.col-sm-12 + .toast.toast-success + button.btn.btn-clear.float-right + | Toast success + .column.col-sm-12 + .toast.toast-warning + button.btn.btn-clear.float-right + | Toast warning + .column.col-sm-12 + .toast.toast-error + button.btn.btn-clear.float-right + | Toast error + + p + | And you can add the #[code toast-primary], #[code toast-success], #[code toast-warning] or #[code toast-error] class for additional toast colors. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="toast toast-primary"> + <button class="btn btn-clear float-right"></button> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/components/tooltips.pug b/docs/src/components/tooltips.pug new file mode 100644 index 0000000..7fdafde --- /dev/null +++ b/docs/src/components/tooltips.pug @@ -0,0 +1,40 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'tooltips' + - var parent = 'components' + - var title = 'Tooltips - Components - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('tooltips', 'Tooltips') + include ../_layout/_ad-g.pug + + p Tooltips provide context information labels that appear on hover and focus. + + .docs-demo.columns.text-center + .column.col-xs-12 + button.btn.btn-primary.tooltip(data-tooltip="Top Tooltip Text") top tooltip + .column.col-xs-12 + button.btn.btn-primary.tooltip.tooltip-right(data-tooltip="Right Tooltip Text") right tooltip + .column.col-xs-12 + button.btn.btn-primary.tooltip.tooltip-bottom(data-tooltip="Bottom Tooltip Text") bottom tooltip + .column.col-xs-12 + button.btn.btn-primary.tooltip.tooltip-left(data-tooltip="Left Tooltip Text") left tooltip + + p Tooltips component is built entirely in CSS. + p + | Add the #[code tooltip] class and the #[code data-tooltip] attribute, which contains the tooltip content, to non self closing elements. + p + | And add the #[code tooltip-right], #[code tooltip-bottom] or #[code tooltip-left] class to define the position of a tooltip. + | By default, the tooltip appears above the element. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <button class="btn tooltip" data-tooltip="Lorem ipsum dolor sit amet">top tooltip</button> + <button class="btn tooltip tooltip-right" data-tooltip="Lorem ipsum dolor sit amet">right tooltip</button> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/contents/accordions.pug b/docs/src/contents/accordions.pug deleted file mode 100644 index 964fab7..0000000 --- a/docs/src/contents/accordions.pug +++ /dev/null @@ -1,113 +0,0 @@ -p Accordions are used to toggle sections of content. - -.docs-demo.columns - .column.col-6.col-md-12 - .accordion - input#accordion-1(type="radio" name="accordion-radio" hidden="" checked="") - label.accordion-header.c-hand(for="accordion-1") - i.icon.icon-arrow-right.mr-1 - | Elements - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Element 1 - li.menu-item - a(href="#accordions") Element 2 - .accordion - input#accordion-2(type="radio" name="accordion-radio" hidden="") - label.accordion-header.c-hand(for="accordion-2") - i.icon.icon-arrow-right.mr-1 - | Layout - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Layout 1 - li.menu-item - a(href="#accordions") Layout 2 - .accordion - input#accordion-3(type="radio" name="accordion-radio" hidden="") - label.accordion-header.c-hand(for="accordion-3") - i.icon.icon-arrow-right.mr-1 - | Components - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Component 1 - li.menu-item - a(href="#accordions") Component 2 - .column.col-6.col-md-12 - .accordion - input#accordion-4(type="checkbox" name="accordion-checkbox" hidden="" checked="") - label.accordion-header.c-hand(for="accordion-4") - | Elements - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Element 1 - li.menu-item - a(href="#accordions") Element 2 - .accordion - input#accordion-5(type="checkbox" name="accordion-checkbox" hidden="") - label.accordion-header.c-hand(for="accordion-5") - | Layout - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Layout 1 - li.menu-item - a(href="#accordions") Layout 2 - .accordion - input#accordion-6(type="checkbox" name="accordion-checkbox" hidden="") - label.accordion-header.c-hand(for="accordion-6") - | Components - .accordion-body - ul.menu.menu-nav - li.menu-item - a(href="#accordions") Component 1 - li.menu-item - a(href="#accordions") Component 2 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- standard Accordions example --> - <div class="accordion"> - <input type="checkbox" id="accordion-1" name="accordion-checkbox" hidden> - <label class="accordion-header" for="accordion-1"> - <i class="icon icon-arrow-right mr-1"></i> - Title - </label> - <div class="accordion-body"> - <!-- Accordions content --> - </div> - </div> - - <!-- mutually exclusive Accordions example (with same input names) --> - <div class="accordion"> - <input type="radio" id="accordion-1" name="accordion-radio" hidden> - <label class="accordion-header" for="accordion-1"> - Title - </label> - <div class="accordion-body"> - <!-- Accordions content --> - </div> - </div> - -p - | Alternatively, you can use #[code details] and #[code summary] instead of #[code input] radio or checkbox trick. - | Add the #[code open] attribute to #[code details] to expand it. - | Microsoft Edge support is #[a(href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/detailssummary/" target="_blank") under consideration]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- details and summary Accordions example --> - <details class="accordion" open> - <summary class="accordion-header"> - <i class="icon icon-arrow-right mr-1"></i> - Title - </summary> - <div class="accordion-body"> - <!-- Accordions content --> - </div> - </details>
\ No newline at end of file diff --git a/docs/src/contents/autocomplete.pug b/docs/src/contents/autocomplete.pug deleted file mode 100644 index ca5eb17..0000000 --- a/docs/src/contents/autocomplete.pug +++ /dev/null @@ -1,119 +0,0 @@ -p - | Autocomplete form component provides suggestions while you type. It is often used for tags and contacts input. - -.docs-demo.columns - .column.col-9.col-xs-12 - .form-group - .form-autocomplete - .form-autocomplete-input.form-input - span.chip - | Bruce Banner - .chip - img.avatar.avatar-sm(src="img/avatar-1.png" alt="Avatar") - | Thor Odinson - .chip - img.avatar.avatar-sm(src="img/avatar-4.png" alt="Avatar") - | Steve Rogers - .chip - figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") - | Tony Stark - span.chip.active - | Natasha Romanoff - input.form-input(type="text" placeholder="") - .column.col-9.col-xs-12 - .form-group - .form-autocomplete - .form-autocomplete-input.form-input.is-focused - span.chip - | Bruce Banner - a.btn.btn-clear(href="#" aria-label="Close" role="button") - span.chip - img.avatar.avatar-sm(src="img/avatar-1.png" alt="Thor Odinson") - | Thor Odinson - a.btn.btn-clear(href="#" aria-label="Close" role="button") - .has-icon-left - input.form-input(type="text" placeholder="" value="S") - i.form-icon.loading - ul.menu - li.menu-item - a(href="#autocomplete") - .tile.tile-centered - .tile-icon - img.avatar.avatar-sm(src="img/avatar-4.png" alt="Steve Rogers") - .tile-content - mark S - | teve Roger - mark s - li.menu-item - a(href="#autocomplete") - .tile.tile-centered - .tile-icon - figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") - .tile-content - | Tony - mark S - | tark - -p - | Add a container element with the #[code form-autocomplete] class. - | There are 2 parts of it, one is #[code form-autocomplete-input], another is #[code menu] component. - | You may add the #[code is-focused] class to #[code form-autocomplete-input] to make it appear as focus state. -p - | Spectre.css does NOT include JavaScript code, you will need to implement your JS to interact with the autocomplete. - | The autocomplete HTML structure is exampled below. - -.docs-demo.columns - .column.col-9.col-xs-12 - .form-group - .form-autocomplete.autocomplete-oneline - .form-autocomplete-input.form-input - span.chip - | Bruce Banner - .chip - img.avatar.avatar-sm(src="img/avatar-1.png" alt="Avatar") - | Thor Odinson - .chip - img.avatar.avatar-sm(src="img/avatar-4.png" alt="Avatar") - | Steve Rogers - .chip - figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") - | Tony Stark - span.chip.active - | Natasha Romanoff - input.form-input(type="text" placeholder="") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="form-autocomplete"> - <!-- autocomplete input container --> - <div class="form-autocomplete-input form-input"> - - <!-- autocomplete chips --> - <div class="chip"> - <img src="img/avatar-1.png" class="avatar avatar-sm" alt="Thor Odinson"> - Thor Odinson - <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> - </div> - - <!-- autocomplete real input box --> - <input class="form-input" type="text" placeholder="typing here"> - </div> - - <!-- autocomplete suggestion list --> - <ul class="menu"> - <!-- menu list items --> - <li class="menu-item"> - <a href="#"> - <div class="tile tile-centered"> - <div class="tile-icon"> - ... - </div> - <div class="tile-content"> - ... - </div> - </div> - </a> - </li> - </ul> - </div>
\ No newline at end of file diff --git a/docs/src/contents/avatars.pug b/docs/src/contents/avatars.pug deleted file mode 100644 index f4e4d22..0000000 --- a/docs/src/contents/avatars.pug +++ /dev/null @@ -1,98 +0,0 @@ -p Avatars are user profile pictures. - -.docs-demo.columns - .column.col-6.col-xs-12 - figure.avatar.avatar-xl - img(src="img/avatar-1.png" alt="Avatar XL") - figure.avatar.avatar-lg - img(src="img/avatar-2.png" alt="Avatar LG") - figure.avatar - img(src="img/avatar-3.png" alt="Avatar") - figure.avatar.avatar-sm - img(src="img/avatar-4.png" alt="Avatar SM") - figure.avatar.avatar-xs - img(src="img/avatar-5.png" alt="Avatar XS") - .column.col-6.col-xs-12 - figure.avatar.avatar-xl(data-initial="YZ") - figure.avatar.avatar-lg(data-initial="YZ") - figure.avatar(data-initial="YZ") - figure.avatar.avatar-sm(data-initial="YZ") - figure.avatar.avatar-xs(data-initial="YZ") - -p - | Add the #[code avatar] class to #{'<img>'} element. - | There are 4 additional sizes available, including #[code avatar-xl](64px), #[code avatar-lg](48px), #[code avatar-sm](24px), and #[code avatar-xs](16px). - | By default, the avatar size is 32px. -p - | For users who don't have profile pictures, you may use their initials for avatars. - | Add the #[code avatar] class and avatar size class to #{'<div>'} element. - | The #[code data-initial] attribute is the name appear inside the avatar. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- Basic avatar examples --> - <figure class="avatar avatar-xl"> - <img src="img/avatar-1.png" alt="..."> - </figure> - - <figure class="avatar avatar-xl" data-initial="YZ" style="background-color: #5755d9;"></figure> - - <!-- Show initals when avatar image is unavailable or not fully loaded --> - <figure class="avatar avatar-xl" data-initial="YZ" style="background-color: #5755d9;"> - <img src="img/avatar-1.png" alt="..."> - </figure> - -.docs-demo.columns - .column.col-6.col-xs-12 - figure.avatar.avatar-xl - img(src="img/avatar-1.png" alt="Avatar") - img.avatar-icon(src="img/avatar-2.png" alt="Avatar") - figure.avatar.avatar-lg - img(src="img/avatar-2.png" alt="Avatar") - img.avatar-icon(src="img/avatar-3.png" alt="Avatar") - figure.avatar - img(src="img/avatar-3.png" alt="Avatar") - img.avatar-icon(src="img/avatar-4.png" alt="Avatar") - figure.avatar.avatar-sm - img(src="img/avatar-4.png" alt="Avatar") - img.avatar-icon(src="img/avatar-5.png" alt="Avatar") - figure.avatar.avatar-xs - img(src="img/avatar-5.png" alt="Avatar") - img.avatar-icon(src="img/avatar-1.png" alt="Avatar") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <figure class="avatar avatar-xl"> - <img src="img/avatar-1.png" alt="..."> - <img src="img/avatar-5.png" class="avatar-icon" alt="..."> - </figure> - -+docs-subheading('avatars-presence', 'Avatar presence') - -.docs-demo.columns - .column.col-6.col-xs-12 - figure.avatar.avatar-xl(data-initial="YZ") - i.avatar-presence.online - figure.avatar.avatar-lg(data-initial="YZ") - i.avatar-presence.busy - figure.avatar(data-initial="YZ") - i.avatar-presence.away - figure.avatar.avatar-sm(data-initial="YZ") - i.avatar-presence.offline - figure.avatar.avatar-xs(data-initial="YZ") - i.avatar-presence.online - -p - | Avatars support presence indicators. - | You can add an #{'<i>'} element with the #[code avatar-presence] class, and add #[code online], #[code busy] or #[code away] class for different status colors. - | The default is gray which means offline. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <figure class="avatar avatar-xl"> - <img src="img/avatar-1.png" alt="..."> - <i class="avatar-presence online"></i> - </figure>
\ No newline at end of file diff --git a/docs/src/contents/badges.pug b/docs/src/contents/badges.pug deleted file mode 100644 index 40b42ea..0000000 --- a/docs/src/contents/badges.pug +++ /dev/null @@ -1,59 +0,0 @@ -p Badges are often used as unread number indicators. - -.docs-demo.columns - .column.col-3.col-xs-6 - span.badge(data-badge="") - | Notifications - .column.col-3.col-xs-6 - span.badge(data-badge="8") - | Notifications - .column.col-3.col-xs-6 - span.badge(data-badge="88") - | Notifications - .column.col-3.col-xs-6 - span.badge(data-badge="888") - | Notifications - -p - | Add the #[code badge] class to non self closing elements. - | And add the #[code data-badge] attribute to define the content of a badge. - | The badge will appear in the top-right direction of the element. -p - | If there is no #[code data-badge] or the attribute is not specified, the badge will appear as a dot. - -.docs-demo.columns - .column.col-sm-12 - button.btn.badge(data-badge="") Button - button.btn.badge(data-badge="8") Button - .column.col-sm-12 - button.btn.btn-primary.badge(data-badge="") Button - button.btn.btn-primary.badge(data-badge="8") Button - .column.col-sm-12 - figure.avatar.avatar-xl.badge(data-badge="8" data-initial="YZ") - img(src="img/avatar-1.png" alt="YZ") - figure.avatar.avatar-lg.badge(data-badge="8" data-initial="YZ") - img(src="img/avatar-2.png" alt="YZ") - figure.avatar.badge(data-badge="8" data-initial="YZ") - img(src="img/avatar-3.png" alt="YZ") - -p - | Badges support #[code button] and #[code avatars] elements as well. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <span class="badge"> - Notifications - </span> - - <span class="badge" data-badge="8"> - Notifications - </span> - - <button class="btn badge" data-badge="8"> - Button - </button> - - <figure class="avatar badge" data-badge="8" data-initial="YZ"> - <img src="img/avatar-3.png" alt="YZ"> - </figure>
\ No newline at end of file diff --git a/docs/src/contents/bars.pug b/docs/src/contents/bars.pug deleted file mode 100644 index 4eee25e..0000000 --- a/docs/src/contents/bars.pug +++ /dev/null @@ -1,82 +0,0 @@ -p - | Bars represent the progress of a task or the value within the known range. - | Bars are custom components for displaying HTML5 #{'<progress>'}, #{'<meter>'} and input range elements. - -.docs-demo.columns - .column.col-8.col-xs-12 - .bar.bar-sm - .bar-item.tooltip(data-tooltip="25%" role="progressbar" style="width:25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100") - .column.col-8.col-xs-12 - .bar - .bar-item.tooltip(data-tooltip="50%" role="progressbar" style="width:50%;") - .column.col-8.col-xs-12 - .bar - .bar-item.tooltip(data-tooltip="25%" role="progressbar" style="width:25%;") 25% - .bar-item.tooltip(data-tooltip="15%" role="progressbar" style="width:15%;background:#817fe3;") 15% - .bar-item.tooltip(data-tooltip="10%" role="progressbar" style="width:10%;background:#aaa9eb;") 10% - .bar-item.tooltip(data-tooltip="15%" role="progressbar" style="width:15%;") 15% - -p - | Add a container element with the #[code bar] class. - | And add child elements with the #[code bar-item] class. - | The width percentage value is needed for every #[code bar-item]. - -p - | There is the #[code bar-sm] class for thinner Bars. - | Also, you could use #[a(href="#tooltips") Tooltips] for any #[code bar-item]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- normal bars --> - <div class="bar bar-sm"> - <div class="bar-item" role="progressbar" style="width:25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div> - </div> - - <!-- multi-bars --> - <div class="bar"> - <div class="bar-item tooltip" data-tooltip="25%" style="width:25%;">25%</div> - <div class="bar-item" style="width:15%;background:#818bd5;">15%</div> - </div> - -+docs-subheading('bars-slider', 'Slider bars') - -.docs-demo.columns - .column.col-8.col-xs-12 - .bar.bar-slider - .bar-item(role="progressbar" style="width:50%;") - button.bar-slider-btn.btn.tooltip(data-tooltip="50%" role="slider") - .column.col-8.col-xs-12 - .bar.bar-slider - .bar-item(role="progressbar" style="width:15%;") - button.bar-slider-btn.btn.tooltip(data-tooltip="25%" role="slider") - .bar-item(role="progressbar" style="width:65%;") - button.bar-slider-btn.btn.tooltip(data-tooltip="65%" role="slider") - -p - | You can add the #[code bar-slider] class to the Bars container. - | And add child elements with the #[code bar-item] class and #[code bar-slider-btn] inside bar-item. - | You need to set the #[code bar-item] width manually to have the slider point. - -p - | If there are two #[code bar-item] divs in one bar-slider, you will have a range slider. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- normal slider --> - <div class="bar bar-slider"> - <div class="bar-item" role="progressbar" style="width:25%;"> - <button class="bar-slider-btn btn" role="slider"></button> - </div> - </div> - - <!-- range slider --> - <div class="bar bar-slider"> - <div class="bar-item" role="progressbar" style="width:15%;"> - <button class="bar-slider-btn btn" role="slider"></button> - </div> - <div class="bar-item" role="progressbar" style="width:65%;"> - <button class="bar-slider-btn btn" role="slider"></button> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/breadcrumbs.pug b/docs/src/contents/breadcrumbs.pug deleted file mode 100644 index 9d61c69..0000000 --- a/docs/src/contents/breadcrumbs.pug +++ /dev/null @@ -1,45 +0,0 @@ -p Breadcrumbs are used as navigational hierarchies to indicate current location. - -.docs-demo.columns - .column.col-12 - ul.breadcrumb - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings - .column.col-12 - ul.breadcrumb - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Change avatar") Change avatar - .column.col-12 - ul.breadcrumb - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Home") Home - li.breadcrumb-item - a.tooltip(href="#breadcrumbs" data-tooltip="Settings") Settings - li.breadcrumb-item - | Search result: - a.tooltip(href="#breadcrumbs" data-tooltip="Search result: Spectre") Spectre - -p - | Add a container element with the #[code breadcrumb] class. - | And add child elements with the #[code breadcrumb-item] class. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="breadcrumb"> - <li class="breadcrumb-item"> - <a href="#">Home</a> - </li> - <li class="breadcrumb-item"> - <a href="#">Settings</a> - </li> - <li class="breadcrumb-item"> - <a href="#">Change avatar</a> - </li> - </ul>
\ No newline at end of file diff --git a/docs/src/contents/browsers.pug b/docs/src/contents/browsers.pug deleted file mode 100644 index dfa95cd..0000000 --- a/docs/src/contents/browsers.pug +++ /dev/null @@ -1,25 +0,0 @@ -p - | Spectre uses - a(href='https://github.com/postcss/autoprefixer', target='_blank') Autoprefixer - | to make most styles compatible with earlier browsers and - a(href='https://necolas.github.io/normalize.css/', target='_blank') Normalize.css - | for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended: -ul - li - | Chrome - small.label.label-success LAST 4 - li - | Microsoft Edge - small.label.label-success LAST 4 - li - | Firefox - small.label.label-success.text-uppercase Extended Support Release - li - | Safari - small.label.label-success LAST 4 - li - | Opera - small.label.label-success LAST 4 - li Internet Explorer 10+ -p - | Spectre supports Internet Explorer 10+, but some HTML5 and CSS3 features are not perfectly supported by Internet Explorer.
\ No newline at end of file diff --git a/docs/src/contents/buttons.pug b/docs/src/contents/buttons.pug deleted file mode 100644 index 3fbf5da..0000000 --- a/docs/src/contents/buttons.pug +++ /dev/null @@ -1,178 +0,0 @@ -p Buttons include simple button styles for actions in different types and sizes. - -.docs-demo.columns - .column.col-12 - button.btn default button - button.btn.btn-primary primary button - button.btn.btn-link link button - -p - | Add the #[code btn] class to #{'<a>'}, #{'<input>'} or #{'<button>'} elements for a default button. - | There are classes #[code btn-primary] and #[code btn-link] for predefined primary and link buttons. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <button class="btn">default button</button> - <button class="btn btn-primary">primary button</button> - <button class="btn btn-link">link button</button> - -+docs-subheading('buttons-colors', 'Button colors') - -.docs-demo.columns - .column.col-12 - button.btn.btn-success success button - button.btn.btn-error error button - -p - | Add the #[code btn-success] or #[code btn-error] class for success (green) or error (red) button color. - | If you need more button colors, please use - a(href="getting-started.html#variables-buttons") button mixins - | to create your own button color variants. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <button class="btn btn-success">success button</button> - <button class="btn btn-error">error button</button> - -+docs-subheading('buttons-sizes', 'Button sizes') - -.docs-demo.columns - .column.col-12 - button.btn.btn-primary.btn-lg - | large - i.icon.icon-arrow-down - button.btn.btn-primary.btn-lg large button - .column.col-12 - button.btn.btn-primary - | normal - i.icon.icon-arrow-down - button.btn.btn-primary normal button - .column.col-12 - button.btn.btn-primary.btn-sm - | small - i.icon.icon-arrow-down - button.btn.btn-primary.btn-sm small button - - -p - | Add the #[code btn-sm] or #[code btn-lg] class for small or large button size. - | Also, you can add the #[code btn-block] class for a full-width button. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <button class="btn btn-lg">large button</button> - <button class="btn btn-sm">small button</button> - - <button class="btn btn-block">block button</button> - - <button class="btn btn-primary btn-lg"><i class="icon icon-arrow-left"></i> large</button> - <button class="btn btn-primary"><i class="icon icon-arrow-left"></i> normal</button> - <button class="btn btn-primary btn-sm"><i class="icon icon-arrow-left"></i> small</button> - -p - | Please note that you could use the #[code btn-action] class for a square button, or add another #[code circle] class for a round button, which is often used as a Float Action Button (FAB). - -.docs-demo.columns - .column.col-xs-12 - button.btn.btn-action.btn-primary.btn-lg - i.icon.icon-menu - button.btn.btn-action.btn-primary - i.icon.icon-menu - button.btn.btn-action.btn-primary.btn-sm - i.icon.icon-menu - .column.col-xs-12 - button.btn.btn-action.btn-primary.btn-lg.circle - i.icon.icon-arrow-up - button.btn.btn-action.btn-primary.circle - i.icon.icon-arrow-up - button.btn.btn-action.btn-primary.btn-sm.circle - i.icon.icon-arrow-up - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <button class="btn btn-action"><i class="icon icon-arrow-left"></i></button> - <button class="btn btn-action circle"><i class="icon icon-arrow-left"></i></button> - -+docs-subheading('buttons-states', 'Button states') - -p - | Add the #[code active] class for active button state style. - -.docs-demo.columns - .column.col-12 - button.btn.active default active - button.btn.btn-primary.active primary active - button.btn.btn-link.active link active - -p - | Add the #[code disabled] class or the #[code disabled] attribute for disabled button state style. - -.docs-demo.columns - .column.col-12 - button.btn.disabled(tabindex="-1") default disabled - button.btn.btn-primary(disabled="" tabindex="-1") primary disabled - button.btn.btn-link(disabled="" tabindex="-1") link disabled - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- buttons with disabled state --> - <button class="btn disabled" tabindex="-1">disabled button</button> - <button class="btn" disabled tabindex="-1">disabled button</button> - -p - | A button with the #[code loading] class can show loading indicator. - -.docs-demo.columns - .column.col-12 - button.btn.loading default button - button.btn.btn-primary.loading primary button - button.btn.btn-link.loading link button - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- buttons with loading state --> - <button class="btn loading">button</button> - <button class="btn btn-primary loading">primary button</button> - -+docs-subheading('buttons-groups', 'Button groups') - -.docs-demo.columns - .column.col-6.col-md-12 - .btn-group - button.btn first button - button.btn second button - button.btn third button - .column.col-6.col-md-12 - .btn-group.btn-group-block - button.btn.btn-primary first button - button.btn.btn-primary second button - button.btn.btn-primary third button - .column.col-6.col-md-12 - .btn-group - button.btn.btn-sm.active first button - button.btn.btn-sm second button - button.btn.btn-sm third button - .column.col-6.col-md-12 - .btn-group.btn-group-block - button.btn.btn-primary.btn-sm.active first button - button.btn.btn-primary.btn-sm second button - button.btn.btn-primary.btn-sm third button - -p - | If you want to use buttons as a group, add the #[code btn-group] class to the container. - | You can add the #[code btn-group-block] class for a full-width button group. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="btn-group btn-group-block"> - <button class="btn">first button</button> - <button class="btn">second button</button> - <button class="btn">third button</button> - </div>
\ No newline at end of file diff --git a/docs/src/contents/calendars.pug b/docs/src/contents/calendars.pug deleted file mode 100644 index d7bf30c..0000000 --- a/docs/src/contents/calendars.pug +++ /dev/null @@ -1,298 +0,0 @@ -p - | Calendars are designed for date or date range picker and events display. It is made with flex layout. - -.docs-demo.columns - .column.col-4.col-md-12 - .calendar - .calendar-nav.navbar - button.btn.btn-action.btn-link.btn-lg - i.icon.icon-arrow-left - .navbar-primary March 2017 - button.btn.btn-action.btn-link.btn-lg - i.icon.icon-arrow-right - .calendar-container - .calendar-header - .calendar-date Sun - .calendar-date Mon - .calendar-date Tue - .calendar-date Wed - .calendar-date Thu - .calendar-date Fri - .calendar-date Sat - .calendar-body - .calendar-date.prev-month - button.date-item 26 - .calendar-date.prev-month - button.date-item 27 - .calendar-date.prev-month - button.date-item 28 - .calendar-date - button.date-item 1 - .calendar-date - button.date-item 2 - .calendar-date - button.date-item 3 - .calendar-date.tooltip(data-tooltip="Today") - button.date-item.date-today 4 - .calendar-date.tooltip(data-tooltip="Not available") - button.date-item(disabled="") 5 - .calendar-date - button.date-item 6 - .calendar-date - button.date-item 7 - .calendar-date.tooltip(data-tooltip="You have appointments") - button.date-item.badge 8 - .calendar-date - button.date-item 9 - .calendar-date - button.date-item 10 - .calendar-date - button.date-item 11 - .calendar-date - button.date-item 12 - .calendar-date - button.date-item 13 - .calendar-date - button.date-item 14 - .calendar-date - button.date-item 15 - .calendar-date.calendar-range.range-start - button.date-item 16 - .calendar-date.calendar-range - button.date-item 17 - .calendar-date.calendar-range - button.date-item 18 - .calendar-date.calendar-range - button.date-item 19 - .calendar-date.calendar-range.range-end - button.date-item 20 - .calendar-date - button.date-item 21 - .calendar-date - button.date-item 22 - .calendar-date - button.date-item 23 - .calendar-date - button.date-item 24 - .calendar-date - button.date-item 25 - .calendar-date - button.date-item 26 - .calendar-date - button.date-item 27 - .calendar-date - button.date-item 28 - .calendar-date - button.date-item 29 - .calendar-date - button.date-item 30 - .calendar-date - button.date-item 31 - .calendar-date.next-month - button.date-item 1 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="calendar"> - <!-- calendar navbar --> - <div class="calendar-nav navbar"> - <button class="btn btn-action btn-link btn-lg"> - <i class="icon icon-arrow-left"></i> - </button> - <div class="navbar-primary">March 2017</div> - <button class="btn btn-action btn-link btn-lg"> - <i class="icon icon-arrow-right"></i> - </button> - </div> - - <div class="calendar-container"> - <div class="calendar-header"> - <div class="calendar-date">Sun</div> - <div class="calendar-date">Mon</div> - <div class="calendar-date">Tue</div> - <div class="calendar-date">Wed</div> - <div class="calendar-date">Thu</div> - <div class="calendar-date">Fri</div> - <div class="calendar-date">Sat</div> - </div> - - <div class="calendar-body"> - <!-- calendar previous month --> - <div class="calendar-date prev-month"> - <button class="date-item">26</button> - </div> - ... - <div class="calendar-date prev-month"> - <button class="date-item">28</button> - </div> - - <!-- calendar current month --> - <div class="calendar-date"> - <button class="date-item">1</button> - </div> - <div class="calendar-date"> - <button class="date-item">2</button> - </div> - <div class="calendar-date"> - <button class="date-item">3</button> - </div> - <!-- calendar date: today --> - <div class="calendar-date"> - <button class="date-item date-today">4</button> - </div> - <!-- calendar date: tooltip --> - <div class="calendar-date tooltip" data-tooltip="You have appointments"> - <button class="date-item">5</button> - </div> - <!-- calendar date: not available --> - <div class="calendar-date tooltip" data-tooltip="Not available"> - <button class="date-item" disabled="">6</button> - </div> - - <!-- calendar range --> - <div class="calendar-date calendar-range range-start"> - <button class="date-item">7</button> - </div> - <div class="calendar-date calendar-range"> - <button class="date-item">8</button> - </div> - <div class="calendar-date calendar-range range-end"> - <button class="date-item">9</button> - </div> - ... - <div class="calendar-date"> - <button class="date-item">31</button> - </div> - - <!-- calendar next month --> - <div class="calendar-date next-month"> - <button class="date-item">1</button> - </div> - </div> - </div> - </div> - -+docs-subheading('calendars-sizes', 'Calendars sizes') - -.docs-demo.columns - .column.col-12 - .calendar.calendar-lg - .calendar-nav.navbar - button.btn.btn-action.btn-link.btn-lg - i.icon.icon-arrow-left - .navbar-primary March 2017 - button.btn.btn-action.btn-link.btn-lg - i.icon.icon-arrow-right - .calendar-container - .calendar-header - .calendar-date Sun - .calendar-date Mon - .calendar-date Tue - .calendar-date Wed - .calendar-date Thu - .calendar-date Fri - .calendar-date Sat - .calendar-body - .calendar-date.prev-month - button.date-item 26 - .calendar-date.prev-month - button.date-item 27 - .calendar-events - a.calendar-event.bg-error.text-light(href="#calendars") Zhonghe Festival - .calendar-date.prev-month - button.date-item 28 - .calendar-date - button.date-item 1 - .calendar-date - button.date-item 2 - .calendar-date - button.date-item 3 - .calendar-date.tooltip(data-tooltip="Today") - button.date-item.date-today 4 - .calendar-date - button.date-item(disabled="") 5 - .calendar-date - button.date-item 6 - .calendar-date - button.date-item 7 - .calendar-date.tooltip(data-tooltip="You have appointments") - button.date-item.badge 8 - .calendar-events - a.calendar-event.bg-primary.text-light(href="#calendars") Product launch event - a.calendar-event.bg-error.text-light(href="#calendars") International Women's Day - .calendar-date - button.date-item 9 - .calendar-date - button.date-item 10 - .calendar-date - button.date-item 11 - .calendar-date - button.date-item 12 - .calendar-events - a.calendar-event.bg-error.text-light(href="#calendars") Arbor Day - .calendar-date - button.date-item 13 - .calendar-date - button.date-item 14 - .calendar-date - button.date-item 15 - .calendar-date.calendar-range.range-start - button.date-item 16 - .calendar-date.calendar-range - button.date-item 17 - .calendar-date.calendar-range - button.date-item 18 - .calendar-date.calendar-range - button.date-item 19 - .calendar-date.calendar-range.range-end - button.date-item 20 - .calendar-events - a.calendar-event.bg-success.text-light(href="#calendars") Spring Equinox - .calendar-date - button.date-item 21 - .calendar-date - button.date-item 22 - .calendar-date - button.date-item 23 - .calendar-date - button.date-item 24 - .calendar-date - button.date-item 25 - .calendar-date - button.date-item 26 - .calendar-date - button.date-item 27 - .calendar-date - button.date-item 28 - .calendar-date - button.date-item 29 - .calendar-date - button.date-item 30 - .calendar-date - button.date-item 31 - .calendar-date.next-month.disabled - button.date-item 1 - .calendar-events - a.calendar-event.bg-error.text-light(href="#calendars") April Fools' Day - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="calendar calendar-lg"> - <!-- calendar navbar structure --> - - <div class="calendar-container"> - <!-- calendar header structure --> - - <div class="calendar-body"> - <!-- calendar date with events --> - <div class="calendar-date"> - <button class="date-item active">20</button> - <div class="calendar-events"> - <a class="calendar-event bg-success text-light" href="#calendars">Spring Equinox</a> - </div> - </div> - </div> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/cards.pug b/docs/src/contents/cards.pug deleted file mode 100644 index 979b3bc..0000000 --- a/docs/src/contents/cards.pug +++ /dev/null @@ -1,94 +0,0 @@ -p Cards are flexible content containers. - -.docs-demo.columns - .column.col-6.col-xs-12 - .card - .card-image - img.img-responsive(src="img/osx-el-capitan.jpg" alt="OS X El Capitan") - .card-header - .card-title.h5 Microsoft - .card-subtitle.text-gray Software and hardware - .card-body - | Empower every person and every organization on the planet to achieve more. - .card-footer - a.btn.btn-primary(href="#cards") Do - .column.col-6.col-xs-12 - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Hardware and software - .card-image - img.img-responsive(src="img/osx-yosemite.jpg" alt="OS X Yosemite") - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-footer - .btn-group.btn-group-block - button.btn.btn-primary Buy - button.btn Buy - button.btn Buy - .column.col-6.col-xs-12 - .card - .card-image - img.img-responsive(src="img/macos-sierra-2.jpg" alt="macOS Sierra") - .card-header - button.btn.btn-primary.float-right - i.icon.icon-plus - .card-title.h5 Google I/O - .card-subtitle.text-gray Software and hardware - .card-body - | An immersive, three-day experience focused on exploring the next generation of technology, mobile and beyond. - .column.col-6.col-xs-12 - .card - .card-image - img.img-responsive(src="img/osx-el-capitan-2.jpg" alt="OS X El Capitan") - .card-footer - a.btn.btn-primary(href="#cards") Buy - a.btn.btn-link(href="#cards") Share - .card-body - strong Surface Studio - | . Turn your desk into a Studio. Surface Studio is designed for the creative process. - .column.col-6.col-xs-12 - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Hardware and software - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-image - img.img-responsive(src="img/macos-sierra.jpg" alt="macOS Sierra") - .column.col-6.col-xs-12 - .card - .card-header - .card-title.h5 Google - .card-subtitle.text-gray Software and hardware - .card-body - | Organize the world’s information and make it universally accessible and useful. - .card-image - img.img-responsive(src="img/osx-yosemite-2.jpg" alt="OS X Yosemite") - .card-footer - a.btn.btn-primary(href="#cards") Search - a.btn.btn-link(href="#cards") Share - -p - | Add a container element with the #[code card] class. - | And add child elements with the #[code card-image], #[code card-header], #[code card-body] and/or #[code card-footer] classes. - | The #[code card-image] can be placed in any position. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="card"> - <div class="card-image"> - <img src="img/osx-el-capitan.jpg" class="img-responsive"> - </div> - <div class="card-header"> - <div class="card-title h5">...</div> - <div class="card-subtitle text-gray">...</div> - </div> - <div class="card-body"> - ... - </div> - <div class="card-footer"> - <button class="btn btn-primary">...</button> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/carousels.pug b/docs/src/contents/carousels.pug deleted file mode 100644 index 5d09532..0000000 --- a/docs/src/contents/carousels.pug +++ /dev/null @@ -1,78 +0,0 @@ -p Carousels are slideshows for cycling images. It is built in pure CSS. - -.docs-demo.columns - .column.col-12 - .carousel - input#slide-1.carousel-locator(type="radio" name="carousel-radio" hidden="" checked="") - input#slide-2.carousel-locator(type="radio" name="carousel-radio" hidden="") - input#slide-3.carousel-locator(type="radio" name="carousel-radio" hidden="") - input#slide-4.carousel-locator(type="radio" name="carousel-radio" hidden="") - .carousel-container - figure.carousel-item - label.item-prev.btn.btn-action.btn-lg(for="slide-4") - i.icon.icon-arrow-left - label.item-next.btn.btn-action.btn-lg(for="slide-2") - i.icon.icon-arrow-right - img.img-responsive.rounded(src="img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper") - figure.carousel-item - label.item-prev.btn.btn-action.btn-lg(for="slide-1") - i.icon.icon-arrow-left - label.item-next.btn.btn-action.btn-lg(for="slide-3") - i.icon.icon-arrow-right - img.img-responsive.rounded(src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") - figure.carousel-item - label.item-prev.btn.btn-action.btn-lg(for="slide-2") - i.icon.icon-arrow-left - label.item-next.btn.btn-action.btn-lg(for="slide-4") - i.icon.icon-arrow-right - img.img-responsive.rounded(src="img/osx-el-capitan.jpg" alt="macOS Yosemite Wallpaper") - figure.carousel-item - label.item-prev.btn.btn-action.btn-lg(for="slide-3") - i.icon.icon-arrow-left - label.item-next.btn.btn-action.btn-lg(for="slide-1") - i.icon.icon-arrow-right - img.img-responsive.rounded(src="img/osx-el-capitan-2.jpg" alt="macOS Yosemite Wallpaper") - .carousel-nav - label.nav-item.text-hide.c-hand(for="slide-1") 1 - label.nav-item.text-hide.c-hand(for="slide-2") 2 - label.nav-item.text-hide.c-hand(for="slide-3") 3 - label.nav-item.text-hide.c-hand(for="slide-4") 4 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="carousel"> - <!-- carousel locator --> - <input class="carousel-locator" id="slide-1" type="radio" name="carousel-radio" hidden="" checked=""> - <input class="carousel-locator" id="slide-2" type="radio" name="carousel-radio" hidden=""> - <input class="carousel-locator" id="slide-3" type="radio" name="carousel-radio" hidden=""> - <input class="carousel-locator" id="slide-4" type="radio" name="carousel-radio" hidden=""> - - <!-- carousel container --> - <div class="carousel-container"> - <!-- carousel item --> - <figure class="carousel-item"> - <label class="item-prev btn btn-action btn-lg" for="slide-4"><i class="icon icon-arrow-left"></i></label> - <label class="item-next btn btn-action btn-lg" for="slide-2"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper"> - </figure> - <figure class="carousel-item"> - <label class="item-prev btn btn-action btn-lg" for="slide-1"><i class="icon icon-arrow-left"></i></label> - <label class="item-next btn btn-action btn-lg" for="slide-3"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper"> - </figure> - <figure class="carousel-item"> - <label class="item-prev btn btn-action btn-lg" for="slide-2"><i class="icon icon-arrow-left"></i></label> - <label class="item-next btn btn-action btn-lg" for="slide-4"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-el-capitan.jpg" alt="macOS Yosemite Wallpaper"> - </figure> - <figure class="carousel-item"> - <label class="item-prev btn btn-action btn-lg" for="slide-3"><i class="icon icon-arrow-left"></i></label> - <label class="item-next btn btn-action btn-lg" for="slide-1"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-el-capitan-2.jpg" alt="macOS Yosemite Wallpaper"> - </figure> - </div> - <!-- carousel navigation --> - <div class="carousel-nav"> - <label class="nav-item text-hide c-hand" for="slide-1">1</label> - <label class="nav-item text-hide c-hand" for="slide-2">2</label> - <label class="nav-item text-hide c-hand" for="slide-3">3</label> - <label class="nav-item text-hide c-hand" for="slide-4">4</label> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/chips.pug b/docs/src/contents/chips.pug deleted file mode 100644 index 7ac2a25..0000000 --- a/docs/src/contents/chips.pug +++ /dev/null @@ -1,44 +0,0 @@ -p Chips are complex entities in small blocks. - -.docs-demo.columns - .column.col-12 - span.chip - | Crime - span.chip - | Drama - span.chip - | Biography - a.btn.btn-clear(href="#" aria-label="Close" role="button") - span.chip - | Mystery - a.btn.btn-clear(href="#" aria-label="Close" role="button") - .column.col-12 - .chip - figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") - | Tony Stark - .chip - img.avatar.avatar-sm(src="img/avatar-1.png" alt="Thor Odinson") - | Thor Odinson - .chip - img.avatar.avatar-sm(src="img/avatar-4.png" alt="Steve Rogers") - | Steve Rogers - -p - | Add a container element with the #[code chip] class. - | And add child text element, buttons or avatars with the #[code avatar] class. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <span class="chip">Crime</span> - - <span class="chip"> - Biography - <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> - </span> - - <div class="chip"> - <img src="img/avatar-1.png" class="avatar avatar-sm"> - Yan Zhu - <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> - </div>
\ No newline at end of file diff --git a/docs/src/contents/code.pug b/docs/src/contents/code.pug deleted file mode 100644 index b14cc89..0000000 --- a/docs/src/contents/code.pug +++ /dev/null @@ -1,22 +0,0 @@ -p Code is used for styling inline and multiline code snippets. -p - | For inline code, you can use the #{'<code>'} element. - | For multiline code snippet blocks, you can use #{'<pre>'} with the #[code code] class as a container, and add #{'<code>'} inside it. - | The #[code data-lang] attribute is rendered as the language name in the top right. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- code snippets --> - <button class="btn"> - Submit - </button> - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <pre class="code" data-lang="HTML"><code><span class="com"><!-- code snippets --></span> - <<span class="tag">button</span> <span class="atn">class</span>=<span class="atv">"btn"</span>> - Submit - <<span class="tag">/button</span>> - </code></pre>
\ No newline at end of file diff --git a/docs/src/contents/colors.pug b/docs/src/contents/colors.pug deleted file mode 100644 index adede92..0000000 --- a/docs/src/contents/colors.pug +++ /dev/null @@ -1,95 +0,0 @@ -p Color utilities are used for changing colors for text, link and background. - -+docs-subheading('colors-text', 'Text colors') - -.docs-demo.columns - .column.col-12 - p - span.text-primary primary color - p - span.text-secondary secondary color - p - span.text-dark dark color - p - span.text-gray gray color - p - span.text-light.bg-dark.p-1.rounded light color - p - span.text-success success color - p - span.text-warning warning color - p - span.text-error error color - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <span class="text-primary">primary color</span> - <span class="text-secondary">secondary color</span> - <span class="text-dark">dark color</span> - <span class="text-gray">gray color</span> - <span class="text-light">light color</span> - <span class="text-success">success color</span> - <span class="text-warning">warning color</span> - <span class="text-error">error color</span> - -.docs-demo.columns - .column.col-12 - p - a.text-primary.p-1(href="#colors") primary link - p - a.text-secondary.p-1(href="#colors") secondary link - p - a.text-dark.p-1(href="#colors") dark link - p - a.text-gray.p-1(href="#colors") gray link - p - a.text-light.bg-dark.p-1.rounded(href="#colors") light link - p - a.text-success.p-1(href="#colors") success link - p - a.text-warning.p-1(href="#colors") warning link - p - a.text-error.p-1(href="#colors") error link - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <a class="text-primary" href="#">primary color</a> - <a class="text-secondary" href="#">secondary color</a> - <a class="text-dark" href="#">dark color</a> - <a class="text-gray" href="#">gray color</a> - <a class="text-light" href="#">light color</a> - <a class="text-success" href="#">success color</a> - <a class="text-warning" href="#">warning color</a> - <a class="text-error" href="#">error color</a> - -+docs-subheading('colors-background', 'Background colors') - -.docs-demo.columns - .column.col-12 - p - span.bg-primary.p-1.rounded primary bg - p - span.bg-secondary.text-primary.p-1.rounded secondary bg - p - span.bg-dark.p-1.rounded dark bg - p - span.bg-gray.p-1.rounded gray bg - p - span.bg-success.p-1.rounded success bg - p - span.bg-warning.p-1.rounded warning bg - p - span.bg-error.p-1.rounded error bg - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="bg-primary">primary bg</div> - <div class="bg-secondary">secondary bg</div> - <div class="bg-dark">dark bg</div> - <div class="bg-gray">gray bg</div> - <div class="bg-success">success bg</div> - <div class="bg-warning">warning bg</div> - <div class="bg-error">error bg</div>
\ No newline at end of file diff --git a/docs/src/contents/comparison.pug b/docs/src/contents/comparison.pug deleted file mode 100644 index 954981d..0000000 --- a/docs/src/contents/comparison.pug +++ /dev/null @@ -1,29 +0,0 @@ -p - | Comparison Sliders are sliders for comparing two images. It is built in pure CSS. - -.docs-demo.columns - .column.col-12 - .comparison-slider - figure.comparison-before - img.rounded(src="img/macos-sierra-2.jpg" alt="macOS Sierra Wallpaper") - .comparison-label Before - figure.comparison-after - img.filter-grayscale.rounded(src="img/macos-sierra-2.jpg" alt="macOS Sierra Wallpaper") - .comparison-label After - textarea.comparison-resizer(readonly="") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="comparison-slider"> - <figure class="comparison-before"> - <!-- image (before) --> - <div class="comparison-label">Before</div> - </figure> - - <figure class="comparison-after"> - <!-- image (after) --> - <div class="comparison-label">After</div> - <textarea class="comparison-resizer" readonly></textarea> - </figure> - </div>
\ No newline at end of file diff --git a/docs/src/contents/cursors.pug b/docs/src/contents/cursors.pug deleted file mode 100644 index ed290b8..0000000 --- a/docs/src/contents/cursors.pug +++ /dev/null @@ -1,31 +0,0 @@ -p Cursor utilities specify which mouse cursor to display when mouseover. - -.docs-demo.columns - .column.col-4 - .bg-gray.docs-block.c-hand c-hand - .column.col-4 - .bg-gray.docs-block.c-move c-move - .column.col-4 - .bg-gray.docs-block.c-zoom-in c-zoom-in - .column.col-4 - .bg-gray.docs-block.c-zoom-out c-zoom-out - .column.col-4 - .bg-gray.docs-block.c-not-allowed c-not-allowed - .column.col-4 - .bg-gray.docs-block.c-auto c-auto - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- cursor: hand; --> - <div class="c-hand"></div> - <!-- cursor: move; --> - <div class="c-move"></div> - <!-- cursor: zoom-in; --> - <div class="c-zoom-in"></div> - <!-- cursor: zoom-out; --> - <div class="c-zoom-out"></div> - <!-- cursor: not-allowed; --> - <div class="c-not-allowed"></div> - <!-- cursor: auto; --> - <div class="c-auto"></div>
\ No newline at end of file diff --git a/docs/src/contents/custom.pug b/docs/src/contents/custom.pug deleted file mode 100644 index 367fdac..0000000 --- a/docs/src/contents/custom.pug +++ /dev/null @@ -1,287 +0,0 @@ -p - | You can customize your version of Spectre.css by editing Sass files in - code /src - | directory or removing unneeded components from - code .scss - | source files. -p - a.btn.btn-primary(href='https://github.com/picturepan2/spectre/', target='_blank') Sass Source Code -p - | If you are looking for Less version of Spectre.css, please switch to - code Less - | branch. -p - a.btn(href='https://github.com/picturepan2/spectre/tree/less', target='_blank') Less Branch - -+docs-subheading('compiling', 'Compiling CSS') - -p - | Spectre uses - a(href='http://gulpjs.com/', target='_blank') Gulp - | for compiling CSS. Firstly you need to - a(href='https://www.npmjs.com/get-npm', target='_blank') install NPM - | , which is used to manage Gulp and other dependencies. -p Then, you can build the CSS file from the command line: -ol - li Navigate to the root directory of Spectre. - li - | Run - code npm install - | . NPM will install all dev dependencies as listed in package.json. - li - | When completed, run - code gulp build - | task to compile Sass to CSS and minify files. - li - | You can find compiled CSS files in - code /dist - | directory. -p All available Gulp tasks: -ul - li - code gulp build - | - compile Sass to CSS and minify files (default) - li - code gulp docs - | - compile Docs related files - li - code gulp watch - | - watch file changes and re-compile CSS files - -+docs-subheading('importing', 'Importing Sass') -p - | It is recommended to customize Spectre by importing Sass source files to your projects. In this way, you can keep Spectre up to date without conflicts, since Spectre code and your custom code are separate. -ul - li - | First, create your own project and install Spectre via - a(href='#installation') NPM or other package managers - | . - li - | Then create your - code project-name.scss - | file in the root folder. You can use - code project-name.scss - | to define your variables. - li Compile the Sass file to CSS to get the custom version of Spectre. - -//- importing -pre.code(data-lang='Sass') - code - :highlight(lang="scss") - // Example of project-name.scss - // Define variables to override default ones - $primary-color: #2e5bec; - $dark-color: #3e396b; - - // Import full Spectre source code - @import "node_modules/spectre.css/src/spectre"; - -p - | Alternatively, you can create custom - code _variables.scss - | and import it to - code project-name.scss - | . - -//- custom variables -pre.code(data-lang='Sass') - code - :highlight(lang="scss") - // Example of project-name.scss - @import "variables"; - - // Import only the needed components - @import "node_modules/spectre.css/src/buttons"; - @import "node_modules/spectre.css/src/forms"; - -+docs-subheading('folders', 'Folder structure') - -//- folder structure -pre.code - code - :highlight - spectre/ - ├── dist/ // Build folder - │ ├── spectre-exp.css - │ ├── spectre-exp.min.css - │ ├── spectre-icons.css - │ ├── spectre-icons.min.css - │ ├── spectre.css - │ └── spectre.min.css - │ - ├── docs/ - │ ├── dist/ // Pre-built CSS folder - │ │ ├── spectre-exp.css - │ │ ├── spectre-exp.min.css - │ │ ├── spectre-icons.css - │ │ ├── spectre-icons.min.css - │ │ ├── spectre.css - │ │ └── spectre.min.css - | ├── css/ // Docs CSS files - │ │ └── docs.css - | ├── src/ - │ │ ├── scss // Docs Sass files - │ │ │ └── docs.scss - │ │ ├── index.pug // Docs Pug files - │ │ └── ... - │ ├── examples/ // Example tempalte - │ │ └── starter.html - │ ├── ../ - │ ├── index.html - │ └── ... - │ - ├── src/ // Source Sass files - │ ├── spectre.scss - │ ├── spectre-icons.scss - │ ├── spectre-exp.scss - │ ├── _mixins.scss - │ ├── _variables.scss - │ └── ... - │ - ├── gulpfile.js - ├── package.json - └── ... - -+docs-subheading('variables', 'Variables') - -p - | Spectre.css is designed with consistent design language. You can use your own variables to create your new or match existing design. All variables in - code _variables.scss - | include - code !default - | flag. You can redefine the variables to override the values. - -+docs-subheading('variables-colors', 'Variables - Colors') - -.columns - .column.col-3.col-md-6 - .docs-color(style='background:#5755d9;color:#fff;') - .color-title #5755d9 - .color-subtitle Primary - .column.col-3.col-md-6 - .docs-color(style='background:#f1f1fc;color:#5755d9;') - .color-title #f1f1fc - .color-subtitle Secondary -.columns - .column.col-3.col-md-6 - .docs-color(style='background:#32b643;color:#fff;') - .color-title #32b643 - .color-subtitle Success - .column.col-3.col-md-6 - .docs-color(style='background:#ffb700;color:#fff;') - .color-title #ffb700 - .color-subtitle Warning - .column.col-3.col-md-6 - .docs-color(style='background:#e85600;color:#fff;') - .color-title #e85600 - .color-subtitle Error -.columns - .column.col-3.col-md-6 - .docs-color(style='background:#303742;color:#fff;') - .color-title #303742 - .color-subtitle Dark - .column.col-3.col-md-6 - .docs-color(style='background:#66758c;color:#fff;') - .color-title #66758c - .color-subtitle Gray dark - .column.col-3.col-md-6 - .docs-color(style='background:#bcc3ce;color:#303742;') - .color-title #bcc3ce - .color-subtitle Gray - .column.col-3.col-md-6 - .docs-color(style='background:#f7f8f9;color:#303742;') - .color-title #f7f8f9 - .color-subtitle Gray light - .column.col-3.col-md-6 - .docs-color(style='background:#bcc3ce;color:#303742;') - .color-title #bcc3ce - .color-subtitle Border - .column.col-3.col-md-6 - .docs-color(style='background:#f7f8f9;color:#303742;') - .color-title #f7f8f9 - .color-subtitle Background - .column.col-3.col-md-6 - .docs-color(style='background:#fff;color:#303742;') - .color-title #fff - .color-subtitle Light - -+docs-subheading('variables-buttons', 'Variables - Button mixins') - -p - | There are 2 button variant mixins in - code _mixins.scss - | to generate different color variants. -ul - li - | @mixin button-variant( - code $color - | : $primary-color); - li - | @mixin button-outline-variant( - code $color - | : $primary-color); - -//- button mixins -pre.code(data-lang='Sass') - code - :highlight(lang="scss") - <!-- filled button with the success color --> - .btn-success { - @include button-variant($success-color); - } - - <!-- outlined button with the success color --> - .btn-outline-success { - @include button-outline-variant($success-color); - } - -+docs-subheading('variables-sizes', 'Variables - Sizes') - -p - | The default REM (root em) size in Spectre.css is - code 20px - | . -p - | Please note in the Chinese/Japanese/Korean version, Chrome uses 12px as default minimum font size. That is why Spectre sets rem default html font size to - code 20px - | , which is relatively easy to calculate. -p - | Spectre uses - code 4px - | as the unit size. Sizes of components are based on the unit size. - -+docs-subheading('variables-custom-prefix', 'Variables - Custom prefix') -p - | There is also a way to add custom prefix to all CSS classes. You can use - a(href='https://www.npmjs.com/package/gulp-css-prefix', target='_blank') gulp-css-prefix - | plugin and add a new Gulp task to enable it. - -//- custom prefix -pre.code(data-lang='Bash') - code - :highlight(lang="Bash") - npm install gulp-css-prefix - -p - | To add - code spectre- - | to all classes, you can add the Gulp task to - code gulpfile.js - | file. - -//- custom prefix -pre.code - code - :highlight(lang="JavaScript") - var cssPrefix = require('gulp-css-prefix'); - - gulp.task('prefix', function() { - gulp.src('./dist/*.css') - .pipe(cssPrefix('spectre-')) - .pipe(gulp.dest('./dist')) - }); - -p - | After you compile your version of Spectre in the /dist, run - code gulp prefix - | in the directory of Spectre.
\ No newline at end of file diff --git a/docs/src/contents/display.pug b/docs/src/contents/display.pug deleted file mode 100644 index bb3a0a3..0000000 --- a/docs/src/contents/display.pug +++ /dev/null @@ -1,26 +0,0 @@ -p Display utilities are used for display and hidden things. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- display: block; --> - <div class="d-block"></div> - <!-- display: inline; --> - <div class="d-inline"></div> - <!-- display: inline-block; --> - <div class="d-inline-block"></div> - <!-- display: flex; --> - <div class="d-flex"></div> - <!-- display: inline-flex; --> - <div class="d-inline-flex"></div> - <!-- display: none; --> - <div class="d-none"></div> - <div class="d-hide"></div> - <!-- visibility: visible; --> - <div class="d-visible"></div> - <!-- visibility: hidden; --> - <div class="d-invisible"></div> - <!-- hide text contents --> - <div class="text-hide"></div> - <!-- assistive text for screen reader --> - <div class="text-assistive"></div>
\ No newline at end of file diff --git a/docs/src/contents/divider.pug b/docs/src/contents/divider.pug deleted file mode 100644 index 92faa70..0000000 --- a/docs/src/contents/divider.pug +++ /dev/null @@ -1,56 +0,0 @@ -p A Divider is used for separating elements. - -.docs-demo.columns - .column - .divider - -.docs-demo.columns - .column - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. - .divider.text-center(data-content="OR") - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. - -.docs-demo.columns - .column - form - .form-group - label.form-label(for="input-example-1") Email - input#input-example-1.form-input(type="text" placeholder="Email") - .form-group - label.form-label(for="input-example-2") Password - input#input-example-2.form-input(type="password" placeholder="Password") - .form-group - label.form-checkbox - input(type="checkbox") - i.form-icon - | Remember me - .form-group - button.btn.btn-primary Sign in - .divider-vert(data-content="OR") - .column - form - .form-group - label.form-label(for="input-example-3") Email - input#input-example-3.form-input(type="text" placeholder="Email") - .form-group - button.btn.btn-primary.btn-block Sign up - button.btn.btn-link.btn-block Learn more - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- divider element --> - <div class="divider"></div> - <!-- divider element with text --> - <div class="divider text-center" data-content="OR"></div> - - <!-- vertical divider element with text --> - <div class="columns"> - <div class="column"> - <!-- column content --> - </div> - <div class="divider-vert" data-content="OR"></div> - <div class="column"> - <!-- column content --> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/empty.pug b/docs/src/contents/empty.pug deleted file mode 100644 index 880090d..0000000 --- a/docs/src/contents/empty.pug +++ /dev/null @@ -1,50 +0,0 @@ -p - | Empty states/blank slates are commonly used as placeholders for first time use, empty data and error screens. - -.docs-demo.columns - .column.col-12 - .empty - .empty-icon - i.icon.icon-3x.icon-mail - p.empty-title.h5 You have no new messages - p.empty-subtitle Click the button to start a conversation - .empty-action - button.btn.btn-primary Send a message - .column.col-12 - .empty - .empty-icon - i.icon.icon-3x.icon-mail - p.empty-title.h5 You've successfully signed up - p.empty-subtitle Click the button to invite your friends - .empty-action - button.btn.btn-primary Invite your friends - .empty-action - button.btn.btn-link Skip - .column.col-12 - .empty - .empty-icon - i.icon.icon-3x.icon-people - p.empty-title.h5 You are not following anyone - p.empty-subtitle Start to meet new friends - .empty-action.input-group.input-inline - input.form-input(type="text" placeholder="") - button.btn.btn-primary.input-group-btn Search - -p - | An empty state component can include icons, messages (title and subtitle messages) and action buttons or any combination of those elements. - | Add #[code empty-icon], #[code empty-title], #[code empty-subtitle] or #[code empty-action] to the elements. - | HTML structure is exampled below. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="empty"> - <div class="empty-icon"> - <i class="icon icon-people"></i> - </div> - <p class="empty-title h5">You have no new messages</p> - <p class="empty-subtitle">Click the button to start a conversation.</p> - <div class="empty-action"> - <button class="btn btn-primary">Send a message</button> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/experimentals.pug b/docs/src/contents/experimentals.pug deleted file mode 100644 index cec5b41..0000000 --- a/docs/src/contents/experimentals.pug +++ /dev/null @@ -1,4 +0,0 @@ -p - | The Experimentals include experimental elements and features, mostly are not yet ready for wide use. - | These elements and components are limited inside #[code spectre-exp.scss] before browsers fully support them. - | Sometimes, there are some specific browsers targeted components.
\ No newline at end of file diff --git a/docs/src/contents/filters.pug b/docs/src/contents/filters.pug deleted file mode 100644 index e2e70b3..0000000 --- a/docs/src/contents/filters.pug +++ /dev/null @@ -1,107 +0,0 @@ -p Filters are CSS only content filters. - -.docs-demo.columns - .column.col-12 - .filter - input#tag-0.filter-tag(type="radio" name="filter-radio" hidden="" checked="") - input#tag-1.filter-tag(type="radio" name="filter-radio" hidden="") - input#tag-2.filter-tag(type="radio" name="filter-radio" hidden="") - input#tag-3.filter-tag(type="radio" name="filter-radio" hidden="") - input#tag-4.filter-tag(type="radio" name="filter-radio" hidden="") - .filter-nav - label.chip(for="tag-0") All - label.chip(for="tag-1") Action - label.chip(for="tag-2") Roleplaying - label.chip(for="tag-3") Shooter - label.chip(for="tag-4") Sports - .filter-body.columns - .column.col-4.filter-item(data-tag="tag-2") - .card - .card-header - .card-title Fallout 4 - .card-subtitle Roleplaying - .column.col-4.filter-item(data-tag="tag-3") - .card - .card-header - .card-title Halo 5 - .card-subtitle Shooter - .column.col-4.filter-item(data-tag="tag-1") - .card - .card-header - .card-title Quantum Break - .card-subtitle Action - .column.col-4.filter-item(data-tag="tag-4") - .card - .card-header - .card-title Forza Horizon 3 - .card-subtitle Sports - .column.col-4.filter-item(data-tag="tag-2") - .card - .card-header - .card-title Final Fantasy XV - .card-subtitle Roleplaying - .column.col-4.filter-item(data-tag="tag-4") - .card - .card-header - .card-title NBA 2K17 - .card-subtitle Sports - .column.col-4.filter-item(data-tag="tag-3") - .card - .card-header - .card-title Battlefield 1 - .card-subtitle Shooter - .column.col-4.filter-item(data-tag="tag-1") - .card - .card-header - .card-title GTA V - .card-subtitle Action - .column.col-4.filter-item(data-tag="tag-4") - .card - .card-header - .card-title FIFA 17 - .card-subtitle Sports - .column.col-4.filter-item(data-tag="tag-3") - .card - .card-header - .card-title Overwatch - .card-subtitle Shooter - .column.col-4.filter-item(data-tag="tag-3") - .card - .card-header - .card-title Titanfall 2 - .card-subtitle Shooter - .column.col-4.filter-item(data-tag="tag-3") - .card - .card-header - .card-title Gears of Wars 4 - .card-subtitle Shooter - -p - | Filters use #[code tag-1] to #[code tag-8] to flag different tags. - | #[code tag-0] is reserved for clearing filter (or showing all). - | You can overwrite #[code $filter-number] in #[code _filters.scss] to have more filters. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="filter"> - <input type="radio" id="tag-0" class="filter-tag" name="filter-radio" hidden checked> - <input type="radio" id="tag-1" class="filter-tag" name="filter-radio" hidden> - <input type="radio" id="tag-2" class="filter-tag" name="filter-radio" hidden> - - <div class="filter-nav"> - <label class="chip" for="tag-0">All</label> - <label class="chip" for="tag-1">Action</label> - <label class="chip" for="tag-2">Roleplaying</label> - </div> - - <div class="filter-body"> - <div class="filter-item card" data-tag="tag-1"> - <!-- Filter item content --> - </div> - <div class="filter-item card" data-tag="tag-2"> - <!-- Filter item content --> - </div> - <!-- Filter items --> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/forms.pug b/docs/src/contents/forms.pug deleted file mode 100644 index e812aef..0000000 --- a/docs/src/contents/forms.pug +++ /dev/null @@ -1,697 +0,0 @@ -p - | Forms provide the most common control styles used in forms, including input, textarea, select, checkbox, radio and switch. - -.docs-demo.columns - .column.col-6.col-xs-12 - .form-group - label.form-label(for="input-example-1") Name - input#input-example-1.form-input(type="text" placeholder="Name") - .form-group - label.form-label(for="input-example-2") Email - input#input-example-2.form-input(type="email" placeholder="Email") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form input control --> - <div class="form-group"> - <label class="form-label" for="input-example-1">Name</label> - <input class="form-input" type="text" id="input-example-1" placeholder="Name"> - </div> - -.docs-demo.columns - .column.col-6.col-xs-12 - .form-group - label.form-label(for="input-example-3") Message - textarea#input-example-3.form-input(placeholder="Textarea" rows="3") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form textarea control --> - <div class="form-group"> - <label class="form-label" for="input-example-3">Message</label> - <textarea class="form-input" id="input-example-3" placeholder="Textarea" rows="3"></textarea> - </div> - -.docs-demo.columns - .column.col-6.col-xs-12 - .form-group - select.form-select - option Choose an option - option Slack - option Skype - option Hipchat - .form-group - select.form-select(multiple="") - option Choose an option - option Slack - option Skype - option Hipchat - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form select control --> - <div class="form-group"> - <select class="form-select"> - <option>Choose an option</option> - <option>Slack</option> - <option>Skype</option> - <option>Hipchat</option> - </select> - </div> - -.docs-demo.columns - .column.col-6.col-xs-12 - form - .form-group - label.form-label Gender - label.form-radio - input(type="radio" name="gender" checked="") - i.form-icon - | Male - label.form-radio - input(type="radio" name="gender") - i.form-icon - | Female - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form radio control --> - <div class="form-group"> - <label class="form-label">Gender</label> - <label class="form-radio"> - <input type="radio" name="gender" checked> - <i class="form-icon"></i> Male - </label> - <label class="form-radio"> - <input type="radio" name="gender"> - <i class="form-icon"></i> Female - </label> - </div> - -.docs-demo.columns - .column.col-6.col-xs-12 - .form-group - label.form-switch - input(type="checkbox") - i.form-icon - | Send me emails with news and tips - .form-group - label.form-switch - input(type="checkbox" checked="") - i.form-icon - | Send me emails with news and tips - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form switch control --> - <div class="form-group"> - <label class="form-switch"> - <input type="checkbox"> - <i class="form-icon"></i> Send me emails with news and tips - </label> - </div> - -.docs-demo.columns - .column.col-6.col-xs-12 - .form-group - label.form-checkbox - input(type="checkbox") - i.form-icon - | Remember me - .form-group - label.form-checkbox - input(type="checkbox" checked="") - i.form-icon - | Remember me - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form checkbox control --> - <div class="form-group"> - <label class="form-checkbox"> - <input type="checkbox"> - <i class="form-icon"></i> Remember me - </label> - </div> - -.docs-demo.columns - .column - .form-group - label.form-checkbox - input#docs-demo-checkbox(type="checkbox") - i.form-icon - | Select all - -script. - document.getElementById("docs-demo-checkbox").indeterminate = true; - -p - | You can change checkbox to indeterminate state by setting the #[code indeterminate] property of input checkboxes to #[code true]. - -+docs-subheading('forms-inline', 'Inline forms') - -.docs-demo.columns - .column.col-6.col-xs-12 - form - .form-group - label.form-radio.form-inline - input(type="radio" name="gender" checked="") - i.form-icon - | Male - label.form-radio.form-inline - input(type="radio" name="gender") - i.form-icon - | Female - .form-group - label.form-checkbox.form-inline - input(type="checkbox") - i.form-icon - | Checkbox 1 - label.form-checkbox.form-inline - input(type="checkbox" checked="") - i.form-icon - | Checkbox 2 - -p - | You can add the #[code form-inline] class to the form components to make them inline in one row. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="form-group"> - <label class="form-radio form-inline"> - <input type="radio" name="gender" checked=""><i class="form-icon"></i> Male - </label> - <label class="form-radio form-inline"> - <input type="radio" name="gender"><i class="form-icon"></i> Female - </label> - </div> - - <div class="form-group"> - <label class="form-checkbox form-inline"> - <input type="checkbox"><i class="form-icon"></i> Checkbox 1 - </label> - <label class="form-checkbox form-inline"> - <input type="checkbox" checked=""><i class="form-icon"></i> Checkbox 2 - </label> - </div> - -+docs-subheading('forms-horizontal', 'Horizontal forms') - -p - | If you want to have a horizontal form, add the #[code form-horizontal] class to the #{'<form>'} container. - | And add the #[code col-<1-12>] and #[code col-xs/sm/lg/xl-<1-12>] class to the child elements for responsive form row layout. - -.docs-demo.columns - .column.col-9.col-sm-12 - form.form-horizontal(action="#forms") - .form-group - .col-3.col-sm-12 - label.form-label(for="input-example-4") Name - .col-9.col-sm-12 - input#input-example-4.form-input(type="text" placeholder="Name") - .form-group - .col-3.col-sm-12 - label.form-label(for="input-example-5") Email - .col-9.col-sm-12 - input#input-example-5.form-input(type="email" placeholder="Email") - .form-group - .col-3.col-sm-12 - label.form-label Gender - .col-9.col-sm-12 - label.form-radio - input(type="radio" name="gender") - i.form-icon - | Male - label.form-radio - input(type="radio" name="gender" checked="") - i.form-icon - | Female - .form-group - .col-3.col-sm-12 - label.form-label Source - .col-9.col-sm-12 - select.form-select(multiple="") - option Slack - option Skype - option Hipchat - .form-group - .col-9.col-sm-12.col-ml-auto - label.form-switch - input(type="checkbox") - i.form-icon - | Send me emails with news and tips - .form-group - .col-3.col-sm-12 - label.form-label(for="input-example-6") Message - .col-9.col-sm-12 - textarea#input-example-6.form-input(placeholder="Textarea" rows="3") - .form-group - .col-9.col-sm-12.col-ml-auto - label.form-checkbox - input(type="checkbox") - i.form-icon - | Remember me - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <form class="form-horizontal"> - <div class="form-group"> - <div class="col-3 col-sm-12"> - <label class="form-label" for="input-example-1">Name</label> - </div> - <div class="col-9 col-sm-12"> - <input class="form-input" type="text" id="input-example-1" placeholder="Name"> - </div> - </div> - <!-- form structure --> - </form> - -+docs-subheading('forms-sizes', 'Form sizes') - -p - | For smaller or larger input and select controls, you could add the #[code input-sm]/#[code input-lg], #[code select-sm]/#[code select-lg] and #[code label-sm]/#[code label-lg] classes to the elements. - -.docs-demo.columns - .column.col-4.col-xs-12 - label.form-label.label-sm Label - .column.col-4.col-xs-12 - input.form-input.input-sm(type="text" placeholder="Name") - .column.col-4.col-xs-12 - select.form-select.select-sm - option Choose an option - option Slack - option Skype - option Hipchat - .column.col-4.col-xs-12 - label.form-label.label-lg Label - .column.col-4.col-xs-12 - input.form-input.input-lg(type="text" placeholder="Name") - .column.col-4.col-xs-12 - select.form-select.select-lg - option Choose an option - option Slack - option Skype - option Hipchat - -p - | You can add the #[code input-sm]/#[code input-lg] classes to the input-checkbox, input-radio and input-switch to have different sizes. - -+docs-subheading('forms-icons', 'Form icons') - -p - | Spectre Form components has - a(href="#icons") Spectre Icons - | support. -p - | Add a wrapper with the #[code has-icon-left]/#[code has-icon-right] class to #{'<input>'} element. - | And add the icon with #[code form-icon] class next to the #{'<input>'}. - -.docs-demo.columns - .column.col-4.col-xs-12 - .has-icon-left - input.form-input.input-sm(type="text" placeholder="Name") - i.form-icon.icon.icon-arrow-right - .column.col-4.col-xs-12 - .has-icon-left.tooltip(data-tooltip="Lorem ipsum dolor sit amet") - input.form-input(type="text" placeholder="Name") - i.form-icon.icon.icon-arrow-right - .column.col-4.col-xs-12 - .has-icon-left - input.form-input.input-lg(type="text" placeholder="Name") - i.form-icon.icon.icon-arrow-right - .column.col-4.col-xs-12 - .has-icon-right - input.form-input.input-sm(type="text" placeholder="Name") - i.form-icon.icon.icon-check - .column.col-4.col-xs-12 - .has-icon-right - input.form-input(type="text" placeholder="Name") - i.form-icon.icon.icon-check - .column.col-4.col-xs-12 - .has-icon-right - input.form-input.input-lg(type="text" placeholder="Name") - i.form-icon.icon.icon-check - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form input with Spectre icon --> - <div class="has-icon-left"> - <input type="text" class="form-input" placeholder="..."> - <i class="form-icon icon icon-check"></i> - </div> - -p - | You can use the #[code loading] class for loading or posting state. - -.docs-demo.columns - .column.col-4.col-xs-12 - .has-icon-right - input.form-input.input-sm(type="text" placeholder="Name") - i.form-icon.loading - .column.col-4.col-xs-12 - .has-icon-right - input.form-input(type="text" placeholder="Name") - i.form-icon.loading - .column.col-4.col-xs-12 - .has-icon-right - input.form-input.input-lg(type="text" placeholder="Name") - i.form-icon.loading - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- form input with loading icon --> - <div class="has-icon-right"> - <input type="text" class="form-input" placeholder="..."> - <i class="form-icon loading"></i> - </div> - -+docs-subheading('forms-input', 'Input types') - -.docs-demo.columns - .column.col-9.col-sm-12 - form.form-horizontal(action="#forms") - .form-group - .col-3 - label.form-label(for="input-example-8") Email - .col-9 - input#input-example-8.form-input(type="email" placeholder="Email" value="spectre@example.com" pattern="[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$") - .form-group - .col-3 - label.form-label(for="input-example-9") URL - .col-9 - input#input-example-9.form-input(type="url" placeholder="URL" value="https://github.com/picturepan2/spectre") - .form-group - .col-3 - label.form-label(for="input-example-10") Search - .col-9 - input#input-example-10.form-input(type="search" placeholder="Search") - .form-group - .col-3 - label.form-label(for="input-example-11") Tel - .col-9 - input#input-example-11.form-input(type="tel" placeholder="Tel" value="1-(888)-888-8888") - .form-group - .col-3 - label.form-label(for="input-example-12") Password - .col-9 - input#input-example-12.form-input(type="password" placeholder="Password" value="123456789") - .form-group - .col-3 - label.form-label(for="input-example-13") Number - .col-9 - input#input-example-13.form-input(type="number" placeholder="00" value="66") - .form-group - .col-3 - label.form-label(for="input-example-14") Date - .col-9 - input#input-example-14.form-input(type="date" value="2016-12-31") - .form-group - .col-3 - label.form-label(for="input-example-15") Color - .col-9 - input#input-example-15.form-input(type="color" value="#5755d9") - .form-group - .col-3 - label.form-label(for="input-example-16") File - .col-9 - input#input-example-16.form-input(type="file") - -+docs-subheading('forms-input-groups', 'Input groups') - -.docs-demo.columns - .column.col-6.col-xs-12 - .input-group - input.form-input.input-sm(type="text" placeholder="username") - select.form-select.select-sm - option Slack - option Skype - option Hipchat - .column.col-6.col-xs-12 - .input-group - span.input-group-addon.addon-sm slack.com/ - input.form-input.input-sm(type="text" placeholder="site name") - button.btn.btn-primary.input-group-btn.btn-sm Submit - .column.col-6.col-xs-12 - .input-group - input.form-input(type="text" placeholder="username") - select.form-select - option Slack - option Skype - option Hipchat - .column.col-6.col-xs-12 - .input-group - span.input-group-addon slack.com/ - input.form-input(type="text" placeholder="site name") - button.btn.btn-primary.input-group-btn Submit - .column.col-6.col-xs-12 - .input-group - label.form-switch - input(type="checkbox") - i.form-icon - input.form-input(type="text" placeholder="name") - .column.col-6.col-xs-12 - .input-group - label.form-checkbox - input(type="checkbox") - i.form-icon - input.form-input(type="text" placeholder="name") - .column.col-6.col-xs-12 - .input-group - input.form-input.input-lg(type="text" placeholder="username") - select.form-select.select-lg - option Slack - option Skype - option Hipchat - .column.col-6.col-xs-12 - .input-group - span.input-group-addon.addon-lg slack.com/ - input.form-input.input-lg(type="text" placeholder="site name") - button.btn.btn-primary.input-group-btn.btn-lg Submit - -p - | If you want to attach text and button along with an input, add the #[code input-group] class to the input container. - | And add the #[code input-group-addon] class to the text element and #[code input-group-btn] to the button element. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- normal input group --> - <div class="input-group"> - <span class="input-group-addon">...</span> - <input type="text" class="form-input" placeholder="..."> - </div> - - <!-- large input group --> - <div class="input-group"> - <span class="input-group-addon addon-lg">...</span> - <input type="text" class="form-input input-lg" placeholder="..."> - </div> - - <!-- normal input group with button --> - <div class="input-group"> - <span class="input-group-addon">...</span> - <input type="text" class="form-input" placeholder="..."> - <button class="btn btn-primary input-group-btn">Submit</button> - </div> - -+docs-subheading('forms-validation', 'Form validation styles') - -.docs-demo.columns - .column.col-9.col-sm-12 - fieldset - legend Input - .form-group - label.form-label(for="input-example-17") Name - input#input-example-17.form-input.is-success(type="text" placeholder="Name") - p.form-input-hint The name is valid. - .form-group.has-error - label.form-label(for="input-example-18") Password - input#input-example-18.form-input(type="password" placeholder="Password") - p.form-input-hint Passwords must have at least 8 characters. - fieldset - legend Select - .form-group - select.form-select.is-error - option Choose an option - option Slack - option Skype - option Hipchat - p.form-input-hint The option is invalid. - .form-group.has-success - select.form-select - option Choose an option - option Slack - option Skype - option Hipchat - p.form-input-hint The option is available. - fieldset - legend Checkbox, Radio and Switch (Error state only) - .form-group - label.form-checkbox.is-error - input(type="checkbox" checked="") - i.form-icon - | I'm not a robot. - .form-group.has-error - label.form-radio - input(type="radio" name="gender" checked="") - i.form-icon - | Male - label.form-radio - input(type="radio" name="gender") - i.form-icon - | Female - .form-group - label.form-switch.is-error - input(type="checkbox" checked="") - i.form-icon - | Send me emails with news and tips - -p - | To use form validation styles, you can either add #[code is-success] or #[code is-error] class to the controls or add #[code has-success] or #[code has-error] class to parent elements. - | Use the #[code form-input-hint] class to provide form validation success and error messages. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <form> - <!-- form validation class: has-success --> - <div class="form-group has-success"> - <label class="form-label" for="input-example-1">Name</label> - <input class="form-input" type="text" id="input-example-1" placeholder="..."> - <p class="form-input-hint">The name is invalid.</p> - </div> - - <!-- form validation class: is-success --> - <div class="form-group"> - <label class="form-label" for="input-example-1">Name</label> - <input class="form-input is-success" type="text" id="input-example-1" placeholder="..."> - <p class="form-input-hint">The name is invalid.</p> - </div> - - <!-- form validation example for checkbox, radio and switch --> - <div class="form-group"> - <label class="form-checkbox is-error"> - <input type="checkbox"> - <i class="form-icon"></i> Remember me - </label> - </div> - </form> - -.docs-demo.columns - .column.col-9.col-sm-12 - .form-group - label.form-label(for="input-example-21") Email - input#input-example-21.form-input(type="text" placeholder="Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,14}$") - .form-group - label.form-label(for="input-example-22") Password - input#input-example-22.form-input(type="password" placeholder="Password" pattern="^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$") - -p - | You can use input #[code pattern] attribute to validate the value as well. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- pattern validation example for Email --> - <input class="form-input" type="email" placeholder="Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,14}$"> - - <!-- pattern validation example for password (8 or more characters that are of at least one number, and one uppercase and lowercase letter) --> - <input class="form-input" type="password" placeholder="Password" pattern="^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$"> - -+docs-subheading('forms-disabled', 'Form disabled styles') - -p - | Add the #[code disabled] attribute to the element or #{'<fieldset>'} for a disabled form components style. - -.docs-demo.columns - .column.col-6.col-xs-12 - form(action="#forms") - fieldset(disabled="") - .form-group - label.form-label(for="input-example-19") Name - input#input-example-19.form-input(type="text" placeholder="Name") - .form-group - label.form-label Gender - label.form-radio - input(type="radio" name="gender" disabled="") - i.form-icon - | Male - label.form-radio - input(type="radio" name="gender" disabled="") - i.form-icon - | Female - .form-group - select.form-select(disabled="") - option Choose an option - option Slack - option Skype - option Hipchat - .form-group - label.form-switch - input(type="checkbox" disabled="") - i.form-icon - | Send me emails with news and tips - .form-group - label.form-label(for="input-example-20") Message - textarea#input-example-20.form-input(placeholder="Textarea" rows="3" disabled="") - .form-group - label.form-checkbox - input(type="checkbox" disabled="") - i.form-icon - | Remember me - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <form action="#forms"> - <fieldset disabled> - <div class="form-group"> - <label class="form-label" for="input-example-19">Name</label> - <input class="form-input" type="text" id="input-example-19" placeholder="Name"> - </div> - <div class="form-group"> - <label class="form-label">Gender</label> - <label class="form-radio"> - <input type="radio" name="gender" disabled> - <i class="form-icon"></i> Male - </label> - <label class="form-radio"> - <input type="radio" name="gender" disabled> - <i class="form-icon"></i> Female - </label> - </div> - <div class="form-group"> - <select class="form-select" disabled> - <option>Choose an option</option> - <option>Slack</option> - <option>Skype</option> - <option>Hipchat</option> - </select> - </div> - <div class="form-group"> - <label class="form-switch"> - <input type="checkbox" disabled> - <i class="form-icon"></i> Send me emails with news and tips - </label> - </div> - <div class="form-group"> - <label class="form-label" for="input-example-20">Message</label> - <textarea class="form-input" id="input-example-20" placeholder="Textarea" rows="3" disabled></textarea> - </div> - <div class="form-group"> - <label class="form-checkbox"> - <input type="checkbox" disabled> - <i class="form-icon"></i> Remember me - </label> - </div> - </fieldset>
\ No newline at end of file diff --git a/docs/src/contents/grid.pug b/docs/src/contents/grid.pug deleted file mode 100644 index dff69f6..0000000 --- a/docs/src/contents/grid.pug +++ /dev/null @@ -1,171 +0,0 @@ -p - | Layout includes flexbox based responsive grid system with 12 columns. - -.docs-demo.columns - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block - .column - .bg-primary.text-secondary.docs-block -.columns - .column.col-12 - .bg-gray.docs-block col-12 (100%) -.columns - .column.col-9 - .bg-gray.docs-block col-9 (75%) -.columns - .column.col-6 - .bg-gray.docs-block col-6 (50%) -.columns - .column.col-3 - .bg-gray.docs-block col-3 (25%) - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- flexbox grid example --> - <div class="container"> - <div class="columns"> - <div class="column col-6">col-6</div> - <div class="column col-3">col-3</div> - <div class="column col-2">col-2</div> - <div class="column col-1">col-1</div> - </div> - </div> - -p - | Add the #[code columns] class to a container with the #[code container] class. - | And add any element you want with the #[code column] class inside the container. These columns will take up the space equally. - | You can specific the width of each column by adding class #[code col-<1-12>]. -p - | And you can add the #[code col-gapless] class to the #[code columns] to have gapless columns. - -.docs-demo.columns.col-gapless - .column.col-6 - .bg-gray.docs-block col-6 (gapless) - .column.col-6 - .bg-gray.docs-block col-6 (gapless) - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- gapless columns --> - <div class="columns col-gapless"> - <div class="column col-6">col-6</div> - <div class="column col-6">col-6</div> - </div> - -p - | By default, Spectre grid has multi-line flexbox enabled. You can add the #[code col-oneline] class to #[code columns] to make all its child columns positioned in the same single row. - -.docs-demo.columns.col-oneline - .column.col-8 - .bg-gray.docs-block col-8 - .column.col-8 - .bg-gray.docs-block col-8 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- one line columns --> - <div class="columns col-oneline"> - <div class="column col-8">col-8</div> - <div class="column col-8">col-8</div> - </div> - -+docs-subheading('grid-offset', 'Grid offset') - -p - | The Flexbox grid provides margin auto utilities to set offset. - | There are #[code col-mx-auto], #[code col-ml-auto] and #[code col-mr-auto] to set margins between columns without using empty columns. - -.columns - .column.col-2 - .bg-gray.docs-block col-2 - .column.col-4.col-mx-auto - .bg-gray.docs-block col-4 col-mx-auto -.columns - .column.col-2 - .bg-gray.docs-block col-2 - .column.col-4.col-ml-auto - .bg-gray.docs-block col-4 col-ml-auto -.columns - .column.col-4.col-ml-auto - .bg-gray.docs-block col-4 col-ml-auto - .column.col-2 - .bg-gray.docs-block col-2 -.columns - .column.col-4.col-mx-auto - .bg-gray.docs-block col-4 col-mx-auto - .column.col-2 - .bg-gray.docs-block col-2 -.columns - .column.col-4.col-mr-auto - .bg-gray.docs-block col-4 col-mr-auto - .column.col-2 - .bg-gray.docs-block col-2 -.columns - .column.col-4.col-mx-auto - .bg-gray.docs-block col-4 col-mx-auto - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- grid offset example --> - <div class="container"> - <div class="columns"> - <div class="column col-4 col-mr-auto">col-4 col-mr-auto</div> - <div class="column col-2">col-2</div> - </div> - </div> - -+docs-subheading('grid-nesting', 'Grid nesting') - -p - | To nest grids, add the new #[code columns] and #[code column] structure within an existing column. - -.docs-demo.columns - .column.col-6 - .bg-gray.docs-block col-6 - .columns - .column.col-6 - .bg-primary.docs-block col-6 - .column.col-6 - .bg-primary.docs-block col-6 - .column.col-6 - .bg-gray.docs-block col-6 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- grid nesting example --> - <div class="container"> - <div class="columns"> - <div class="column col-6">col-6 - <div class="columns"> - <div class="column col-6">col-6</div> - <div class="column col-6">col-6</div> - </div> - </div> - <div class="column col-6">col-6</div> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/icons.pug b/docs/src/contents/icons.pug deleted file mode 100644 index b67f1a5..0000000 --- a/docs/src/contents/icons.pug +++ /dev/null @@ -1,197 +0,0 @@ -p - | Icons are single-element, responsive and pure CSS icons. - | You can include #[code spectre-icons.css] located in the #[code dist] folder to your web #{'<head>'} to have these CSS icons. - -+docs-subheading('icons-navigation', 'Navigation icons') - -.columns - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-arrow-up - p icon-arrow-up - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-arrow-right - p icon-arrow-right - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-arrow-down - p icon-arrow-down - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-arrow-left - p icon-arrow-left - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-upward - p icon-upward - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-forward - p icon-forward - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-downward - p icon-downward - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-back - p icon-back - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-caret - p icon-caret - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-menu - p icon-menu - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-apps - p icon-apps - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-more-horiz - p icon-more-horiz - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-more-vert - p icon-more-vert - -+docs-subheading('icons-action', 'Action icons') - -.columns - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-resize-horiz - p icon-resize-horiz - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-resize-vert - p icon-resize-vert - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-plus - p icon-plus - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-minus - p icon-minus - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-cross - p icon-cross - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-check - p icon-check - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-stop - p icon-stop - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-shutdown - p icon-shutdown - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-refresh - p icon-refresh - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-search - p icon-search - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-flag - p icon-flag - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-bookmark - p icon-bookmark - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-edit - p icon-edit - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-delete - p icon-delete - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-share - p icon-share - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-download - p icon-download - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-upload - p icon-upload - -+docs-subheading('icons-object', 'Object icons') - -.columns - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-mail - p icon-mail - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-people - p icon-people - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-message - p icon-message - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-photo - p icon-photo - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-time - p icon-time - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-location - p icon-location - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-link - p icon-link - .column.col-3.col-md-6 - button.btn.btn-primary.btn-action.btn-lg - i.icon.icon-emoji - p icon-emoji - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <i class="icon icon-menu"></i> - -+docs-subheading('icons-sizes', 'Icon sizes') - -p - | Use #[code icon-2x], #[code icon-3x] and #[code icon-4x] classes to increase icon sizes. - | You can set #[code font-size] to have different icon sizes. - -.columns - .column.col-3.col-md-6 - p - i.icon.icon-2x.icon-mail - p icon-2x (32px) - .column.col-3.col-md-6 - p - i.icon.icon-3x.icon-mail - p icon-3x (48px) - .column.col-3.col-md-6 - p - i.icon.icon-4x.icon-mail - p icon-4x (64px) - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <i class="icon icon-2x icon-mail"></i>
\ No newline at end of file diff --git a/docs/src/contents/installation.pug b/docs/src/contents/installation.pug deleted file mode 100644 index cada6ce..0000000 --- a/docs/src/contents/installation.pug +++ /dev/null @@ -1,68 +0,0 @@ -p - | There are 5 ways to get started with Spectre CSS framework in your projects. You can either install manually, from CDN or use package managers. - -+docs-subheading('install-manually', 'Install manually') -p - | Download the compiled and minified - a(href='https://github.com/picturepan2/spectre/releases', target='_blank') Spectre CSS file - | (core ~10KB min+gzip): -p - a.btn.btn-primary(href='https://github.com/picturepan2/spectre/releases', target='_blank') Download Spectre.css -p - | Include - code spectre.css - | located in - strong /dist - | in your website or Web app <head>. Also, you can add - code spectre-icons.css - | and - code spectre-exp.css - | accordingly. - -//- install manually -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <link rel="stylesheet" href="spectre.min.css"> - <link rel="stylesheet" href="spectre-exp.min.css"> - <link rel="stylesheet" href="spectre-icons.min.css"> - -+docs-subheading('install-cdn', 'Install from CDN') -p - | Alternatively, you can use the - a(href='https://unpkg.com/', target='_blank') unpkg - | or - a(href='https://cdnjs.com/libraries/spectre.css', target='_blank') cdnjs - | CDN to load compiled Spectre.css. - -//- install from CDN -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css"> - <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-exp.min.css"> - <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-icons.min.css"> - -+docs-subheading('install-npm', 'Install with NPM') - -//- install with npm -pre.code(data-lang='Bash') - code - :highlight(lang="Bash") - npm install spectre.css --save - -+docs-subheading('install-yarn', 'Install with Yarn') - -//- install with yarn -pre.code(data-lang='Bash') - code - :highlight(lang="bash") - yarn add spectre.css - -+docs-subheading('install-bower', 'Install from Bower') - -//- install with bower -pre.code(data-lang='Bash') - code - :highlight(lang="bash") - bower install spectre.css --save
\ No newline at end of file diff --git a/docs/src/contents/introduction.pug b/docs/src/contents/introduction.pug deleted file mode 100644 index 8e544de..0000000 --- a/docs/src/contents/introduction.pug +++ /dev/null @@ -1,5 +0,0 @@ -p - strong Spectre.css - | is a lightweight, responsive and modern CSS framework for faster and extensible development. -p - | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.
\ No newline at end of file diff --git a/docs/src/contents/labels.pug b/docs/src/contents/labels.pug deleted file mode 100644 index f0ad51f..0000000 --- a/docs/src/contents/labels.pug +++ /dev/null @@ -1,35 +0,0 @@ -p Labels are formatted text tags for highlighted, informative information. - -.docs-demo.columns - .column - span.label.mr-1 default label - span.label.label-primary.mr-1 primary label - span.label.label-secondary.mr-1 secondary label - span.label.label-success.mr-1 success label - span.label.label-warning.mr-1 warning label - span.label.label-error error label - -p - | Add the #[code label] class to #{'<span>'} or #{'<small>'} elements. - | You can add another class #[code label-primary], #[code label-secondary], #[code label-success], #[code label-warning] and #[code label-error] for colored labels. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- normal labels --> - <span class="label">default label</span> - <span class="label label-primary">primary label</span> - -.docs-demo.columns - .column - span.label.label-rounded.mr-1 default label - span.label.label-rounded.label-primary primary label - -p - | Add the #[code label-rounded] class to have rounded labels. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- rounded labels --> - <span class="label label-rounded label-primary">primary label</span>
\ No newline at end of file diff --git a/docs/src/contents/loading.pug b/docs/src/contents/loading.pug deleted file mode 100644 index 38a1dad..0000000 --- a/docs/src/contents/loading.pug +++ /dev/null @@ -1,21 +0,0 @@ -p - | Loading indicator is used for loading or updating. - | You can add the #[code loading] class to a container for loading status. - -.docs-demo.columns - .column.col-12.text-center - .loading - -p - | Add the #[code loading-lg] class for large size. - -.docs-demo.columns - .column.col-12.text-center - .loading.loading-lg - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- loading element --> - <div class="loading"></div> - <div class="loading loading-lg"></div>
\ No newline at end of file diff --git a/docs/src/contents/media.pug b/docs/src/contents/media.pug deleted file mode 100644 index ee78fcc..0000000 --- a/docs/src/contents/media.pug +++ /dev/null @@ -1,73 +0,0 @@ -p Media includes responsive images, figures and video classes. - -+docs-subheading('media-images', 'Images') - -p - | Add the #[code img-responsive] class to #{'<img>'} elements. The images will scale with the parent sizes. - -.columns - .column.col-12 - img.img-responsive.rounded(src="img/osx-el-capitan.jpg" alt="macOS El Capitan Wallpaper") - -p - | Add the #[code img-fit-contain] or #[code img-fit-cover] class to #{'<img>'} or #{'<video>'} elements. The media will crop itself to fit inside the element (and you don't need another container). - | This feature can replace the classic background image trick. Microsoft Edge support - a(href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/" target="_blank") is shipped - | with Build Number 16299+. - -.docs-demo.columns - .column.col-6.col-xs-12 - figure.figure - img.img-fit-contain.rounded(src="img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;") - figcaption.figure-caption.text-center img-fit-contain - .column.col-6.col-xs-12 - figure.figure - img.img-fit-cover.rounded(src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;") - figcaption.figure-caption.text-center img-fit-cover - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <img src="img/osx-el-capitan.jpg" class="img-responsive ..." alt="..."> - <img src="img/osx-el-capitan.jpg" class="img-fit-contain ..." alt="..."> - <img src="img/osx-el-capitan.jpg" class="img-fit-cover ..." alt="..."> - -+docs-subheading('media-figure', 'Figure') - -p - | You can use the element #{'<figure>'} for an image with a caption. - | Add the #[code figure] class to #{'<figure>'} element. - | The images with the #[code img-responsive] class will be responsive. - | And the included class #[code figure-caption] will provide basic style for caption. - | Also, you can use #[code text-left], #[code text-center] and #[code text-right] for caption alignment. - -.docs-demo.columns - .column.col-12 - figure.figure - img.img-responsive.rounded(src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") - figcaption.figure-caption.text-center macOS Yosemite wallpaper - -+docs-subheading('media-video', 'Video') - -p - | For responsive video, add a container with the #[code video-responsive] class. - | Insert any YouTube, Youku or other iframe/embed video inside the container. - | The ratio is 16:9 by default. - | You may add #[code video-responsive-4-3] for 4:3 ratio video container or #[code video-responsive-1-1] for 1:1 ratio. - -.docs-demo.columns - .column.col-12 - .video-responsive - iframe(width="560" height="315" src="https://www.youtube.com/embed/7DbslbKsQSk" allowfullscreen="") - -p - | For responsive #{'<video>'} elements, you can add the #[code video-responsive] class directly. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="video-responsive video-responsive-4-3"> - <iframe src="..." width="..." height="..." frameborder="0" allowfullscreen></iframe> - </div> - - <video class="video-responsive" src="...">...</video> diff --git a/docs/src/contents/menu.pug b/docs/src/contents/menu.pug deleted file mode 100644 index 45ba53b..0000000 --- a/docs/src/contents/menu.pug +++ /dev/null @@ -1,184 +0,0 @@ -p Menus are vertical list of links or buttons for actions and navigation. - -.docs-demo.columns - .column.col-4.col-xs-12 - ul.menu - li.menu-item - .tile.tile-centered - .tile-icon - img.avatar(src="img/avatar-4.png" alt="Avatar") - .tile-content - | Steve Rogers - li.divider - li.menu-item - .menu-badge - label.label.label-primary 2 - a.active(href="#menus") - | My profile - li.menu-item - a(href="#menus") - | Settings - li.menu-item - a(href="#menus") - | Logout - .column.col-4.col-xs-12 - ul.menu - li.divider(data-content="LINKS") - li.menu-item - a(href="#menus") Slack - li.menu-item - a(href="#menus") Hipchat - li.menu-item - a(href="#menus") Skype - .column.col-4.col-xs-12 - ul.menu - li.menu-item - label.form-checkbox - input(type="checkbox" checked="") - i.form-icon - | form-checkbox - li.menu-item - label.form-radio - input(type="radio" checked="") - i.form-icon - | form-radio - li.menu-item - label.form-switch - input(type="checkbox" checked="") - i.form-icon - | form-switch - -p - | Add a container element with the #[code menu] class. - | And add child elements with the #[code menu-item] class. - | You can separate menu items with a #[code divider]. - | Spectre.css does not include JavaScript code, you will need to implement your JS to interact with the menus. -p - | Menus also have #[a(href="elements.html#forms" target="_blank") Form controls] (checkbox, radio and checkbox) support. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="menu"> - <!-- menu header text --> - <li class="divider" data-content="LINKS"> - </li> - <!-- menu item standard --> - <li class="menu-item"> - <a href="#"> - <i class="icon icon-link"></i> Slack - </a> - </li> - <!-- menu item with form control --> - <li class="menu-item"> - <label class="form-checkbox"> - <input type="checkbox"> - <i class="form-icon"></i> form-checkbox - </label> - </li> - <!-- menu divider --> - <li class="divider"></li> - <!-- menu item with badge --> - <li class="menu-item"> - <div class="menu-badge"> - <label class="label label-primary">2</label> - </div> - <a href="#"> - <i class="icon icon-link"></i> Settings - </a> - </li> - </ul> - -+docs-subheading('menu-dropdown', 'Dropdown menu') - -p The dropdown is a combination of buttons and menus. - -.docs-demo.columns - .column.col-xs-12 - .dropdown - .btn-group - a.btn.btn-primary dropdown button - a.btn.btn-primary.dropdown-toggle(tabindex="0") - i.icon.icon-caret - ul.menu - li.menu-item - a(href="#dropdowns") - | Slack - li.menu-item - a(href="#dropdowns") - | Hipchat - li.menu-item - a(href="#dropdowns") - | Skype - .column.col-xs-12 - .dropdown - a.btn.btn-link.dropdown-toggle(tabindex="0") - | dropdown button - i.icon.icon-caret - ul.menu - li.menu-item - a(href="#dropdowns") - | Slack - li.menu-item - a(href="#dropdowns") - | Hipchat - li.menu-item - a(href="#dropdowns") - | Skype - -p - | Dropdown menus component is built entirely in CSS. It is triggered by #[code :focus] event. -p - | Add a container element with the #[code dropdown] class. - | And add a focusable element with the #[code dropdown-toggle] class for the button and a #[code menu] component right next to it. - | You also need to add #[code tabindex] to make the buttons focusable. -p - | If the dropdown is close to the right edge of the browser, you can add the #[code dropdown-right] class to the container to prevent it appearing off screen. - -.docs-demo.columns - .column.col-xs-12.text-right - .dropdown.dropdown-right - a.btn.btn-primary.dropdown-toggle(tabindex="0") - | dropdown button - i.icon.icon-caret - ul.menu.text-left - li.menu-item - a(href="#dropdowns") Slack - li.menu-item - a(href="#dropdowns") Hipchat - li.menu-item - a(href="#dropdowns") Skype - -p - | Also, you can implement your JS to interact with the dropdown menus by adding the #[code active] class to the #[code dropdown] container. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- basic dropdown button --> - <div class="dropdown"> - <a href="#" class="btn btn-link dropdown-toggle" tabindex="0"> - dropdown menu <i class="icon icon-caret"></i> - </a> - <!-- menu component --> - <ul class="menu"> - ... - </ul> - </div> - - <!-- dropdown button group --> - <div class="dropdown"> - <div class="btn-group"> - <a href="#" class="btn"> - dropdown button - </a> - <a href="#" class="btn dropdown-toggle" tabindex="0"> - <i class="icon icon-caret"></i> - </a> - - <!-- menu component --> - <ul class="menu"> - ... - </ul> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/meters.pug b/docs/src/contents/meters.pug deleted file mode 100644 index 8f96070..0000000 --- a/docs/src/contents/meters.pug +++ /dev/null @@ -1,22 +0,0 @@ -p Meters represent the value within the known range. - -.docs-demo.columns - .column.col-3.col-xs-12 - meter.meter(value="20" min="0" max="100") - .column.col-3.col-xs-12 - meter.meter(value="60" min="0" low="30" optimum="60" high="80" max="100") - .column.col-3.col-xs-12 - meter.meter(value="85" min="0" low="30" high="80" max="100") - .column.col-3.col-xs-12 - meter.meter(value="20" min="0" low="30" optimum="90" high="80" max="100") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- Meter is green when low < value < high --> - <meter class="meter" value="20" min="0" max="100"></meter> - <meter class="meter" value="60" min="0" max="100" low="30" high="80"></meter> - <!-- Meter is yellow when value < low or high < value --> - <meter class="meter" value="85" min="0" max="100" low="30" high="80"></meter> - <!-- Meter is red when value < low < high < optimum or optimum < low < high < value --> - <meter class="meter" value="20" optimum="90" min="0" max="100" low="30" high="80"></meter>
\ No newline at end of file diff --git a/docs/src/contents/modals.pug b/docs/src/contents/modals.pug deleted file mode 100644 index 54a6fcd..0000000 --- a/docs/src/contents/modals.pug +++ /dev/null @@ -1,141 +0,0 @@ -p Modals are flexible dialog prompts. - -.docs-demo.columns - .column - a.btn.btn-primary(href="#example-modal-1") Open Modal - #example-modal-1.modal - a.modal-overlay(href="#modals" aria-label="Close") - .modal-container(role="document") - .modal-header - a.btn.btn-clear.float-right(href="#modals" aria-label="Close") - .modal-title.h5 Modal title - .modal-body - .content - p This is the content inside the modal. - h4 Lorem ipsum - p - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. - p - | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. - h4 Cupcake ipsum - p - | Jelly-o sesame snaps halvah croissant oat cake cookie. Cheesecake bear claw topping. Chupa chups apple pie carrot cake chocolate cake caramels. - p - | De braaaiiiins apocalypsi gorger omero prefrontal cortex undead survivor fornix dictum mauris. Hi brains mindless mortuis limbic cortex soulless creaturas optic nerve. - h4 Candy ipsum - p - | Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar. - p - | Caerphilly swiss fromage frais. Brie cheese and wine fromage frais chalk and cheese danish fontina smelly cheese who moved my cheese cow. - .modal-footer - button.btn.btn-primary Share - a.btn.btn-link(href="#modals") Close - -p - | Add a container element with the #[code modal] class. - | And add a real container #[code modal-container] and overlay #[code modal-overlay] inside it. - | You can add child elements with the #[code modal-header], #[code modal-body] and #[code modal-footer] - any or all of them. -p - | Spectre.css does not include JavaScript code, you will need to implement your JS to interact with modals. - | To make a modal appear, add the #[code active] class to the #[code modal] container. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="modal active" id="modal-id"> - <a href="#close" class="modal-overlay" aria-label="Close"></a> - <div class="modal-container"> - <div class="modal-header"> - <a href="#close" class="btn btn-clear float-right" aria-label="Close"></a> - <div class="modal-title h5">Modal title</div> - </div> - <div class="modal-body"> - <div class="content"> - <!-- content here --> - </div> - </div> - <div class="modal-footer"> - ... - </div> - </div> - </div> - -+docs-subheading('modals-sizes', 'Modal sizes') - -.docs-demo.columns - .column.col-6.col-xs-12 - a.btn.btn-primary(href="#example-modal-2") Open small size Modal - #example-modal-2.modal.modal-sm - a.modal-overlay(href="#modals-sizes" aria-label="Close") - .modal-container(role="document") - .modal-header - a.btn.btn-clear.float-right(href="#modals-sizes" aria-label="Close") - .modal-title.h5 Modal title - .modal-body - .content - form - .form-group - label.form-label(for="input-example-7") Name - input#input-example-7.form-input(type="text" placeholder="Name") - .form-group - label.form-label Gender - label.form-radio - input(type="radio" name="gender") - i.form-icon - | Male - label.form-radio - input(type="radio" name="gender" checked="") - i.form-icon - | Female - .modal-footer - button.btn.btn-primary Submit - a.btn.btn-link(href="#modals-sizes" aria-label="Close") Close - -p - | Use the #[code modal-sm] class for a smaller modal dialog. - | The container max width is #[code 320px]. - -.docs-demo.columns - .column - a.btn.btn-primary(href="#example-modal-3") Open large size Modal - #example-modal-3.modal.modal-lg - a.modal-overlay(href="#modals-sizes" aria-label="Close") - .modal-container(role="document") - .modal-header - a.btn.btn-clear.float-right(href="#modals-sizes" aria-label="Close") - .modal-title.h5 Modal title - .modal-body - .content - p This is the content inside the modal. - h4 Lorem ipsum - p - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. - p - | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. - h4 Cupcake ipsum - p - | Jelly-o sesame snaps halvah croissant oat cake cookie. Cheesecake bear claw topping. Chupa chups apple pie carrot cake chocolate cake caramels. - p - | De braaaiiiins apocalypsi gorger omero prefrontal cortex undead survivor fornix dictum mauris. Hi brains mindless mortuis limbic cortex soulless creaturas optic nerve. - h4 Candy ipsum - p - | Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar. - p - | Caerphilly swiss fromage frais. Brie cheese and wine fromage frais chalk and cheese danish fontina smelly cheese who moved my cheese cow. - .modal-footer - button.btn.btn-primary Share - a.btn.btn-link(href="#modals-sizes") Close - -p - | Use the #[code modal-lg] class for a full size modal. - | The container max width is #[code 960px]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="modal modal-sm"> - <a href="#close" class="modal-overlay" aria-label="Close"></a> - <div class="modal-container"> - <!-- modal structure here --> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/nav.pug b/docs/src/contents/nav.pug deleted file mode 100644 index f40964a..0000000 --- a/docs/src/contents/nav.pug +++ /dev/null @@ -1,57 +0,0 @@ -.docs-demo.columns - .column.col-6.col-xs-12 - ul.nav - li.nav-item - a(href="#nav") Elements - li.nav-item.active - a(href="#nav") Layout - ul.nav - li.nav-item - a(href="#nav") Flexbox grid - li.nav-item - a(href="#nav") Responsive - li.nav-item - a(href="#nav") Navbar - li.nav-item - a(href="#nav") Empty states - li.nav-item - a(href="#nav") Components - li.nav-item - a(href="#nav") Utilities - -p - | Add a container element with the #[code nav] class. - | And add child elements with the #[code nav-item] class. - | The #[code nav-item] with the #[code active] class will be highlighted. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="nav"> - <li class="nav-item"> - <a href="#">Elements</a> - </li> - <li class="nav-item active"> - <a href="#">Layout</a> - <ul class="nav"> - <li class="nav-item"> - <a href="#">Flexbox grid</a> - </li> - <li class="nav-item"> - <a href="#">Responsive</a> - </li> - <li class="nav-item"> - <a href="#">Navbar</a> - </li> - <li class="nav-item"> - <a href="#">Empty states</a> - </li> - </ul> - </li> - <li class="nav-item"> - <a href="#">Components</a> - </li> - <li class="nav-item"> - <a href="#">Utilities</a> - </li> - </ul>
\ No newline at end of file diff --git a/docs/src/contents/navbar.pug b/docs/src/contents/navbar.pug deleted file mode 100644 index fd4ac29..0000000 --- a/docs/src/contents/navbar.pug +++ /dev/null @@ -1,66 +0,0 @@ -p Navbar is a layout container that appears in the header of apps and websites. - -.docs-demo.columns - .column - .navbar - .navbar-section - a.navbar-brand.mr-2(href="#navbar") Spectre.css - a.btn.btn-link(href="#navbar") Docs - a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub - .navbar-section - .input-group.input-inline - input.form-input(type="text" placeholder="search") - button.btn.btn-primary.input-group-btn Search - -p - | The navbar component can include logo brand, nav links and buttons, search box or any combination of those elements. - | Each section with the #[code navbar-section] class will be evenly distributed in the container. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <header class="navbar"> - <section class="navbar-section"> - <a href="..." class="navbar-brand mr-2">Spectre.css</a> - <a href="..." class="btn btn-link">Docs</a> - <a href="..." class="btn btn-link">GitHub</a> - </section> - <section class="navbar-section"> - <div class="input-group input-inline"> - <input class="form-input" type="text" placeholder="search"> - <button class="btn btn-primary input-group-btn">Search</button> - </div> - </section> - </header> - -p - | You can use #[code navbar-center] class to have a centered section. - -.docs-demo.columns - .column.col-12 - .navbar - .navbar-section - a.btn.btn-link(href="#navbar") Docs - a.btn.btn-link(href="#navbar") Examples - .navbar-center - img(src="img/spectre-logo.svg" alt="Spectre.css") - .navbar-section - a.btn.btn-link(href="https://twitter.com/spectrecss") Twitter - a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <header class="navbar"> - <section class="navbar-section"> - <a href="#" class="btn btn-link">Docs</a> - <a href="#" class="btn btn-link">Examples</a> - </section> - <section class="navbar-center"> - <!-- centered logo or brand --> - </section> - <section class="navbar-section"> - <a href="#" class="btn btn-link">Twitter</a> - <a href="#" class="btn btn-link">GitHub</a> - </section> - </header>
\ No newline at end of file diff --git a/docs/src/contents/off-canvas.pug b/docs/src/contents/off-canvas.pug deleted file mode 100644 index 3e24f4c..0000000 --- a/docs/src/contents/off-canvas.pug +++ /dev/null @@ -1,45 +0,0 @@ -p - | The Off-canvas is a navigation layout that the sidebar can slide in and out of the viewport. It is built in pure CSS. -p - | By default, the off-canvas menu is collapsed whenever the window width is. - | But you can add the #[code off-canvas-sidebar-show] class to the #[code off-canvas] to make the sidebar expanded when the window width is larger than or equal to #[strong 960px]. - -.docs-demo.columns - .column - .off-canvas.off-canvas-sidebar-show - a.off-canvas-toggle.btn.btn-primary.btn-action(href="#sidebar-demo") - i.icon.icon-menu - #sidebar-demo.off-canvas-sidebar.flex-centered - span Sidebar - a.off-canvas-overlay(href="#close") - .off-canvas-content - .content - h4 Lorem ipsum - p - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. - p - | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. - -p - | You can open the sidebar by adding the class #[code active] to #[code off-canvas-sidebar]. - | And remove the #[code active] to close it. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="off-canvas"> - <!-- off-screen toggle button --> - <a class="off-canvas-toggle btn btn-primary btn-action" href="#sidebar-id"> - <i class="icon icon-menu"></i> - </a> - - <div id="sidebar-id" class="off-canvas-sidebar"> - <!-- off-screen sidebar --> - </div> - - <a class="off-canvas-overlay" href="#close"></a> - - <div class="off-canvas-content"> - <!-- off-screen content --> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/pagination.pug b/docs/src/contents/pagination.pug deleted file mode 100644 index c90f6de..0000000 --- a/docs/src/contents/pagination.pug +++ /dev/null @@ -1,102 +0,0 @@ -.docs-demo.columns - .column.col-xs-12 - ul.pagination - li.page-item - a(href="#pagination") Prev - li.page-item - a(href="#pagination") 1 - li.page-item - span ... - li.page-item - a(href="#pagination") 4 - li.page-item.active - a(href="#pagination") 5 - li.page-item - a(href="#pagination") 6 - li.page-item - span ... - li.page-item - a(href="#pagination") 9 - li.page-item - a(href="#pagination") Next - .column.col-xs-12 - ul.pagination - li.page-item.disabled - a(href="#pagination" tabindex="-1") Prev - li.page-item.active - a(href="#pagination") 1 - li.page-item - a(href="#pagination") 2 - li.page-item - a(href="#pagination") 3 - li.page-item - span ... - li.page-item - a(href="#pagination") 9 - li.page-item - a(href="#pagination") Next - -p - | Add a container element with the #[code pagination] class. - | And add child elements with the #[code page-item] class. - | The #[code page-item] with the #[code active] class will be highlighted. - | You can add the #[code disabled] class to the #[code page-item] to have unclickable page links. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="pagination"> - <li class="page-item disabled"> - <a href="#" tabindex="-1">Previous</a> - </li> - <li class="page-item active"> - <a href="#">1</a> - </li> - <li class="page-item"> - <a href="#">2</a> - </li> - <li class="page-item"> - <a href="#">3</a> - </li> - <li class="page-item"> - <span>...</span> - </li> - <li class="page-item"> - <a href="#">12</a> - </li> - <li class="page-item"> - <a href="#">Next</a> - </li> - </ul> - -.docs-demo.columns - .column.col-12 - ul.pagination - li.page-item.page-prev - a(href="#pagination") - .page-item-subtitle Previous - .page-item-title.h5 Getting started - li.page-item.page-next - a(href="#pagination") - .page-item-subtitle Next - .page-item-title.h5 Layout - -p You could use previous and next pagination to navigate. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="pagination"> - <li class="page-item page-prev"> - <a href="#"> - <div class="page-item-subtitle">Previous</div> - <div class="page-item-title h5">Getting started</div> - </a> - </li> - <li class="page-item page-next"> - <a href="#"> - <div class="page-item-subtitle">Next</div> - <div class="page-item-title h5">Layout</div> - </a> - </li> - </ul>
\ No newline at end of file diff --git a/docs/src/contents/panels.pug b/docs/src/contents/panels.pug deleted file mode 100644 index a30d75c..0000000 --- a/docs/src/contents/panels.pug +++ /dev/null @@ -1,114 +0,0 @@ -p Panels are flexible view container with auto-expand content section. - -.docs-demo.columns - .column.col-6.col-xs-12 - .panel - .panel-header.text-center - figure.avatar.avatar-lg - img(src="img/avatar-2.png" alt="Avatar") - .panel-title.h5.mt-10 Bruce Banner - .panel-subtitle THE HULK - nav.panel-nav - ul.tab.tab-block - li.tab-item.active - a(href="#panels") - | Profile - li.tab-item - a(href="#panels") - | Files - li.tab-item - a(href="#panels") - | Tasks - .panel-body - .tile.tile-centered - .tile-content - .tile-title.text-bold E-mail - .tile-subtitle bruce.banner@hulk.com - .tile-action - button.btn.btn-link.btn-action.btn-lg.tooltip.tooltip-left(data-tooltip="Edit E-mail") - i.icon.icon-edit - .tile.tile-centered - .tile-content - .tile-title.text-bold Skype - .tile-subtitle bruce.banner - .tile-action - button.btn.btn-link.btn-action.btn-lg - i.icon.icon-edit - .tile.tile-centered - .tile-content - .tile-title.text-bold Location - .tile-subtitle Dayton, Ohio - .tile-action - button.btn.btn-link.btn-action.btn-lg - i.icon.icon-edit - .panel-footer - button.btn.btn-primary.btn-block Save - .column.col-6.col-xs-12 - .panel - .panel-header - .panel-title.h6 Comments - .panel-body - .tile - .tile-icon - figure.avatar - img(src="img/avatar-1.png" alt="Avatar") - .tile-content - p.tile-title.text-bold Thor Odinson - p.tile-subtitle - | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... - .tile - .tile-icon - figure.avatar - img(src="img/avatar-2.png" alt="Avatar") - .tile-content - p.tile-title.text-bold Bruce Banner - p.tile-subtitle The Strategic Homeland Intervention, Enforcement, and Logistics Division... - .tile - .tile-icon - figure.avatar(data-initial="TS") - .tile-content - p.tile-title.text-bold Tony Stark - p.tile-subtitle - | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... - .tile - .tile-icon - figure.avatar - img(src="img/avatar-4.png" alt="Avatar") - .tile-content - p.tile-title.text-bold Steve Rogers - p.tile-subtitle The Strategic Homeland Intervention, Enforcement, and Logistics Division... - .tile - .tile-icon - figure.avatar - img(src="img/avatar-3.png" alt="Avatar") - .tile-content - p.tile-title.text-bold Natasha Romanoff - p.tile-subtitle - | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... - .panel-footer - .input-group - input.form-input(type="text" placeholder="Hello") - button.btn.btn-primary.input-group-btn Send - -p - | Add a container element with the #[code panel] class. - | And add child elements with the #[code panel-header], #[code panel-nav], #[code panel-body] and/or #[code panel-footer] classes. - | The #[code panel-body] can be auto expanded and vertically scrollable. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="panel"> - <div class="panel-header"> - <div class="panel-title">Comments</div> - </div> - <div class="panel-nav"> - <!-- navigation components: tabs, breadcrumbs or pagination --> - </div> - <div class="panel-body"> - <!-- contents --> - </div> - <div class="panel-footer"> - <!-- buttons or inputs --> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/parallax.pug b/docs/src/contents/parallax.pug deleted file mode 100644 index b448b43..0000000 --- a/docs/src/contents/parallax.pug +++ /dev/null @@ -1,34 +0,0 @@ -p - | The Parallax acts like Apple TV/tvOS hover parallax effect. It is built in pure CSS. - -.docs-demo.columns - .column.col-sm-12.col-8.col-mx-auto - .parallax - .parallax-top-left(tabindex="1") - .parallax-top-right(tabindex="2") - .parallax-bottom-left(tabindex="3") - .parallax-bottom-right(tabindex="4") - .parallax-content - .parallax-front - h2 tvOS parallax demo - .parallax-back - img.img-responsive.rounded(src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="parallax"> - <div class="parallax-top-left" tabindex="1"></div> - <div class="parallax-top-right" tabindex="2"></div> - <div class="parallax-bottom-left" tabindex="3"></div> - <div class="parallax-bottom-right" tabindex="4"></div> - <div class="parallax-content"> - <div class="parallax-front"> - <h2>tvOS parallax demo</h2> - </div> - <div class="parallax-back"> - <img src="img/osx-el-capitan.jpg" class="img-responsive rounded" ...> - </div> - </div> - </div> -
\ No newline at end of file diff --git a/docs/src/contents/popovers.pug b/docs/src/contents/popovers.pug deleted file mode 100644 index b2c1b33..0000000 --- a/docs/src/contents/popovers.pug +++ /dev/null @@ -1,83 +0,0 @@ -p Popovers are small overlay content containers. Popovers component is built entirely in CSS. - -.docs-demo.columns - .column.col-3.col-sm-6 - .popover - a.btn.btn-primary(href="#popovers") - | top popover - .popover-container - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Software and hardware - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-footer - button.btn.btn-primary Buy - .column.col-3.col-sm-6 - .popover.popover-right - a.btn.btn-primary(href="#popovers") - | right popover - .popover-container - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Software and hardware - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-footer - button.btn.btn-primary Buy - .column.col-3.col-sm-6 - .popover.popover-bottom - a.btn.btn-primary(href="#popovers") - | bottom popover - .popover-container - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Software and hardware - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-footer - button.btn.btn-primary Buy - .column.col-3.col-sm-6 - .popover.popover-left - a.btn.btn-primary(href="#popovers") - | left popover - .popover-container - .card - .card-header - .card-title.h5 Apple - .card-subtitle.text-gray Software and hardware - .card-body - | To make a contribution to the world by making tools for the mind that advance humankind. - .card-footer - button.btn.btn-primary Buy - -p - | Wrap an element by a container with the #[code popover] class. - | And add a container with the #[code popover-container] next to the element. - | You can use #[a(href="#cards") Cards] component inside the #[code popover-container]. -p - | Also, you can add the #[code popover-right], #[code popover-bottom] or #[code popover-left] class to define the position. - | By default, the popovers appear above the element. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="popover popover-right"> - <button class="btn btn-primary">right popover</button> - <div class="popover-container"> - <div class="card"> - <div class="card-header"> - ... - </div> - <div class="card-body"> - ... - </div> - <div class="card-footer"> - ... - </div> - </div> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/position.pug b/docs/src/contents/position.pug deleted file mode 100644 index 7f49b1f..0000000 --- a/docs/src/contents/position.pug +++ /dev/null @@ -1,41 +0,0 @@ -p - | Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- clear float --> - <div class="clearfix"></div> - <!-- float: left and right --> - <div class="float-left"></div> - <div class="float-right"></div> - <!-- position: relative, absolute, fixed and sticky --> - <div class="p-relative"></div> - <div class="p-absolute"></div> - <div class="p-fixed"></div> - <div class="p-sticky"></div> - <!-- centered block --> - <div class="p-centered"></div> - - <!-- m-1 {margin: 4px;} m-2 {margin: 8px;} --> - <div class="m-1"></div> - <div class="m-2"></div> - <!-- margin in 4 directions. mt-1 {margin-top: 4px;} mt-2 {margin-top: 8px;} --> - <div class="mt-1"></div> - <div class="mt-2"></div> - <!-- mx-1 {margin-left: 4px; margin-right: 4px;} --> - <div class="mx-1"></div> - <div class="mx-2"></div> - <div class="my-1"></div> - <div class="my-2"></div> - <!-- p-1 {padding: 4px;} p-2 {padding: 8px;} --> - <div class="p-1"></div> - <div class="p-2"></div> - <!-- padding in 4 directions. pt-1 {padding-top: 4px;} pt-2 {padding-top: 8px;} --> - <div class="pt-1"></div> - <div class="pt-2"></div> - <!-- px-1 {padding-left: 4px; padding-right: 4px;} --> - <div class="px-1"></div> - <div class="px-2"></div> - <div class="py-1"></div> - <div class="py-2"></div>
\ No newline at end of file diff --git a/docs/src/contents/progress.pug b/docs/src/contents/progress.pug deleted file mode 100644 index 23af0af..0000000 --- a/docs/src/contents/progress.pug +++ /dev/null @@ -1,17 +0,0 @@ -p The Progress indicates the progress completion of a task. - -.docs-demo.columns - .column.col-3.col-xs-12 - progress.progress(value="75" max="100") - .column.col-3.col-xs-12 - progress.progress(value="50" max="100") - .column.col-3.col-xs-12 - progress.progress(value="25" max="100") - .column.col-3.col-xs-12 - progress.progress(max="100") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <progress class="progress" value="25" max="100"></progress> - <progress class="progress" max="100"></progress>
\ No newline at end of file diff --git a/docs/src/contents/responsive.pug b/docs/src/contents/responsive.pug deleted file mode 100644 index 9737755..0000000 --- a/docs/src/contents/responsive.pug +++ /dev/null @@ -1,254 +0,0 @@ -p Spectre provides a neat responsive layout grid system and responsive visibility utilities. - -.docs-demo.columns - .column.col-10.col-lg-8.col-md-6.col-sm-4 - .bg-gray.docs-block - | col-10 - br - | col-lg-8 - br - | col-md-6 - br - | col-sm-4 - .column.col-2.col-lg-4.col-md-6.col-sm-8 - .bg-gray.docs-block - | col-2 - br - | col-lg-4 - br - | col-md-6 - br - | col-sm-8 - -p - | There are #[code col-xs-<1-12>], #[code col-sm-<1-12>], #[code col-md-<1-12>], #[code col-lg-<1-12>] and #[code col-xl-<1-12>] available for flexible grid across mobile, tablet and desktop viewport usage. - -ul - li - | #[code col-xs-<1-12>] apply to window width smaller than or equal to #[strong 480px]. - li - | #[code col-sm-<1-12>] apply to window width smaller than or equal to #[strong 600px]. - li - | #[code col-md-<1-12>] apply to window width smaller than or equal to #[strong 840px]. - li - | #[code col-lg-<1-12>] apply to window width smaller than or equal to #[strong 960px]. - li - | #[code col-xl-<1-12>] apply to window width smaller than or equal to #[strong 1280px]. - li - | #[code col-<1-12>] apply to all window width, including the width wider than #[strong 1280px]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="container"> - <div class="columns"> - <div class="column col-xs-6">col-xs-6</div> - <div class="column col-xs-3">col-xs-3</div> - <div class="column col-xs-3">col-xs-3</div> - </div> - </div> - -+docs-subheading('responsive-container', 'Responsive container') - -p - | The responsive layout also provides fixed-width containers. - | Use #[code grid-xs](480px), #[code grid-sm](600px), #[code grid-md](840px), #[code grid-lg](960px) or #[code grid-xl](1280px) to the container for a fixed-width container with the specific max-width. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- 100% width container with max-width set to grid-lg (960px) --> - <div class="container grid-lg"> - <div class="columns"> - ... - </div> - </div> - -+docs-subheading('responsive-visibility', 'Responsive visibility') - -p The responsive visibility utilities help show and hide elements on specific viewport sizes. - -.docs-demo.columns - .column.col-12 - table.docs-table.table.table-striped.text-center - thead - tr - th - th size-xs - th size-sm - th size-md - th size-lg - th size-xl - tbody - tr - td.text-left hide-xs - td - .bg-secondary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - tr - td.text-left hide-sm - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - tr - td.text-left hide-md - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - tr - td.text-left hide-lg - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-primary.docs-dot - tr - td.text-left hide-xl - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - -p - | For hiding elements on specific viewport sizes, there are classes #[code hide-xs], #[code hide-sm], #[code hide-md], #[code hide-lg] and #[code hide-xl] available. - -ul - li - | #[code hide-xs] hides elements when the window width is smaller than or equal to #[strong 480px]. - li - | #[code hide-sm] hides elements when the window width is smaller than or equal to #[strong 600px]. - li - | #[code hide-md] hides elements when the window width is smaller than or equal to #[strong 840px]. - li - | #[code hide-lg] hides elements when the window width is smaller than or equal to #[strong 960px]. - li - | #[code hide-xl] hides elements when the window width is smaller than or equal to #[strong 1280px]. - -.docs-demo.columns - .column.col-12 - table.docs-table.table.table-striped.text-center - thead - tr - th - th size-xs - th size-sm - th size-md - th size-lg - th size-xl - tbody - tr - td.text-left show-xs - td - .bg-primary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - tr - td.text-left show-sm - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - tr - td.text-left show-md - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-secondary.docs-dot - td - .bg-secondary.docs-dot - tr - td.text-left show-lg - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-secondary.docs-dot - tr - td.text-left show-xl - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - td - .bg-primary.docs-dot - -p - | For showing elements on specific viewport sizes, there are classes #[code show-xs], #[code show-sm], #[code show-md], #[code show-lg] and #[code show-xl] available. - -ul - li - | #[code show-xs] shows elements when the window width is smaller than or equal to #[strong 480px]. - li - | #[code show-sm] shows elements when the window width is smaller than or equal to #[strong 600px]. - li - | #[code show-md] shows elements when the window width is smaller than or equal to #[strong 840px]. - li - | #[code show-lg] shows elements when the window width is smaller than or equal to #[strong 960px]. - li - | #[code show-xl] shows elements when the window width is smaller than or equal to #[strong 1280px]. - -p - | Spectre also has a responsive web test tool Responsive Resizer. - | You can clone the - a(href="https://github.com/picturepan2/responsive-resizer" target="_blank") GitHub Repo - | to use it locally or use it online. -p - a.btn.btn-primary(href="https://picturepan2.github.io/responsive-resizer/" target="_blank") Responsive Resizer - diff --git a/docs/src/contents/shapes.pug b/docs/src/contents/shapes.pug deleted file mode 100644 index c6afe85..0000000 --- a/docs/src/contents/shapes.pug +++ /dev/null @@ -1,17 +0,0 @@ -p Shape utilities are used for change element shapes. - -.docs-demo.columns - .column.col-6.text-center - .bg-primary.text-light.docs-shape.s-rounded.centered - | s-rounded - .column.col-6.text-center - .bg-primary.text-light.docs-shape.s-circle.centered - | s-circle - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- rounded element --> - <div class="s-rounded"></div> - <!-- circle element --> - <div class="s-circle"></div>
\ No newline at end of file diff --git a/docs/src/contents/sliders.pug b/docs/src/contents/sliders.pug deleted file mode 100644 index 754833c..0000000 --- a/docs/src/contents/sliders.pug +++ /dev/null @@ -1,18 +0,0 @@ -p Sliders are for selecting values from ranges. -p - | You can add the class #[code tooltip] to have tooltip labels. - | If no #[code data-tooltip] is set, the #[code value] will be used instead. - -.docs-demo.columns - .column.col-6.col-xs-12 - input.slider.tooltip(type="range" min="0" max="100" value="50" oninput="this.setAttribute('value', this.value);") - .column.col-6.col-xs-12 - input.slider(type="range" min="0" max="100" value="50" disabled="") - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- Sliders --> - <input class="slider" type="range" min="0" max="100" value="50"> - <!-- Sliders with tooltips --> - <input class="slider tooltip" type="range" min="0" max="100" value="50" oninput="this.setAttribute('value', this.value);">
\ No newline at end of file diff --git a/docs/src/contents/steps.pug b/docs/src/contents/steps.pug deleted file mode 100644 index 0109e02..0000000 --- a/docs/src/contents/steps.pug +++ /dev/null @@ -1,47 +0,0 @@ -p Steps are progress indicators of a sequence of task steps. - -.docs-demo.columns - .column.col-12 - ul.step - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 1 Tooltip") - li.step-item.active - a.tooltip(href="#steps" data-tooltip="Step 2 Tooltip") - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 3 Tooltip") - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 4 Tooltip") - .column.col-12 - ul.step - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 1 Tooltip") Step 1 - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 2 Tooltip") Step 2 - li.step-item.active - a.tooltip(href="#steps" data-tooltip="Step 3 Tooltip") Step 3 - li.step-item - a.tooltip(href="#steps" data-tooltip="Step 4 Tooltip") Step 4 - -p - | Add a container element with the #[code step] class. - | And add child elements with the #[code step-item] class. - | The #[code step-item] with the #[code active] class will be highlighted and indicate the current state of progress. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="step"> - <li class="step-item"> - <a href="#" class="tooltip" data-tooltip="Step 1">Step 1</a> - </li> - <li class="step-item active"> - <a href="#" class="tooltip" data-tooltip="Step 2">Step 2</a> - </li> - <li class="step-item"> - <a href="#" class="tooltip" data-tooltip="Step 3">Step 3</a> - </li> - <li class="step-item"> - <a href="#" class="tooltip" data-tooltip="Step 4">Step 4</a> - </li> - </ul> - diff --git a/docs/src/contents/tables.pug b/docs/src/contents/tables.pug deleted file mode 100644 index 5466959..0000000 --- a/docs/src/contents/tables.pug +++ /dev/null @@ -1,107 +0,0 @@ -p Tables include default styles for tables and data sets. - -.docs-demo.columns - .column.col-12 - table.table.table-striped - thead - tr - th Name - th Genre - th Release date - tbody - tr - td The Shawshank Redemption - td Crime, Drama - td 14 October 1994 - tr - td The Godfather - td Crime, Drama - td 24 March 1972 - tr - td Schindler's List - td Biography, Drama, History - td 4 February 1994 - tr - td Se7en - td Crime, Drama, Mystery - td 22 September 1995 - -p - | Add the #[code table] class to any #{'<table>'} element. - | The class will add padding, border and emphasized table header. - | Use the #[code table-striped] class to #{'<table>'} to add zebra striped style. - | For hoverable table rows, you can add the #[code table-hover] class to enable hover style. -p - | Use the #[code active] class to make #{'<tr>'} element highlighted. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <table class="table table-striped table-hover"> - <thead> - <tr> - <th>name</th> - <th>genre</th> - <th>release date</th> - </tr> - </thead> - <tbody> - <tr class="active"> - <td>The Shawshank Redemption</td> - <td>Crime, Drama</td> - <td>14 October 1994</td> - </tr> - </tbody> - </table> - - -.docs-demo.columns - .column.col-12 - table.table.table-striped.table-scroll - thead - tr - th Name - th Rating - th Duration - th Genre - th Release date - th Director - tbody - tr - td The Shawshank Redemption - td R - td 2h 22min - td Crime, Drama - td 14 October 1994 - td Frank Darabont - tr - td The Godfather - td R - td 2h 55min - td Crime, Drama - td 24 March 1972 - td Francis Ford Coppola - tr - td Schindler's List - td R - td 3h 15min - td Biography, Drama, History - td 4 February 1994 - td Steven Spielberg - tr - td Se7en - td R - td 2h 7min - td Crime, Drama, Mystery - td 22 September 1995 - td David Fincher - -p - | Add the #[code table-scroll] class to #{'<table>'} to have a horizontally scrollable table. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <table class="table table-striped table-scroll"> - ... - </table>
\ No newline at end of file diff --git a/docs/src/contents/tabs.pug b/docs/src/contents/tabs.pug deleted file mode 100644 index fea99ad..0000000 --- a/docs/src/contents/tabs.pug +++ /dev/null @@ -1,132 +0,0 @@ -p Tabs enable quick switch between different views. - -.docs-demo.columns - .column.col-6.col-sm-12 - ul.tab - li.tab-item.active - a(href="#tabs") - | Music - li.tab-item - a(href="#tabs") - | Playlists - li.tab-item - a(href="#tabs") - | Radio - li.tab-item - a(href="#tabs") - | Store - .column.col-6.col-sm-12 - ul.tab.tab-block - li.tab-item.active - a(href="#tabs") - | Music - li.tab-item - a(href="#tabs") - | Playlists - li.tab-item - a(href="#tabs") - | Radio - -p - | Add a container element with the #[code tab] class. - | And add child elements with the #[code tab-item] class. - | You can add the #[code tab-block] class for a full-width tab. - | The #[code tab-item] or its child #{'<a>'} with the #[code active] class will be highlighted. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="tab tab-block"> - <li class="tab-item active"> - <a href="#">Music</a> - </li> - <li class="tab-item"> - <a href="#" class="active">Playlists</a> - </li> - <li class="tab-item"> - <a href="#">Radio</a> - </li> - <li class="tab-item"> - <a href="#">Connect</a> - </li> - </ul> - -.docs-demo.columns - .column.col-sm-12 - ul.tab - li.tab-item.active - a.badge(href="#tabs" data-badge="999") - | Music - li.tab-item - a(href="#tabs") - | Playlists - li.tab-item - a(href="#tabs") - | Radio - .column.col-sm-12 - ul.tab.tab-block - li.tab-item.active - a.badge(href="#tabs" data-badge="9") - | Music - li.tab-item - a.badge(href="#tabs" data-badge="99") - | Playlists - li.tab-item - a(href="#tabs") - | Radio - -p - | If you need #[code badges] on tabs, you can add badge class to the element within #[code tab-item]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="tab tab-block"> - <li class="tab-item active"> - <a href="#" class="badge" data-badge="9"> - Music - </a> - </li> - </ul> - -.docs-demo.columns - .column.col-12 - ul.tab - li.tab-item.active - a(href="#tabs") - | Music - span.btn.btn-clear - li.tab-item - a(href="#tabs") - | Playlists - li.tab-item - a(href="#tabs") - | Radio - li.tab-item - a(href="#tabs") - | Store - li.tab-item.tab-action - .input-group.input-inline - input.form-input.input-sm(type="text" placeholder="search") - button.btn.btn-primary.btn-sm.input-group-btn Search - -p - | You could add a search box or buttons inside a tab. - | Add the #[code tab-action] class to the #[code tab-item]. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <ul class="tab"> - <li class="tab-item active"> - <a href="#"> - Music - </a> - </li> - <li class="tab-item tab-action"> - <div class="input-group input-inline"> - <input class="form-input input-sm" type="text" placeholder="search"> - <button class="btn btn-primary btn-sm input-group-btn">Search</button> - </div> - </li> - </ul>
\ No newline at end of file diff --git a/docs/src/contents/text.pug b/docs/src/contents/text.pug deleted file mode 100644 index a6a733b..0000000 --- a/docs/src/contents/text.pug +++ /dev/null @@ -1,36 +0,0 @@ -p Text utilities are used for text alignment, styles and overflow things. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- left-aligned text --> - <div class="text-left"></div> - <!-- center-aligned text --> - <div class="text-center"></div> - <!-- right-aligned text --> - <div class="text-right"></div> - <!-- justified text --> - <div class="text-justify"></div> - - <!-- Lowercased text --> - <div class="text-lowercase"></div> - <!-- Uppercased text --> - <div class="text-uppercase"></div> - <!-- Capitalized text --> - <div class="text-capitalize"></div> - - <!-- Normal weight text --> - <div class="text-normal"></div> - <!-- Bold text --> - <div class="text-bold"></div> - <!-- Italicized text --> - <div class="text-italic"></div> - <!-- Larger text (120%) --> - <div class="text-large"></div> - - <!-- Overflow behavior: display an ellipsis to represent clipped text --> - <div class="text-ellipsis"></div> - <!-- Overflow behavior: truncate the text --> - <div class="text-clip"></div> - <!-- Text may be broken at arbitrary points --> - <div class="text-break"></div>
\ No newline at end of file diff --git a/docs/src/contents/tiles.pug b/docs/src/contents/tiles.pug deleted file mode 100644 index cd8b994..0000000 --- a/docs/src/contents/tiles.pug +++ /dev/null @@ -1,92 +0,0 @@ -p Tiles are repeatable or embeddable information blocks. - -.docs-demo.columns - .column.col-9.col-sm-12 - .tile - .tile-icon - figure.avatar.avatar-lg - img(src="img/avatar-3.png" alt="Avatar") - .tile-content - p.tile-title The Avengers - p.tile-subtitle.text-gray - | Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle... - .tile-action - button.btn.btn-primary Join - button.btn Contact - .column.col-9.col-sm-12 - .tile - .tile-icon - figure.avatar.avatar-lg - img(src="img/avatar-2.png" alt="Avatar") - .tile-content - p.tile-title The S.H.I.E.L.D. - p.tile-subtitle.text-gray The Strategic Homeland Intervention, Enforcement, and Logistics Division... - p - button.btn.btn-primary.btn-sm Join - button.btn.btn-sm Contact - -p - | Add a container with the #[code tile] class. - | And add child elements with the #[code tile-icon], #[code tile-content] or/and #[code tile-action] classes. - | The #[code tile-icon] and #[code tile-action] are optional. -p - | There are #[code tile-title] and #[code tile-subtitle] classes for title and subtitle text styles. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="tile"> - <div class="tile-icon"> - <div class="example-tile-icon"> - <i class="icon icon-file centered"></i> - </div> - </div> - <div class="tile-content"> - <p class="tile-title">The Avengers</p> - <p class="tile-subtitle text-gray">Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle...</p> - </div> - <div class="tile-action"> - <button class="btn btn-primary">Join</button> - </div> - </div> - -+docs-subheading('tiles-compact', 'Compact tiles') - -p - | There is compact version of Tiles component, which is often used as contact and file info blocks. -p - | Add the #[code tile-centered] class to the container #[code tile]. - | The #[code tile-icon], #[code tile-content] and #[code tile-action] will be vertically centered. - -.docs-demo.columns - .column.col-6.col-md-9.col-xs-12 - .tile.tile-centered - .tile-icon - .example-tile-icon - i.icon.icon-mail.centered - .tile-content - .tile-title spectre-docs.pdf - .tile-subtitle.text-gray 14MB · Public · 1 Jan, 2017 - .tile-action - button.btn.btn-link.btn-action - i.icon.icon-more-vert - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="tile tile-centered"> - <div class="tile-icon"> - <div class="example-tile-icon"> - <i class="icon icon-file centered"></i> - </div> - </div> - <div class="tile-content"> - <div class="tile-title">spectre-docs.pdf</div> - <div class="tile-subtitle text-gray">14MB · Public · 1 Jan, 2017</div> - </div> - <div class="tile-action"> - <button class="btn btn-link"> - <i class="icon icon-more-vert"></i> - </button> - </div> - </div>
\ No newline at end of file diff --git a/docs/src/contents/timelines.pug b/docs/src/contents/timelines.pug deleted file mode 100644 index c654c9e..0000000 --- a/docs/src/contents/timelines.pug +++ /dev/null @@ -1,81 +0,0 @@ -p Timelines are ordered sequences of activities. - -.docs-demo.columns - .column.col-9.col-sm-12 - .timeline - #timeline-example-1.timeline-item - .timeline-left - a.timeline-icon.tooltip(href="#timeline-example-1" data-tooltip="March 2016") - .timeline-content - .tile - .tile-content - p.tile-subtitle March 2016 - p.tile-title Initial commit - #timeline-example-2.timeline-item - .timeline-left - a.timeline-icon.icon-lg.tooltip(href="#timeline-example-2" data-tooltip="February 2017") - i.icon.icon-check - .timeline-content - .tile - .tile-content - p.tile-subtitle February 2017 - p.tile-title New Documents experience - p.tile-title - a(href="components.html#bars") Bars - | : represent the progress of a task - p.tile-title - a(href="components.html#steps") Steps - | : progress indicators of a sequence of task steps - p.tile-title - a(href="components.html#tiles") Tiles - | : repeatable or embeddable information blocks - .tile-action - button.btn View - #timeline-example-3.timeline-item - .timeline-left - a.timeline-icon.icon-lg.tooltip(href="#timeline-example-3" data-tooltip="March 2017") - i.icon.icon-check - .timeline-content - .tile - .tile-content - p.tile-subtitle March 2017 - p.tile-title - a(href="elements.html#icons") Icons - | : single-element, responsive and pure CSS icons - p.tile-title - a(href="components.html#popovers") Popovers - | : small overlay content containers - p.tile-title - a(href="experimentals.html#calendars") Calendars - | : date or date range picker and events display - p.tile-title - a(href="experimentals.html#carousels") Carousels - | : slideshows for cycling images - .tile-action - button.btn View - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="timeline"> - <div class="timeline-item" id="timeline-example-1"> - <div class="timeline-left"> - <a class="timeline-icon" href="#timeline-example-1"></a> - </div> - <div class="timeline-content"> - <!-- tiles structure --> - </div> - </div> - - <div class="timeline-item" id="timeline-example-2"> - <div class="timeline-left"> - <a class="timeline-icon icon-lg" href="#timeline-example-2"> - <i class="icon icon-check"></i> - </a> - </div> - <div class="timeline-content"> - <!-- tiles structure --> - </div> - </div> - ... - </div>
\ No newline at end of file diff --git a/docs/src/contents/toasts.pug b/docs/src/contents/toasts.pug deleted file mode 100644 index e35e4dd..0000000 --- a/docs/src/contents/toasts.pug +++ /dev/null @@ -1,49 +0,0 @@ -p Toasts are used to show alert or information to users. - -.docs-demo.columns - .column.col-9.col-sm-12 - .toast - button.btn.btn-clear.float-right - h6 Toast Title - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. - .column.col-9.col-sm-12 - .toast.toast-primary - button.btn.btn-clear.float-right - | Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -p - | Add a container element with the #[code toast] class. - | You can add any text within the container, and even icons. - | You may also add a close button with the #[code btn-clear] class if you need. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="toast"> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - </div> - -.docs-demo.columns - .column.col-sm-12 - .toast.toast-success - button.btn.btn-clear.float-right - | Toast success - .column.col-sm-12 - .toast.toast-warning - button.btn.btn-clear.float-right - | Toast warning - .column.col-sm-12 - .toast.toast-error - button.btn.btn-clear.float-right - | Toast error - -p - | And you can add the #[code toast-primary], #[code toast-success], #[code toast-warning] or #[code toast-error] class for additional toast colors. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <div class="toast toast-primary"> - <button class="btn btn-clear float-right"></button> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - </div>
\ No newline at end of file diff --git a/docs/src/contents/tooltips.pug b/docs/src/contents/tooltips.pug deleted file mode 100644 index 08906e6..0000000 --- a/docs/src/contents/tooltips.pug +++ /dev/null @@ -1,24 +0,0 @@ -p Tooltips provide context information labels that appear on hover and focus. - -.docs-demo.columns.text-center - .column.col-xs-12 - button.btn.btn-primary.tooltip(data-tooltip="Top Tooltip Text") top tooltip - .column.col-xs-12 - button.btn.btn-primary.tooltip.tooltip-right(data-tooltip="Right Tooltip Text") right tooltip - .column.col-xs-12 - button.btn.btn-primary.tooltip.tooltip-bottom(data-tooltip="Bottom Tooltip Text") bottom tooltip - .column.col-xs-12 - button.btn.btn-primary.tooltip.tooltip-left(data-tooltip="Left Tooltip Text") left tooltip - -p Tooltips component is built entirely in CSS. -p - | Add the #[code tooltip] class and the #[code data-tooltip] attribute, which contains the tooltip content, to non self closing elements. -p - | And add the #[code tooltip-right], #[code tooltip-bottom] or #[code tooltip-left] class to define the position of a tooltip. - | By default, the tooltip appears above the element. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <button class="btn tooltip" data-tooltip="Lorem ipsum dolor sit amet">top tooltip</button> - <button class="btn tooltip tooltip-right" data-tooltip="Lorem ipsum dolor sit amet">right tooltip</button>
\ No newline at end of file diff --git a/docs/src/contents/typography.pug b/docs/src/contents/typography.pug deleted file mode 100644 index 0656f91..0000000 --- a/docs/src/contents/typography.pug +++ /dev/null @@ -1,257 +0,0 @@ -p - | Typography sets default styles for headings, paragraphs, semantic text, blockquote and lists elements. - -+docs-subheading('typography-headings', 'Headings') - -.docs-demo.columns - .column.col-12 - h1 - | H1 Heading - small.label 40px - .column.col-12 - h2 - | H2 Heading - small.label 32px - .column.col-12 - h3 - | H3 Heading - small.label 28px - .column.col-12 - h4 - | H4 Heading - small.label 24px - .column.col-12 - h5 - | H5 Heading - small.label 20px - .column.col-12 - h6 - | H6 Heading - small.label 16px - -//- headings -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <h1>H1 Heading</h1> - <h1>H1 Heading <small class="label">40px</small></h1> - <span class="h1">H1 Heading</span> - -+docs-subheading('typography-paragraphs', 'Paragraphs') - -p - | Lorem ipsum dolor sit amet, consectetur #[a(href='#typography') adipiscing elit]. - | Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. -p - | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. - -//- paragraphs -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <p>Lorem ipsum dolor sit amet, ...</p> - <p>...</p> - -+docs-subheading('typography-semantic-text', 'Semantic text elements') - -.docs-demo.columns - .column.col-6.col-xs-12 - abbr(title='Internationalization') I18N - code.ml-2 abbr - .column.col-6.col-xs-12 - strong Bold - code.ml-2 strong - code.ml-2 b - .column.col-6.col-xs-12 - cite Citation - code.ml-2 cite - .column.col-6.col-xs-12 - code Hello World! - code.ml-2 code - .column.col-6.col-xs-12 - del Deleted - code.ml-2 del - .column.col-6.col-xs-12 - em Emphasis - code.ml-2 em - .column.col-6.col-xs-12 - i Italic - code.ml-2 i - .column.col-6.col-xs-12 - ins Inserted - code.ml-2 ins - .column.col-6.col-xs-12 - kbd Ctrl + S - code.ml-2 kbd - .column.col-6.col-xs-12 - mark Highlighted - code.ml-2 mark - .column.col-6.col-xs-12 - ruby - | 漢 - rt kan - | 字 - rt ji - code.ml-2 ruby - .column.col-6.col-xs-12 - s Strikethrough - code.ml-2 s - .column.col-6.col-xs-12 - samp Sample - code.ml-2 samp - .column.col-6.col-xs-12 - | Text - sub Subscripted - code.ml-2 sub - .column.col-6.col-xs-12 - | Text - sup Superscripted - code.ml-2 sup - .column.col-6.col-xs-12 - time 20:00 - code.ml-2 time - .column.col-6.col-xs-12 - u Underline - code.ml-2 u - .column.col-6.col-xs-12 - var x - | = - var y - | + 2 - code.ml-2 var - -+docs-subheading('typography-east-asian', 'Optimized for East Asian fonts') - -.docs-demo.columns - .column - p.h5 - | #[small(lang='zh-Hans') 你好], #[small(lang='ja') こんにちは], #[small(lang='ko') 안녕하세요] - p.h6 Chinese (Simplified) - p(lang='zh-Hans') 革命不是请客吃饭,不是做文章,不是绘画绣花,不能那样雅致,那样从容不迫,“文质彬彬”,那样“温良恭俭让”。革命就是暴动,是一个阶级推翻一个阶级的暴烈的行动。 - p.h6 Chinese (Tranditional) - p(lang='zh-Hant') - | 山不在高,有仙則名;水不在深,有龍則靈。斯是陋室,惟吾德馨。苔痕上階綠,草色入簾青;談笑有鴻儒,往來無白丁。可以調素琴,閱金經。無絲竹之亂耳,無案牘之勞形。南陽諸葛廬,西蜀子雲亭。孔子云:「何陋之有?」 - p.h6 Japanese - p(lang='ja') - | 祇園精舎の鐘の声、諸行無常の響きあり。沙羅双樹の花の色、盛者必衰の理をあらはす。おごれる人も久しからず。ただ春の夜の夢のごとし。たけき者も遂にはほろびぬ、ひとへに風の前の塵に同じ。 - p.h6 Korean - p(lang='ko') - | 나라말이 중국과 달라, 한문・한자와 서로 통하지 아니하므로, 어리석은 백성들이 말하고자 하는 바가 있어도, 끝내 제 뜻을 펴지 못하는 사람이 많다. 내가 이를 불쌍히 여겨, 새로 스물 여덟 글자를 만드니, 사람마다 하여금 쉽게 익혀, 날마다 씀에 편하게 하고자 할 따름이다. - -p - | Use the #[code lang] attribute to the container element to have better Asian CJK (Chinese, Japanese and Korean) font support. - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <p lang="zh-Hans">革命不是请客吃饭,不是做文章……</p> - <p lang="ja">祇園精舎の鐘の声、諸行無常の響きあり……</p> - <p lang="ko">나라말이 중국과 달라, 한문・한자와 서로 통하지 아니하므로……</p> - -p - | And you can use the #[code cjk] class or the #[code lang] attribute to add spacing between underlines and strike-through text for better Chinese and Japanese readability. - -.docs-demo.columns - .column - p(lang='ja'). - <u>祇園</u><u>精舎</u>の鐘の声、諸行無常の響きあり。 - p(lang='ja'). - <del>祇園</del><del>精舎</del>の鐘の声、諸行無常の響きあり。 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <p class="cjk"><u>祇園</u><u>精舎</u>の鐘の声、諸行無常の響きあり。……</p> - <p lang="ja"><del>祇園</del><del>精舎</del>の鐘の声、諸行無常の響きあり。……</p> - -+docs-subheading('typography-fonts', 'Fonts') - -p - | Spectre sets the most common and best #[code font-family] for each OS with fallback support in old systems. - | There are also fonts targeted East Asian typography. - -pre.code - code - :highlight(lang="scss") - /* Western typography targeted */ - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; - /* Monospace typography targeted */ - font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace; - - /* Chinese (lang="zh" and lang="zh-Hans") targeted */ - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif; - /* Chinese (lang="zh-Hant") targeted */ - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Helvetica Neue", sans-serif; - /* Japanese (lang="ja") targeted */ - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo, "Helvetica Neue", sans-serif; - /* Korean (lang="ko") targeted */ - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", "Helvetica Neue", sans-serif; - -+docs-subheading('typography-blockquote', 'Blockquote') - -blockquote - p - | The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life. - cite - Bill Gates - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <blockquote> - <p>The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life. </p> - <cite>- Bill Gates</cite> - </blockquote> - -+docs-subheading('typography-lists', 'Lists') - -.docs-demo.columns - .column.col-4.col-xs-12 - ul.list - li list item 1 - li - | list item 2 - ul - li list item 2.1 - li list item 2.2 - li list item 2.3 - li list item 3 - .column.col-4.col-xs-12 - ol.list - li list item 1 - li - | list item 2 - ol - li list item 2.1 - li list item 2.2 - li list item 2.3 - li list item 3 - .column.col-4.col-xs-12 - dl.list - dt description list term 1 - dd description list description 1 - dt description list term 2 - dd description list description 2 - dt description list term 3 - dd description list description 3 - -pre.code(data-lang='HTML') - code - :highlight(lang="html") - <!-- unordered list --> - <ul> - <li>list item 1</li> - <li>list item 2 - <ul> - <li>list item 2.1</li> - <li>list item 2.2</li> - <li>list item 2.3</li> - </ul> - </li> - <li>list item 3</li> - </ul> - - <!-- description list --> - <dl> - <dt>description list term</dt> - <dd>description list description</dd> - </dl>
\ No newline at end of file diff --git a/docs/src/contents/whatsnew.pug b/docs/src/contents/whatsnew.pug deleted file mode 100644 index 0c38102..0000000 --- a/docs/src/contents/whatsnew.pug +++ /dev/null @@ -1,79 +0,0 @@ -p - strong September 2017 -ul - li - a(href='experimentals.html#off-canvas') Off-canvas - | : navigation layout that the sidebar can slide in and out of the viewport - small.label.label-primary NEW -p - strong August 2017 -ul - li - a(href='getting-started.html') Switch to Sass - small.label.label-primary NEW - li - a(href='getting-started.html') New Docs Experience - small.label.label-primary NEW -p - strong April 2017 -ul - li - a(href='components.html#accordions') Accordions - | : used to toggle sections of content - li - a(href='experimentals.html#filters') Filters - | : CSS only content filters - li - a(href='experimentals.html#comparison') Comparison Sliders - | : sliders for comparing two images - li - a(href='experimentals.html#timelines') Timelines - | : ordered sequences of activities -p - strong March 2017 -ul - li - a(href='elements.html#icons') Icons - | : single-element, responsive and pure CSS icons - li - a(href='components.html#popovers') Popovers - | : small overlay content containers - li - a(href='layout.html#panels') Panels - | : flexible view container layout with auto-expand content section - li - a(href='experimentals.html#carousels') Carousels - | : slideshows for cycling images - li - a(href='experimentals.html#calendars') Calendars - | : date or date range picker and events display -p - strong February 2017 -ul - li New Documents experience - li - a(href='components.html#bars') Bars - | : represent the progress of a task or the value within the known range - li - a(href='components.html#steps') Steps - | : progress indicators of a sequence of task steps - li - a(href='components.html#tiles') Tiles - | : repeatable or embeddable information blocks - li - a(href='experimentals.html') Experimentals - | : experimental elements and features - li - a(href='experimentals.html#meters') Meters - | , - a(href='experimentals.html#parallax') Parallax - | , - a(href='experimentals.html#progress') Progress - | and - a(href='experimentals.html#sliders') Sliders -p - strong March 2016 -ul - li Initial commit -p - a.btn.btn-primary(href='https://github.com/picturepan2/spectre/releases', target='_blank') Releases
\ No newline at end of file diff --git a/docs/src/elements.pug b/docs/src/elements.pug index c80dba2..270cc39 100644 --- a/docs/src/elements.pug +++ b/docs/src/elements.pug @@ -1,43 +1,94 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables + - var slug = 'elements' + - var parent = 'elements' - var title = 'Elements - Spectre.css CSS Framework' - - var description = '' - - var current = 'elements' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Typography - +docs-heading('typography', 'Typography') - include contents/_ad-g.pug - include contents/typography.pug - - //- Tables - +docs-heading('tables', 'Tables') - include contents/tables.pug + +docs-heading('elements', 'Elements') + include _layout/_ad-g.pug - //- Buttons - +docs-heading('buttons', 'Buttons') - include contents/_ad-c.pug - include contents/buttons.pug + p + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p + | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. - //- Forms - +docs-heading('forms', 'Forms') - include contents/forms.pug - - //- Icons - +docs-heading('icons', 'Icons') - include contents/icons.pug + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Typography + .card-body + | Headings, paragraphs, semantic text, blockquote and lists elements + .card-footer + a.btn.btn-primary(href="elements/typography.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Tables + .card-body + | Tables and data sets + .card-footer + a.btn.btn-primary(href="elements/tables.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Buttons + .card-body + | Simple button styles for actions in different types and sizes + .card-footer + a.btn.btn-primary(href="elements/buttons.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Forms + .card-body + | Input, textarea, select, checkbox, radio and switch + .card-footer + a.btn.btn-primary(href="elements/forms.html") View - //- Labels - +docs-heading('labels', 'Labels') - include contents/labels.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Icons + .card-body + | Single-element, responsive and pure CSS icons + .card-footer + a.btn.btn-primary(href="elements/icons.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Labels + .card-body + | Formatted text tags for highlighted, informative information + .card-footer + a.btn.btn-primary(href="elements/labels.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Code + .card-body + | Inline and multiline code snippets + .card-footer + a.btn.btn-primary(href="elements/code.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Media + .card-body + | Responsive images, figures and video + .card-footer + a.btn.btn-primary(href="elements/media.html") View - //- Codes - +docs-heading('code', 'Code') - include contents/code.pug - - //- Media - +docs-heading('media', 'Media') - include contents/media.pug + include _layout/_ad-c.pug - include _footer.pug
\ No newline at end of file + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/buttons.pug b/docs/src/elements/buttons.pug new file mode 100644 index 0000000..04e3101 --- /dev/null +++ b/docs/src/elements/buttons.pug @@ -0,0 +1,194 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'buttons' + - var parent = 'elements' + - var title = 'Buttons - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('buttons', 'Buttons') + include ../_layout/_ad-g.pug + + p Buttons include simple button styles for actions in different types and sizes. + + .docs-demo.columns + .column.col-12 + button.btn default button + button.btn.btn-primary primary button + button.btn.btn-link link button + + p + | Add the #[code btn] class to #{'<a>'}, #{'<input>'} or #{'<button>'} elements for a default button. + | There are classes #[code btn-primary] and #[code btn-link] for predefined primary and link buttons. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <button class="btn">default button</button> + <button class="btn btn-primary">primary button</button> + <button class="btn btn-link">link button</button> + + +docs-subheading('buttons-colors', 'Button colors') + + .docs-demo.columns + .column.col-12 + button.btn.btn-success success button + button.btn.btn-error error button + + p + | Add the #[code btn-success] or #[code btn-error] class for success (green) or error (red) button color. + | If you need more button colors, please use + a(href="getting-started.html#variables-buttons") button mixins + | to create your own button color variants. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <button class="btn btn-success">success button</button> + <button class="btn btn-error">error button</button> + + +docs-subheading('buttons-sizes', 'Button sizes') + + .docs-demo.columns + .column.col-12 + button.btn.btn-primary.btn-lg + | large + i.icon.icon-arrow-down + button.btn.btn-primary.btn-lg large button + .column.col-12 + button.btn.btn-primary + | normal + i.icon.icon-arrow-down + button.btn.btn-primary normal button + .column.col-12 + button.btn.btn-primary.btn-sm + | small + i.icon.icon-arrow-down + button.btn.btn-primary.btn-sm small button + + + p + | Add the #[code btn-sm] or #[code btn-lg] class for small or large button size. + | Also, you can add the #[code btn-block] class for a full-width button. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <button class="btn btn-lg">large button</button> + <button class="btn btn-sm">small button</button> + + <button class="btn btn-block">block button</button> + + <button class="btn btn-primary btn-lg"><i class="icon icon-arrow-left"></i> large</button> + <button class="btn btn-primary"><i class="icon icon-arrow-left"></i> normal</button> + <button class="btn btn-primary btn-sm"><i class="icon icon-arrow-left"></i> small</button> + + p + | Please note that you could use the #[code btn-action] class for a square button, or add another #[code s-circle] class for a round button, which is often used as a Float Action Button (FAB). + + .docs-demo.columns + .column.col-xs-12 + button.btn.btn-action.btn-primary.btn-lg + i.icon.icon-menu + button.btn.btn-action.btn-primary + i.icon.icon-menu + button.btn.btn-action.btn-primary.btn-sm + i.icon.icon-menu + .column.col-xs-12 + button.btn.btn-action.btn-primary.btn-lg.s-circle + i.icon.icon-arrow-up + button.btn.btn-action.btn-primary.s-circle + i.icon.icon-arrow-up + button.btn.btn-action.btn-primary.btn-sm.s-circle + i.icon.icon-arrow-up + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <button class="btn btn-action"><i class="icon icon-arrow-left"></i></button> + <button class="btn btn-action s-circle"><i class="icon icon-arrow-left"></i></button> + + +docs-subheading('buttons-states', 'Button states') + + p + | Add the #[code active] class for active button state style. + + .docs-demo.columns + .column.col-12 + button.btn.active default active + button.btn.btn-primary.active primary active + button.btn.btn-link.active link active + + p + | Add the #[code disabled] class or the #[code disabled] attribute for disabled button state style. + + .docs-demo.columns + .column.col-12 + button.btn.disabled(tabindex="-1") default disabled + button.btn.btn-primary(disabled="" tabindex="-1") primary disabled + button.btn.btn-link(disabled="" tabindex="-1") link disabled + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- buttons with disabled state --> + <button class="btn disabled" tabindex="-1">disabled button</button> + <button class="btn" disabled tabindex="-1">disabled button</button> + + p + | A button with the #[code loading] class can show loading indicator. + + .docs-demo.columns + .column.col-12 + button.btn.loading default button + button.btn.btn-primary.loading primary button + button.btn.btn-link.loading link button + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- buttons with loading state --> + <button class="btn loading">button</button> + <button class="btn btn-primary loading">primary button</button> + + +docs-subheading('buttons-groups', 'Button groups') + + .docs-demo.columns + .column.col-6.col-md-12 + .btn-group + button.btn first button + button.btn second button + button.btn third button + .column.col-6.col-md-12 + .btn-group.btn-group-block + button.btn.btn-primary first button + button.btn.btn-primary second button + button.btn.btn-primary third button + .column.col-6.col-md-12 + .btn-group + button.btn.btn-sm.active first button + button.btn.btn-sm second button + button.btn.btn-sm third button + .column.col-6.col-md-12 + .btn-group.btn-group-block + button.btn.btn-primary.btn-sm.active first button + button.btn.btn-primary.btn-sm second button + button.btn.btn-primary.btn-sm third button + + p + | If you want to use buttons as a group, add the #[code btn-group] class to the container. + | You can add the #[code btn-group-block] class for a full-width button group. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="btn-group btn-group-block"> + <button class="btn">first button</button> + <button class="btn">second button</button> + <button class="btn">third button</button> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/code.pug b/docs/src/elements/code.pug new file mode 100644 index 0000000..894b617 --- /dev/null +++ b/docs/src/elements/code.pug @@ -0,0 +1,38 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'code' + - var parent = 'elements' + - var title = 'Code - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('code', 'Code') + include ../_layout/_ad-g.pug + + p Code is used for styling inline and multiline code snippets. + p + | For inline code, you can use the #{'<code>'} element. + | For multiline code snippet blocks, you can use #{'<pre>'} with the #[code code] class as a container, and add #{'<code>'} inside it. + | The #[code data-lang] attribute is rendered as the language name in the top right. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- code snippets --> + <button class="btn"> + Submit + </button> + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <pre class="code" data-lang="HTML"><code><span class="com"><!-- code snippets --></span> + <<span class="tag">button</span> <span class="atn">class</span>=<span class="atv">"btn"</span>> + Submit + <<span class="tag">/button</span>> + </code></pre> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/forms.pug b/docs/src/elements/forms.pug new file mode 100644 index 0000000..5532860 --- /dev/null +++ b/docs/src/elements/forms.pug @@ -0,0 +1,713 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'forms' + - var parent = 'elements' + - var title = 'Forms - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('forms', 'Forms') + include ../_layout/_ad-g.pug + + p + | Forms provide the most common control styles used in forms, including input, textarea, select, checkbox, radio and switch. + + .docs-demo.columns + .column.col-6.col-xs-12 + .form-group + label.form-label(for="input-example-1") Name + input#input-example-1.form-input(type="text" placeholder="Name") + .form-group + label.form-label(for="input-example-2") Email + input#input-example-2.form-input(type="email" placeholder="Email") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form input control --> + <div class="form-group"> + <label class="form-label" for="input-example-1">Name</label> + <input class="form-input" type="text" id="input-example-1" placeholder="Name"> + </div> + + .docs-demo.columns + .column.col-6.col-xs-12 + .form-group + label.form-label(for="input-example-3") Message + textarea#input-example-3.form-input(placeholder="Textarea" rows="3") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form textarea control --> + <div class="form-group"> + <label class="form-label" for="input-example-3">Message</label> + <textarea class="form-input" id="input-example-3" placeholder="Textarea" rows="3"></textarea> + </div> + + .docs-demo.columns + .column.col-6.col-xs-12 + .form-group + select.form-select + option Choose an option + option Slack + option Skype + option Hipchat + .form-group + select.form-select(multiple="") + option Choose an option + option Slack + option Skype + option Hipchat + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form select control --> + <div class="form-group"> + <select class="form-select"> + <option>Choose an option</option> + <option>Slack</option> + <option>Skype</option> + <option>Hipchat</option> + </select> + </div> + + .docs-demo.columns + .column.col-6.col-xs-12 + form + .form-group + label.form-label Gender + label.form-radio + input(type="radio" name="gender" checked="") + i.form-icon + | Male + label.form-radio + input(type="radio" name="gender") + i.form-icon + | Female + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form radio control --> + <div class="form-group"> + <label class="form-label">Gender</label> + <label class="form-radio"> + <input type="radio" name="gender" checked> + <i class="form-icon"></i> Male + </label> + <label class="form-radio"> + <input type="radio" name="gender"> + <i class="form-icon"></i> Female + </label> + </div> + + .docs-demo.columns + .column.col-6.col-xs-12 + .form-group + label.form-switch + input(type="checkbox") + i.form-icon + | Send me emails with news and tips + .form-group + label.form-switch + input(type="checkbox" checked="") + i.form-icon + | Send me emails with news and tips + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form switch control --> + <div class="form-group"> + <label class="form-switch"> + <input type="checkbox"> + <i class="form-icon"></i> Send me emails with news and tips + </label> + </div> + + .docs-demo.columns + .column.col-6.col-xs-12 + .form-group + label.form-checkbox + input(type="checkbox") + i.form-icon + | Remember me + .form-group + label.form-checkbox + input(type="checkbox" checked="") + i.form-icon + | Remember me + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form checkbox control --> + <div class="form-group"> + <label class="form-checkbox"> + <input type="checkbox"> + <i class="form-icon"></i> Remember me + </label> + </div> + + .docs-demo.columns + .column + .form-group + label.form-checkbox + input#docs-demo-checkbox(type="checkbox") + i.form-icon + | Select all + + script. + document.getElementById("docs-demo-checkbox").indeterminate = true; + + p + | You can change checkbox to indeterminate state by setting the #[code indeterminate] property of input checkboxes to #[code true]. + + +docs-subheading('forms-inline', 'Inline forms') + + .docs-demo.columns + .column.col-6.col-xs-12 + form + .form-group + label.form-radio.form-inline + input(type="radio" name="gender" checked="") + i.form-icon + | Male + label.form-radio.form-inline + input(type="radio" name="gender") + i.form-icon + | Female + .form-group + label.form-checkbox.form-inline + input(type="checkbox") + i.form-icon + | Checkbox 1 + label.form-checkbox.form-inline + input(type="checkbox" checked="") + i.form-icon + | Checkbox 2 + + p + | You can add the #[code form-inline] class to the form components to make them inline in one row. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="form-group"> + <label class="form-radio form-inline"> + <input type="radio" name="gender" checked=""><i class="form-icon"></i> Male + </label> + <label class="form-radio form-inline"> + <input type="radio" name="gender"><i class="form-icon"></i> Female + </label> + </div> + + <div class="form-group"> + <label class="form-checkbox form-inline"> + <input type="checkbox"><i class="form-icon"></i> Checkbox 1 + </label> + <label class="form-checkbox form-inline"> + <input type="checkbox" checked=""><i class="form-icon"></i> Checkbox 2 + </label> + </div> + + +docs-subheading('forms-horizontal', 'Horizontal forms') + + p + | If you want to have a horizontal form, add the #[code form-horizontal] class to the #{'<form>'} container. + | And add the #[code col-<1-12>] and #[code col-xs/sm/lg/xl-<1-12>] class to the child elements for responsive form row layout. + + .docs-demo.columns + .column.col-9.col-sm-12 + form.form-horizontal(action="#forms") + .form-group + .col-3.col-sm-12 + label.form-label(for="input-example-4") Name + .col-9.col-sm-12 + input#input-example-4.form-input(type="text" placeholder="Name") + .form-group + .col-3.col-sm-12 + label.form-label(for="input-example-5") Email + .col-9.col-sm-12 + input#input-example-5.form-input(type="email" placeholder="Email") + .form-group + .col-3.col-sm-12 + label.form-label Gender + .col-9.col-sm-12 + label.form-radio + input(type="radio" name="gender") + i.form-icon + | Male + label.form-radio + input(type="radio" name="gender" checked="") + i.form-icon + | Female + .form-group + .col-3.col-sm-12 + label.form-label Source + .col-9.col-sm-12 + select.form-select(multiple="") + option Slack + option Skype + option Hipchat + .form-group + .col-9.col-sm-12.col-ml-auto + label.form-switch + input(type="checkbox") + i.form-icon + | Send me emails with news and tips + .form-group + .col-3.col-sm-12 + label.form-label(for="input-example-6") Message + .col-9.col-sm-12 + textarea#input-example-6.form-input(placeholder="Textarea" rows="3") + .form-group + .col-9.col-sm-12.col-ml-auto + label.form-checkbox + input(type="checkbox") + i.form-icon + | Remember me + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <form class="form-horizontal"> + <div class="form-group"> + <div class="col-3 col-sm-12"> + <label class="form-label" for="input-example-1">Name</label> + </div> + <div class="col-9 col-sm-12"> + <input class="form-input" type="text" id="input-example-1" placeholder="Name"> + </div> + </div> + <!-- form structure --> + </form> + + +docs-subheading('forms-sizes', 'Form sizes') + + p + | For smaller or larger input and select controls, you could add the #[code input-sm]/#[code input-lg], #[code select-sm]/#[code select-lg] and #[code label-sm]/#[code label-lg] classes to the elements. + + .docs-demo.columns + .column.col-4.col-xs-12 + label.form-label.label-sm Label + .column.col-4.col-xs-12 + input.form-input.input-sm(type="text" placeholder="Name") + .column.col-4.col-xs-12 + select.form-select.select-sm + option Choose an option + option Slack + option Skype + option Hipchat + .column.col-4.col-xs-12 + label.form-label.label-lg Label + .column.col-4.col-xs-12 + input.form-input.input-lg(type="text" placeholder="Name") + .column.col-4.col-xs-12 + select.form-select.select-lg + option Choose an option + option Slack + option Skype + option Hipchat + + p + | You can add the #[code input-sm]/#[code input-lg] classes to the input-checkbox, input-radio and input-switch to have different sizes. + + +docs-subheading('forms-icons', 'Form icons') + + p + | Spectre Form components has + a(href="#icons") Spectre Icons + | support. + p + | Add a wrapper with the #[code has-icon-left]/#[code has-icon-right] class to #{'<input>'} element. + | And add the icon with #[code form-icon] class next to the #{'<input>'}. + + .docs-demo.columns + .column.col-4.col-xs-12 + .has-icon-left + input.form-input.input-sm(type="text" placeholder="Name") + i.form-icon.icon.icon-arrow-right + .column.col-4.col-xs-12 + .has-icon-left.tooltip(data-tooltip="Lorem ipsum dolor sit amet") + input.form-input(type="text" placeholder="Name") + i.form-icon.icon.icon-arrow-right + .column.col-4.col-xs-12 + .has-icon-left + input.form-input.input-lg(type="text" placeholder="Name") + i.form-icon.icon.icon-arrow-right + .column.col-4.col-xs-12 + .has-icon-right + input.form-input.input-sm(type="text" placeholder="Name") + i.form-icon.icon.icon-check + .column.col-4.col-xs-12 + .has-icon-right + input.form-input(type="text" placeholder="Name") + i.form-icon.icon.icon-check + .column.col-4.col-xs-12 + .has-icon-right + input.form-input.input-lg(type="text" placeholder="Name") + i.form-icon.icon.icon-check + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form input with Spectre icon --> + <div class="has-icon-left"> + <input type="text" class="form-input" placeholder="..."> + <i class="form-icon icon icon-check"></i> + </div> + + p + | You can use the #[code loading] class for loading or posting state. + + .docs-demo.columns + .column.col-4.col-xs-12 + .has-icon-right + input.form-input.input-sm(type="text" placeholder="Name") + i.form-icon.loading + .column.col-4.col-xs-12 + .has-icon-right + input.form-input(type="text" placeholder="Name") + i.form-icon.loading + .column.col-4.col-xs-12 + .has-icon-right + input.form-input.input-lg(type="text" placeholder="Name") + i.form-icon.loading + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- form input with loading icon --> + <div class="has-icon-right"> + <input type="text" class="form-input" placeholder="..."> + <i class="form-icon loading"></i> + </div> + + +docs-subheading('forms-input', 'Input types') + + .docs-demo.columns + .column.col-9.col-sm-12 + form.form-horizontal(action="#forms") + .form-group + .col-3 + label.form-label(for="input-example-8") Email + .col-9 + input#input-example-8.form-input(type="email" placeholder="Email" value="spectre@example.com" pattern="[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$") + .form-group + .col-3 + label.form-label(for="input-example-9") URL + .col-9 + input#input-example-9.form-input(type="url" placeholder="URL" value="https://github.com/picturepan2/spectre") + .form-group + .col-3 + label.form-label(for="input-example-10") Search + .col-9 + input#input-example-10.form-input(type="search" placeholder="Search") + .form-group + .col-3 + label.form-label(for="input-example-11") Tel + .col-9 + input#input-example-11.form-input(type="tel" placeholder="Tel" value="1-(888)-888-8888") + .form-group + .col-3 + label.form-label(for="input-example-12") Password + .col-9 + input#input-example-12.form-input(type="password" placeholder="Password" value="123456789") + .form-group + .col-3 + label.form-label(for="input-example-13") Number + .col-9 + input#input-example-13.form-input(type="number" placeholder="00" value="66") + .form-group + .col-3 + label.form-label(for="input-example-14") Date + .col-9 + input#input-example-14.form-input(type="date" value="2016-12-31") + .form-group + .col-3 + label.form-label(for="input-example-15") Color + .col-9 + input#input-example-15.form-input(type="color" value="#5755d9") + .form-group + .col-3 + label.form-label(for="input-example-16") File + .col-9 + input#input-example-16.form-input(type="file") + + +docs-subheading('forms-input-groups', 'Input groups') + + .docs-demo.columns + .column.col-6.col-xs-12 + .input-group + input.form-input.input-sm(type="text" placeholder="username") + select.form-select.select-sm + option Slack + option Skype + option Hipchat + .column.col-6.col-xs-12 + .input-group + span.input-group-addon.addon-sm slack.com/ + input.form-input.input-sm(type="text" placeholder="site name") + button.btn.btn-primary.input-group-btn.btn-sm Submit + .column.col-6.col-xs-12 + .input-group + input.form-input(type="text" placeholder="username") + select.form-select + option Slack + option Skype + option Hipchat + .column.col-6.col-xs-12 + .input-group + span.input-group-addon slack.com/ + input.form-input(type="text" placeholder="site name") + button.btn.btn-primary.input-group-btn Submit + .column.col-6.col-xs-12 + .input-group + label.form-switch + input(type="checkbox") + i.form-icon + input.form-input(type="text" placeholder="name") + .column.col-6.col-xs-12 + .input-group + label.form-checkbox + input(type="checkbox") + i.form-icon + input.form-input(type="text" placeholder="name") + .column.col-6.col-xs-12 + .input-group + input.form-input.input-lg(type="text" placeholder="username") + select.form-select.select-lg + option Slack + option Skype + option Hipchat + .column.col-6.col-xs-12 + .input-group + span.input-group-addon.addon-lg slack.com/ + input.form-input.input-lg(type="text" placeholder="site name") + button.btn.btn-primary.input-group-btn.btn-lg Submit + + p + | If you want to attach text and button along with an input, add the #[code input-group] class to the input container. + | And add the #[code input-group-addon] class to the text element and #[code input-group-btn] to the button element. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- normal input group --> + <div class="input-group"> + <span class="input-group-addon">...</span> + <input type="text" class="form-input" placeholder="..."> + </div> + + <!-- large input group --> + <div class="input-group"> + <span class="input-group-addon addon-lg">...</span> + <input type="text" class="form-input input-lg" placeholder="..."> + </div> + + <!-- normal input group with button --> + <div class="input-group"> + <span class="input-group-addon">...</span> + <input type="text" class="form-input" placeholder="..."> + <button class="btn btn-primary input-group-btn">Submit</button> + </div> + + +docs-subheading('forms-validation', 'Form validation styles') + + .docs-demo.columns + .column.col-9.col-sm-12 + fieldset + legend Input + .form-group + label.form-label(for="input-example-17") Name + input#input-example-17.form-input.is-success(type="text" placeholder="Name") + p.form-input-hint The name is valid. + .form-group.has-error + label.form-label(for="input-example-18") Password + input#input-example-18.form-input(type="password" placeholder="Password") + p.form-input-hint Passwords must have at least 8 characters. + fieldset + legend Select + .form-group + select.form-select.is-error + option Choose an option + option Slack + option Skype + option Hipchat + p.form-input-hint The option is invalid. + .form-group.has-success + select.form-select + option Choose an option + option Slack + option Skype + option Hipchat + p.form-input-hint The option is available. + fieldset + legend Checkbox, Radio and Switch (Error state only) + .form-group + label.form-checkbox.is-error + input(type="checkbox" checked="") + i.form-icon + | I'm not a robot. + .form-group.has-error + label.form-radio + input(type="radio" name="gender" checked="") + i.form-icon + | Male + label.form-radio + input(type="radio" name="gender") + i.form-icon + | Female + .form-group + label.form-switch.is-error + input(type="checkbox" checked="") + i.form-icon + | Send me emails with news and tips + + p + | To use form validation styles, you can either add #[code is-success] or #[code is-error] class to the controls or add #[code has-success] or #[code has-error] class to parent elements. + | Use the #[code form-input-hint] class to provide form validation success and error messages. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <form> + <!-- form validation class: has-success --> + <div class="form-group has-success"> + <label class="form-label" for="input-example-1">Name</label> + <input class="form-input" type="text" id="input-example-1" placeholder="..."> + <p class="form-input-hint">The name is invalid.</p> + </div> + + <!-- form validation class: is-success --> + <div class="form-group"> + <label class="form-label" for="input-example-1">Name</label> + <input class="form-input is-success" type="text" id="input-example-1" placeholder="..."> + <p class="form-input-hint">The name is invalid.</p> + </div> + + <!-- form validation example for checkbox, radio and switch --> + <div class="form-group"> + <label class="form-checkbox is-error"> + <input type="checkbox"> + <i class="form-icon"></i> Remember me + </label> + </div> + </form> + + .docs-demo.columns + .column.col-9.col-sm-12 + .form-group + label.form-label(for="input-example-21") Email + input#input-example-21.form-input(type="text" placeholder="Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,14}$") + .form-group + label.form-label(for="input-example-22") Password + input#input-example-22.form-input(type="password" placeholder="Password" pattern="^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$") + + p + | You can use input #[code pattern] attribute to validate the value as well. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- pattern validation example for Email --> + <input class="form-input" type="email" placeholder="Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,14}$"> + + <!-- pattern validation example for password (8 or more characters that are of at least one number, and one uppercase and lowercase letter) --> + <input class="form-input" type="password" placeholder="Password" pattern="^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$"> + + +docs-subheading('forms-disabled', 'Form disabled styles') + + p + | Add the #[code disabled] attribute to the element or #{'<fieldset>'} for a disabled form components style. + + .docs-demo.columns + .column.col-6.col-xs-12 + form(action="#forms") + fieldset(disabled="") + .form-group + label.form-label(for="input-example-19") Name + input#input-example-19.form-input(type="text" placeholder="Name") + .form-group + label.form-label Gender + label.form-radio + input(type="radio" name="gender" disabled="") + i.form-icon + | Male + label.form-radio + input(type="radio" name="gender" disabled="") + i.form-icon + | Female + .form-group + select.form-select(disabled="") + option Choose an option + option Slack + option Skype + option Hipchat + .form-group + label.form-switch + input(type="checkbox" disabled="") + i.form-icon + | Send me emails with news and tips + .form-group + label.form-label(for="input-example-20") Message + textarea#input-example-20.form-input(placeholder="Textarea" rows="3" disabled="") + .form-group + label.form-checkbox + input(type="checkbox" disabled="") + i.form-icon + | Remember me + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <form action="#forms"> + <fieldset disabled> + <div class="form-group"> + <label class="form-label" for="input-example-19">Name</label> + <input class="form-input" type="text" id="input-example-19" placeholder="Name"> + </div> + <div class="form-group"> + <label class="form-label">Gender</label> + <label class="form-radio"> + <input type="radio" name="gender" disabled> + <i class="form-icon"></i> Male + </label> + <label class="form-radio"> + <input type="radio" name="gender" disabled> + <i class="form-icon"></i> Female + </label> + </div> + <div class="form-group"> + <select class="form-select" disabled> + <option>Choose an option</option> + <option>Slack</option> + <option>Skype</option> + <option>Hipchat</option> + </select> + </div> + <div class="form-group"> + <label class="form-switch"> + <input type="checkbox" disabled> + <i class="form-icon"></i> Send me emails with news and tips + </label> + </div> + <div class="form-group"> + <label class="form-label" for="input-example-20">Message</label> + <textarea class="form-input" id="input-example-20" placeholder="Textarea" rows="3" disabled></textarea> + </div> + <div class="form-group"> + <label class="form-checkbox"> + <input type="checkbox" disabled> + <i class="form-icon"></i> Remember me + </label> + </div> + </fieldset> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/icons.pug b/docs/src/elements/icons.pug new file mode 100644 index 0000000..1430fe4 --- /dev/null +++ b/docs/src/elements/icons.pug @@ -0,0 +1,213 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'icons' + - var parent = 'elements' + - var title = 'Icons - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('icons', 'Icons') + include ../_layout/_ad-g.pug + + p + | Icons are single-element, responsive and pure CSS icons. + | You can include #[code spectre-icons.css] located in the #[code dist] folder to your web #{'<head>'} to have these CSS icons. + + +docs-subheading('icons-navigation', 'Navigation icons') + + .columns + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-arrow-up + p icon-arrow-up + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-arrow-right + p icon-arrow-right + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-arrow-down + p icon-arrow-down + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-arrow-left + p icon-arrow-left + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-upward + p icon-upward + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-forward + p icon-forward + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-downward + p icon-downward + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-back + p icon-back + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-caret + p icon-caret + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-menu + p icon-menu + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-apps + p icon-apps + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-more-horiz + p icon-more-horiz + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-more-vert + p icon-more-vert + + +docs-subheading('icons-action', 'Action icons') + + .columns + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-resize-horiz + p icon-resize-horiz + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-resize-vert + p icon-resize-vert + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-plus + p icon-plus + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-minus + p icon-minus + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-cross + p icon-cross + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-check + p icon-check + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-stop + p icon-stop + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-shutdown + p icon-shutdown + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-refresh + p icon-refresh + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-search + p icon-search + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-flag + p icon-flag + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-bookmark + p icon-bookmark + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-edit + p icon-edit + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-delete + p icon-delete + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-share + p icon-share + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-download + p icon-download + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-upload + p icon-upload + + +docs-subheading('icons-object', 'Object icons') + + .columns + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-mail + p icon-mail + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-people + p icon-people + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-message + p icon-message + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-photo + p icon-photo + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-time + p icon-time + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-location + p icon-location + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-link + p icon-link + .column.col-3.col-md-6 + button.btn.btn-primary.btn-action.btn-lg + i.icon.icon-emoji + p icon-emoji + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <i class="icon icon-menu"></i> + + +docs-subheading('icons-sizes', 'Icon sizes') + + p + | Use #[code icon-2x], #[code icon-3x] and #[code icon-4x] classes to increase icon sizes. + | You can set #[code font-size] to have different icon sizes. + + .columns + .column.col-3.col-md-6 + p + i.icon.icon-2x.icon-mail + p icon-2x (32px) + .column.col-3.col-md-6 + p + i.icon.icon-3x.icon-mail + p icon-3x (48px) + .column.col-3.col-md-6 + p + i.icon.icon-4x.icon-mail + p icon-4x (64px) + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <i class="icon icon-2x icon-mail"></i> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/labels.pug b/docs/src/elements/labels.pug new file mode 100644 index 0000000..7232d42 --- /dev/null +++ b/docs/src/elements/labels.pug @@ -0,0 +1,51 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'labels' + - var parent = 'elements' + - var title = 'Labels - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('labels', 'Labels') + include ../_layout/_ad-g.pug + + p Labels are formatted text tags for highlighted, informative information. + + .docs-demo.columns + .column + span.label.mr-1 default label + span.label.label-primary.mr-1 primary label + span.label.label-secondary.mr-1 secondary label + span.label.label-success.mr-1 success label + span.label.label-warning.mr-1 warning label + span.label.label-error error label + + p + | Add the #[code label] class to #{'<span>'} or #{'<small>'} elements. + | You can add another class #[code label-primary], #[code label-secondary], #[code label-success], #[code label-warning] and #[code label-error] for colored labels. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- normal labels --> + <span class="label">default label</span> + <span class="label label-primary">primary label</span> + + .docs-demo.columns + .column + span.label.label-rounded.mr-1 default label + span.label.label-rounded.label-primary primary label + + p + | Add the #[code label-rounded] class to have rounded labels. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- rounded labels --> + <span class="label label-rounded label-primary">primary label</span> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/media.pug b/docs/src/elements/media.pug new file mode 100644 index 0000000..05cd719 --- /dev/null +++ b/docs/src/elements/media.pug @@ -0,0 +1,89 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'media' + - var parent = 'elements' + - var title = 'Media - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('media', 'Media') + include ../_layout/_ad-g.pug + + p Media includes responsive images, figures and video classes. + + +docs-subheading('media-images', 'Images') + + p + | Add the #[code img-responsive] class to #{'<img>'} elements. The images will scale with the parent sizes. + + .columns + .column.col-12 + img.img-responsive.rounded(src="../img/osx-el-capitan.jpg" alt="macOS El Capitan Wallpaper") + + p + | Add the #[code img-fit-contain] or #[code img-fit-cover] class to #{'<img>'} or #{'<video>'} elements. The media will crop itself to fit inside the element (and you don't need another container). + | This feature can replace the classic background image trick. Microsoft Edge support + a(href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/" target="_blank") is shipped + | with Build Number 16299+. + + .docs-demo.columns + .column.col-6.col-xs-12 + figure.figure + img.img-fit-contain.rounded(src="../img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;") + figcaption.figure-caption.text-center img-fit-contain + .column.col-6.col-xs-12 + figure.figure + img.img-fit-cover.rounded(src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;") + figcaption.figure-caption.text-center img-fit-cover + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <img src="img/osx-el-capitan.jpg" class="img-responsive ..." alt="..."> + <img src="img/osx-el-capitan.jpg" class="img-fit-contain ..." alt="..."> + <img src="img/osx-el-capitan.jpg" class="img-fit-cover ..." alt="..."> + + +docs-subheading('media-figure', 'Figure') + + p + | You can use the element #{'<figure>'} for an image with a caption. + | Add the #[code figure] class to #{'<figure>'} element. + | The images with the #[code img-responsive] class will be responsive. + | And the included class #[code figure-caption] will provide basic style for caption. + | Also, you can use #[code text-left], #[code text-center] and #[code text-right] for caption alignment. + + .docs-demo.columns + .column.col-12 + figure.figure + img.img-responsive.rounded(src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") + figcaption.figure-caption.text-center macOS Yosemite wallpaper + + +docs-subheading('media-video', 'Video') + + p + | For responsive video, add a container with the #[code video-responsive] class. + | Insert any YouTube, Youku or other iframe/embed video inside the container. + | The ratio is 16:9 by default. + | You may add #[code video-responsive-4-3] for 4:3 ratio video container or #[code video-responsive-1-1] for 1:1 ratio. + + .docs-demo.columns + .column.col-12 + .video-responsive + iframe(width="560" height="315" src="https://www.youtube.com/embed/7DbslbKsQSk" allowfullscreen="") + + p + | For responsive #{'<video>'} elements, you can add the #[code video-responsive] class directly. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="video-responsive video-responsive-4-3"> + <iframe src="..." width="..." height="..." frameborder="0" allowfullscreen></iframe> + </div> + + <video class="video-responsive" src="...">...</video> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug diff --git a/docs/src/elements/tables.pug b/docs/src/elements/tables.pug new file mode 100644 index 0000000..3e087d9 --- /dev/null +++ b/docs/src/elements/tables.pug @@ -0,0 +1,123 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'tables' + - var parent = 'elements' + - var title = 'Tables - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('tables', 'Tables') + include ../_layout/_ad-g.pug + + p Tables include default styles for tables and data sets. + + .docs-demo.columns + .column.col-12 + table.table.table-striped + thead + tr + th Name + th Genre + th Release date + tbody + tr + td The Shawshank Redemption + td Crime, Drama + td 14 October 1994 + tr + td The Godfather + td Crime, Drama + td 24 March 1972 + tr + td Schindler's List + td Biography, Drama, History + td 4 February 1994 + tr + td Se7en + td Crime, Drama, Mystery + td 22 September 1995 + + p + | Add the #[code table] class to any #{'<table>'} element. + | The class will add padding, border and emphasized table header. + | Use the #[code table-striped] class to #{'<table>'} to add zebra striped style. + | For hoverable table rows, you can add the #[code table-hover] class to enable hover style. + p + | Use the #[code active] class to make #{'<tr>'} element highlighted. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <table class="table table-striped table-hover"> + <thead> + <tr> + <th>name</th> + <th>genre</th> + <th>release date</th> + </tr> + </thead> + <tbody> + <tr class="active"> + <td>The Shawshank Redemption</td> + <td>Crime, Drama</td> + <td>14 October 1994</td> + </tr> + </tbody> + </table> + + + .docs-demo.columns + .column.col-12 + table.table.table-striped.table-scroll + thead + tr + th Name + th Rating + th Duration + th Genre + th Release date + th Director + tbody + tr + td The Shawshank Redemption + td R + td 2h 22min + td Crime, Drama + td 14 October 1994 + td Frank Darabont + tr + td The Godfather + td R + td 2h 55min + td Crime, Drama + td 24 March 1972 + td Francis Ford Coppola + tr + td Schindler's List + td R + td 3h 15min + td Biography, Drama, History + td 4 February 1994 + td Steven Spielberg + tr + td Se7en + td R + td 2h 7min + td Crime, Drama, Mystery + td 22 September 1995 + td David Fincher + + p + | Add the #[code table-scroll] class to #{'<table>'} to have a horizontally scrollable table. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <table class="table table-striped table-scroll"> + ... + </table> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/elements/typography.pug b/docs/src/elements/typography.pug new file mode 100644 index 0000000..2fb7733 --- /dev/null +++ b/docs/src/elements/typography.pug @@ -0,0 +1,275 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'typography' + - var parent = 'elements' + - var title = 'Typography - Elements - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('typography', 'Typography') + include ../_layout/_ad-g.pug + + p + | Typography sets default styles for headings, paragraphs, semantic text, blockquote and lists elements. + + +docs-subheading('typography-headings', 'Headings') + + .docs-demo.columns + .column.col-12 + h1 + | H1 Heading + small.label 40px + .column.col-12 + h2 + | H2 Heading + small.label 32px + .column.col-12 + h3 + | H3 Heading + small.label 28px + .column.col-12 + h4 + | H4 Heading + small.label 24px + .column.col-12 + h5 + | H5 Heading + small.label 20px + .column.col-12 + h6 + | H6 Heading + small.label 16px + + //- headings + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <h1>H1 Heading</h1> + <h1>H1 Heading <small class="label">40px</small></h1> + <span class="h1">H1 Heading</span> + + +docs-subheading('typography-paragraphs', 'Paragraphs') + + p + | Lorem ipsum dolor sit amet, consectetur #[a(href='#typography') adipiscing elit]. + | Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. + p + | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. + + //- paragraphs + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <p>Lorem ipsum dolor sit amet, ...</p> + <p>...</p> + + +docs-subheading('typography-semantic-text', 'Semantic text elements') + + .docs-demo.columns + .column.col-6.col-xs-12 + abbr(title='Internationalization') I18N + code.ml-2 abbr + .column.col-6.col-xs-12 + strong Bold + code.ml-2 strong + code.ml-2 b + .column.col-6.col-xs-12 + cite Citation + code.ml-2 cite + .column.col-6.col-xs-12 + code Hello World! + code.ml-2 code + .column.col-6.col-xs-12 + del Deleted + code.ml-2 del + .column.col-6.col-xs-12 + em Emphasis + code.ml-2 em + .column.col-6.col-xs-12 + i Italic + code.ml-2 i + .column.col-6.col-xs-12 + ins Inserted + code.ml-2 ins + .column.col-6.col-xs-12 + kbd Ctrl + S + code.ml-2 kbd + .column.col-6.col-xs-12 + mark Highlighted + code.ml-2 mark + .column.col-6.col-xs-12 + ruby + | 漢 + rt kan + | 字 + rt ji + code.ml-2 ruby + .column.col-6.col-xs-12 + s Strikethrough + code.ml-2 s + .column.col-6.col-xs-12 + samp Sample + code.ml-2 samp + .column.col-6.col-xs-12 + | Text + sub Subscripted + code.ml-2 sub + .column.col-6.col-xs-12 + | Text + sup Superscripted + code.ml-2 sup + .column.col-6.col-xs-12 + time 20:00 + code.ml-2 time + .column.col-6.col-xs-12 + u Underline + code.ml-2 u + .column.col-6.col-xs-12 + var x + | = + var y + | + 2 + code.ml-2 var + + +docs-subheading('typography-east-asian', 'Optimized for East Asian fonts') + + .docs-demo.columns + .column + p.h5 + | #[small.lang-zh-hans 你好], #[small.lang-ja こんにちは], #[small.lang-ko 안녕하세요] + p.h6 Chinese (Simplified) + p.lang-zh-hans 革命不是请客吃饭,不是做文章,不是绘画绣花,不能那样雅致,那样从容不迫,“文质彬彬”,那样“温良恭俭让”。革命就是暴动,是一个阶级推翻一个阶级的暴烈的行动。 + p.h6 Chinese (Tranditional) + p.lang-zh-hant + | 山不在高,有仙則名;水不在深,有龍則靈。斯是陋室,惟吾德馨。苔痕上階綠,草色入簾青;談笑有鴻儒,往來無白丁。可以調素琴,閱金經。無絲竹之亂耳,無案牘之勞形。南陽諸葛廬,西蜀子雲亭。孔子云:「何陋之有?」 + p.h6 Japanese + p.lang-ja + | 祇園精舎の鐘の声、諸行無常の響きあり。沙羅双樹の花の色、盛者必衰の理をあらはす。おごれる人も久しからず。ただ春の夜の夢のごとし。たけき者も遂にはほろびぬ、ひとへに風の前の塵に同じ。 + p.h6 Korean + p.lang-ko + | 나라말이 중국과 달라, 한문・한자와 서로 통하지 아니하므로, 어리석은 백성들이 말하고자 하는 바가 있어도, 끝내 제 뜻을 펴지 못하는 사람이 많다. 내가 이를 불쌍히 여겨, 새로 스물 여덟 글자를 만드니, 사람마다 하여금 쉽게 익혀, 날마다 씀에 편하게 하고자 할 따름이다. + + p + | Add the #[code lang] attribute to the #{'<html>'} element or use the class #[code lang-zh], #[code lang-zh-hans], #[code lang-zh-hant], #[code lang-ja] or #[code lang-ko] to have better Asian CJK (Chinese, Japanese and Korean) font support. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <html lang="zh-Hans">……</html> + + <p class="lang-zh-hans">革命不是请客吃饭,不是做文章……</p> + <p class="lang-ja">祇園精舎の鐘の声、諸行無常の響きあり……</p> + <p class="lang-ko">나라말이 중국과 달라, 한문・한자와 서로 통하지 아니하므로……</p> + + p + | And you can use the #[code lang-cjk] class or the #[code lang] attribute to add spacing between underlines and strike-through text for better Chinese and Japanese readability. + + .docs-demo.columns + .column + p(lang='ja'). + <u>祇園</u><u>精舎</u>の鐘の声、諸行無常の響きあり。 + p(lang='ja'). + <del>祇園</del><del>精舎</del>の鐘の声、諸行無常の響きあり。 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <p class="lang-cjk"><u>祇園</u><u>精舎</u>の鐘の声、諸行無常の響きあり。……</p> + <p lang="ja"><del>祇園</del><del>精舎</del>の鐘の声、諸行無常の響きあり。……</p> + + +docs-subheading('typography-fonts', 'Fonts') + + p + | Spectre sets the most common and best #[code font-family] for each OS with fallback support in old systems. + | There are also fonts targeted East Asian typography. + + pre.code + code + :highlight(lang="scss") + /* Western typography targeted */ + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; + /* Monospace typography targeted */ + font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace; + + /* Chinese (lang="zh" and lang="zh-Hans") targeted */ + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif; + /* Chinese (lang="zh-Hant") targeted */ + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Helvetica Neue", sans-serif; + /* Japanese (lang="ja") targeted */ + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo, "Helvetica Neue", sans-serif; + /* Korean (lang="ko") targeted */ + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", "Helvetica Neue", sans-serif; + + +docs-subheading('typography-blockquote', 'Blockquote') + + blockquote + p + | The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life. + cite - Bill Gates + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <blockquote> + <p>The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life. </p> + <cite>- Bill Gates</cite> + </blockquote> + + +docs-subheading('typography-lists', 'Lists') + + .docs-demo.columns + .column.col-4.col-xs-12 + ul.list + li list item 1 + li + | list item 2 + ul + li list item 2.1 + li list item 2.2 + li list item 2.3 + li list item 3 + .column.col-4.col-xs-12 + ol.list + li list item 1 + li + | list item 2 + ol + li list item 2.1 + li list item 2.2 + li list item 2.3 + li list item 3 + .column.col-4.col-xs-12 + dl.list + dt description list term 1 + dd description list description 1 + dt description list term 2 + dd description list description 2 + dt description list term 3 + dd description list description 3 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- unordered list --> + <ul> + <li>list item 1</li> + <li>list item 2 + <ul> + <li>list item 2.1</li> + <li>list item 2.2</li> + <li>list item 2.3</li> + </ul> + </li> + <li>list item 3</li> + </ul> + + <!-- description list --> + <dl> + <dt>description list term</dt> + <dd>description list description</dd> + </dl> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals.pug b/docs/src/experimentals.pug index c21a2a4..e1a6a02 100644 --- a/docs/src/experimentals.pug +++ b/docs/src/experimentals.pug @@ -1,59 +1,120 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables + - var slug = 'experimentals' + - var parent = 'experimentals' - var title = 'Experimentals - Spectre.css CSS Framework' - - var description = '' - - var current = 'experimentals' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Experimentals +docs-heading('experimentals', 'Experimentals') - include contents/experimentals.pug - - //- Autocomplete - +docs-heading('autocomplete', 'Autocomplete') - include contents/_ad-g.pug - include contents/autocomplete.pug - - //- Calendars - +docs-heading('calendars', 'Calendars') - include contents/_ad-c.pug - include contents/calendars.pug + include _layout/_ad-g.pug - //- Carousels - +docs-heading('carousels', 'Carousels') - include contents/carousels.pug + p + | The Experimentals include experimental elements and features, mostly are not yet ready for wide use. + | These elements and components are limited inside #[code spectre-exp.scss] before browsers fully support them. + | Sometimes, there are some specific browsers targeted components. - //- Comparison sliders - +docs-heading('comparison', 'Comparison sliders') - include contents/comparison.pug - - //- Filters - +docs-heading('filters', 'Filters') - include contents/filters.pug + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Autocomplete + .card-body + | Form component provides suggestions while you type + .card-footer + a.btn.btn-primary(href="experimentals/autocomplete.html") View - //- Meters - +docs-heading('meters', 'Meters') - include contents/meters.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Calendars + .card-body + | Date or date range picker and events display based on Flexbox + .card-footer + a.btn.btn-primary(href="experimentals/calendars.html") View - //- Off-canvas - +docs-heading('off-canvas', 'Off-canvas') - include contents/off-canvas.pug - - //- Parallax - +docs-heading('parallax', 'Parallax') - include contents/parallax.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Carousels + .card-body + | Pure CSS slideshows for cycling images + .card-footer + a.btn.btn-primary(href="experimentals/carousels.html") View - //- Progress - +docs-heading('progress', 'Progress') - include contents/progress.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Comparison sliders + .card-body + | Pure CSS sliders for comparing two images + .card-footer + a.btn.btn-primary(href="experimentals/comparison.html") View - //- Sliders - +docs-heading('sliders', 'Sliders') - include contents/sliders.pug - - //- Timelines - +docs-heading('timelines', 'Timelines') - include contents/timelines.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Filters + .card-body + | CSS only content filters + .card-footer + a.btn.btn-primary(href="experimentals/filters.html") View - include _footer.pug
\ No newline at end of file + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Meters + .card-body + | Representing the value within the known range + .card-footer + a.btn.btn-primary(href="experimentals/meters.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Off-canvas + .card-body + | Navigation layout that sidebars can slide in and out of the viewport + .card-footer + a.btn.btn-primary(href="experimentals/off-canvas.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Parallax + .card-body + | Pure CSS Apple TV/tvOS hover parallax effect + .card-footer + a.btn.btn-primary(href="experimentals/parallax.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Progress + .card-body + | Indicating the progress completion of a task + .card-footer + a.btn.btn-primary(href="experimentals/progress.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Sliders + .card-body + | Selecting values from ranges + .card-footer + a.btn.btn-primary(href="experimentals/sliders.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Timelines + .card-body + | Ordered sequences of activities + .card-footer + a.btn.btn-primary(href="experimentals/timelines.html") View + + include _layout/_ad-c.pug + + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/autocomplete.pug b/docs/src/experimentals/autocomplete.pug new file mode 100644 index 0000000..c112c46 --- /dev/null +++ b/docs/src/experimentals/autocomplete.pug @@ -0,0 +1,135 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'autocomplete' + - var parent = 'experimentals' + - var title = 'Autocomplete - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('autocomplete', 'Autocomplete') + include ../_layout/_ad-g.pug + + p + | Autocomplete form component provides suggestions while you type. It is often used for tags and contacts input. + + .docs-demo.columns + .column.col-9.col-xs-12 + .form-group + .form-autocomplete + .form-autocomplete-input.form-input + span.chip + | Bruce Banner + .chip + img.avatar.avatar-sm(src="../img/avatar-1.png" alt="Avatar") + | Thor Odinson + .chip + img.avatar.avatar-sm(src="../img/avatar-4.png" alt="Avatar") + | Steve Rogers + .chip + figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") + | Tony Stark + span.chip.active + | Natasha Romanoff + input.form-input(type="text" placeholder="") + .column.col-9.col-xs-12 + .form-group + .form-autocomplete + .form-autocomplete-input.form-input.is-focused + span.chip + | Bruce Banner + a.btn.btn-clear(href="#" aria-label="Close" role="button") + span.chip + img.avatar.avatar-sm(src="../img/avatar-1.png" alt="Thor Odinson") + | Thor Odinson + a.btn.btn-clear(href="#" aria-label="Close" role="button") + .has-icon-left + input.form-input(type="text" placeholder="" value="S") + i.form-icon.loading + ul.menu + li.menu-item + a(href="#autocomplete") + .tile.tile-centered + .tile-icon + img.avatar.avatar-sm(src="../img/avatar-4.png" alt="Steve Rogers") + .tile-content + mark S + | teve Roger + mark s + li.menu-item + a(href="#autocomplete") + .tile.tile-centered + .tile-icon + figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") + .tile-content + | Tony + mark S + | tark + + p + | Add a container element with the #[code form-autocomplete] class. + | There are 2 parts of it, one is #[code form-autocomplete-input], another is #[code menu] component. + | You may add the #[code is-focused] class to #[code form-autocomplete-input] to make it appear as focus state. + p + | Spectre.css does NOT include JavaScript code, you will need to implement your JS to interact with the autocomplete. + | The autocomplete HTML structure is exampled below. + + .docs-demo.columns + .column.col-9.col-xs-12 + .form-group + .form-autocomplete.autocomplete-oneline + .form-autocomplete-input.form-input + span.chip + | Bruce Banner + .chip + img.avatar.avatar-sm(src="../img/avatar-1.png" alt="Avatar") + | Thor Odinson + .chip + img.avatar.avatar-sm(src="../img/avatar-4.png" alt="Avatar") + | Steve Rogers + .chip + figure.avatar.avatar-sm(data-initial="TS" style="background-color: #5755d9;") + | Tony Stark + span.chip.active + | Natasha Romanoff + input.form-input(type="text" placeholder="") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="form-autocomplete"> + <!-- autocomplete input container --> + <div class="form-autocomplete-input form-input"> + + <!-- autocomplete chips --> + <div class="chip"> + <img src="img/avatar-1.png" class="avatar avatar-sm" alt="Thor Odinson"> + Thor Odinson + <a href="#" class="btn btn-clear" aria-label="Close" role="button"></a> + </div> + + <!-- autocomplete real input box --> + <input class="form-input" type="text" placeholder="typing here"> + </div> + + <!-- autocomplete suggestion list --> + <ul class="menu"> + <!-- menu list items --> + <li class="menu-item"> + <a href="#"> + <div class="tile tile-centered"> + <div class="tile-icon"> + ... + </div> + <div class="tile-content"> + ... + </div> + </div> + </a> + </li> + </ul> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/calendars.pug b/docs/src/experimentals/calendars.pug new file mode 100644 index 0000000..3c543d2 --- /dev/null +++ b/docs/src/experimentals/calendars.pug @@ -0,0 +1,314 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'calendars' + - var parent = 'experimentals' + - var title = 'Calendars - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('calendars', 'Calendars') + include ../_layout/_ad-g.pug + + p + | Calendars are designed for date or date range picker and events display. It is made with flex layout. + + .docs-demo.columns + .column.col-4.col-md-12 + .calendar + .calendar-nav.navbar + button.btn.btn-action.btn-link.btn-lg + i.icon.icon-arrow-left + .navbar-primary March 2017 + button.btn.btn-action.btn-link.btn-lg + i.icon.icon-arrow-right + .calendar-container + .calendar-header + .calendar-date Sun + .calendar-date Mon + .calendar-date Tue + .calendar-date Wed + .calendar-date Thu + .calendar-date Fri + .calendar-date Sat + .calendar-body + .calendar-date.prev-month + button.date-item 26 + .calendar-date.prev-month + button.date-item 27 + .calendar-date.prev-month + button.date-item 28 + .calendar-date + button.date-item 1 + .calendar-date + button.date-item 2 + .calendar-date + button.date-item 3 + .calendar-date.tooltip(data-tooltip="Today") + button.date-item.date-today 4 + .calendar-date.tooltip(data-tooltip="Not available") + button.date-item(disabled="") 5 + .calendar-date + button.date-item 6 + .calendar-date + button.date-item 7 + .calendar-date.tooltip(data-tooltip="You have appointments") + button.date-item.badge 8 + .calendar-date + button.date-item 9 + .calendar-date + button.date-item 10 + .calendar-date + button.date-item 11 + .calendar-date + button.date-item 12 + .calendar-date + button.date-item 13 + .calendar-date + button.date-item 14 + .calendar-date + button.date-item 15 + .calendar-date.calendar-range.range-start + button.date-item 16 + .calendar-date.calendar-range + button.date-item 17 + .calendar-date.calendar-range + button.date-item 18 + .calendar-date.calendar-range + button.date-item 19 + .calendar-date.calendar-range.range-end + button.date-item 20 + .calendar-date + button.date-item 21 + .calendar-date + button.date-item 22 + .calendar-date + button.date-item 23 + .calendar-date + button.date-item 24 + .calendar-date + button.date-item 25 + .calendar-date + button.date-item 26 + .calendar-date + button.date-item 27 + .calendar-date + button.date-item 28 + .calendar-date + button.date-item 29 + .calendar-date + button.date-item 30 + .calendar-date + button.date-item 31 + .calendar-date.next-month + button.date-item 1 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="calendar"> + <!-- calendar navbar --> + <div class="calendar-nav navbar"> + <button class="btn btn-action btn-link btn-lg"> + <i class="icon icon-arrow-left"></i> + </button> + <div class="navbar-primary">March 2017</div> + <button class="btn btn-action btn-link btn-lg"> + <i class="icon icon-arrow-right"></i> + </button> + </div> + + <div class="calendar-container"> + <div class="calendar-header"> + <div class="calendar-date">Sun</div> + <div class="calendar-date">Mon</div> + <div class="calendar-date">Tue</div> + <div class="calendar-date">Wed</div> + <div class="calendar-date">Thu</div> + <div class="calendar-date">Fri</div> + <div class="calendar-date">Sat</div> + </div> + + <div class="calendar-body"> + <!-- calendar previous month --> + <div class="calendar-date prev-month"> + <button class="date-item">26</button> + </div> + ... + <div class="calendar-date prev-month"> + <button class="date-item">28</button> + </div> + + <!-- calendar current month --> + <div class="calendar-date"> + <button class="date-item">1</button> + </div> + <div class="calendar-date"> + <button class="date-item">2</button> + </div> + <div class="calendar-date"> + <button class="date-item">3</button> + </div> + <!-- calendar date: today --> + <div class="calendar-date"> + <button class="date-item date-today">4</button> + </div> + <!-- calendar date: tooltip --> + <div class="calendar-date tooltip" data-tooltip="You have appointments"> + <button class="date-item">5</button> + </div> + <!-- calendar date: not available --> + <div class="calendar-date tooltip" data-tooltip="Not available"> + <button class="date-item" disabled="">6</button> + </div> + + <!-- calendar range --> + <div class="calendar-date calendar-range range-start"> + <button class="date-item">7</button> + </div> + <div class="calendar-date calendar-range"> + <button class="date-item">8</button> + </div> + <div class="calendar-date calendar-range range-end"> + <button class="date-item">9</button> + </div> + ... + <div class="calendar-date"> + <button class="date-item">31</button> + </div> + + <!-- calendar next month --> + <div class="calendar-date next-month"> + <button class="date-item">1</button> + </div> + </div> + </div> + </div> + + +docs-subheading('calendars-sizes', 'Calendars sizes') + + .docs-demo.columns + .column.col-12 + .calendar.calendar-lg + .calendar-nav.navbar + button.btn.btn-action.btn-link.btn-lg + i.icon.icon-arrow-left + .navbar-primary March 2017 + button.btn.btn-action.btn-link.btn-lg + i.icon.icon-arrow-right + .calendar-container + .calendar-header + .calendar-date Sun + .calendar-date Mon + .calendar-date Tue + .calendar-date Wed + .calendar-date Thu + .calendar-date Fri + .calendar-date Sat + .calendar-body + .calendar-date.prev-month + button.date-item 26 + .calendar-date.prev-month + button.date-item 27 + .calendar-events + a.calendar-event.bg-error.text-light(href="#calendars") Zhonghe Festival + .calendar-date.prev-month + button.date-item 28 + .calendar-date + button.date-item 1 + .calendar-date + button.date-item 2 + .calendar-date + button.date-item 3 + .calendar-date.tooltip(data-tooltip="Today") + button.date-item.date-today 4 + .calendar-date + button.date-item(disabled="") 5 + .calendar-date + button.date-item 6 + .calendar-date + button.date-item 7 + .calendar-date.tooltip(data-tooltip="You have appointments") + button.date-item.badge 8 + .calendar-events + a.calendar-event.bg-primary.text-light(href="#calendars") Product launch event + a.calendar-event.bg-error.text-light(href="#calendars") International Women's Day + .calendar-date + button.date-item 9 + .calendar-date + button.date-item 10 + .calendar-date + button.date-item 11 + .calendar-date + button.date-item 12 + .calendar-events + a.calendar-event.bg-error.text-light(href="#calendars") Arbor Day + .calendar-date + button.date-item 13 + .calendar-date + button.date-item 14 + .calendar-date + button.date-item 15 + .calendar-date.calendar-range.range-start + button.date-item 16 + .calendar-date.calendar-range + button.date-item 17 + .calendar-date.calendar-range + button.date-item 18 + .calendar-date.calendar-range + button.date-item 19 + .calendar-date.calendar-range.range-end + button.date-item 20 + .calendar-events + a.calendar-event.bg-success.text-light(href="#calendars") Spring Equinox + .calendar-date + button.date-item 21 + .calendar-date + button.date-item 22 + .calendar-date + button.date-item 23 + .calendar-date + button.date-item 24 + .calendar-date + button.date-item 25 + .calendar-date + button.date-item 26 + .calendar-date + button.date-item 27 + .calendar-date + button.date-item 28 + .calendar-date + button.date-item 29 + .calendar-date + button.date-item 30 + .calendar-date + button.date-item 31 + .calendar-date.next-month.disabled + button.date-item 1 + .calendar-events + a.calendar-event.bg-error.text-light(href="#calendars") April Fools' Day + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="calendar calendar-lg"> + <!-- calendar navbar structure --> + + <div class="calendar-container"> + <!-- calendar header structure --> + + <div class="calendar-body"> + <!-- calendar date with events --> + <div class="calendar-date"> + <button class="date-item active">20</button> + <div class="calendar-events"> + <a class="calendar-event bg-success text-light" href="#calendars">Spring Equinox</a> + </div> + </div> + </div> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/carousels.pug b/docs/src/experimentals/carousels.pug new file mode 100644 index 0000000..3ae34bb --- /dev/null +++ b/docs/src/experimentals/carousels.pug @@ -0,0 +1,94 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'carousels' + - var parent = 'experimentals' + - var title = 'Carousels - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('carousels', 'Carousels') + include ../_layout/_ad-g.pug + + p Carousels are slideshows for cycling images. It is built in pure CSS. + + .docs-demo.columns + .column.col-12 + .carousel + input#slide-1.carousel-locator(type="radio" name="carousel-radio" hidden="" checked="") + input#slide-2.carousel-locator(type="radio" name="carousel-radio" hidden="") + input#slide-3.carousel-locator(type="radio" name="carousel-radio" hidden="") + input#slide-4.carousel-locator(type="radio" name="carousel-radio" hidden="") + .carousel-container + figure.carousel-item + label.item-prev.btn.btn-action.btn-lg(for="slide-4") + i.icon.icon-arrow-left + label.item-next.btn.btn-action.btn-lg(for="slide-2") + i.icon.icon-arrow-right + img.img-responsive.rounded(src="../img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper") + figure.carousel-item + label.item-prev.btn.btn-action.btn-lg(for="slide-1") + i.icon.icon-arrow-left + label.item-next.btn.btn-action.btn-lg(for="slide-3") + i.icon.icon-arrow-right + img.img-responsive.rounded(src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") + figure.carousel-item + label.item-prev.btn.btn-action.btn-lg(for="slide-2") + i.icon.icon-arrow-left + label.item-next.btn.btn-action.btn-lg(for="slide-4") + i.icon.icon-arrow-right + img.img-responsive.rounded(src="../img/osx-el-capitan.jpg" alt="macOS Yosemite Wallpaper") + figure.carousel-item + label.item-prev.btn.btn-action.btn-lg(for="slide-3") + i.icon.icon-arrow-left + label.item-next.btn.btn-action.btn-lg(for="slide-1") + i.icon.icon-arrow-right + img.img-responsive.rounded(src="../img/osx-el-capitan-2.jpg" alt="macOS Yosemite Wallpaper") + .carousel-nav + label.nav-item.text-hide.c-hand(for="slide-1") 1 + label.nav-item.text-hide.c-hand(for="slide-2") 2 + label.nav-item.text-hide.c-hand(for="slide-3") 3 + label.nav-item.text-hide.c-hand(for="slide-4") 4 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="carousel"> + <!-- carousel locator --> + <input class="carousel-locator" id="slide-1" type="radio" name="carousel-radio" hidden="" checked=""> + <input class="carousel-locator" id="slide-2" type="radio" name="carousel-radio" hidden=""> + <input class="carousel-locator" id="slide-3" type="radio" name="carousel-radio" hidden=""> + <input class="carousel-locator" id="slide-4" type="radio" name="carousel-radio" hidden=""> + + <!-- carousel container --> + <div class="carousel-container"> + <!-- carousel item --> + <figure class="carousel-item"> + <label class="item-prev btn btn-action btn-lg" for="slide-4"><i class="icon icon-arrow-left"></i></label> + <label class="item-next btn btn-action btn-lg" for="slide-2"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper"> + </figure> + <figure class="carousel-item"> + <label class="item-prev btn btn-action btn-lg" for="slide-1"><i class="icon icon-arrow-left"></i></label> + <label class="item-next btn btn-action btn-lg" for="slide-3"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper"> + </figure> + <figure class="carousel-item"> + <label class="item-prev btn btn-action btn-lg" for="slide-2"><i class="icon icon-arrow-left"></i></label> + <label class="item-next btn btn-action btn-lg" for="slide-4"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-el-capitan.jpg" alt="macOS Yosemite Wallpaper"> + </figure> + <figure class="carousel-item"> + <label class="item-prev btn btn-action btn-lg" for="slide-3"><i class="icon icon-arrow-left"></i></label> + <label class="item-next btn btn-action btn-lg" for="slide-1"><i class="icon icon-arrow-right"></i></label><img class="img-responsive rounded" src="img/osx-el-capitan-2.jpg" alt="macOS Yosemite Wallpaper"> + </figure> + </div> + <!-- carousel navigation --> + <div class="carousel-nav"> + <label class="nav-item text-hide c-hand" for="slide-1">1</label> + <label class="nav-item text-hide c-hand" for="slide-2">2</label> + <label class="nav-item text-hide c-hand" for="slide-3">3</label> + <label class="nav-item text-hide c-hand" for="slide-4">4</label> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/comparison.pug b/docs/src/experimentals/comparison.pug new file mode 100644 index 0000000..cdf135c --- /dev/null +++ b/docs/src/experimentals/comparison.pug @@ -0,0 +1,45 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'comparison' + - var parent = 'experimentals' + - var title = 'Comparison sliders - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('comparison', 'Comparison sliders') + include ../_layout/_ad-g.pug + + p + | Comparison Sliders are sliders for comparing two images. It is built in pure CSS. + + .docs-demo.columns + .column.col-12 + .comparison-slider + figure.comparison-before + img.rounded(src="../img/macos-sierra-2.jpg" alt="macOS Sierra Wallpaper") + .comparison-label Before + figure.comparison-after + img.filter-grayscale.rounded(src="../img/macos-sierra-2.jpg" alt="macOS Sierra Wallpaper") + .comparison-label After + textarea.comparison-resizer(readonly="") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="comparison-slider"> + <figure class="comparison-before"> + <!-- image (before) --> + <div class="comparison-label">Before</div> + </figure> + + <figure class="comparison-after"> + <!-- image (after) --> + <div class="comparison-label">After</div> + <textarea class="comparison-resizer" readonly></textarea> + </figure> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/filters.pug b/docs/src/experimentals/filters.pug new file mode 100644 index 0000000..d31c6f7 --- /dev/null +++ b/docs/src/experimentals/filters.pug @@ -0,0 +1,123 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'filters' + - var parent = 'experimentals' + - var title = 'Filters - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('filters', 'Filters') + include ../_layout/_ad-g.pug + + p Filters are CSS only content filters. + + .docs-demo.columns + .column.col-12 + .filter + input#tag-0.filter-tag(type="radio" name="filter-radio" hidden="" checked="") + input#tag-1.filter-tag(type="radio" name="filter-radio" hidden="") + input#tag-2.filter-tag(type="radio" name="filter-radio" hidden="") + input#tag-3.filter-tag(type="radio" name="filter-radio" hidden="") + input#tag-4.filter-tag(type="radio" name="filter-radio" hidden="") + .filter-nav + label.chip(for="tag-0") All + label.chip(for="tag-1") Action + label.chip(for="tag-2") Roleplaying + label.chip(for="tag-3") Shooter + label.chip(for="tag-4") Sports + .filter-body.columns + .column.col-4.filter-item(data-tag="tag-2") + .card + .card-header + .card-title Fallout 4 + .card-subtitle Roleplaying + .column.col-4.filter-item(data-tag="tag-3") + .card + .card-header + .card-title Halo 5 + .card-subtitle Shooter + .column.col-4.filter-item(data-tag="tag-1") + .card + .card-header + .card-title Quantum Break + .card-subtitle Action + .column.col-4.filter-item(data-tag="tag-4") + .card + .card-header + .card-title Forza Horizon 3 + .card-subtitle Sports + .column.col-4.filter-item(data-tag="tag-2") + .card + .card-header + .card-title Final Fantasy XV + .card-subtitle Roleplaying + .column.col-4.filter-item(data-tag="tag-4") + .card + .card-header + .card-title NBA 2K17 + .card-subtitle Sports + .column.col-4.filter-item(data-tag="tag-3") + .card + .card-header + .card-title Battlefield 1 + .card-subtitle Shooter + .column.col-4.filter-item(data-tag="tag-1") + .card + .card-header + .card-title GTA V + .card-subtitle Action + .column.col-4.filter-item(data-tag="tag-4") + .card + .card-header + .card-title FIFA 17 + .card-subtitle Sports + .column.col-4.filter-item(data-tag="tag-3") + .card + .card-header + .card-title Overwatch + .card-subtitle Shooter + .column.col-4.filter-item(data-tag="tag-3") + .card + .card-header + .card-title Titanfall 2 + .card-subtitle Shooter + .column.col-4.filter-item(data-tag="tag-3") + .card + .card-header + .card-title Gears of Wars 4 + .card-subtitle Shooter + + p + | Filters use #[code tag-1] to #[code tag-8] to flag different tags. + | #[code tag-0] is reserved for clearing filter (or showing all). + | You can overwrite #[code $filter-number] in #[code _filters.scss] to have more filters. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="filter"> + <input type="radio" id="tag-0" class="filter-tag" name="filter-radio" hidden checked> + <input type="radio" id="tag-1" class="filter-tag" name="filter-radio" hidden> + <input type="radio" id="tag-2" class="filter-tag" name="filter-radio" hidden> + + <div class="filter-nav"> + <label class="chip" for="tag-0">All</label> + <label class="chip" for="tag-1">Action</label> + <label class="chip" for="tag-2">Roleplaying</label> + </div> + + <div class="filter-body"> + <div class="filter-item card" data-tag="tag-1"> + <!-- Filter item content --> + </div> + <div class="filter-item card" data-tag="tag-2"> + <!-- Filter item content --> + </div> + <!-- Filter items --> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/meters.pug b/docs/src/experimentals/meters.pug new file mode 100644 index 0000000..5ac11b5 --- /dev/null +++ b/docs/src/experimentals/meters.pug @@ -0,0 +1,38 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'meters' + - var parent = 'experimentals' + - var title = 'Meters - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('meters', 'Meters') + include ../_layout/_ad-g.pug + + p Meters represent the value within the known range. + + .docs-demo.columns + .column.col-3.col-xs-12 + meter.meter(value="20" min="0" max="100") + .column.col-3.col-xs-12 + meter.meter(value="60" min="0" low="30" optimum="60" high="80" max="100") + .column.col-3.col-xs-12 + meter.meter(value="85" min="0" low="30" high="80" max="100") + .column.col-3.col-xs-12 + meter.meter(value="20" min="0" low="30" optimum="90" high="80" max="100") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- Meter is green when low < value < high --> + <meter class="meter" value="20" min="0" max="100"></meter> + <meter class="meter" value="60" min="0" max="100" low="30" high="80"></meter> + <!-- Meter is yellow when value < low or high < value --> + <meter class="meter" value="85" min="0" max="100" low="30" high="80"></meter> + <!-- Meter is red when value < low < high < optimum or optimum < low < high < value --> + <meter class="meter" value="20" optimum="90" min="0" max="100" low="30" high="80"></meter> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/off-canvas.pug b/docs/src/experimentals/off-canvas.pug new file mode 100644 index 0000000..51fe9d0 --- /dev/null +++ b/docs/src/experimentals/off-canvas.pug @@ -0,0 +1,61 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'off-canvas' + - var parent = 'experimentals' + - var title = 'Off-canvas - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('off-canvas', 'Off-canvas') + include ../_layout/_ad-g.pug + + p + | The Off-canvas is a navigation layout that the sidebar can slide in and out of the viewport. It is built in pure CSS. + p + | By default, the off-canvas menu is collapsed whenever the window width is. + | But you can add the #[code off-canvas-sidebar-show] class to the #[code off-canvas] to make the sidebar expanded when the window width is larger than or equal to #[strong 960px]. + + .docs-demo.columns + .column + .off-canvas.off-canvas-sidebar-show + a.off-canvas-toggle.btn.btn-primary.btn-action(href="#sidebar-demo") + i.icon.icon-menu + #sidebar-demo.off-canvas-sidebar.flex-centered + span Sidebar + a.off-canvas-overlay(href="#close") + .off-canvas-content + .content + h4 Lorem ipsum + p + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat. + p + | Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs. + + p + | You can open the sidebar by adding the class #[code active] to #[code off-canvas-sidebar]. + | And remove the #[code active] to close it. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="off-canvas"> + <!-- off-screen toggle button --> + <a class="off-canvas-toggle btn btn-primary btn-action" href="#sidebar-id"> + <i class="icon icon-menu"></i> + </a> + + <div id="sidebar-id" class="off-canvas-sidebar"> + <!-- off-screen sidebar --> + </div> + + <a class="off-canvas-overlay" href="#close"></a> + + <div class="off-canvas-content"> + <!-- off-screen content --> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/parallax.pug b/docs/src/experimentals/parallax.pug new file mode 100644 index 0000000..df84a5f --- /dev/null +++ b/docs/src/experimentals/parallax.pug @@ -0,0 +1,50 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'parallax' + - var parent = 'experimentals' + - var title = 'Parallax - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('parallax', 'Parallax') + include ../_layout/_ad-g.pug + + p + | The Parallax acts like Apple TV/tvOS hover parallax effect. It is built in pure CSS. + + .docs-demo.columns + .column.col-sm-12.col-8.col-mx-auto + .parallax + .parallax-top-left(tabindex="1") + .parallax-top-right(tabindex="2") + .parallax-bottom-left(tabindex="3") + .parallax-bottom-right(tabindex="4") + .parallax-content + .parallax-front + h2 tvOS parallax demo + .parallax-back + img.img-responsive.rounded(src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="parallax"> + <div class="parallax-top-left" tabindex="1"></div> + <div class="parallax-top-right" tabindex="2"></div> + <div class="parallax-bottom-left" tabindex="3"></div> + <div class="parallax-bottom-right" tabindex="4"></div> + <div class="parallax-content"> + <div class="parallax-front"> + <h2>tvOS parallax demo</h2> + </div> + <div class="parallax-back"> + <img src="img/osx-el-capitan.jpg" class="img-responsive rounded" ...> + </div> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug +
\ No newline at end of file diff --git a/docs/src/experimentals/progress.pug b/docs/src/experimentals/progress.pug new file mode 100644 index 0000000..585b731 --- /dev/null +++ b/docs/src/experimentals/progress.pug @@ -0,0 +1,33 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'progress' + - var parent = 'experimentals' + - var title = 'Progress - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('progress', 'Progress') + include ../_layout/_ad-g.pug + + p The Progress indicates the progress completion of a task. + + .docs-demo.columns + .column.col-3.col-xs-12 + progress.progress(value="75" max="100") + .column.col-3.col-xs-12 + progress.progress(value="50" max="100") + .column.col-3.col-xs-12 + progress.progress(value="25" max="100") + .column.col-3.col-xs-12 + progress.progress(max="100") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <progress class="progress" value="25" max="100"></progress> + <progress class="progress" max="100"></progress> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/sliders.pug b/docs/src/experimentals/sliders.pug new file mode 100644 index 0000000..c15d270 --- /dev/null +++ b/docs/src/experimentals/sliders.pug @@ -0,0 +1,34 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'sliders' + - var parent = 'experimentals' + - var title = 'Sliders - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('sliders', 'Sliders') + include ../_layout/_ad-g.pug + + p Sliders are for selecting values from ranges. + p + | You can add the class #[code tooltip] to have tooltip labels. + | If no #[code data-tooltip] is set, the #[code value] will be used instead. + + .docs-demo.columns + .column.col-6.col-xs-12 + input.slider.tooltip(type="range" min="0" max="100" value="50" oninput="this.setAttribute('value', this.value);") + .column.col-6.col-xs-12 + input.slider(type="range" min="0" max="100" value="50" disabled="") + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- Sliders --> + <input class="slider" type="range" min="0" max="100" value="50"> + <!-- Sliders with tooltips --> + <input class="slider tooltip" type="range" min="0" max="100" value="50" oninput="this.setAttribute('value', this.value);"> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/experimentals/timelines.pug b/docs/src/experimentals/timelines.pug new file mode 100644 index 0000000..1a9165e --- /dev/null +++ b/docs/src/experimentals/timelines.pug @@ -0,0 +1,97 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'timelines' + - var parent = 'experimentals' + - var title = 'Timelines - Experimentals - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('timelines', 'Timelines') + include ../_layout/_ad-g.pug + + p Timelines are ordered sequences of activities. + + .docs-demo.columns + .column.col-9.col-sm-12 + .timeline + #timeline-example-1.timeline-item + .timeline-left + a.timeline-icon.tooltip(href="#timeline-example-1" data-tooltip="March 2016") + .timeline-content + .tile + .tile-content + p.tile-subtitle March 2016 + p.tile-title Initial commit + #timeline-example-2.timeline-item + .timeline-left + a.timeline-icon.icon-lg.tooltip(href="#timeline-example-2" data-tooltip="February 2017") + i.icon.icon-check + .timeline-content + .tile + .tile-content + p.tile-subtitle February 2017 + p.tile-title New Documents experience + p.tile-title + a(href="components.html#bars") Bars + | : represent the progress of a task + p.tile-title + a(href="components.html#steps") Steps + | : progress indicators of a sequence of task steps + p.tile-title + a(href="components.html#tiles") Tiles + | : repeatable or embeddable information blocks + .tile-action + button.btn View + #timeline-example-3.timeline-item + .timeline-left + a.timeline-icon.icon-lg.tooltip(href="#timeline-example-3" data-tooltip="March 2017") + i.icon.icon-check + .timeline-content + .tile + .tile-content + p.tile-subtitle March 2017 + p.tile-title + a(href="elements.html#icons") Icons + | : single-element, responsive and pure CSS icons + p.tile-title + a(href="components.html#popovers") Popovers + | : small overlay content containers + p.tile-title + a(href="experimentals.html#calendars") Calendars + | : date or date range picker and events display + p.tile-title + a(href="experimentals.html#carousels") Carousels + | : slideshows for cycling images + .tile-action + button.btn View + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="timeline"> + <div class="timeline-item" id="timeline-example-1"> + <div class="timeline-left"> + <a class="timeline-icon" href="#timeline-example-1"></a> + </div> + <div class="timeline-content"> + <!-- tiles structure --> + </div> + </div> + + <div class="timeline-item" id="timeline-example-2"> + <div class="timeline-left"> + <a class="timeline-icon icon-lg" href="#timeline-example-2"> + <i class="icon icon-check"></i> + </a> + </div> + <div class="timeline-content"> + <!-- tiles structure --> + </div> + </div> + ... + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/getting-started.pug b/docs/src/getting-started.pug index b766ba6..21d93c1 100644 --- a/docs/src/getting-started.pug +++ b/docs/src/getting-started.pug @@ -1,36 +1,65 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables + - var slug = 'getting-started' + - var parent = 'getting-started' - var title = 'Getting started - Spectre.css CSS Framework' - - var description = '' - - var current = 'getting-started' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Introduction - +docs-heading('introduction', 'Introduction') - include contents/introduction.pug - - //- Installation - +docs-heading('installation', 'Installation') - include contents/_ad-g.pug - include contents/installation.pug + +docs-heading('getting-started', 'Getting started') + include _layout/_ad-g.pug - //- Custom - +docs-heading('custom', 'Custom version') - include contents/_ad-c.pug - include contents/custom.pug + p + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p + | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. - //- Accessibility - +docs-heading('accessibility', 'Accessibility') - - //- Browser support - +docs-heading('browsers', 'Browser support') - include contents/browsers.pug + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Installation + .card-body + | How to install and use Spectre.css + .card-footer + a.btn.btn-primary(href="getting-started/installation.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Custom version + .card-body + | Customize your version of Spectre.css + .card-footer + a.btn.btn-primary(href="getting-started/custom.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Browser support + .card-body + | Browser compatibility and support + .card-footer + a.btn.btn-primary(href="getting-started/browsers.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 What's new + .card-body + | Changelog and release notes + .card-footer + a.btn.btn-primary(href="getting-started/whatsnew.html") View - //- What's new - +docs-heading('whatsnew', 'What\'s new') - include contents/whatsnew.pug - - include _footer.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Accessibility + .card-body + | Coming soon -
\ No newline at end of file + include _layout/_ad-c.pug + + include _layout/_footer.pug diff --git a/docs/src/getting-started/browsers.pug b/docs/src/getting-started/browsers.pug new file mode 100644 index 0000000..91f0e65 --- /dev/null +++ b/docs/src/getting-started/browsers.pug @@ -0,0 +1,41 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'browsers' + - var parent = 'getting-started' + - var title = 'Browsers - Getting started - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('browsers', 'Browser support') + include ../_layout/_ad-g.pug + + p + | Spectre uses + a(href='https://github.com/postcss/autoprefixer', target='_blank') Autoprefixer + | to make most styles compatible with earlier browsers and + a(href='https://necolas.github.io/normalize.css/', target='_blank') Normalize.css + | for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended: + ul + li + | Chrome + small.label.label-success LAST 4 + li + | Microsoft Edge + small.label.label-success LAST 4 + li + | Firefox + small.label.label-success.text-uppercase Extended Support Release + li + | Safari + small.label.label-success LAST 4 + li + | Opera + small.label.label-success LAST 4 + li Internet Explorer 10+ + p + | Spectre supports Internet Explorer 10+, but some HTML5 and CSS3 features are not perfectly supported by Internet Explorer. + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/getting-started/custom.pug b/docs/src/getting-started/custom.pug new file mode 100644 index 0000000..2bd89ee --- /dev/null +++ b/docs/src/getting-started/custom.pug @@ -0,0 +1,303 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'custom' + - var parent = 'getting-started' + - var title = 'Custom - Getting started - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('custom', 'Custom version') + include ../_layout/_ad-g.pug + + p + | You can customize your version of Spectre.css by editing Sass files in + code /src + | directory or removing unneeded components from + code .scss + | source files. + p + a.btn.btn-primary(href='https://github.com/picturepan2/spectre/', target='_blank') Sass Source Code + p + | If you are looking for Less version of Spectre.css, please switch to + code Less + | branch. + p + a.btn(href='https://github.com/picturepan2/spectre/tree/less', target='_blank') Less Branch + + +docs-subheading('compiling', 'Compiling CSS') + + p + | Spectre uses + a(href='http://gulpjs.com/', target='_blank') Gulp + | for compiling CSS. Firstly you need to + a(href='https://www.npmjs.com/get-npm', target='_blank') install NPM + | , which is used to manage Gulp and other dependencies. + p Then, you can build the CSS file from the command line: + ol + li Navigate to the root directory of Spectre. + li + | Run + code npm install + | . NPM will install all dev dependencies as listed in package.json. + li + | When completed, run + code gulp build + | task to compile Sass to CSS and minify files. + li + | You can find compiled CSS files in + code /dist + | directory. + p All available Gulp tasks: + ul + li + code gulp build + | - compile Sass to CSS and minify files (default) + li + code gulp docs + | - compile Docs related files + li + code gulp watch + | - watch file changes and re-compile CSS files + + +docs-subheading('importing', 'Importing Sass') + p + | It is recommended to customize Spectre by importing Sass source files to your projects. In this way, you can keep Spectre up to date without conflicts, since Spectre code and your custom code are separate. + ul + li + | First, create your own project and install Spectre via + a(href='#installation') NPM or other package managers + | . + li + | Then create your + code project-name.scss + | file in the root folder. You can use + code project-name.scss + | to define your variables. + li Compile the Sass file to CSS to get the custom version of Spectre. + + //- importing + pre.code(data-lang='Sass') + code + :highlight(lang="scss") + // Example of project-name.scss + // Define variables to override default ones + $primary-color: #2e5bec; + $dark-color: #3e396b; + + // Import full Spectre source code + @import "node_modules/spectre.css/src/spectre"; + + p + | Alternatively, you can create custom + code _variables.scss + | and import it to + code project-name.scss + | . + + //- custom variables + pre.code(data-lang='Sass') + code + :highlight(lang="scss") + // Example of project-name.scss + @import "variables"; + + // Import only the needed components + @import "node_modules/spectre.css/src/buttons"; + @import "node_modules/spectre.css/src/forms"; + + +docs-subheading('folders', 'Folder structure') + + //- folder structure + pre.code + code + :highlight + spectre/ + ├── dist/ // Build folder + │ ├── spectre-exp.css + │ ├── spectre-exp.min.css + │ ├── spectre-icons.css + │ ├── spectre-icons.min.css + │ ├── spectre.css + │ └── spectre.min.css + │ + ├── docs/ + │ ├── dist/ // Pre-built CSS folder + │ │ ├── spectre-exp.css + │ │ ├── spectre-exp.min.css + │ │ ├── spectre-icons.css + │ │ ├── spectre-icons.min.css + │ │ ├── spectre.css + │ │ └── spectre.min.css + | ├── css/ // Docs CSS files + │ │ └── docs.css + | ├── src/ + │ │ ├── scss // Docs Sass files + │ │ │ └── docs.scss + │ │ ├── index.pug // Docs Pug files + │ │ └── ... + │ ├── examples/ // Example tempalte + │ │ └── starter.html + │ ├── ../ + │ ├── index.html + │ └── ... + │ + ├── src/ // Source Sass files + │ ├── spectre.scss + │ ├── spectre-icons.scss + │ ├── spectre-exp.scss + │ ├── _mixins.scss + │ ├── _variables.scss + │ └── ... + │ + ├── gulpfile.js + ├── package.json + └── ... + + +docs-subheading('variables', 'Variables') + + p + | Spectre.css is designed with consistent design language. You can use your own variables to create your new or match existing design. All variables in + code _variables.scss + | include + code !default + | flag. You can redefine the variables to override the values. + + +docs-subheading('variables-colors', 'Variables - Colors') + + .columns + .column.col-3.col-md-6 + .docs-color(style='background:#5755d9;color:#fff;') + .color-title #5755d9 + .color-subtitle Primary + .column.col-3.col-md-6 + .docs-color(style='background:#f1f1fc;color:#5755d9;') + .color-title #f1f1fc + .color-subtitle Secondary + .columns + .column.col-3.col-md-6 + .docs-color(style='background:#32b643;color:#fff;') + .color-title #32b643 + .color-subtitle Success + .column.col-3.col-md-6 + .docs-color(style='background:#ffb700;color:#fff;') + .color-title #ffb700 + .color-subtitle Warning + .column.col-3.col-md-6 + .docs-color(style='background:#e85600;color:#fff;') + .color-title #e85600 + .color-subtitle Error + .columns + .column.col-3.col-md-6 + .docs-color(style='background:#303742;color:#fff;') + .color-title #303742 + .color-subtitle Dark + .column.col-3.col-md-6 + .docs-color(style='background:#66758c;color:#fff;') + .color-title #66758c + .color-subtitle Gray dark + .column.col-3.col-md-6 + .docs-color(style='background:#bcc3ce;color:#303742;') + .color-title #bcc3ce + .color-subtitle Gray + .column.col-3.col-md-6 + .docs-color(style='background:#f7f8f9;color:#303742;') + .color-title #f7f8f9 + .color-subtitle Gray light + .column.col-3.col-md-6 + .docs-color(style='background:#bcc3ce;color:#303742;') + .color-title #bcc3ce + .color-subtitle Border + .column.col-3.col-md-6 + .docs-color(style='background:#f7f8f9;color:#303742;') + .color-title #f7f8f9 + .color-subtitle Background + .column.col-3.col-md-6 + .docs-color(style='background:#fff;color:#303742;') + .color-title #fff + .color-subtitle Light + + +docs-subheading('variables-buttons', 'Variables - Button mixins') + + p + | There are 2 button variant mixins in + code _mixins.scss + | to generate different color variants. + ul + li + | @mixin button-variant( + code $color + | : $primary-color); + li + | @mixin button-outline-variant( + code $color + | : $primary-color); + + //- button mixins + pre.code(data-lang='Sass') + code + :highlight(lang="scss") + <!-- filled button with the success color --> + .btn-success { + @include button-variant($success-color); + } + + <!-- outlined button with the success color --> + .btn-outline-success { + @include button-outline-variant($success-color); + } + + +docs-subheading('variables-sizes', 'Variables - Sizes') + + p + | The default REM (root em) size in Spectre.css is + code 20px + | . + p + | Please note in the Chinese/Japanese/Korean version, Chrome uses 12px as default minimum font size. That is why Spectre sets rem default html font size to + code 20px + | , which is relatively easy to calculate. + p + | Spectre uses + code 4px + | as the unit size. Sizes of components are based on the unit size. + + +docs-subheading('variables-custom-prefix', 'Variables - Custom prefix') + p + | There is also a way to add custom prefix to all CSS classes. You can use + a(href='https://www.npmjs.com/package/gulp-css-prefix', target='_blank') gulp-css-prefix + | plugin and add a new Gulp task to enable it. + + //- custom prefix + pre.code(data-lang='Bash') + code + :highlight(lang="Bash") + npm install gulp-css-prefix + + p + | To add + code spectre- + | to all classes, you can add the Gulp task to + code gulpfile.js + | file. + + //- custom prefix + pre.code + code + :highlight(lang="JavaScript") + var cssPrefix = require('gulp-css-prefix'); + + gulp.task('prefix', function() { + gulp.src('./dist/*.css') + .pipe(cssPrefix('spectre-')) + .pipe(gulp.dest('./dist')) + }); + + p + | After you compile your version of Spectre in the /dist, run + code gulp prefix + | in the directory of Spectre. + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/getting-started/installation.pug b/docs/src/getting-started/installation.pug new file mode 100644 index 0000000..387e7bf --- /dev/null +++ b/docs/src/getting-started/installation.pug @@ -0,0 +1,84 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'installation' + - var parent = 'getting-started' + - var title = 'Installation - Getting started - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('installation', 'Installation') + include ../_layout/_ad-g.pug + + p + | There are 5 ways to get started with Spectre CSS framework in your projects. You can either install manually, from CDN or use package managers. + + +docs-subheading('install-manually', 'Install manually') + p + | Download the compiled and minified + a(href='https://github.com/picturepan2/spectre/releases', target='_blank') Spectre CSS file + | (core ~10KB min+gzip): + p + a.btn.btn-primary(href='https://github.com/picturepan2/spectre/releases', target='_blank') Download Spectre.css + p + | Include + code spectre.css + | located in + strong /dist + | in your website or Web app <head>. Also, you can add + code spectre-icons.css + | and + code spectre-exp.css + | accordingly. + + //- install manually + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <link rel="stylesheet" href="spectre.min.css"> + <link rel="stylesheet" href="spectre-exp.min.css"> + <link rel="stylesheet" href="spectre-icons.min.css"> + + +docs-subheading('install-cdn', 'Install from CDN') + p + | Alternatively, you can use the + a(href='https://unpkg.com/', target='_blank') unpkg + | or + a(href='https://cdnjs.com/libraries/spectre.css', target='_blank') cdnjs + | CDN to load compiled Spectre.css. + + //- install from CDN + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css"> + <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-exp.min.css"> + <link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-icons.min.css"> + + +docs-subheading('install-npm', 'Install with NPM') + + //- install with npm + pre.code.c-select-all(data-lang='Bash') + code + :highlight(lang="Bash") + npm install spectre.css --save + + +docs-subheading('install-yarn', 'Install with Yarn') + + //- install with yarn + pre.code.c-select-all(data-lang='Bash') + code + :highlight(lang="bash") + yarn add spectre.css + + +docs-subheading('install-bower', 'Install from Bower') + + //- install with bower + pre.code.c-select-all(data-lang='Bash') + code + :highlight(lang="bash") + bower install spectre.css --save + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/getting-started/whatsnew.pug b/docs/src/getting-started/whatsnew.pug new file mode 100644 index 0000000..4354e98 --- /dev/null +++ b/docs/src/getting-started/whatsnew.pug @@ -0,0 +1,20 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'whatsnew' + - var parent = 'getting-started' + - var title = 'What\'s New - Getting started - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('whatsnew', 'What\'s new') + include ../_layout/_ad-g.pug + + include:markdown-it ../../../changelog.md + + p + a.btn.btn-primary(href='https://github.com/picturepan2/spectre/releases', target='_blank') Releases + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/index.pug b/docs/src/index.pug index 58de518..e819cf1 100644 --- a/docs/src/index.pug +++ b/docs/src/index.pug @@ -1,4 +1,10 @@ -extends _layout.pug +extends _layout/_layout.pug + +block variables + - var slug = 'index' + - var parent = 'index' + - var title = 'Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block content .section.section-hero.bg-gray @@ -7,7 +13,7 @@ block content a.docs-logo(href='index.html') img(src='img/spectre-logo.svg' alt='Spectre.css CSS Framework') h2 SPECTRE - h1 Spectre.css + h1 SPECTRE.CSS h2 | A #[u Lightweight], #[u Responsive] and #[u Modern] CSS Framework p @@ -37,7 +43,7 @@ block content | Elegantly designed and developed elements and components .section.section-ads.bg-gray - include contents/_ad-g.pug + include _layout/_ad-g.pug .section.section-features.bg-primary.text-light.text-center .container.grid-lg @@ -45,9 +51,12 @@ block content .columns .column.col-10.col-sm-12.col-mx-auto.text-left p.text-secondary + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p.text-secondary | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. .column.col-10.col-sm-12.col-mx-auto - a.btn.btn-lg(href='getting-started.html#installation') Install Spectre.css + a.btn.btn-lg(href='getting-started/installation.html') Install SPECTRE.CSS .section.section-updates.bg-gray .container.grid-lg @@ -79,7 +88,7 @@ block content .card-footer a.btn.btn-primary(href='getting-started.html') Explore .section.section-ads.bg-gray - include contents/_ad-c.pug + include _layout/_ad-c.pug footer.section.section-footer - include _footer.pug
\ No newline at end of file + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/layout.pug b/docs/src/layout.pug index 5aa8bc5..582a98b 100644 --- a/docs/src/layout.pug +++ b/docs/src/layout.pug @@ -1,23 +1,49 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables + - var slug = 'layout' + - var parent = 'layout' - var title = 'Layout - Spectre.css CSS Framework' - - var description = '' - - var current = 'layout' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Flexbox grid - +docs-heading('grid', 'Flexbox grid') - include contents/_ad-g.pug - include contents/grid.pug - - //- Responsive - +docs-heading('responsive', 'Responsive') - include contents/_ad-c.pug - include contents/responsive.pug + +docs-heading('layout', 'Layout') + include _layout/_ad-g.pug - //- Navbar - +docs-heading('navbar', 'Navbar') - include contents/navbar.pug + p + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p + | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. - include _footer.pug
\ No newline at end of file + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Flexbox grid + .card-body + | Flexbox based responsive grid system with 12 columns + .card-footer + a.btn.btn-primary(href="layout/grid.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Responsive + .card-body + | Responsive layout grid system and responsive visibility utilities + .card-footer + a.btn.btn-primary(href="layout/responsive.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Navbar + .card-body + | Layout container that appears in the header of apps and websites + .card-footer + a.btn.btn-primary(href="layout/navbar.html") View + + include _layout/_ad-c.pug + + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/layout/grid.pug b/docs/src/layout/grid.pug new file mode 100644 index 0000000..f9725a4 --- /dev/null +++ b/docs/src/layout/grid.pug @@ -0,0 +1,187 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'grid' + - var parent = 'layout' + - var title = 'Flexbox grid - Layout - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('grid', 'Flexbox grid') + include ../_layout/_ad-g.pug + + p + | Layout includes flexbox based responsive grid system with 12 columns. + + .docs-demo.columns + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .column + .bg-primary.text-secondary.docs-block + .columns + .column.col-12 + .bg-gray.docs-block col-12 (100%) + .columns + .column.col-9 + .bg-gray.docs-block col-9 (75%) + .columns + .column.col-6 + .bg-gray.docs-block col-6 (50%) + .columns + .column.col-3 + .bg-gray.docs-block col-3 (25%) + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- flexbox grid example --> + <div class="container"> + <div class="columns"> + <div class="column col-6">col-6</div> + <div class="column col-3">col-3</div> + <div class="column col-2">col-2</div> + <div class="column col-1">col-1</div> + </div> + </div> + + p + | Add the #[code columns] class to a container with the #[code container] class. + | And add any element you want with the #[code column] class inside the container. These columns will take up the space equally. + | You can specific the width of each column by adding class #[code col-<1-12>]. + p + | And you can add the #[code col-gapless] class to the #[code columns] to have gapless columns. + + .docs-demo.columns.col-gapless + .column.col-6 + .bg-gray.docs-block col-6 (gapless) + .column.col-6 + .bg-gray.docs-block col-6 (gapless) + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- gapless columns --> + <div class="columns col-gapless"> + <div class="column col-6">col-6</div> + <div class="column col-6">col-6</div> + </div> + + p + | By default, Spectre grid has multi-line flexbox enabled. You can add the #[code col-oneline] class to #[code columns] to make all its child columns positioned in the same single row. + + .docs-demo.columns.col-oneline + .column.col-8 + .bg-gray.docs-block col-8 + .column.col-8 + .bg-gray.docs-block col-8 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- one line columns --> + <div class="columns col-oneline"> + <div class="column col-8">col-8</div> + <div class="column col-8">col-8</div> + </div> + + +docs-subheading('grid-offset', 'Grid offset') + + p + | The Flexbox grid provides margin auto utilities to set offset. + | There are #[code col-mx-auto], #[code col-ml-auto] and #[code col-mr-auto] to set margins between columns without using empty columns. + + .columns + .column.col-2 + .bg-gray.docs-block col-2 + .column.col-4.col-mx-auto + .bg-gray.docs-block col-4 col-mx-auto + .columns + .column.col-2 + .bg-gray.docs-block col-2 + .column.col-4.col-ml-auto + .bg-gray.docs-block col-4 col-ml-auto + .columns + .column.col-4.col-ml-auto + .bg-gray.docs-block col-4 col-ml-auto + .column.col-2 + .bg-gray.docs-block col-2 + .columns + .column.col-4.col-mx-auto + .bg-gray.docs-block col-4 col-mx-auto + .column.col-2 + .bg-gray.docs-block col-2 + .columns + .column.col-4.col-mr-auto + .bg-gray.docs-block col-4 col-mr-auto + .column.col-2 + .bg-gray.docs-block col-2 + .columns + .column.col-4.col-mx-auto + .bg-gray.docs-block col-4 col-mx-auto + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- grid offset example --> + <div class="container"> + <div class="columns"> + <div class="column col-4 col-mr-auto">col-4 col-mr-auto</div> + <div class="column col-2">col-2</div> + </div> + </div> + + +docs-subheading('grid-nesting', 'Grid nesting') + + p + | To nest grids, add the new #[code columns] and #[code column] structure within an existing column. + + .docs-demo.columns + .column.col-6 + .bg-gray.docs-block col-6 + .columns + .column.col-6 + .bg-primary.docs-block col-6 + .column.col-6 + .bg-primary.docs-block col-6 + .column.col-6 + .bg-gray.docs-block col-6 + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- grid nesting example --> + <div class="container"> + <div class="columns"> + <div class="column col-6">col-6 + <div class="columns"> + <div class="column col-6">col-6</div> + <div class="column col-6">col-6</div> + </div> + </div> + <div class="column col-6">col-6</div> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/layout/navbar.pug b/docs/src/layout/navbar.pug new file mode 100644 index 0000000..45417aa --- /dev/null +++ b/docs/src/layout/navbar.pug @@ -0,0 +1,82 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'navbar' + - var parent = 'layout' + - var title = 'Navbar - Layout - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('navbar', 'Navbar') + include ../_layout/_ad-g.pug + + p Navbar is a layout container that appears in the header of apps and websites. + + .docs-demo.columns + .column + .navbar + .navbar-section + a.navbar-brand.text-bold.mr-2(href="#navbar") SPECTRE.CSS + a.btn.btn-link(href="#navbar") Docs + a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub + .navbar-section + .input-group.input-inline + input.form-input(type="text" placeholder="search") + button.btn.btn-primary.input-group-btn Search + + p + | The navbar component can include logo brand, nav links and buttons, search box or any combination of those elements. + | Each section with the #[code navbar-section] class will be evenly distributed in the container. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <header class="navbar"> + <section class="navbar-section"> + <a href="..." class="navbar-brand mr-2">Spectre.css</a> + <a href="..." class="btn btn-link">Docs</a> + <a href="..." class="btn btn-link">GitHub</a> + </section> + <section class="navbar-section"> + <div class="input-group input-inline"> + <input class="form-input" type="text" placeholder="search"> + <button class="btn btn-primary input-group-btn">Search</button> + </div> + </section> + </header> + + p + | You can use #[code navbar-center] class to have a centered section. + + .docs-demo.columns + .column.col-12 + .navbar + .navbar-section + a.btn.btn-link(href="#navbar") Docs + a.btn.btn-link(href="#navbar") Examples + .navbar-center + img(src="../img/spectre-logo.svg" alt="Spectre.css") + .navbar-section + a.btn.btn-link(href="https://twitter.com/spectrecss") Twitter + a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <header class="navbar"> + <section class="navbar-section"> + <a href="#" class="btn btn-link">Docs</a> + <a href="#" class="btn btn-link">Examples</a> + </section> + <section class="navbar-center"> + <!-- centered logo or brand --> + </section> + <section class="navbar-section"> + <a href="#" class="btn btn-link">Twitter</a> + <a href="#" class="btn btn-link">GitHub</a> + </section> + </header> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/layout/responsive.pug b/docs/src/layout/responsive.pug new file mode 100644 index 0000000..6516b26 --- /dev/null +++ b/docs/src/layout/responsive.pug @@ -0,0 +1,269 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'responsive' + - var parent = 'layout' + - var title = 'Responsive - Layout - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('responsive', 'Responsive') + include ../_layout/_ad-g.pug + + p Spectre provides a neat responsive layout grid system and responsive visibility utilities. + + .docs-demo.columns + .column.col-10.col-lg-8.col-md-6.col-sm-4 + .bg-gray.docs-block + | col-10 + br + | col-lg-8 + br + | col-md-6 + br + | col-sm-4 + .column.col-2.col-lg-4.col-md-6.col-sm-8 + .bg-gray.docs-block + | col-2 + br + | col-lg-4 + br + | col-md-6 + br + | col-sm-8 + + p + | There are #[code col-xs-<1-12>], #[code col-sm-<1-12>], #[code col-md-<1-12>], #[code col-lg-<1-12>] and #[code col-xl-<1-12>] available for flexible grid across mobile, tablet and desktop viewport usage. + + ul + li + | #[code col-xs-<1-12>] apply to window width smaller than or equal to #[strong 480px]. + li + | #[code col-sm-<1-12>] apply to window width smaller than or equal to #[strong 600px]. + li + | #[code col-md-<1-12>] apply to window width smaller than or equal to #[strong 840px]. + li + | #[code col-lg-<1-12>] apply to window width smaller than or equal to #[strong 960px]. + li + | #[code col-xl-<1-12>] apply to window width smaller than or equal to #[strong 1280px]. + li + | #[code col-<1-12>] apply to all window width, including the width wider than #[strong 1280px]. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="container"> + <div class="columns"> + <div class="column col-xs-6">col-xs-6</div> + <div class="column col-xs-3">col-xs-3</div> + <div class="column col-xs-3">col-xs-3</div> + </div> + </div> + + +docs-subheading('responsive-container', 'Responsive container') + + p + | The responsive layout also provides fixed-width containers. + | Use #[code grid-xs](480px), #[code grid-sm](600px), #[code grid-md](840px), #[code grid-lg](960px) or #[code grid-xl](1280px) to the container for a fixed-width container with the specific max-width. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- 100% width container with max-width set to grid-lg (960px) --> + <div class="container grid-lg"> + <div class="columns"> + ... + </div> + </div> + + +docs-subheading('responsive-visibility', 'Responsive visibility') + + p The responsive visibility utilities help show and hide elements on specific viewport sizes. + + .docs-demo.columns + .column.col-12 + table.docs-table.table.table-striped.text-center + thead + tr + th + th size-xs + th size-sm + th size-md + th size-lg + th size-xl + tbody + tr + td.text-left hide-xs + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-sm + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-md + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-lg + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-xl + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + + p + | For hiding elements on specific viewport sizes, there are classes #[code hide-xs], #[code hide-sm], #[code hide-md], #[code hide-lg] and #[code hide-xl] available. + + ul + li + | #[code hide-xs] hides elements when the window width is smaller than or equal to #[strong 480px]. + li + | #[code hide-sm] hides elements when the window width is smaller than or equal to #[strong 600px]. + li + | #[code hide-md] hides elements when the window width is smaller than or equal to #[strong 840px]. + li + | #[code hide-lg] hides elements when the window width is smaller than or equal to #[strong 960px]. + li + | #[code hide-xl] hides elements when the window width is smaller than or equal to #[strong 1280px]. + + .docs-demo.columns + .column.col-12 + table.docs-table.table.table-striped.text-center + thead + tr + th + th size-xs + th size-sm + th size-md + th size-lg + th size-xl + tbody + tr + td.text-left show-xs + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-sm + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-md + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-lg + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-xl + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + + p + | For showing elements on specific viewport sizes, there are classes #[code show-xs], #[code show-sm], #[code show-md], #[code show-lg] and #[code show-xl] available. + + ul + li + | #[code show-xs] shows elements when the window width is smaller than or equal to #[strong 480px]. + li + | #[code show-sm] shows elements when the window width is smaller than or equal to #[strong 600px]. + li + | #[code show-md] shows elements when the window width is smaller than or equal to #[strong 840px]. + li + | #[code show-lg] shows elements when the window width is smaller than or equal to #[strong 960px]. + li + | #[code show-xl] shows elements when the window width is smaller than or equal to #[strong 1280px]. + + p + | Spectre also has a responsive web test tool Responsive Resizer. + | You can clone the + a(href="https://github.com/picturepan2/responsive-resizer" target="_blank") GitHub Repo + | to use it locally or use it online. + p + a.btn.btn-primary(href="https://picturepan2.github.io/responsive-resizer/" target="_blank") Responsive Resizer + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/scss/docs.scss b/docs/src/scss/docs.scss index 7f7c682..d5a33e5 100644 --- a/docs/src/scss/docs.scss +++ b/docs/src/scss/docs.scss @@ -31,10 +31,11 @@ top: 0; z-index: $zindex-1; - .btn { + .btns { position: absolute; right: 1.5rem; top: 1rem; + width: 8rem; } } @@ -222,6 +223,10 @@ } } + .c-select-all { + user-select: all; + } + .panel { height: 75vh; @@ -532,7 +537,7 @@ } .docs-navbar { - .btn { + .btns { right: .9rem; } } diff --git a/docs/src/utilities.pug b/docs/src/utilities.pug index 8af2055..a7ef67e 100644 --- a/docs/src/utilities.pug +++ b/docs/src/utilities.pug @@ -1,43 +1,94 @@ -extends _docs-layout.pug +extends _layout/_docs-layout.pug block variables + - var slug = 'utilities' + - var parent = 'utilities' - var title = 'Utilities - Spectre.css CSS Framework' - - var description = '' - - var current = 'utilities' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' block docs-content - //- Colors - +docs-heading('colors', 'Color utilities') - include contents/_ad-g.pug - include contents/colors.pug - - //- Cursor - +docs-heading('cursors', 'Cursor utilities') - include contents/cursors.pug + +docs-heading('utilities', 'Utilities') + include _layout/_ad-g.pug - //- Display - +docs-heading('display', 'Display utilities') - include contents/_ad-c.pug - include contents/display.pug + p + strong Spectre.css + | is a lightweight, responsive and modern CSS framework for faster and extensible development. + p + | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. - //- Divider - +docs-heading('divider', 'Divider') - include contents/divider.pug - - //- Loading - +docs-heading('loading', 'Loading') - include contents/loading.pug + .docs-demo.columns + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Color utilities + .card-body + | Colors for text, link and background + .card-footer + a.btn.btn-primary(href="utilities/colors.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Cursor utilities + .card-body + | Mouse cursor to display when mouseover + .card-footer + a.btn.btn-primary(href="utilities/cursors.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Display utilities + .card-body + | Display and hidden things + .card-footer + a.btn.btn-primary(href="utilities/display.html") View - //- Position - +docs-heading('position', 'Position utilities') - include contents/position.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Divider + .card-body + | Separating elements + .card-footer + a.btn.btn-primary(href="utilities/divider.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Loading + .card-body + | Indicating loading or updating state + .card-footer + a.btn.btn-primary(href="utilities/loading.html") View - //- Shapes - +docs-heading('shapes', 'Shape utilities') - include contents/shapes.pug - - //- Text - +docs-heading('text', 'Text utilities') - include contents/text.pug + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Position utilities + .card-body + | Useful layout and position things + .card-footer + a.btn.btn-primary(href="utilities/position.html") View + + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Shape utilities + .card-body + | Changing element shapes + .card-footer + a.btn.btn-primary(href="utilities/shapes.html") View - include _footer.pug
\ No newline at end of file + .column.col-6.col-xs-12 + .card + .card-header + .card-title.h5 Text utilities + .card-body + | Text alignment, styles and overflow things + .card-footer + a.btn.btn-primary(href="utilities/text.html") View + + include _layout/_ad-c.pug + + include _layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/colors.pug b/docs/src/utilities/colors.pug new file mode 100644 index 0000000..a5a306c --- /dev/null +++ b/docs/src/utilities/colors.pug @@ -0,0 +1,111 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'colors' + - var parent = 'utilities' + - var title = 'Color utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('colors', 'Color utilities') + include ../_layout/_ad-g.pug + + p Color utilities are used for changing colors for text, link and background. + + +docs-subheading('colors-text', 'Text colors') + + .docs-demo.columns + .column.col-12 + p + span.text-primary primary color + p + span.text-secondary secondary color + p + span.text-dark dark color + p + span.text-gray gray color + p + span.text-light.bg-dark.p-1.rounded light color + p + span.text-success success color + p + span.text-warning warning color + p + span.text-error error color + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <span class="text-primary">primary color</span> + <span class="text-secondary">secondary color</span> + <span class="text-dark">dark color</span> + <span class="text-gray">gray color</span> + <span class="text-light">light color</span> + <span class="text-success">success color</span> + <span class="text-warning">warning color</span> + <span class="text-error">error color</span> + + .docs-demo.columns + .column.col-12 + p + a.text-primary.p-1(href="#colors") primary link + p + a.text-secondary.p-1(href="#colors") secondary link + p + a.text-dark.p-1(href="#colors") dark link + p + a.text-gray.p-1(href="#colors") gray link + p + a.text-light.bg-dark.p-1.rounded(href="#colors") light link + p + a.text-success.p-1(href="#colors") success link + p + a.text-warning.p-1(href="#colors") warning link + p + a.text-error.p-1(href="#colors") error link + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <a class="text-primary" href="#">primary color</a> + <a class="text-secondary" href="#">secondary color</a> + <a class="text-dark" href="#">dark color</a> + <a class="text-gray" href="#">gray color</a> + <a class="text-light" href="#">light color</a> + <a class="text-success" href="#">success color</a> + <a class="text-warning" href="#">warning color</a> + <a class="text-error" href="#">error color</a> + + +docs-subheading('colors-background', 'Background colors') + + .docs-demo.columns + .column.col-12 + p + span.bg-primary.p-1.rounded primary bg + p + span.bg-secondary.text-primary.p-1.rounded secondary bg + p + span.bg-dark.p-1.rounded dark bg + p + span.bg-gray.p-1.rounded gray bg + p + span.bg-success.p-1.rounded success bg + p + span.bg-warning.p-1.rounded warning bg + p + span.bg-error.p-1.rounded error bg + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <div class="bg-primary">primary bg</div> + <div class="bg-secondary">secondary bg</div> + <div class="bg-dark">dark bg</div> + <div class="bg-gray">gray bg</div> + <div class="bg-success">success bg</div> + <div class="bg-warning">warning bg</div> + <div class="bg-error">error bg</div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/cursors.pug b/docs/src/utilities/cursors.pug new file mode 100644 index 0000000..c816795 --- /dev/null +++ b/docs/src/utilities/cursors.pug @@ -0,0 +1,47 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'cursors' + - var parent = 'utilities' + - var title = 'Cursor utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('cursors', 'Cursor utilities') + include ../_layout/_ad-g.pug + + p Cursor utilities specify which mouse cursor to display when mouseover. + + .docs-demo.columns + .column.col-4 + .bg-gray.docs-block.c-hand c-hand + .column.col-4 + .bg-gray.docs-block.c-move c-move + .column.col-4 + .bg-gray.docs-block.c-zoom-in c-zoom-in + .column.col-4 + .bg-gray.docs-block.c-zoom-out c-zoom-out + .column.col-4 + .bg-gray.docs-block.c-not-allowed c-not-allowed + .column.col-4 + .bg-gray.docs-block.c-auto c-auto + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- cursor: hand; --> + <div class="c-hand"></div> + <!-- cursor: move; --> + <div class="c-move"></div> + <!-- cursor: zoom-in; --> + <div class="c-zoom-in"></div> + <!-- cursor: zoom-out; --> + <div class="c-zoom-out"></div> + <!-- cursor: not-allowed; --> + <div class="c-not-allowed"></div> + <!-- cursor: auto; --> + <div class="c-auto"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/display.pug b/docs/src/utilities/display.pug new file mode 100644 index 0000000..d69e514 --- /dev/null +++ b/docs/src/utilities/display.pug @@ -0,0 +1,42 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'display' + - var parent = 'utilities' + - var title = 'Display utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('display', 'Display utilities') + include ../_layout/_ad-g.pug + + p Display utilities are used for display and hidden things. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- display: block; --> + <div class="d-block"></div> + <!-- display: inline; --> + <div class="d-inline"></div> + <!-- display: inline-block; --> + <div class="d-inline-block"></div> + <!-- display: flex; --> + <div class="d-flex"></div> + <!-- display: inline-flex; --> + <div class="d-inline-flex"></div> + <!-- display: none; --> + <div class="d-none"></div> + <div class="d-hide"></div> + <!-- visibility: visible; --> + <div class="d-visible"></div> + <!-- visibility: hidden; --> + <div class="d-invisible"></div> + <!-- hide text contents --> + <div class="text-hide"></div> + <!-- assistive text for screen reader --> + <div class="text-assistive"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/divider.pug b/docs/src/utilities/divider.pug new file mode 100644 index 0000000..be6fea7 --- /dev/null +++ b/docs/src/utilities/divider.pug @@ -0,0 +1,72 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'divider' + - var parent = 'utilities' + - var title = 'Divider - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('divider', 'Divider') + include ../_layout/_ad-g.pug + + p A Divider is used for separating elements. + + .docs-demo.columns + .column + .divider + + .docs-demo.columns + .column + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. + .divider.text-center(data-content="OR") + | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent risus leo, dictum in vehicula sit amet, feugiat tempus tellus. + + .docs-demo.columns + .column + form + .form-group + label.form-label(for="input-example-1") Email + input#input-example-1.form-input(type="text" placeholder="Email") + .form-group + label.form-label(for="input-example-2") Password + input#input-example-2.form-input(type="password" placeholder="Password") + .form-group + label.form-checkbox + input(type="checkbox") + i.form-icon + | Remember me + .form-group + button.btn.btn-primary Sign in + .divider-vert(data-content="OR") + .column + form + .form-group + label.form-label(for="input-example-3") Email + input#input-example-3.form-input(type="text" placeholder="Email") + .form-group + button.btn.btn-primary.btn-block Sign up + button.btn.btn-link.btn-block Learn more + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- divider element --> + <div class="divider"></div> + <!-- divider element with text --> + <div class="divider text-center" data-content="OR"></div> + + <!-- vertical divider element with text --> + <div class="columns"> + <div class="column"> + <!-- column content --> + </div> + <div class="divider-vert" data-content="OR"></div> + <div class="column"> + <!-- column content --> + </div> + </div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/loading.pug b/docs/src/utilities/loading.pug new file mode 100644 index 0000000..f5ddb67 --- /dev/null +++ b/docs/src/utilities/loading.pug @@ -0,0 +1,37 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'loading' + - var parent = 'utilities' + - var title = 'Loading - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('loading', 'Loading') + include ../_layout/_ad-g.pug + + p + | Loading indicator is used for loading or updating. + | You can add the #[code loading] class to a container for loading status. + + .docs-demo.columns + .column.col-12.text-center + .loading + + p + | Add the #[code loading-lg] class for large size. + + .docs-demo.columns + .column.col-12.text-center + .loading.loading-lg + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- loading element --> + <div class="loading"></div> + <div class="loading loading-lg"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/position.pug b/docs/src/utilities/position.pug new file mode 100644 index 0000000..dc0d718 --- /dev/null +++ b/docs/src/utilities/position.pug @@ -0,0 +1,57 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'position' + - var parent = 'utilities' + - var title = 'Position utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('position', 'Position utilities') + include ../_layout/_ad-g.pug + + p + | Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- clear float --> + <div class="clearfix"></div> + <!-- float: left and right --> + <div class="float-left"></div> + <div class="float-right"></div> + <!-- position: relative, absolute, fixed and sticky --> + <div class="p-relative"></div> + <div class="p-absolute"></div> + <div class="p-fixed"></div> + <div class="p-sticky"></div> + <!-- centered block --> + <div class="p-centered"></div> + + <!-- m-1 {margin: 4px;} m-2 {margin: 8px;} --> + <div class="m-1"></div> + <div class="m-2"></div> + <!-- margin in 4 directions. mt-1 {margin-top: 4px;} mt-2 {margin-top: 8px;} --> + <div class="mt-1"></div> + <div class="mt-2"></div> + <!-- mx-1 {margin-left: 4px; margin-right: 4px;} --> + <div class="mx-1"></div> + <div class="mx-2"></div> + <div class="my-1"></div> + <div class="my-2"></div> + <!-- p-1 {padding: 4px;} p-2 {padding: 8px;} --> + <div class="p-1"></div> + <div class="p-2"></div> + <!-- padding in 4 directions. pt-1 {padding-top: 4px;} pt-2 {padding-top: 8px;} --> + <div class="pt-1"></div> + <div class="pt-2"></div> + <!-- px-1 {padding-left: 4px; padding-right: 4px;} --> + <div class="px-1"></div> + <div class="px-2"></div> + <div class="py-1"></div> + <div class="py-2"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/shapes.pug b/docs/src/utilities/shapes.pug new file mode 100644 index 0000000..7449156 --- /dev/null +++ b/docs/src/utilities/shapes.pug @@ -0,0 +1,33 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'shapes' + - var parent = 'utilities' + - var title = 'Shape utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('shapes', 'Shape utilities') + include ../_layout/_ad-g.pug + + p Shape utilities are used for changing element shapes. + + .docs-demo.columns + .column.col-6.text-center + .bg-primary.text-light.docs-shape.s-rounded.centered + | s-rounded + .column.col-6.text-center + .bg-primary.text-light.docs-shape.s-circle.centered + | s-circle + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- rounded element --> + <div class="s-rounded"></div> + <!-- circle element --> + <div class="s-circle"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file diff --git a/docs/src/utilities/text.pug b/docs/src/utilities/text.pug new file mode 100644 index 0000000..d383128 --- /dev/null +++ b/docs/src/utilities/text.pug @@ -0,0 +1,52 @@ +extends ../_layout/_docs-layout.pug + +block variables + - var slug = 'text' + - var parent = 'utilities' + - var title = 'Text utilities - Utilities - Spectre.css CSS Framework' + - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.' + +block docs-content + +docs-heading('text', 'Text utilities') + include ../_layout/_ad-g.pug + + p Text utilities are used for text alignment, styles and overflow things. + + pre.code(data-lang='HTML') + code + :highlight(lang="html") + <!-- left-aligned text --> + <div class="text-left"></div> + <!-- center-aligned text --> + <div class="text-center"></div> + <!-- right-aligned text --> + <div class="text-right"></div> + <!-- justified text --> + <div class="text-justify"></div> + + <!-- Lowercased text --> + <div class="text-lowercase"></div> + <!-- Uppercased text --> + <div class="text-uppercase"></div> + <!-- Capitalized text --> + <div class="text-capitalize"></div> + + <!-- Normal weight text --> + <div class="text-normal"></div> + <!-- Bold text --> + <div class="text-bold"></div> + <!-- Italicized text --> + <div class="text-italic"></div> + <!-- Larger text (120%) --> + <div class="text-large"></div> + + <!-- Overflow behavior: display an ellipsis to represent clipped text --> + <div class="text-ellipsis"></div> + <!-- Overflow behavior: truncate the text --> + <div class="text-clip"></div> + <!-- Text may be broken at arbitrary points --> + <div class="text-break"></div> + + include ../_layout/_ad-c.pug + + include ../_layout/_footer.pug
\ No newline at end of file |