spuit 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +11 -0
  3. data/.gitignore +70 -0
  4. data/.npmignore +9 -0
  5. data/Gemfile +4 -0
  6. data/README.md +16 -0
  7. data/Rakefile +1 -0
  8. data/assets/javascripts/index.js +2 -0
  9. data/assets/javascripts/spuit/Common.js +316 -0
  10. data/assets/javascripts/spuit/extend.js +46 -0
  11. data/assets/stylesheets/spuit/components/_body.sass +175 -0
  12. data/assets/stylesheets/spuit/components/_button.sass +116 -0
  13. data/assets/stylesheets/spuit/components/_form.sass +44 -0
  14. data/assets/stylesheets/spuit/components/_gist.sass +57 -0
  15. data/assets/stylesheets/spuit/components/_grids.sass +44 -0
  16. data/assets/stylesheets/spuit/components/_icon.scss +68 -0
  17. data/assets/stylesheets/spuit/components/_markdown.sass +182 -0
  18. data/assets/stylesheets/spuit/components/_messages.sass +18 -0
  19. data/assets/stylesheets/spuit/components/_shoulder.sass +13 -0
  20. data/assets/stylesheets/spuit/components/_split.sass +32 -0
  21. data/assets/stylesheets/spuit/components/_triangle.sass +40 -0
  22. data/assets/stylesheets/spuit/components/_wordwrap-fadeout.sass +19 -0
  23. data/assets/stylesheets/spuit/components/_wrap.sass +22 -0
  24. data/assets/stylesheets/spuit/elements/_checkbox.sass +46 -0
  25. data/assets/stylesheets/spuit/elements/_dl.sass +30 -0
  26. data/assets/stylesheets/spuit/elements/_fieldset.sass +46 -0
  27. data/assets/stylesheets/spuit/elements/_hr.sass +36 -0
  28. data/assets/stylesheets/spuit/elements/_input.sass +27 -0
  29. data/assets/stylesheets/spuit/elements/_radio.sass +47 -0
  30. data/assets/stylesheets/spuit/elements/_select.sass +54 -0
  31. data/assets/stylesheets/spuit/elements/_table.sass +58 -0
  32. data/assets/stylesheets/spuit/includes/_animations.scss +55 -0
  33. data/assets/stylesheets/spuit/includes/_grid.scss +345 -0
  34. data/assets/stylesheets/spuit/includes/_hiddens.scss +17 -0
  35. data/assets/stylesheets/spuit/includes/_normalize.scss +467 -0
  36. data/assets/stylesheets/spuit/includes/_spacers.scss +79 -0
  37. data/assets/stylesheets/spuit/includes/_spuit-utils.scss +11 -0
  38. data/assets/stylesheets/spuit/includes/_stickey-footer.scss +18 -0
  39. data/assets/stylesheets/spuit/includes/_webfonts.scss +30 -0
  40. data/assets/stylesheets/spuit/modules/_background-image.scss +63 -0
  41. data/assets/stylesheets/spuit/modules/_breakpoints.scss +19 -0
  42. data/assets/stylesheets/spuit/modules/_clearfix.scss +7 -0
  43. data/assets/stylesheets/spuit/modules/_fa.scss +28 -0
  44. data/assets/stylesheets/spuit/modules/_font-face.scss +31 -0
  45. data/assets/stylesheets/spuit/modules/_hide-text.scss +9 -0
  46. data/assets/stylesheets/spuit/modules/_inherit.scss +6 -0
  47. data/assets/stylesheets/spuit/modules/_reset.scss +55 -0
  48. data/assets/stylesheets/spuit/modules/_text-overflow.scss +15 -0
  49. data/assets/stylesheets/spuit/modules/_word-break.scss +11 -0
  50. data/assets/stylesheets/spuit/shortcuts/_absolute.scss +17 -0
  51. data/assets/stylesheets/spuit/shortcuts/_centering.scss +6 -0
  52. data/assets/stylesheets/spuit/shortcuts/_disc.scss +6 -0
  53. data/assets/stylesheets/spuit/variables/_colors.scss +3 -0
  54. data/assets/stylesheets/spuit/variables/_defaults.scss +3 -0
  55. data/assets/stylesheets/spuit/variables/_fonts.scss +6 -0
  56. data/assets/stylesheets/spuit/variables/_media-queries.scss +31 -0
  57. data/assets/stylesheets/spuit/variables/_svgs.scss +7 -0
  58. data/assets/stylesheets/spuit/variables/_timing-functions.sass +37 -0
  59. data/assets/stylesheets/styles.scss +164 -0
  60. data/assets/stylesheets/styles/config/_mixins.scss +23 -0
  61. data/assets/stylesheets/styles/config/_variables.scss +4 -0
  62. data/dist/favicon.png +0 -0
  63. data/dist/index.html +307 -0
  64. data/dist/javascripts/scripts.min.js +2 -0
  65. data/dist/javascripts/scripts.min.js.map +1 -0
  66. data/dist/stylesheets/styles.css +1 -0
  67. data/gulp/README.md +7 -0
  68. data/gulp/tasks/watch.js +79 -0
  69. data/gulpfile.js +2 -0
  70. data/lib/spuit.rb +41 -0
  71. data/lib/spuit/engine.rb +5 -0
  72. data/lib/spuit/generator.rb +80 -0
  73. data/lib/spuit/version.rb +3 -0
  74. data/package.json +38 -0
  75. data/spuit.gemspec +23 -0
  76. data/spuit.scss +47 -0
  77. metadata +147 -0
@@ -0,0 +1,68 @@
1
+ /*
2
+ necessary:
3
+ @include include-fa;
4
+ @include include-animations;
5
+ */
6
+ @mixin icon-loading {
7
+ &::before {
8
+ @include fa('\f1ce');
9
+ animation: anim-spin 1.6s infinite linear;
10
+ margin-right: 5px;
11
+ }
12
+ }
13
+
14
+ @mixin icon-twitter {
15
+ &::before {
16
+ content: '';
17
+ width: 40px;
18
+ height: 40px;
19
+ display: inline-block;
20
+ background-color: $color-twitter;
21
+ background-image: url("data:image/svg+xml, #{$svg-twitter}");
22
+ background-repeat: no-repeat;
23
+ background-position: center center;
24
+ background-size: 60% 60%;
25
+ }
26
+ }
27
+
28
+ @mixin icon-facebook {
29
+ &::before {
30
+ content: '';
31
+ width: 40px;
32
+ height: 40px;
33
+ display: inline-block;
34
+ background-color: $color-facebook;
35
+ background-image: url("data:image/svg+xml, #{$svg-facebook}");
36
+ background-repeat: no-repeat;
37
+ background-position: center center;
38
+ background-size: 60% 60%
39
+ }
40
+ }
41
+
42
+ @mixin icon-hatena {
43
+ &::before {
44
+ content: '';
45
+ width: 40px;
46
+ height: 40px;
47
+ display: inline-block;
48
+ background-color: $color-hatena;
49
+ background-image: url("data:image/svg+xml, #{$svg-hatena}");
50
+ background-repeat: no-repeat;
51
+ background-position: center center;
52
+ background-size: 50% 50%;
53
+ }
54
+ }
55
+
56
+ @mixin icon-hamburger {
57
+ &::before {
58
+ content: '';
59
+ width: 40px;
60
+ height: 40px;
61
+ display: inline-block;
62
+ background-color: #000;
63
+ background-image: url("data:image/svg+xml, #{$svg-hamburger}");
64
+ background-repeat: no-repeat;
65
+ background-position: center center;
66
+ background-size: 45% 45%;
67
+ }
68
+ }
@@ -0,0 +1,182 @@
1
+ =markdown
2
+ $_color-accent: #222
3
+ $_contents-width: 500px
4
+ $_break-point: 500px
5
+ $_margin-contents-bottom: 30px
6
+
7
+ // .md系
8
+ .md-img-left,
9
+ .md-img-right
10
+ clear: both
11
+ .md-img-left + p img,
12
+ .md-img-right + p img
13
+ width: 300px
14
+ margin-bottom: 20px
15
+ @media screen and (max-width: $_break-point + 300px)
16
+ position: relative
17
+ width: auto !important
18
+ margin-left: 0 !important
19
+ margin-right: 0 !important
20
+ float: none !important
21
+ width: 100% !important
22
+ .md-img-left + p img
23
+ float: left
24
+ margin-left: -100px
25
+ margin-right: 30px
26
+ .md-img-right + p img
27
+ float: right
28
+ margin-right: -100px
29
+ margin-left: 30px
30
+
31
+ // .md-step
32
+ .md-step + ul
33
+ $accent: #000
34
+ $background: #f2f2f2
35
+ $border: #fff
36
+ $h: 30px
37
+ list-style: none
38
+ padding: 0
39
+ margin: 0 0 20px 0
40
+ border: 1px solid $border
41
+ overflow: hidden
42
+ display: inline-block
43
+ background-color: $background
44
+ border: 1px solid $border
45
+ // +border-radius(4px)
46
+ li
47
+ float: left
48
+ color: #ccc
49
+ line-height: $h
50
+ padding: 0 10px 0 15px
51
+ font-size: 12px
52
+ text-align: center
53
+ position: relative
54
+ list-style: none
55
+ & + li
56
+ padding: 0 7px 0 $h*0.8
57
+ &:last-child
58
+ padding-right: 15px
59
+ &:after,
60
+ &:before
61
+ left: 100%
62
+ border: solid transparent
63
+ content: " "
64
+ height: 0
65
+ width: 0
66
+ position: absolute
67
+ pointer-events: none
68
+ z-index: 5
69
+ &:after
70
+ border-left-color: $background
71
+ border-width: $h/2
72
+ top: 50%
73
+ margin-top: -$h/2
74
+ &:before
75
+ border-left-color: $border
76
+ border-width: $h/2 + 1px
77
+ top: 50%
78
+ margin-top: -$h/2 - 1px
79
+ li
80
+ background-color: $accent
81
+ color: #fff
82
+ margin-bottom: 0
83
+ &:after
84
+ border-left-color: $accent
85
+ &:before
86
+ border-left-color: #ffffff
87
+
88
+ // .md-large + script + link + .gist,
89
+ .md-large + p,
90
+ .md-large + div
91
+ $_ml: 100px
92
+ width: auto !important
93
+ margin-left: -$_ml !important
94
+ margin-right: -$_ml !important
95
+ position: relative
96
+ img
97
+ width: 100%
98
+ height: auto
99
+ @media screen and (max-width: $_contents-width + ($_ml*2) + 20px)
100
+ margin-left: 0 !important
101
+ margin-right: 0 !important
102
+ @media screen and (max-width: $_break-point)
103
+ margin-left: 0 !important
104
+ margin-right: 0 !important
105
+
106
+ .md-frame-learge + p,
107
+ .md-frame + p
108
+ background: #f2f2f2
109
+ padding: 10px
110
+ margin-bottom: $_margin-contents-bottom
111
+ .md-frame-learge + p
112
+ $_ml: 100px
113
+ width: auto !important
114
+ margin-left: -$_ml !important
115
+ margin-right: -$_ml !important
116
+ margin-top: 30px
117
+ margin-bottom: 30px
118
+ position: relative
119
+
120
+ // .md-large
121
+ .md-photo + p
122
+ $_ml: 100px
123
+ $_ml2: 200px
124
+ $_ml3: 300px
125
+ width: auto !important
126
+ margin-left: -$_ml3 !important
127
+ margin-right: -$_ml3 !important
128
+ position: relative
129
+ img
130
+ width: 100%
131
+ height: auto
132
+ @media screen and (max-width: $_contents-width + ($_ml3*2) + 20px)
133
+ margin-left: -$_ml2 !important
134
+ margin-right: -$_ml2 !important
135
+ @media screen and (max-width: $_contents-width + ($_ml2*2) + 20px)
136
+ margin-left: -$_ml !important
137
+ margin-right: -$_ml !important
138
+ @media screen and (max-width: $_contents-width + ($_ml*2) + 20px)
139
+ margin-left: 0 !important
140
+ margin-right: 0 !important
141
+ @media screen and (max-width: $_break-point)
142
+ margin-left: 0 !important
143
+ margin-right: 0 !important
144
+
145
+ // footnote系
146
+ %footnote
147
+ font-size: 10px !important
148
+ background: $_color-accent
149
+ color: #000
150
+ text-decoration: none
151
+ padding: 2px
152
+ line-height: 1em
153
+ a[rel="footnote"]
154
+ @extend %footnote
155
+ .footnotes
156
+ ol
157
+ margin-bottom: $_margin-contents-bottom
158
+ padding: 10px 10px 10px 0px
159
+ border: 1px solid #dedede
160
+ // +border-radius(4px)
161
+ li
162
+ font-weight: normal
163
+ list-style: decimal
164
+ border-top: 1px dotted #dedede
165
+ padding: 5px 0 5px 0
166
+ margin-left: 30px
167
+ font-size: 12px !important
168
+ &:first-child
169
+ border-top: none
170
+ +transition(background-color 1s ease-out)
171
+ &.active
172
+ background-color: $_color-accent + 200
173
+ p
174
+ margin: 0
175
+ font-size: 12px !important
176
+ a, strong
177
+ font-size: 12px !important
178
+ a.reversefootnote,
179
+ a[rev="footnote"]
180
+ @extend %footnote
181
+
182
+
@@ -0,0 +1,18 @@
1
+ =message-element($name: info, $color: #3498DB)
2
+ box-sizing: border-box
3
+ padding: 12px
4
+ border-radius: 3px
5
+ display: block
6
+
7
+ &.is-#{$name}
8
+ color: $color
9
+ background: rgba($color, 0.1)
10
+ border: 1px solid rgba($color, 0.15)
11
+
12
+ =util-messages($color-info: #3498DB, $color-success: #1ABC9C, $color-warning: #F1C40F, $color-danger: #E74C3C)
13
+ @at-root
14
+ .message
15
+ +message-element(info, $color-info)
16
+ +message-element(success, $color-success)
17
+ +message-element(warning, $color-warning)
18
+ +message-element(danger, $color-danger)
@@ -0,0 +1,13 @@
1
+ // %h2
2
+ // %ul.shoulder
3
+ // %li
4
+ // = link_to 'shoulder', '#'
5
+ // %li
6
+ // = link_to 'shoulder', '#'
7
+ // Heading and shoulder links.
8
+
9
+ =shoulder
10
+ +reset-ul
11
+ display: inline-block
12
+ float: right
13
+ padding-left: 10px
@@ -0,0 +1,32 @@
1
+ // Example:
2
+
3
+ // Simple Grid System - ie9-
4
+ @function split-width($column: 5, $gutter: 2)
5
+ $parcent: (1/$column) * 100
6
+ $margin: ($gutter * ($column - 1)) / $column
7
+ @return ($parcent - $margin)
8
+
9
+ =split($column: 5, $gutter: 2, $debug: false)
10
+ @at-root
11
+ #{&}
12
+ +clearfix
13
+ +reset-ul
14
+ position: relative
15
+ > *
16
+ @if $debug
17
+ +debug-block
18
+ display: inline-block
19
+ float: left
20
+ box-sizing: border-box
21
+ width: split-width($column, $gutter) * 1%
22
+ margin-left: $gutter * 1%
23
+ @for $i from 0 through 150
24
+ @if $i%$column == 1
25
+ &:nth-child(#{$i})
26
+ clear: both
27
+ margin-left: 0
28
+ @else
29
+ &:nth-child(#{$i})
30
+ clear: none
31
+ margin-left: $gutter * 1%
32
+ margin-bottom: 10px
@@ -0,0 +1,40 @@
1
+ // Example:
2
+ // +triangle(#222, 12px, $w/2, 0, 'left')
3
+
4
+ =triangle($c: #2dd, $w:20px, $l: 0, $t: 0, $direction: "right", $element: "after")
5
+ position: relative
6
+ &:#{$element}
7
+ content: ""
8
+ position: absolute
9
+ width: 0
10
+ height: 0
11
+ border: $w solid transparent
12
+ border-top-color: $c
13
+ @if $direction == "left"
14
+ &:#{$element}
15
+ transform: translateX(-$w*2) translateY(-$w) rotate(90deg)
16
+ left: $l
17
+ right: auto
18
+ top: $t
19
+ @if $direction == "right"
20
+ &:#{$element}
21
+ transform: translateX($w*2) translateY(-$w) rotate(-90deg)
22
+ left: auto
23
+ right: $l
24
+ top: $t
25
+ @if $direction == "top"
26
+ &:#{$element}
27
+ transform: translateX(-$w) translateY(-$w*2) rotate(180deg)
28
+ right: auto
29
+ left: $l
30
+ top: $t
31
+ @if $direction == "bottom"
32
+ &:#{$element}
33
+ transform: translateX(-$w) translateY($w*2) rotate(0)
34
+ right: auto
35
+ left: $l
36
+ bottom: $t
37
+
38
+ =tri($c: #2dd, $w:20px, $l: 0, $t: 0, $direction: "right", $element: "after")
39
+ +triangle($c, $w, $l, $t, $direction, $element)
40
+
@@ -0,0 +1,19 @@
1
+ =wordwrap-fadeout($h: 40px, $m: 10px, $c: #fff)
2
+ position: relative
3
+ overflow: hidden
4
+ &:before
5
+ content: ''
6
+ position: absolute
7
+ bottom: 0
8
+ left: 0
9
+ width: 100%
10
+ height: $m
11
+ background: $c
12
+ &:after
13
+ background-image: linear-gradient(to top, rgba($c,1), rgba($c,0))
14
+ content: ''
15
+ position: absolute
16
+ bottom: $m
17
+ left: 0
18
+ width: 100%
19
+ height: $h
@@ -0,0 +1,22 @@
1
+ =wrap($n: 960px, $margin: 10px)
2
+ width: 100%
3
+ margin: 0
4
+ padding: 0
5
+ text-align: center
6
+ min-width: $n
7
+ +breakpoint-down(sm)
8
+ width: auto
9
+ min-width: 0
10
+
11
+ @at-root
12
+ #{&}__inner
13
+ box-sizing: border-box
14
+ position: relative
15
+ display: block
16
+ width: $n
17
+ margin: 0 auto
18
+ text-align: left
19
+ +breakpoint-down(sm)
20
+ width: 100%
21
+ padding-left: $margin
22
+ padding-right: $margin
@@ -0,0 +1,46 @@
1
+ =checkbox-default
2
+ margin: 0
3
+ display: inline-block
4
+ vertical-align: top
5
+
6
+ input[type=checkbox]
7
+ display: inline-block
8
+ margin: 0 4px 0 0
9
+ label
10
+ cursor: pointer
11
+ margin: 0
12
+
13
+ =checkbox-base($tag: label, $w: 18px, $color-key: #529ef6)
14
+ +checkbox-default
15
+ $icon: 'DQo8c3ZnIHdpZHRoPSIxMXB4IiBoZWlnaHQ9IjExcHgiIHZpZXdCb3g9Ijg2IDIyNiAxMSAxMSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4NCiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+DQogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+DQogICAgPGRlZnM+PC9kZWZzPg0KICAgIDxwYXRoIGQ9Ik04OS4yOTI4OTMyLDIzMi43MDcxMDcgTDk1LjI5Mjg5MzIsMjMyLjcwNzEwNyBMOTUuMjkyODkzMiwyMzQuNzA3MTA3IEw4Ny4yOTI4OTMyLDIzNC43MDcxMDcgTDg3LjI5Mjg5MzIsMjMzLjcwNzEwNyBMODcuMjkyODkzMiwyMjguNzA3MTA3IEw4OS4yOTI4OTMyLDIyOC43MDcxMDcgTDg5LjI5Mjg5MzIsMjMyLjcwNzEwNyBaIiBpZD0iY2hlY2siIHN0cm9rZT0ibm9uZSIgZmlsbD0iI0ZGRkZGRiIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5MS4yOTI4OTMsIDIzMS43MDcxMDcpIHJvdGF0ZSgtNDUuMDAwMDAwKSB0cmFuc2xhdGUoLTkxLjI5Mjg5MywgLTIzMS43MDcxMDcpICI+PC9wYXRoPg0KPC9zdmc+'
16
+
17
+ #{$tag}
18
+ margin: 0
19
+ padding: 0
20
+ line-height: 1
21
+ cursor: pointer
22
+
23
+ &:before
24
+ content: url('data:image/svg+xml;base64,#{$icon}')
25
+ vertical-align: middle
26
+ box-sizing: border-box
27
+ text-align: center
28
+ background: #fff
29
+ width: $w
30
+ height: $w
31
+ line-height: $w - 5px
32
+ padding: 0 0 0 1px
33
+ border: 1px solid #ddd
34
+ display: inline-block
35
+ border-radius: 3px
36
+
37
+ &:hover
38
+ &:before
39
+ border-color: $color-key
40
+
41
+ input[type=checkbox]
42
+ display: none
43
+
44
+ &:checked + #{$tag}
45
+ &:before
46
+ background: $color-key