middleman-sculptor 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +10 -0
  3. data/.gitignore +9 -0
  4. data/Gemfile +3 -0
  5. data/Rakefile +2 -0
  6. data/bin/middleman-sculptor +7 -0
  7. data/bin/sculpt +7 -0
  8. data/lib/middleman-sculptor.rb +16 -0
  9. data/lib/middleman-sculptor/cli.rb +57 -0
  10. data/lib/middleman-sculptor/cli/init.rb +15 -0
  11. data/lib/middleman-sculptor/cli/version.rb +12 -0
  12. data/lib/middleman-sculptor/extension.rb +13 -0
  13. data/lib/middleman-sculptor/hash_dot_syntax.rb +6 -0
  14. data/lib/middleman-sculptor/helpers/model.rb +110 -0
  15. data/lib/middleman-sculptor/helpers/outliner.rb +44 -0
  16. data/lib/middleman-sculptor/helpers/resources.rb +155 -0
  17. data/lib/middleman-sculptor/resource_patch.rb +49 -0
  18. data/lib/middleman-sculptor/sprockets_patch.rb +48 -0
  19. data/lib/middleman-sculptor/template.rb +39 -0
  20. data/lib/middleman-sculptor/template/.bowerrc +3 -0
  21. data/lib/middleman-sculptor/template/.editorconfig +10 -0
  22. data/lib/middleman-sculptor/template/.gitignore +2 -0
  23. data/lib/middleman-sculptor/template/Gemfile.tt +11 -0
  24. data/lib/middleman-sculptor/template/bower.json +12 -0
  25. data/lib/middleman-sculptor/template/config.tt +149 -0
  26. data/lib/middleman-sculptor/template/data/.gitkeep +0 -0
  27. data/lib/middleman-sculptor/template/source/assets/images/.gitkeep +0 -0
  28. data/lib/middleman-sculptor/template/source/assets/scripts/app.js +6 -0
  29. data/lib/middleman-sculptor/template/source/assets/scripts/glyptotheque.js +8 -0
  30. data/lib/middleman-sculptor/template/source/assets/scripts/glyptotheque/controllers.js +1 -0
  31. data/lib/middleman-sculptor/template/source/assets/scripts/glyptotheque/directives.js +124 -0
  32. data/lib/middleman-sculptor/template/source/assets/scripts/glyptotheque/services.js +1 -0
  33. data/lib/middleman-sculptor/template/source/assets/scripts/head-js.js +1 -0
  34. data/lib/middleman-sculptor/template/source/assets/scripts/iframe-js.js +1 -0
  35. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque.scss +9 -0
  36. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_$variables.scss +3 -0
  37. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_base.scss +58 -0
  38. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_codehilite.scss +10 -0
  39. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_html-outline.scss +131 -0
  40. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_model-utils.scss +78 -0
  41. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_model.scss +48 -0
  42. data/lib/middleman-sculptor/template/source/assets/styles/glyptotheque/_nav.scss +172 -0
  43. data/lib/middleman-sculptor/template/source/assets/styles/main.scss +18 -0
  44. data/lib/middleman-sculptor/template/source/assets/styles/pygments/borland.css +46 -0
  45. data/lib/middleman-sculptor/template/source/assets/styles/pygments/colorful.css +61 -0
  46. data/lib/middleman-sculptor/template/source/assets/styles/pygments/github.css +61 -0
  47. data/lib/middleman-sculptor/template/source/assets/styles/pygments/trac.css +59 -0
  48. data/lib/middleman-sculptor/template/source/glyptotheque/_model-outline-element.slim +22 -0
  49. data/lib/middleman-sculptor/template/source/glyptotheque/_model-outline.slim +3 -0
  50. data/lib/middleman-sculptor/template/source/glyptotheque/_model-utils.slim +13 -0
  51. data/lib/middleman-sculptor/template/source/glyptotheque/_model.slim +26 -0
  52. data/lib/middleman-sculptor/template/source/glyptotheque/_nav.slim +31 -0
  53. data/lib/middleman-sculptor/template/source/glyptotheque/directory-index.html.slim +14 -0
  54. data/lib/middleman-sculptor/template/source/glyptotheque/site-index.html.slim +5 -0
  55. data/lib/middleman-sculptor/template/source/glyptotheque/sitemap.json.erb +1 -0
  56. data/lib/middleman-sculptor/template/source/layouts/glyptotheque.slim +19 -0
  57. data/lib/middleman-sculptor/template/source/layouts/isolated.slim +19 -0
  58. data/lib/middleman-sculptor/template/source/layouts/layout.slim +18 -0
  59. data/lib/middleman-sculptor/version.rb +5 -0
  60. data/lib/middleman_extension.rb +1 -0
  61. data/middleman-sculptor.gemspec +29 -0
  62. metadata +197 -0
@@ -0,0 +1 @@
1
+ //= require iframe-resizer/src/iframeResizer.contentWindow
@@ -0,0 +1,9 @@
1
+ @import 'bourbon';
2
+
3
+ @import 'glyptotheque/$variables';
4
+ @import 'glyptotheque/base';
5
+ @import 'glyptotheque/nav';
6
+ @import 'glyptotheque/model';
7
+ @import 'glyptotheque/model-utils';
8
+ @import 'glyptotheque/html-outline';
9
+ @import 'glyptotheque/codehilite';
@@ -0,0 +1,3 @@
1
+ $light-grey: #e7e6e8;
2
+ $hover-orange: #d25f00;
3
+ $glypto-nav-width: 230px;
@@ -0,0 +1,58 @@
1
+ html,
2
+ body {
3
+ height: 100%;
4
+ }
5
+
6
+ body {
7
+ background: #d9d7de;
8
+ }
9
+
10
+ .glyptotheque {
11
+ padding: 40px 20px;
12
+ min-height: 100%;
13
+ overflow: hidden;
14
+ background: white;
15
+ box-shadow: -1px 0 0 rgba(black, .1);
16
+ position: relative;
17
+
18
+ > header {
19
+ margin: 0 0 30px;
20
+ border-bottom: 1px solid #ccc;
21
+
22
+ h1 {
23
+ font-size: 28px;
24
+ font-weight: 400;
25
+ margin: 0;
26
+ padding-bottom: 4px;
27
+ border-bottom: 4px solid #ccc;
28
+ display: inline-block;
29
+ }
30
+ }
31
+ }
32
+
33
+ .glypto-section {
34
+ margin: 0 -20px 30px;
35
+ padding: 0 20px 30px;
36
+ border-bottom: 1px solid #ddd;
37
+ box-shadow: 0 1px rgba(white, .4);
38
+
39
+ &:last-child {
40
+ box-shadow: none;
41
+ border: 0;
42
+ }
43
+
44
+ .glypto-title {
45
+ font-weight: 400;
46
+ font-size: 24px;
47
+ margin: 0;
48
+
49
+ a {
50
+ color: #0070a8;
51
+ text-decoration: none;
52
+
53
+ &:hover {
54
+ color: $hover-orange;
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,10 @@
1
+ .codehilite {
2
+ background: $light-grey;
3
+ padding: 10px;
4
+
5
+ // compensate for first new line
6
+ code {
7
+ display: inline-block;
8
+ margin-top: -1em;
9
+ }
10
+ }
@@ -0,0 +1,131 @@
1
+ .html-outline {
2
+ @mixin _item($color: null, $before: none, $after: none) {
3
+ $pres-color: #aaa;
4
+
5
+ display: inline-block;
6
+ vertical-align: top;
7
+ overflow: hidden;
8
+
9
+ @if $color {
10
+ color: $color;
11
+ }
12
+ &:before {
13
+ content: $before;
14
+ color: $pres-color;
15
+ }
16
+ &:after {
17
+ content: $after;
18
+ color: $pres-color;
19
+ }
20
+ }
21
+
22
+ font: 600 11px Menlo, monospace;
23
+ cursor: default;
24
+ background: $light-grey;
25
+ padding: 10px;
26
+ margin: 1em 0;
27
+
28
+ .glypto-model-outline & {
29
+ margin: 0;
30
+ }
31
+
32
+ ._element {
33
+ transition: 100ms;
34
+ padding: 1px 2px 2px;
35
+ border-radius: 3px;
36
+ margin: 1px;
37
+ color: #aaa;
38
+
39
+ &:hover {
40
+ box-shadow: inset 0 0 0 1px rgba(black, .07);
41
+ background: rgba(white, .2);
42
+ }
43
+
44
+ > span {
45
+ margin-top: 1px;
46
+ }
47
+
48
+ ._element {
49
+ margin-left: 10px;
50
+ }
51
+
52
+ > ._name,
53
+ ._id,
54
+ ._classes {
55
+ border-radius: 3px;
56
+ background: rgba(white, .2);
57
+ }
58
+
59
+ > ._name,
60
+ ._id,
61
+ ._classes,
62
+ ._class {
63
+ padding: 2px 5px;
64
+ margin-right: 1px;
65
+ white-space: nowrap;
66
+ }
67
+ }
68
+
69
+ ._id {
70
+ @include _item(#009486);
71
+ box-shadow: inset 0 0 0 1px rgba(#009486, .2);
72
+ }
73
+
74
+ ._classes {
75
+ @include _item;
76
+ box-shadow: inset 0 0 0 1px rgba(#cc3333, .2);
77
+ }
78
+
79
+ ._element > ._name {
80
+ @include _item(#003366);
81
+ box-shadow: inset 0 0 0 1px rgba(#003366, .2);
82
+ }
83
+
84
+ ._element ._class {
85
+ @include _item(#cc3333);
86
+ margin: -2px 0 -2px -1px;
87
+ border-left: 1px solid rgba(#cc3333, .1);
88
+ background: none;
89
+
90
+ &:first-child {
91
+ margin-left: -4px;
92
+ border: 0;
93
+ }
94
+
95
+ &:before {
96
+ font-family: serif;
97
+ font-weight: bold;
98
+ font-size: 12px;
99
+ margin: 0 2px 0 -2px;
100
+ color: inherit;
101
+ }
102
+ }
103
+
104
+ ._attributes {
105
+ @include _item;
106
+ padding: 2px;
107
+ border-radius: 3px;
108
+ word-break: break-word;
109
+ }
110
+
111
+ ._attr {
112
+ > ._name {
113
+ @include _item(#3366cc);
114
+ }
115
+
116
+ > ._value {
117
+ @include _item(#339900);
118
+ text-overflow: ellipsis;
119
+ white-space: nowrap;
120
+ max-width: 400px;
121
+ }
122
+ }
123
+
124
+ ._text {
125
+ @include _item;
126
+ font: normal 13px/15px Helvetica, Arial, sans-serif;
127
+ padding: 2px 2px 0;
128
+ max-width: 360px;
129
+ word-break: break-word;
130
+ }
131
+ }
@@ -0,0 +1,78 @@
1
+ .glypto-model-utils {
2
+ border-top: 1px solid $light-grey;
3
+
4
+ > menu {
5
+ @include clearfix;
6
+ font-size: 11px;
7
+ font-weight: 600;
8
+ color: #888;
9
+ margin: 0;
10
+ padding: 5px;
11
+ position: relative;
12
+ -webkit-font-smoothing: antialiased;
13
+
14
+ > a,
15
+ > button {
16
+ text-transform: uppercase;
17
+ padding: 5px 8px;
18
+ border-radius: 3px;
19
+ background: none;
20
+ color: inherit;
21
+ font-weight: inherit;
22
+
23
+ &:hover {
24
+ color: #555;
25
+ background: rgba(black, .05);
26
+ }
27
+ &:active {
28
+ color: #333;
29
+ background: rgba(black, .1);
30
+ }
31
+
32
+ &.__active {
33
+ color: white;
34
+ background: rgba(black, .3);
35
+
36
+ &:active {
37
+ background: rgba(black, .5);
38
+ color: white;
39
+ }
40
+ }
41
+
42
+ .fa {
43
+ margin-left: 5px;
44
+ }
45
+ }
46
+ }
47
+
48
+ ._tab-toggle {
49
+ float: left;
50
+ border: none;
51
+ outline: none;
52
+ margin-right: 3px;
53
+ }
54
+
55
+ ._isolated {
56
+ float: right;
57
+ text-decoration: none;
58
+ }
59
+
60
+ ._container {
61
+ max-height: 40rem;
62
+ overflow: auto;
63
+ }
64
+
65
+ ._panel {
66
+ display: none;
67
+
68
+ &.__shown {
69
+ display: block;
70
+ }
71
+ }
72
+
73
+ pre {
74
+ font: 12px/1.4 Menlo, monospace;
75
+ white-space: pre-wrap;
76
+ margin: 0;
77
+ }
78
+ }
@@ -0,0 +1,48 @@
1
+ @import 'pygments/github';
2
+
3
+ .glypto-model {
4
+ margin: 20px 0;
5
+ border: 1px solid $light-grey;
6
+
7
+ &:last-child {
8
+ margin-bottom: 0;
9
+ }
10
+
11
+ > .glypto-model-stage {
12
+ position: relative;
13
+ padding: 1px;
14
+
15
+ > figure,
16
+ > iframe {
17
+ display: block;
18
+ margin: 0;
19
+ }
20
+
21
+ > figure {
22
+ @include clearfix;
23
+ padding: 10px;
24
+ }
25
+
26
+ ._component {
27
+ transition: 200ms max-width;
28
+ overflow: hidden;
29
+ padding: 5px;
30
+
31
+ &.__small {
32
+ max-width: 320px;
33
+ }
34
+
35
+ &.__medium {
36
+ max-width: 640px;
37
+ }
38
+
39
+ &.__large {
40
+ max-width: 1280px;
41
+ }
42
+
43
+ &.__default {
44
+ max-width: 100%;
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,172 @@
1
+ .glypto-nav,
2
+ #glypto-nav-placeholder {
3
+ float: left;
4
+ width: $glypto-nav-width;
5
+ min-height: 1px;
6
+ }
7
+
8
+ .glypto-nav {
9
+ transition: 120ms ease-out;
10
+ color: #444;
11
+
12
+ &.s-hidden {
13
+ margin-left: -$glypto-nav-width;
14
+
15
+ > .glypto-nav-toggle {
16
+ background: none;
17
+ border-color:rgba(black, .2);
18
+ box-shadow: none;
19
+ margin-right: -30px;
20
+ }
21
+ }
22
+
23
+ ._logo {
24
+ background: rgba(black, .2);
25
+ color: rgba(white, .6);
26
+ border-bottom: 1px solid rgba(black, .05);
27
+ box-shadow: 0 1px 0 rgba(white, .3);
28
+ padding: 8px;
29
+
30
+ &:hover,
31
+ &:focus {
32
+ background: rgba(black, .2);
33
+ color: white;
34
+ }
35
+ }
36
+
37
+ .search {
38
+ padding: 4px;
39
+ background: rgba(black, .06);
40
+ border-bottom: 1px solid transparent;
41
+ margin-bottom: -1px;
42
+
43
+ input {
44
+ box-sizing: border-box;
45
+ border: 1px solid rgba(black, .2);
46
+ background: rgba(white, .6);
47
+ padding: 5px;
48
+ font-size: 14px;
49
+ display: block;
50
+ width: 100%;
51
+ outline: none;
52
+
53
+ @include placeholder {
54
+ color: #bbb;
55
+ }
56
+
57
+ &:focus {
58
+ background: white;
59
+ border-color: rgba(black, .4);
60
+ box-shadow: inset 0 0 2px rgba(black, .2);
61
+
62
+ @include placeholder {
63
+ color: #ddd;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ > .glypto-nav-toggle {
70
+ @include size(25px);
71
+ transition: 100ms;
72
+ padding: 0;
73
+ background: rgba(black, .1);
74
+ border: 0;
75
+ float: right;
76
+ margin: 5px 5px 0 0;
77
+ position: relative;
78
+ z-index: 1;
79
+ cursor: pointer;
80
+ opacity: .5;
81
+ outline: none;
82
+ border: 1px solid rgba(black, .28);
83
+ box-shadow: inset 0 0 0 1px rgba(black, .06);
84
+
85
+ &:before {
86
+ @include position(absolute, 5px 0 null 0);
87
+ transition: 300ms;
88
+ box-shadow: 0 2px 0 1px black, 0 7px 0 1px black, 0 12px 0 1px black;
89
+ width: 15px;
90
+ margin: auto;
91
+ opacity: .6;
92
+ content: '';
93
+ }
94
+
95
+ &:hover {
96
+ opacity: .6;
97
+ }
98
+ &:active {
99
+ opacity: .8;
100
+ background: rgba(black, .1);
101
+ border-color: rgba(black, .2);
102
+ box-shadow: inset 0 0 0 1px rgba(black, .06);
103
+ }
104
+ }
105
+
106
+ ul {
107
+ @include clearfix;
108
+ list-style: none;
109
+ font-size: 14px;
110
+ line-height: 1.2;
111
+ padding: 0;
112
+ margin: 0;
113
+ color: #555;
114
+ }
115
+
116
+ > ul > li {
117
+ border-top: 1px solid rgba(black, .07);
118
+ }
119
+
120
+ a {
121
+ display: block;
122
+ padding: 8px 10px;
123
+ color: inherit;
124
+ text-decoration: none;
125
+ outline: none;
126
+
127
+ &:hover,
128
+ &:focus {
129
+ background: rgba(white, .16);
130
+ color: $hover-orange;
131
+ }
132
+
133
+ &:active {
134
+ color: inherit;
135
+ background: rgba(black, .01);
136
+ }
137
+ }
138
+
139
+ li._index {
140
+ > a {
141
+ letter-spacing: 1px;
142
+ font-weight: 600;
143
+ }
144
+
145
+ ._count {
146
+ float: right;
147
+ color: #999;
148
+ font-weight: normal;
149
+ line-height: 16px;
150
+ }
151
+
152
+ ul {
153
+ a:before {
154
+ content: '';
155
+ margin: 0 5px;
156
+ }
157
+
158
+ ul a:before {
159
+ margin-left: 15px;
160
+ }
161
+
162
+ li:not(._index) a:before {
163
+ content: '•';
164
+ }
165
+ }
166
+ }
167
+
168
+ li.s-selected > a {
169
+ color: inherit;
170
+ background: rgba(#b5cdd9, .5);
171
+ }
172
+ }