spuit 0.0.14.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.npmignore +10 -6
- data/Gemfile.lock +1 -1
- data/README.md +20 -1
- data/assets/html/index.ejs +328 -0
- data/assets/javascripts/scripts.js +3 -3
- data/assets/stylesheets/styles.scss +8 -3
- data/dist/favicon.ico +0 -0
- data/dist/index.html +1 -323
- data/dist/javascripts/scripts.js +1 -1
- data/dist/stylesheets/styles.css +2 -2
- data/lib/spuit/version.rb +1 -1
- data/package.json +19 -18
- data/scss/{components → _}/_body.sass +0 -0
- data/scss/{components → _}/_form.sass +0 -0
- data/scss/{components → _}/_gist.sass +0 -0
- data/scss/{components → _}/_grids.sass +0 -0
- data/scss/{components → _}/_markdown.sass +0 -0
- data/scss/components/_button.scss +140 -0
- data/scss/components/_messages.scss +23 -0
- data/scss/components/{_shoulder.sass → _shoulder.scss} +6 -5
- data/scss/components/_split.scss +45 -0
- data/scss/components/_triangle.scss +50 -0
- data/scss/components/_wordwrap-fadeout.scss +22 -0
- data/scss/components/_wrap.scss +27 -0
- data/scss/elements/_dl.scss +40 -0
- data/scss/elements/_fieldset.scss +63 -0
- data/scss/elements/_hr.scss +39 -0
- data/scss/elements/_input.scss +35 -0
- data/scss/elements/_table.scss +102 -0
- data/scss/{components → includes}/_icon.scss +0 -0
- data/scss/spuit.scss +1 -4
- data/scss/variables/_timing-functions.scss +37 -0
- data/spuit.scss +1 -46
- data/webpack/css.webpack.config.js +37 -5
- data/webpack/js.webpack.config.js +13 -8
- data/yarn.lock +3390 -4480
- metadata +23 -22
- data/.editorconfig +0 -11
- data/scss/components/_button.sass +0 -116
- data/scss/components/_messages.sass +0 -18
- data/scss/components/_split.sass +0 -32
- data/scss/components/_triangle.sass +0 -40
- data/scss/components/_wordwrap-fadeout.sass +0 -19
- data/scss/components/_wrap.sass +0 -22
- data/scss/elements/_dl.sass +0 -30
- data/scss/elements/_fieldset.sass +0 -46
- data/scss/elements/_hr.sass +0 -36
- data/scss/elements/_input.sass +0 -27
- data/scss/elements/_table.sass +0 -58
- data/scss/variables/_timing-functions.sass +0 -37
@@ -0,0 +1,63 @@
|
|
1
|
+
@mixin fieldset-base($legend-width: 100px, $gutter: 20px) {
|
2
|
+
@include clearfix;
|
3
|
+
position: relative;
|
4
|
+
padding-left: $legend-width + $gutter;
|
5
|
+
padding-bottom: 0.5rem;
|
6
|
+
|
7
|
+
@include breakpoint-down(sm) {
|
8
|
+
padding-left: 0;
|
9
|
+
padding-bottom: 1rem;
|
10
|
+
}
|
11
|
+
|
12
|
+
> legend {
|
13
|
+
width: $legend-width;
|
14
|
+
margin-left: -($legend-width + $gutter);
|
15
|
+
display: inline-block;
|
16
|
+
vertical-align: middle;
|
17
|
+
float: left;
|
18
|
+
|
19
|
+
@include breakpoint-down(sm) {
|
20
|
+
display: block;
|
21
|
+
float: none;
|
22
|
+
width: auto;
|
23
|
+
margin-left: 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
&.has-padding {
|
28
|
+
> legend {
|
29
|
+
padding-top: 0.5rem;
|
30
|
+
@include breakpoint-down(sm) {
|
31
|
+
padding-top: 0;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
//not <fieldset/>
|
38
|
+
@mixin fieldset-flex($legend-width: 30%, $gutter: 20px) {
|
39
|
+
display: flex;
|
40
|
+
justify-content: space-between;
|
41
|
+
align-items: center;
|
42
|
+
min-width: 0;
|
43
|
+
padding: 0;
|
44
|
+
margin: 0 0 10px;
|
45
|
+
border: 0;
|
46
|
+
|
47
|
+
&:last-child {
|
48
|
+
margin-bottom: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
label, legend {
|
52
|
+
margin-bottom: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
> legend {
|
56
|
+
width: $legend-width;
|
57
|
+
padding-right: $gutter;
|
58
|
+
}
|
59
|
+
|
60
|
+
> *:not(legend) {
|
61
|
+
flex: 1;
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@mixin hr-center-border($w: 100px, $c: #000) {
|
2
|
+
border: none;
|
3
|
+
border-top: 1px solid $c;
|
4
|
+
width: $w;
|
5
|
+
margin-top: 50px;
|
6
|
+
margin-bottom: 50px;
|
7
|
+
}
|
8
|
+
|
9
|
+
// Example:
|
10
|
+
// .dotted
|
11
|
+
// +hr-dotted
|
12
|
+
// .dotted--alt
|
13
|
+
// +hr-dotted(#000, 4, 1)
|
14
|
+
|
15
|
+
@mixin hr-dotted($color:rgba(#000, 1.0), $stripe: 1, $spacing: 4, $height:1) {
|
16
|
+
@include background-image(linear-gradient(left, $color 0%, $color ($stripe/($stripe+$spacing))*100%, transparent ($stripe/($stripe+$spacing))*100%, transparent 100%));
|
17
|
+
background-size: ($stripe+$spacing)*1px ($stripe+$spacing)*1px;
|
18
|
+
height: $height*1px;
|
19
|
+
border: none;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Example:
|
23
|
+
// .shaded
|
24
|
+
// +hr-shaded
|
25
|
+
|
26
|
+
@mixin hr-shaded($deg:135deg, $color:rgba(#000, 1.0), $stripe: 1, $spacing: 1, $height:10px) {
|
27
|
+
$_stripe: $stripe;
|
28
|
+
$_spacing: $spacing;
|
29
|
+
$_diagonal: ceil(($_stripe+$_spacing)*1.414);
|
30
|
+
$_pattern: $deg, $color, $color ($_stripe)*1px, transparent ($_stripe)*1px, transparent ($_diagonal)*1px, $color ($_diagonal)*1px;
|
31
|
+
background-image: -webkit-repeating-linear-gradient($_pattern);
|
32
|
+
background-image: -moz-repeating-linear-gradient($_pattern);
|
33
|
+
background-image: -o-repeating-linear-gradient($_pattern);
|
34
|
+
background-image: -ms-repeating-linear-grad§ient($_pattern);
|
35
|
+
background-image: repeating-linear-gradient($_pattern);
|
36
|
+
background-size: (($_stripe+$_spacing)*2)*1px (($_stripe+$_spacing)*2)*1px;
|
37
|
+
height: $height;
|
38
|
+
border: none;
|
39
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@mixin input-base($w: auto, $p: 10px 10px) {
|
2
|
+
@include reset-form;
|
3
|
+
font-size: inherit;
|
4
|
+
display: inline-block;
|
5
|
+
width: $w;
|
6
|
+
padding: $p;
|
7
|
+
box-sizing: border-box;
|
8
|
+
line-height: 1;
|
9
|
+
&::placeholder {
|
10
|
+
font-size: inherit;
|
11
|
+
}
|
12
|
+
&:focus {
|
13
|
+
outline: 0;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin input-normal($w: auto, $p: 10px 10px) {
|
18
|
+
@include reset-form;
|
19
|
+
@include input-base($w, $p);
|
20
|
+
|
21
|
+
$color-border: #ddd;
|
22
|
+
$color-border-key: rgba(#529ef6, 0.5);
|
23
|
+
$color-bg-select: #fffff2;
|
24
|
+
|
25
|
+
border: 1px solid $color-border;
|
26
|
+
|
27
|
+
&::placeholder {
|
28
|
+
color: #ddd;
|
29
|
+
}
|
30
|
+
|
31
|
+
&:focus {
|
32
|
+
border: 1px solid $color-border-key;
|
33
|
+
background: $color-bg-select;
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
@mixin table-base($p: 5px 10px) {
|
2
|
+
width: 100%;
|
3
|
+
border-collapse: collapse;
|
4
|
+
margin-bottom: 0;
|
5
|
+
|
6
|
+
th {
|
7
|
+
font-weight: bold;
|
8
|
+
}
|
9
|
+
|
10
|
+
th,
|
11
|
+
td {
|
12
|
+
padding: $p;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
// .table--normal
|
17
|
+
// +table-normal
|
18
|
+
@mixin table-normal($p: 5px 10px, $border-top: 2px solid #eee, $border: 1px solid #eee) {
|
19
|
+
@include table-base($p);
|
20
|
+
border-top: $border;
|
21
|
+
|
22
|
+
thead {
|
23
|
+
tr {
|
24
|
+
th,
|
25
|
+
td {
|
26
|
+
font-size: 0.8rem;
|
27
|
+
border: $border;
|
28
|
+
border-bottom: $border-top;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
tbody {
|
34
|
+
tr {
|
35
|
+
&:first-child {
|
36
|
+
th,
|
37
|
+
td {
|
38
|
+
border-top: none;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
th {
|
44
|
+
border: $border;
|
45
|
+
border-bottom: $border-top;
|
46
|
+
}
|
47
|
+
|
48
|
+
td {
|
49
|
+
border: $border;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
// .table--line
|
55
|
+
// +table-line
|
56
|
+
@mixin table-line($border-top: 2px solid #eee, $border: 1px solid #eee) {
|
57
|
+
@include table-base;
|
58
|
+
|
59
|
+
thead {
|
60
|
+
tr {
|
61
|
+
th,
|
62
|
+
td {
|
63
|
+
border-bottom: $border-top;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
tr {
|
69
|
+
&:first-child {
|
70
|
+
th,
|
71
|
+
td {
|
72
|
+
border-top: none;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
th,
|
78
|
+
td {
|
79
|
+
border-top: $border;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
// .table--stripe
|
84
|
+
// +table-stripe
|
85
|
+
@mixin table-stripe($color-thead: #fff, $color-even: #eee, $color-odd: #f8f8f8) {
|
86
|
+
@include table-base;
|
87
|
+
|
88
|
+
thead {
|
89
|
+
tr {
|
90
|
+
background-color: $color-thead;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
tbody {
|
95
|
+
tr:nth-child(even) {
|
96
|
+
background-color: $color-even;
|
97
|
+
}
|
98
|
+
tr:nth-child(odd) {
|
99
|
+
background-color: $color-odd;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
File without changes
|
data/scss/spuit.scss
CHANGED
@@ -27,6 +27,7 @@
|
|
27
27
|
@import 'includes/stickey-footer';
|
28
28
|
@import 'includes/spuit-utils';
|
29
29
|
@import 'includes/normalize';
|
30
|
+
@import 'includes/icon';
|
30
31
|
|
31
32
|
// shortcut mixins
|
32
33
|
@import 'shortcuts/absolute';
|
@@ -34,14 +35,10 @@
|
|
34
35
|
@import 'shortcuts/disc';
|
35
36
|
|
36
37
|
// shortcut components, element
|
37
|
-
// FIXME: 未整理、不要なものを削除するまでコメントアウト
|
38
|
-
@import 'components/icon';
|
39
38
|
@import 'components/button';
|
40
39
|
@import 'components/switch';
|
41
40
|
@import 'elements/table';
|
42
41
|
@import 'elements/input';
|
43
42
|
@import 'elements/fieldset';
|
44
|
-
// @import 'elements/radio';
|
45
|
-
// @import 'elements/checkbox';
|
46
43
|
@import 'elements/custom-checkbox';
|
47
44
|
@import 'elements/select';
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// from: https://github.com/thoughtbot/bourbon/blob/master/dist/addons/_timing-functions.scss
|
2
|
+
// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
|
3
|
+
// Timing functions are the same as demo'ed here: http://jqueryui.com/resources/demos/effect/easing.html
|
4
|
+
|
5
|
+
// EASE IN
|
6
|
+
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
7
|
+
$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
8
|
+
$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
9
|
+
$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
10
|
+
$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
11
|
+
$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
12
|
+
$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
13
|
+
$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
14
|
+
|
15
|
+
// EASE OUT
|
16
|
+
$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
17
|
+
$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
18
|
+
$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
19
|
+
$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
20
|
+
$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
21
|
+
$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
22
|
+
$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
23
|
+
$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
24
|
+
|
25
|
+
// EASE IN OUT
|
26
|
+
$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
27
|
+
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
28
|
+
$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
29
|
+
$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
30
|
+
$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
31
|
+
$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
32
|
+
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
33
|
+
$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
34
|
+
|
35
|
+
// (similar elastic).
|
36
|
+
$ease-out-elastic: cubic-bezier(0.370, 1.650, 0.410, 0.780);
|
37
|
+
$ease-in-elastic: cubic-bezier(0.370, 0.650, 0.410, -0.780);
|
data/spuit.scss
CHANGED
@@ -1,48 +1,3 @@
|
|
1
1
|
@charset 'utf-8';
|
2
2
|
|
3
|
-
|
4
|
-
@import 'scss/variables/defaults';
|
5
|
-
@import 'scss/variables/fonts';
|
6
|
-
@import 'scss/variables/timing-functions';
|
7
|
-
@import 'scss/variables/media-queries';
|
8
|
-
@import 'scss/variables/colors';
|
9
|
-
@import 'scss/variables/svgs';
|
10
|
-
|
11
|
-
// module mixins
|
12
|
-
@import 'scss/modules/clearfix';
|
13
|
-
@import 'scss/modules/breakpoints';
|
14
|
-
@import 'scss/modules/hide-text';
|
15
|
-
@import 'scss/modules/fa';
|
16
|
-
@import 'scss/modules/font-face';
|
17
|
-
@import 'scss/modules/background-image';
|
18
|
-
@import 'scss/modules/inherit';
|
19
|
-
@import 'scss/modules/word-break';
|
20
|
-
@import 'scss/modules/text-overflow';
|
21
|
-
@import 'scss/modules/reset';
|
22
|
-
|
23
|
-
// create styles
|
24
|
-
@import 'scss/includes/animations';
|
25
|
-
@import 'scss/includes/hiddens';
|
26
|
-
@import 'scss/includes/spacers';
|
27
|
-
@import 'scss/includes/webfonts';
|
28
|
-
@import 'scss/includes/stickey-footer';
|
29
|
-
@import 'scss/includes/spuit-utils';
|
30
|
-
@import 'scss/includes/normalize';
|
31
|
-
|
32
|
-
// shortcut mixins
|
33
|
-
@import 'scss/shortcuts/absolute';
|
34
|
-
@import 'scss/shortcuts/centering';
|
35
|
-
@import 'scss/shortcuts/disc';
|
36
|
-
|
37
|
-
// shortcut components, element
|
38
|
-
// FIXME: 未整理、不要なものを削除するまでコメントアウト
|
39
|
-
@import 'scss/components/icon';
|
40
|
-
@import 'scss/components/button';
|
41
|
-
@import 'scss/components/switch';
|
42
|
-
@import 'scss/elements/table';
|
43
|
-
@import 'scss/elements/input';
|
44
|
-
@import 'scss/elements/fieldset';
|
45
|
-
// @import 'scss/elements/radio';
|
46
|
-
// @import 'scss/elements/checkbox';
|
47
|
-
@import 'scss/elements/custom-checkbox';
|
48
|
-
@import 'scss/elements/select';
|
3
|
+
@import 'scss/spuit';
|
@@ -1,9 +1,11 @@
|
|
1
1
|
const path = require('path')
|
2
2
|
const webpack = require('webpack')
|
3
3
|
const ExtractTextPlugin = require("extract-text-webpack-plugin")
|
4
|
+
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
|
5
|
+
const TerserPlugin = require('terser-webpack-plugin')
|
4
6
|
|
5
|
-
let app = './assets'
|
6
|
-
let dist = '../dist'
|
7
|
+
let app = './assets'
|
8
|
+
let dist = '../dist'
|
7
9
|
|
8
10
|
module.exports = {
|
9
11
|
entry: {
|
@@ -19,14 +21,41 @@ module.exports = {
|
|
19
21
|
test: /\.css$/,
|
20
22
|
loader: ExtractTextPlugin.extract({
|
21
23
|
fallback: 'style-loader',
|
22
|
-
use: [
|
24
|
+
use: [
|
25
|
+
{
|
26
|
+
loader: 'css-loader',
|
27
|
+
options: {
|
28
|
+
sourceMap: false,
|
29
|
+
includePaths: [path.resolve(__dirname, 'node_modules')],
|
30
|
+
},
|
31
|
+
},
|
32
|
+
{
|
33
|
+
loader: 'postcss-loader',
|
34
|
+
options: {
|
35
|
+
sourceMap: false
|
36
|
+
},
|
37
|
+
},
|
38
|
+
]
|
23
39
|
})
|
24
40
|
},
|
25
41
|
{
|
26
42
|
test: /\.scss$/,
|
27
43
|
loader: ExtractTextPlugin.extract({
|
28
44
|
fallback: 'style-loader',
|
29
|
-
use: [
|
45
|
+
use: [
|
46
|
+
{
|
47
|
+
loader: 'css-loader',
|
48
|
+
options: {
|
49
|
+
sourceMap: false,
|
50
|
+
},
|
51
|
+
},
|
52
|
+
{
|
53
|
+
loader: 'sass-loader',
|
54
|
+
options: {
|
55
|
+
sourceMap: false,
|
56
|
+
},
|
57
|
+
},
|
58
|
+
]
|
30
59
|
})
|
31
60
|
},
|
32
61
|
{
|
@@ -38,5 +67,8 @@ module.exports = {
|
|
38
67
|
plugins: [
|
39
68
|
require('autoprefixer'),
|
40
69
|
new ExtractTextPlugin('stylesheets/[name].css')
|
41
|
-
]
|
70
|
+
],
|
71
|
+
optimization: {
|
72
|
+
minimizer: [new TerserPlugin({}), new OptimizeCSSAssetsPlugin({})],
|
73
|
+
},
|
42
74
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
const path = require('path')
|
2
2
|
const webpack = require('webpack')
|
3
3
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
4
|
-
|
4
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
5
5
|
|
6
|
-
let app = './assets'
|
7
|
-
let dist = '../dist'
|
6
|
+
let app = './assets'
|
7
|
+
let dist = '../dist'
|
8
8
|
|
9
9
|
module.exports = {
|
10
10
|
entry: {
|
@@ -19,11 +19,16 @@ module.exports = {
|
|
19
19
|
port: 8080
|
20
20
|
},
|
21
21
|
plugins: [
|
22
|
-
new UglifyJsPlugin()
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
new UglifyJsPlugin(),
|
23
|
+
new HtmlWebpackPlugin({
|
24
|
+
template: app+'/html/index.ejs',
|
25
|
+
minify: {
|
26
|
+
removeComments: true,
|
27
|
+
collapseWhitespace: true,
|
28
|
+
removeAttributeQuotes: true
|
29
|
+
},
|
30
|
+
chunksSortMode: 'dependency'
|
31
|
+
})
|
27
32
|
],
|
28
33
|
cache: true
|
29
34
|
};
|