spuit 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +11 -0
- data/.gitignore +70 -0
- data/.npmignore +9 -0
- data/Gemfile +4 -0
- data/README.md +16 -0
- data/Rakefile +1 -0
- data/assets/javascripts/index.js +2 -0
- data/assets/javascripts/spuit/Common.js +316 -0
- data/assets/javascripts/spuit/extend.js +46 -0
- data/assets/stylesheets/spuit/components/_body.sass +175 -0
- data/assets/stylesheets/spuit/components/_button.sass +116 -0
- data/assets/stylesheets/spuit/components/_form.sass +44 -0
- data/assets/stylesheets/spuit/components/_gist.sass +57 -0
- data/assets/stylesheets/spuit/components/_grids.sass +44 -0
- data/assets/stylesheets/spuit/components/_icon.scss +68 -0
- data/assets/stylesheets/spuit/components/_markdown.sass +182 -0
- data/assets/stylesheets/spuit/components/_messages.sass +18 -0
- data/assets/stylesheets/spuit/components/_shoulder.sass +13 -0
- data/assets/stylesheets/spuit/components/_split.sass +32 -0
- data/assets/stylesheets/spuit/components/_triangle.sass +40 -0
- data/assets/stylesheets/spuit/components/_wordwrap-fadeout.sass +19 -0
- data/assets/stylesheets/spuit/components/_wrap.sass +22 -0
- data/assets/stylesheets/spuit/elements/_checkbox.sass +46 -0
- data/assets/stylesheets/spuit/elements/_dl.sass +30 -0
- data/assets/stylesheets/spuit/elements/_fieldset.sass +46 -0
- data/assets/stylesheets/spuit/elements/_hr.sass +36 -0
- data/assets/stylesheets/spuit/elements/_input.sass +27 -0
- data/assets/stylesheets/spuit/elements/_radio.sass +47 -0
- data/assets/stylesheets/spuit/elements/_select.sass +54 -0
- data/assets/stylesheets/spuit/elements/_table.sass +58 -0
- data/assets/stylesheets/spuit/includes/_animations.scss +55 -0
- data/assets/stylesheets/spuit/includes/_grid.scss +345 -0
- data/assets/stylesheets/spuit/includes/_hiddens.scss +17 -0
- data/assets/stylesheets/spuit/includes/_normalize.scss +467 -0
- data/assets/stylesheets/spuit/includes/_spacers.scss +79 -0
- data/assets/stylesheets/spuit/includes/_spuit-utils.scss +11 -0
- data/assets/stylesheets/spuit/includes/_stickey-footer.scss +18 -0
- data/assets/stylesheets/spuit/includes/_webfonts.scss +30 -0
- data/assets/stylesheets/spuit/modules/_background-image.scss +63 -0
- data/assets/stylesheets/spuit/modules/_breakpoints.scss +19 -0
- data/assets/stylesheets/spuit/modules/_clearfix.scss +7 -0
- data/assets/stylesheets/spuit/modules/_fa.scss +28 -0
- data/assets/stylesheets/spuit/modules/_font-face.scss +31 -0
- data/assets/stylesheets/spuit/modules/_hide-text.scss +9 -0
- data/assets/stylesheets/spuit/modules/_inherit.scss +6 -0
- data/assets/stylesheets/spuit/modules/_reset.scss +55 -0
- data/assets/stylesheets/spuit/modules/_text-overflow.scss +15 -0
- data/assets/stylesheets/spuit/modules/_word-break.scss +11 -0
- data/assets/stylesheets/spuit/shortcuts/_absolute.scss +17 -0
- data/assets/stylesheets/spuit/shortcuts/_centering.scss +6 -0
- data/assets/stylesheets/spuit/shortcuts/_disc.scss +6 -0
- data/assets/stylesheets/spuit/variables/_colors.scss +3 -0
- data/assets/stylesheets/spuit/variables/_defaults.scss +3 -0
- data/assets/stylesheets/spuit/variables/_fonts.scss +6 -0
- data/assets/stylesheets/spuit/variables/_media-queries.scss +31 -0
- data/assets/stylesheets/spuit/variables/_svgs.scss +7 -0
- data/assets/stylesheets/spuit/variables/_timing-functions.sass +37 -0
- data/assets/stylesheets/styles.scss +164 -0
- data/assets/stylesheets/styles/config/_mixins.scss +23 -0
- data/assets/stylesheets/styles/config/_variables.scss +4 -0
- data/dist/favicon.png +0 -0
- data/dist/index.html +307 -0
- data/dist/javascripts/scripts.min.js +2 -0
- data/dist/javascripts/scripts.min.js.map +1 -0
- data/dist/stylesheets/styles.css +1 -0
- data/gulp/README.md +7 -0
- data/gulp/tasks/watch.js +79 -0
- data/gulpfile.js +2 -0
- data/lib/spuit.rb +41 -0
- data/lib/spuit/engine.rb +5 -0
- data/lib/spuit/generator.rb +80 -0
- data/lib/spuit/version.rb +3 -0
- data/package.json +38 -0
- data/spuit.gemspec +23 -0
- data/spuit.scss +47 -0
- metadata +147 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
// プロトタイプの拡張
|
2
|
+
|
3
|
+
//全文置換を追加
|
4
|
+
String.prototype.replaceAll = function (org, dest){
|
5
|
+
return this.split(org).join(dest);
|
6
|
+
}
|
7
|
+
|
8
|
+
//Fisher-Yates シャッフル
|
9
|
+
Array.prototype.shuffle = function() {
|
10
|
+
var i = this.length;
|
11
|
+
while(i){
|
12
|
+
var j = Math.floor(Math.random()*i);
|
13
|
+
var t = this[--i];
|
14
|
+
this[i] = this[j];
|
15
|
+
this[j] = t;
|
16
|
+
}
|
17
|
+
return this;
|
18
|
+
}
|
19
|
+
|
20
|
+
//配列の複製
|
21
|
+
Array.prototype.clone = function(){
|
22
|
+
return Array.apply(null,this)
|
23
|
+
}
|
24
|
+
|
25
|
+
//IEのArrayにはindexOfが無いので追加
|
26
|
+
if (!Array.prototype.indexOf)
|
27
|
+
{
|
28
|
+
Array.prototype.indexOf = function(elt /*, from*/)
|
29
|
+
{
|
30
|
+
var len = this.length;
|
31
|
+
var from = Number(arguments[1]) || 0;
|
32
|
+
from = (from < 0)
|
33
|
+
? Math.ceil(from)
|
34
|
+
: Math.floor(from);
|
35
|
+
if (from < 0)
|
36
|
+
from += len;
|
37
|
+
|
38
|
+
for (; from < len; from++)
|
39
|
+
{
|
40
|
+
if (from in this &&
|
41
|
+
this[from] === elt)
|
42
|
+
return from;
|
43
|
+
}
|
44
|
+
return -1;
|
45
|
+
};
|
46
|
+
}
|
@@ -0,0 +1,175 @@
|
|
1
|
+
=body
|
2
|
+
$color-def: #222
|
3
|
+
$color-accent: #f22
|
4
|
+
|
5
|
+
width: 100%
|
6
|
+
text-align: left
|
7
|
+
|
8
|
+
> *
|
9
|
+
margin-bottom: 2rem
|
10
|
+
&:first-child
|
11
|
+
margin-top: 0
|
12
|
+
&:last-child
|
13
|
+
margin-bottom: 0
|
14
|
+
|
15
|
+
h1,h1 a,
|
16
|
+
h2,h2 a,
|
17
|
+
h3,h3 a,
|
18
|
+
h4,h4 a,
|
19
|
+
h5,h5 a,
|
20
|
+
h6,h6 a
|
21
|
+
+word-break
|
22
|
+
clear: both
|
23
|
+
color: $color-def
|
24
|
+
font-weight: normal
|
25
|
+
small
|
26
|
+
font-size: 0.8rem
|
27
|
+
|
28
|
+
h1,h1 a
|
29
|
+
font-size: 2rem
|
30
|
+
line-height: 3rem
|
31
|
+
margin-top: 2rem
|
32
|
+
margin-bottom: 2rem
|
33
|
+
|
34
|
+
h2,h2 a
|
35
|
+
font-size: 1.8rem
|
36
|
+
margin-top: 2rem
|
37
|
+
margin-bottom: 2rem
|
38
|
+
|
39
|
+
h3,h3 a
|
40
|
+
font-size: 1.4rem
|
41
|
+
margin-top: 2rem
|
42
|
+
margin-bottom: 2rem
|
43
|
+
|
44
|
+
h4,h4 a
|
45
|
+
font-size: 1rem
|
46
|
+
margin-bottom: 20px
|
47
|
+
|
48
|
+
h5,h5 a
|
49
|
+
font-size: 1rem
|
50
|
+
margin-bottom: 16px
|
51
|
+
|
52
|
+
h6,h6 a
|
53
|
+
font-size: 1rem
|
54
|
+
margin-bottom: 16px
|
55
|
+
|
56
|
+
dl, ul, p
|
57
|
+
font-size: 1rem
|
58
|
+
|
59
|
+
i
|
60
|
+
font-style: italic
|
61
|
+
|
62
|
+
strong
|
63
|
+
font-weight: normal !important
|
64
|
+
font-weight: bold !important
|
65
|
+
padding-left: 3px
|
66
|
+
padding-right: 3px
|
67
|
+
|
68
|
+
p
|
69
|
+
+font
|
70
|
+
clear: both
|
71
|
+
code
|
72
|
+
font-family: $font-code
|
73
|
+
margin: 0 4px
|
74
|
+
padding: 2px 6px
|
75
|
+
font-style: italic
|
76
|
+
color: #777
|
77
|
+
background: #f8f8f8
|
78
|
+
$c: #f8f8f8
|
79
|
+
border: 1px solid $c - 10
|
80
|
+
|
81
|
+
a
|
82
|
+
+font
|
83
|
+
color: $color-def
|
84
|
+
text-decoration: underline
|
85
|
+
&:hover
|
86
|
+
text-decoration: none
|
87
|
+
|
88
|
+
// アイコンつきリンク
|
89
|
+
// a[target="_blank"]
|
90
|
+
// > a[target="_blank"], p > a[target="_blank"], li > a[target="_blank"]
|
91
|
+
// +icon-fa('\f08e')
|
92
|
+
// &:before
|
93
|
+
// opacity: 0.2
|
94
|
+
// margin-left: 4px
|
95
|
+
// font-size: 0.8rem
|
96
|
+
|
97
|
+
img
|
98
|
+
margin: 0
|
99
|
+
padding: 0
|
100
|
+
line-height: 0
|
101
|
+
border: none
|
102
|
+
max-width: 100%
|
103
|
+
|
104
|
+
> ul
|
105
|
+
margin-left: 20px
|
106
|
+
li
|
107
|
+
+font(0.9rem)
|
108
|
+
list-style-type: disc
|
109
|
+
a
|
110
|
+
+font(0.9rem)
|
111
|
+
> ol
|
112
|
+
margin-left: 20px
|
113
|
+
li
|
114
|
+
+font
|
115
|
+
list-style: decimal
|
116
|
+
+ li
|
117
|
+
border-top: 1px dotted #ddd
|
118
|
+
|
119
|
+
> table
|
120
|
+
width: 100%
|
121
|
+
border-collapse: collapse
|
122
|
+
th
|
123
|
+
border-bottom: 1px solid #eee
|
124
|
+
padding: 5px 10px 5px 10px
|
125
|
+
+font(10px)
|
126
|
+
td
|
127
|
+
border-bottom: 1px solid #eee
|
128
|
+
padding: 5px 10px 5px 10px
|
129
|
+
+font(14px)
|
130
|
+
|
131
|
+
pre > code,
|
132
|
+
.highlight
|
133
|
+
width: auto !important
|
134
|
+
padding: 20px
|
135
|
+
margin-top: 2rem
|
136
|
+
margin-bottom: 2rem
|
137
|
+
display: block
|
138
|
+
background: #f8f8f8
|
139
|
+
border: 1px solid #eee
|
140
|
+
font-family: $font-code
|
141
|
+
font-size: 0.8rem
|
142
|
+
line-height: 1.6rem
|
143
|
+
overflow: auto
|
144
|
+
p
|
145
|
+
font-family: $font-code
|
146
|
+
font-size: 0.8rem
|
147
|
+
pre
|
148
|
+
margin-bottom: 0
|
149
|
+
|
150
|
+
blockquote
|
151
|
+
+clearfix
|
152
|
+
width: auto !important
|
153
|
+
text-align: left !important
|
154
|
+
margin-left: 0
|
155
|
+
padding-left: 20px
|
156
|
+
border-left: 4px solid #f2f2f2
|
157
|
+
cite
|
158
|
+
margin-top: 0
|
159
|
+
float: right
|
160
|
+
font-size: 12px
|
161
|
+
p, a
|
162
|
+
display: inline
|
163
|
+
font-weight: normal
|
164
|
+
font-style: normal
|
165
|
+
color: $color-def
|
166
|
+
font-size: 12px
|
167
|
+
a
|
168
|
+
text-decoration: underline
|
169
|
+
&:hover
|
170
|
+
color: $color-accent
|
171
|
+
p
|
172
|
+
font-weight: bold
|
173
|
+
font-style: italic
|
174
|
+
margin-bottom: 10px
|
175
|
+
text-align: left !important
|
@@ -0,0 +1,116 @@
|
|
1
|
+
=button-base($c: transparent)
|
2
|
+
box-sizing: border-box
|
3
|
+
box-shadow: none
|
4
|
+
appearance: none
|
5
|
+
display: inline-block
|
6
|
+
border-radius: 0
|
7
|
+
background-color: $c
|
8
|
+
background-image: linear-gradient(to top, $c, $c)
|
9
|
+
position: relative
|
10
|
+
cursor: pointer
|
11
|
+
text-align: center
|
12
|
+
font-weight: normal
|
13
|
+
margin: 0
|
14
|
+
padding: 0
|
15
|
+
border: none
|
16
|
+
outline: none
|
17
|
+
&:link, &:visited, &:hover, &:active, &:active
|
18
|
+
text-decoration: none
|
19
|
+
&:focus
|
20
|
+
outline: none
|
21
|
+
&:disabled,
|
22
|
+
&.is-disabled
|
23
|
+
+button-disabled
|
24
|
+
opacity: 0.2
|
25
|
+
// &.is-loading
|
26
|
+
// +button-loading
|
27
|
+
|
28
|
+
=button-disabled
|
29
|
+
cursor: default
|
30
|
+
pointer-events: none
|
31
|
+
|
32
|
+
=button-loading
|
33
|
+
+button-disabled
|
34
|
+
+icon-loading
|
35
|
+
opacity: 0.6
|
36
|
+
|
37
|
+
// .button-normal
|
38
|
+
// +button-normal(10px 10px, #529ef6, #fff, 2px)
|
39
|
+
=button-normal($p: 10px 10px, $c: #529ef6, $c-text: #fff, $r: 2px)
|
40
|
+
+button-base
|
41
|
+
border-radius: $r
|
42
|
+
border: 1px solid $c
|
43
|
+
background-color: $c
|
44
|
+
color: $c-text
|
45
|
+
padding: $p
|
46
|
+
line-height: 1
|
47
|
+
&:focus
|
48
|
+
background-color: $c
|
49
|
+
&:hover,
|
50
|
+
&:active,
|
51
|
+
&.is-current
|
52
|
+
background-color: darken($c, 10%)
|
53
|
+
color: $c-text
|
54
|
+
border-color: $c
|
55
|
+
|
56
|
+
// .button-semiflat
|
57
|
+
// +button-semiflat(10px 10px, #529ef6, 10%, #fff, 2px)
|
58
|
+
=button-semiflat($p: 10px 10px, $c: #529ef6, $strangth: 5%, $c-text: #fff, $r: 4px)
|
59
|
+
+button-base
|
60
|
+
border-radius: $r
|
61
|
+
background-color: $c
|
62
|
+
background-image: linear-gradient(to top, $c, lighten($c, $strangth))
|
63
|
+
border: 1px solid lighten($c, $strangth)
|
64
|
+
color: $c-text
|
65
|
+
padding: $p
|
66
|
+
line-height: 1
|
67
|
+
&:focus
|
68
|
+
background-color: $c
|
69
|
+
background-image: linear-gradient(to top, $c, lighten($c, $strangth))
|
70
|
+
&:hover,
|
71
|
+
&:active,
|
72
|
+
&.is-current
|
73
|
+
background-color: darken($c, $strangth)
|
74
|
+
background-image: linear-gradient(to top, darken($c, $strangth), $c)
|
75
|
+
|
76
|
+
// .button-border
|
77
|
+
// +button-border(10px 10px, #529ef6, #fff)
|
78
|
+
=button-border($p: 10px 10px, $c: #529ef6, $c-text: #fff, $border: 1px, $r: 2px)
|
79
|
+
+button-base
|
80
|
+
border-radius: $r
|
81
|
+
background-color: transparent
|
82
|
+
padding: $p
|
83
|
+
border: $border solid $c
|
84
|
+
color: $c
|
85
|
+
line-height: 1
|
86
|
+
&:focus
|
87
|
+
background-color: transparent
|
88
|
+
border: $border solid $c
|
89
|
+
&:hover,
|
90
|
+
&:active,
|
91
|
+
&.is-current
|
92
|
+
background-color: $c
|
93
|
+
color: $c-text
|
94
|
+
border-color: transparet
|
95
|
+
|
96
|
+
// .button-emboss
|
97
|
+
// +button-emboss(10px 10px, #529ef6, #fff, 6px, 4px)
|
98
|
+
=button-emboss($p: 10px 10px, $c: #529ef6, $c-text: #fff, $thickness: 6px, $r: 4px)
|
99
|
+
+button-base
|
100
|
+
transition: all 0.05s ease-out
|
101
|
+
transform: translateY(-$thickness)
|
102
|
+
box-shadow: 0 $thickness 0 darken($c, 10%)
|
103
|
+
border-radius: $r
|
104
|
+
background-color: $c
|
105
|
+
color: $c-text
|
106
|
+
padding: $p
|
107
|
+
line-height: 1
|
108
|
+
&:focus
|
109
|
+
background-color: $c
|
110
|
+
box-shadow: 0 $thickness 0 darken($c, 10%)
|
111
|
+
&:hover,
|
112
|
+
&:active,
|
113
|
+
&.is-current
|
114
|
+
transform: translateY(0)
|
115
|
+
box-shadow: 0 0 0 $c
|
116
|
+
background-color: darken($c, 10%)
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=form
|
2
|
+
input[type=text],
|
3
|
+
textarea,
|
4
|
+
legend,
|
5
|
+
.select,
|
6
|
+
.radio,
|
7
|
+
.radio-inside,
|
8
|
+
.radio-default,
|
9
|
+
.checkbox,
|
10
|
+
.checkbox-inside,
|
11
|
+
.checkbox-default
|
12
|
+
font-size: 1rem
|
13
|
+
line-height: 1.6rem
|
14
|
+
|
15
|
+
p
|
16
|
+
margin-bottom: 0
|
17
|
+
|
18
|
+
input[type=text]
|
19
|
+
+input-base
|
20
|
+
textarea
|
21
|
+
+input-base
|
22
|
+
fieldset
|
23
|
+
+fieldset-base
|
24
|
+
.select
|
25
|
+
+select-base
|
26
|
+
|
27
|
+
.radio
|
28
|
+
+radio-base
|
29
|
+
padding-right: 1rem
|
30
|
+
.radio-inside
|
31
|
+
+radio-base(span)
|
32
|
+
padding-right: 1rem
|
33
|
+
.radio-default
|
34
|
+
+radio-default
|
35
|
+
padding-right: 1rem
|
36
|
+
.checkbox
|
37
|
+
+checkbox-base
|
38
|
+
padding-right: 1rem
|
39
|
+
.checkbox-inside
|
40
|
+
+checkbox-base(span)
|
41
|
+
padding-right: 1rem
|
42
|
+
.checkbox-default
|
43
|
+
+checkbox-default
|
44
|
+
padding-right: 1rem
|
@@ -0,0 +1,57 @@
|
|
1
|
+
=gist
|
2
|
+
$_contents-width: 960px
|
3
|
+
$_break-point: 640px
|
4
|
+
$_ml: 100px
|
5
|
+
width: auto !important
|
6
|
+
margin-left: -$_ml !important
|
7
|
+
margin-right: -$_ml !important
|
8
|
+
margin-top: 30px
|
9
|
+
margin-bottom: 30px
|
10
|
+
position: relative
|
11
|
+
@media screen and (max-width: $_contents-width + ($_ml*2) + 20px)
|
12
|
+
margin-left: 0 !important
|
13
|
+
margin-right: 0 !important
|
14
|
+
@media screen and (max-width: $_break-point)
|
15
|
+
margin-left: 0 !important
|
16
|
+
margin-right: 0 !important
|
17
|
+
table
|
18
|
+
margin-bottom: 0
|
19
|
+
.gist-file
|
20
|
+
border: none
|
21
|
+
.gist-data
|
22
|
+
border-bottom: none
|
23
|
+
background: #f8f8f8
|
24
|
+
.file-data
|
25
|
+
line-height: 1.4em
|
26
|
+
color: #444
|
27
|
+
position: relative
|
28
|
+
width: auto !important
|
29
|
+
.line-data
|
30
|
+
border-top: none
|
31
|
+
border-bottom: none
|
32
|
+
padding-left: 10px !important
|
33
|
+
.line-numbers,
|
34
|
+
.line-data,
|
35
|
+
.line-pre
|
36
|
+
border: none
|
37
|
+
font-size: 13px
|
38
|
+
background: #f8f8f8
|
39
|
+
.line-numbers
|
40
|
+
padding-right: 10px
|
41
|
+
width: 20px
|
42
|
+
.line-number
|
43
|
+
font-weight: normal
|
44
|
+
color: #ddd
|
45
|
+
.line-pre
|
46
|
+
font-family: Consolas, "Liberation Mono", Courier, monospace
|
47
|
+
color: #333
|
48
|
+
.gist-meta
|
49
|
+
$c: #f8f8f8
|
50
|
+
background-color: $c
|
51
|
+
border-top: 1px solid #eee
|
52
|
+
text-shadow: none
|
53
|
+
|
54
|
+
.gist-meta, .gist-meta a
|
55
|
+
font-size: 12px
|
56
|
+
font-weight: normal
|
57
|
+
text-shadow: 1px 1px rgba(255,255,255,0)
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=grid-container
|
2
|
+
+clearfix
|
3
|
+
box-sizing: border-box
|
4
|
+
margin-right: auto
|
5
|
+
margin-left: auto
|
6
|
+
position: relative
|
7
|
+
|
8
|
+
=grid-row($gutter: 10px)
|
9
|
+
+clearfix
|
10
|
+
box-sizing: border-box
|
11
|
+
position: relative
|
12
|
+
margin-left: -($gutter / 2)
|
13
|
+
margin-right: -($gutter / 2)
|
14
|
+
margin-top: -($gutter / 2)
|
15
|
+
margin-bottom: -($gutter / 2)
|
16
|
+
|
17
|
+
=grid-item($gutter: 10px)
|
18
|
+
box-sizing: border-box
|
19
|
+
position: relative
|
20
|
+
padding-left: ($gutter / 2)
|
21
|
+
padding-right: ($gutter / 2)
|
22
|
+
padding-top: ($gutter / 2)
|
23
|
+
padding-bottom: ($gutter / 2)
|
24
|
+
float: left
|
25
|
+
word-break: break-all
|
26
|
+
|
27
|
+
=grids($grid-columns: 12, $grid-gutter: 10px, $debug: true)
|
28
|
+
@at-root
|
29
|
+
#{&}
|
30
|
+
+grid-container
|
31
|
+
|
32
|
+
#{&}__row
|
33
|
+
+grid-row($grid-gutter)
|
34
|
+
|
35
|
+
#{&}__item
|
36
|
+
@if $debug
|
37
|
+
+debug-block
|
38
|
+
+grid-item($grid-gutter)
|
39
|
+
width: percentage(3 / $grid-columns)
|
40
|
+
&.c
|
41
|
+
clear: both
|
42
|
+
@for $i from 0 through $grid-columns
|
43
|
+
&.is-col#{$i}
|
44
|
+
width: percentage($i / $grid-columns)
|