From c5d3a98c639caed1f0454ce64dbc838f6d773fb7 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sat, 12 May 2018 18:08:15 +0800 Subject: Move Docs to Pug templates --- docs/src/_mixins.pug | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/src/_mixins.pug (limited to 'docs/src/_mixins.pug') diff --git a/docs/src/_mixins.pug b/docs/src/_mixins.pug new file mode 100644 index 0000000..54e76d7 --- /dev/null +++ b/docs/src/_mixins.pug @@ -0,0 +1,22 @@ +mixin docs-accordion(id, name, ...pages) + .accordion + input(id='accordion-' + id type='checkbox' name='docs-accordion-checkbox' hidden='' checked=(current === 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 + +mixin docs-heading(id, name) + .container + h3.s-title(id=id) + a.anchor(href='#'+id aria-hidden='true') # + | #{name} + if block + block + +mixin docs-subheading(id, name) + h4.s-subtitle(id=id) + a.anchor(href='#'+id aria-hidden='true') # + | #{name} \ No newline at end of file -- cgit v1.3.1-26-gb76a From 27844c650766864aba46584e566639b79f22c0aa Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 3 Jun 2018 18:17:42 +0800 Subject: Fix Docs hash linking bug --- docs/elements.html | 34 +- docs/getting-started.html | 26 +- docs/layout.html | 2039 ++++++++++++++++++++++++++++----------------- docs/src/_docs-layout.pug | 2 +- docs/src/_mixins.pug | 4 +- docs/src/elements.pug | 4 +- docs/src/layout.pug | 39 + 7 files changed, 1356 insertions(+), 792 deletions(-) create mode 100644 docs/src/layout.pug (limited to 'docs/src/_mixins.pug') diff --git a/docs/elements.html b/docs/elements.html index e7b4e82..b20594a 100644 --- a/docs/elements.html +++ b/docs/elements.html @@ -46,7 +46,7 @@ - + @@ -129,8 +129,8 @@
-
-

Typography

+
+

Typography

Typography sets default styles for headings, paragraphs, semantic text, blockquote and lists elements.

Headings

@@ -317,8 +317,8 @@ <dd>description list description</dd> </dl>
-
-

Tables

+
+

Tables

Tables include default styles for tables and data sets.

@@ -378,8 +378,8 @@ </tbody> </table>
-
-

Buttons

+
+

Buttons

Buttons include simple button styles for actions in different types and sizes.

@@ -526,8 +526,8 @@ <button class="btn">third button</button> </div>
-
-

Forms

+
+

Forms

Forms provide the most common control styles used in forms, including input, textarea, select, checkbox, radio and switch.

@@ -1208,11 +1208,11 @@ </div> </fieldset>
-
-

Icons

+
+

Icons

-
-

Labels

+
+

Labels

Labels are formatted text tags for highlighted, informative information.

default labelprimary labelsecondary labelsuccess labelwarning labelerror label
@@ -1231,8 +1231,8 @@ <!-- rounded labels --> <span class="label label-rounded label-primary">primary label</span>
-
-

Code

+
+

Code

Code is used for styling inline and multiline code snippets.

For inline code, you can use the <code> element. For multiline code snippet blocks, you can use <pre> with the code class as a container, and add <code> inside it. @@ -1249,8 +1249,8 @@ &lt;<span class="tag">/button</span>&gt; </code></pre>

-
-

Media

+
+

Media

Media includes responsive images, figures and video classes.

Images

Add the img-responsive class to <img> elements. The images will scale with the parent sizes.

diff --git a/docs/getting-started.html b/docs/getting-started.html index 4d9f7ee..2665d0c 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -46,7 +46,7 @@ - +
@@ -129,14 +129,14 @@
-
-

Introduction

+
+

Introduction

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.

-
-

Installation

+
+

Installation

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.

Install manually

Download the compiled and minified Spectre CSS file (core ~10KB min+gzip):

@@ -161,8 +161,8 @@

Install from Bower

bower install spectre.css --save
-
-

Custom version

+
+

Custom version

You can customize your version of Spectre.css by editing Sass files in /src directory or removing unneeded components from .scss source files.

Sass Source Code

If you are looking for Less version of Spectre.css, please switch to Less branch.

@@ -364,11 +364,11 @@ gulp.task('prefix',

After you compile your version of Spectre in the /dist, run gulp prefix in the directory of Spectre.

-
-

Accessibility

+
+

Accessibility

-
-

Browser support

+
+

Browser support

Spectre uses Autoprefixer to make most styles compatible with earlier browsers and Normalize.css for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended:

  • Chrome LAST 4
  • @@ -380,8 +380,8 @@ gulp.task('prefix',

    Spectre supports Internet Explorer 10+, but some HTML5 and CSS3 features are not perfectly supported by Internet Explorer.

-
-

What's new

+
+

What's new

September 2017

  • Off-canvas: navigation layout that the sidebar can slide in and out of the viewport NEW
  • diff --git a/docs/layout.html b/docs/layout.html index dd4fae5..b20594a 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -1,799 +1,1326 @@ - - - - - - - Layout - Spectre.css CSS Framework - - - - - - - - -
    - - -
-

Importing Sass

+

Importing Sass

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.

  • First, create your own project and install Spectre via NPM or other package managers.
  • @@ -219,7 +219,7 @@ @import "node_modules/spectre.css/src/buttons"; @import "node_modules/spectre.css/src/forms"; -

    Folder structure

    +

    Folder structure

    spectre/
     ├── dist/                           // Build folder
     │   ├── spectre-exp.css
    @@ -262,9 +262,9 @@
     ├── package.json
     └── ...
     
    -

    Variables

    +

    Variables

    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 _variables.scss include !default flag. You can redefine the variables to override the values.

    -

    Variables - Colors

    +

    Variables - Colors

    @@ -343,7 +343,7 @@
    -

    Variables - Button mixins

    +

    Variables - Button mixins

    There are 2 button variant mixins in _mixins.scss to generate different color variants.

    • @mixin button-variant($color: $primary-color);
    • @@ -359,11 +359,11 @@ @include button-outline-variant($success-color); } -

      Variables - Sizes

      +

      Variables - Sizes

      The default REM (root em) size in Spectre.css is 20px.

      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 20px, which is relatively easy to calculate.

      Spectre uses 4px as the unit size. Sizes of components are based on the unit size.

      -

      Variables - Custom prefix

      +

      Variables - Custom prefix

      There is also a way to add custom prefix to all CSS classes. You can use gulp-css-prefix plugin and add a new Gulp task to enable it.

      npm install gulp-css-prefix
       
      @@ -379,10 +379,10 @@ gulp.task('prefix', After you compile your version of Spectre in the /dist, run gulp prefix in the directory of Spectre.

-

Accessibility

+

Accessibility

-

Browser support

+

Browser support

Spectre uses Autoprefixer to make most styles compatible with earlier browsers and Normalize.css for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended:

  • Chrome LAST 4
  • @@ -395,7 +395,7 @@ gulp.task('prefix', Spectre supports Internet Explorer 10+, but some HTML5 and CSS3 features are not perfectly supported by Internet Explorer.

-

What's new

+

What's new

September 2017

  • Off-canvas: navigation layout that the sidebar can slide in and out of the viewport NEW
  • diff --git a/docs/layout.html b/docs/layout.html index 6d661c6..0c003ad 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -130,7 +130,7 @@
    -

    Flexbox grid

    +

    Flexbox grid

    @@ -245,7 +245,7 @@ <div class="column col-8">col-8</div> </div> -

    Grid offset

    +

    Grid offset

    The Flexbox grid provides margin auto utilities to set offset. There are col-mx-auto, col-ml-auto and col-mr-auto to set margins between columns without using empty columns. @@ -303,7 +303,7 @@ </div> </div> -

    Grid nesting

    +

    Grid nesting

    To nest grids, add the new columns and column structure within an existing column.

    @@ -335,7 +335,7 @@ </div>
    -

    Responsive

    +

    Responsive

    @@ -365,7 +365,7 @@ </div> </div> -

    Responsive container

    +

    Responsive container

    The responsive layout also provides fixed-width containers. Use grid-xs(480px), grid-sm(600px), grid-md(840px), grid-lg(960px) or grid-xl(1280px) to the container for a fixed-width container with the specific max-width. @@ -377,7 +377,7 @@ </div> </div> -

    Responsive visibility

    +

    Responsive visibility

    The responsive visibility utilities help show and hide elements on specific viewport sizes.

    @@ -618,7 +618,7 @@

    Responsive Resizer