Skip to content

Commit

Permalink
Add: hbsからpugに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
manabuyasuda committed Sep 27, 2019
1 parent e1b59b4 commit d36f365
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 29 deletions.
6 changes: 4 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ const gulpSvgSprite = require('gulp-svg-sprite');

// Styleguide
const fractal = require('@frctl/fractal').create();
fractal.components.engine('@rsm/fractal-pug-adapter');

fractal.set('project.title', 'Styleguide');
fractal.set('project.version', 'v4.0');
fractal.set('project.author', 'Manabu Yasuda');
fractal.components.set('ext', '.pug');
fractal.components.set('path', __dirname + '/src/styleguide/components');
fractal.docs.set('path', __dirname + '/src/styleguide/docs');
fractal.web.set('builder.dest', __dirname + '/htdocs/styleguide');
Expand All @@ -51,7 +53,7 @@ fractal.web.set('server.syncOptions', {
const mandelbrot = require('@frctl/mandelbrot');

const myCustomisedTheme = mandelbrot({
panels: ['html', 'notes', 'info', 'view', 'context', 'resources'],
panels: ['view', 'html', 'notes', 'info', 'context', 'resources'],
lang: 'ja',
skin: 'olive',
});
Expand All @@ -77,7 +79,7 @@ const src = {
ssi: 'static/**/*.html',
data: 'src/_data/',
css: 'src/**/*.scss',
styleguideWatch: 'src/**/*.{scss,md,hbs,json}',
styleguideWatch: 'src/**/*.{scss,md,pug,json}',
js: './src/assets/js/site.js',
jsWatch: 'src/**/*.{js,vue}',
image: 'src/assets/img/**/*.{png,jpg,gif,svg}',
Expand Down
99 changes: 98 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"homepage": "https://github.com/manabuyasuda/website-template#readme",
"devDependencies": {
"@babel/preset-env": "^7.4.5",
"@rsm/fractal-pug-adapter": "^0.5.0",
"autoprefixer": "^9.6.0",
"babel-loader": "^8.0.6",
"browser-sync": "^2.26.7",
Expand Down
13 changes: 0 additions & 13 deletions src/styleguide/components/_preview.hbs

This file was deleted.

21 changes: 21 additions & 0 deletions src/styleguide/components/_preview.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
doctype html
html.no-js(lang="ja")
head
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
title #{_target.label} | Styleguide

link(rel="stylesheet" href="https://cdn.jsdelivr.net/npm/yakuhanjp@3/dist/css/yakuhanjp_s.min.css")
link(rel="stylesheet" href="/assets/css/site.css")

meta(name="format-detection" content="telephone=no")

script.
document.documentElement.classList.remove('no-js')

body
#app
!= yield

script(src="/assets/js/site.js")
13 changes: 0 additions & 13 deletions src/styleguide/components/sw/Button/Button.hbs

This file was deleted.

21 changes: 21 additions & 0 deletions src/styleguide/components/sw/Button/Button.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
p #{description}

div
a.sw-Button(href="#" class=variant) #{text}
button.sw-Button(type="button" class=variant) #{text}
input.sw-Button(type="button" class=variant value=text)

h2 disabled

div
a.sw-Button.-disabled(href="#" class=variant tabindex="-1") #{text}
button.sw-Button(type="button" class=variant disabled) #{text}
input.sw-Button(type="button" class=variant value=text disabled)

h2 icon

div
a.sw-Button(href="#" class=variant)
svg.sw-Button_More(role="img")
use(xlink:href="/assets/svg/sprite.svg#right-arrow1")
span #{text}

0 comments on commit d36f365

Please sign in to comment.