plinth 0.0.1.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.codoopts +10 -0
- data/.env +1 -0
- data/.gitignore +23 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +1 -0
- data/Capfile +4 -0
- data/Gemfile +52 -0
- data/Gemfile.lock +243 -0
- data/Guardfile +9 -0
- data/LICENSE +22 -0
- data/Procfile +1 -0
- data/README.md +79 -0
- data/Rakefile +35 -0
- data/app/assets/images/layouts/basic-marketing-site.png +0 -0
- data/app/assets/images/layouts/jumbotron-site.png +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/application.js +17 -0
- data/app/assets/javascripts/base.js.coffee +3 -0
- data/app/assets/javascripts/grids.js.coffee +3 -0
- data/app/assets/javascripts/javascript.js.coffee +3 -0
- data/app/assets/javascripts/lib/modernizr.js +4 -0
- data/app/assets/javascripts/modules.js.coffee +3 -0
- data/app/assets/stylesheets/application-old-ie.css.scss +10 -0
- data/app/assets/stylesheets/application.css.scss +57 -0
- data/app/assets/stylesheets/base/_all.scss +6 -0
- data/app/assets/stylesheets/base/_reset.css.scss +16 -0
- data/app/assets/stylesheets/base/_type.scss +16 -0
- data/app/assets/stylesheets/modules/_coderay.css.scss +171 -0
- data/app/assets/stylesheets/modules/_layout_examples.css.scss +13 -0
- data/app/assets/stylesheets/modules/_webfont_table.css.scss +47 -0
- data/app/assets/stylesheets/vanilla-normal-old-ie.css.scss +11 -0
- data/app/assets/stylesheets/vanilla-normal.css.scss +33 -0
- data/app/controllers/application_controller.rb +5 -0
- data/app/controllers/base_controller.rb +52 -0
- data/app/controllers/grids_controller.rb +48 -0
- data/app/controllers/javascript_controller.rb +20 -0
- data/app/controllers/javascripts_controller.rb +4 -0
- data/app/controllers/modules_controller.rb +43 -0
- data/app/controllers/ui_controller.rb +2 -0
- data/app/helpers/plinth_helper.rb +33 -0
- data/app/views/base/_webfonts_social_standard.html +429 -0
- data/app/views/base/_webfonts_ss_standard.html +2413 -0
- data/app/views/base/buttons.html.haml +20 -0
- data/app/views/base/forms.html.haml +40 -0
- data/app/views/base/images.html.haml +20 -0
- data/app/views/base/index.html.haml +68 -0
- data/app/views/base/labels.html.haml +22 -0
- data/app/views/base/lists.html.haml +20 -0
- data/app/views/base/webfonts.html.haml +17 -0
- data/app/views/grids/index.html.haml +73 -0
- data/app/views/grids/layouts/basic-marketing-site.haml +69 -0
- data/app/views/grids/layouts/jumbotron-site.haml +92 -0
- data/app/views/grids/layouts.html.haml +9 -0
- data/app/views/layouts/_main_nav.html.haml +15 -0
- data/app/views/layouts/application.html.haml +15 -0
- data/app/views/modules/alerts.html.haml +12 -0
- data/app/views/modules/footer.html.haml +2 -0
- data/app/views/modules/index.html.haml +5 -0
- data/app/views/modules/nav.html.haml +12 -0
- data/app/views/modules/panels.html.haml +3 -0
- data/app/views/modules/tabs.html.haml +58 -0
- data/app/views/old_javascript/close.html.haml +2 -0
- data/app/views/old_javascript/forms.html.haml +2 -0
- data/app/views/old_javascript/ga_events.html.haml +2 -0
- data/app/views/old_javascript/index.html.haml +2 -0
- data/app/views/old_javascript/responsive_resize.html.haml +2 -0
- data/app/views/old_javascript/switch.html.haml +2 -0
- data/app/views/parts/base/_button.haml +3 -0
- data/app/views/parts/base/_button_colours.haml +4 -0
- data/app/views/parts/base/_button_group.haml +4 -0
- data/app/views/parts/base/_button_sizing.haml +3 -0
- data/app/views/parts/base/_button_states.haml +3 -0
- data/app/views/parts/base/_form_example.haml +26 -0
- data/app/views/parts/base/_form_example_horizontal.haml +26 -0
- data/app/views/parts/base/_form_group.haml +10 -0
- data/app/views/parts/base/_form_location.haml +3 -0
- data/app/views/parts/base/_labels.haml +5 -0
- data/app/views/parts/base/_labels_sizing.haml +3 -0
- data/app/views/parts/base/_list.haml +10 -0
- data/app/views/parts/base/_list_action.haml +5 -0
- data/app/views/parts/base/_list_nav.haml +12 -0
- data/app/views/parts/base/_list_unset.haml +10 -0
- data/app/views/parts/base/_type_body.haml +2 -0
- data/app/views/parts/base/_type_headings.haml +5 -0
- data/app/views/parts/base/_type_helpers.haml +3 -0
- data/app/views/parts/base/_type_links.haml +9 -0
- data/app/views/parts/base/_type_shouts.haml +4 -0
- data/app/views/parts/grids/_example_layout_1.haml +10 -0
- data/app/views/parts/grids/_live_grid.haml +29 -0
- data/app/views/parts/modules/_alerts.haml +11 -0
- data/app/views/parts/modules/_nav_footer.haml +34 -0
- data/app/views/parts/modules/_nav_header.haml +18 -0
- data/app/views/parts/modules/_panels.haml +9 -0
- data/app/views/parts/modules/_tabs_minimal.haml +11 -0
- data/app/views/parts/modules/_tabs_simple_group.haml +11 -0
- data/app/views/parts/modules/_tabs_simple_group_toggle.haml +11 -0
- data/app/views/parts/modules/_tabs_toggle.haml +5 -0
- data/app/views/parts/modules/_tabs_traditional.haml +11 -0
- data/app/views/shared/_placeholder_text.html.haml +1 -0
- data/app/views/shared/_title.html.haml +8 -0
- data/app/views/shared/_ui_nav.html.haml +5 -0
- data/app/views/ui/alert.html.haml +35 -0
- data/app/views/ui/buttons.html.haml +116 -0
- data/app/views/ui/footer.html.haml +69 -0
- data/app/views/ui/forms/_vertical_form.haml +7 -0
- data/app/views/ui/forms.html.haml +59 -0
- data/app/views/ui/grids.html.haml +18 -0
- data/app/views/ui/index.html.haml +5 -0
- data/app/views/ui/labels.html.haml +15 -0
- data/app/views/ui/modules/panel.html.haml +3 -0
- data/app/views/ui/nav.html.haml +48 -0
- data/app/views/ui/tabs.html.haml +171 -0
- data/app/views/ui/typography.html.haml +118 -0
- data/db/development.sqlite3 +0 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/plinth/version.rb +3 -0
- data/lib/plinth.rb +11 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/templates/haml/scaffold/_form.html.haml +8 -0
- data/log/.gitkeep +0 -0
- data/plinth.gemspec +33 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +25 -0
- data/public/favicon.ico +0 -0
- data/public/javascripts/LICENSE.html +158 -0
- data/public/javascripts/README.md.html +163 -0
- data/public/javascripts/assets/codo.css +1 -0
- data/public/javascripts/assets/codo.js +21 -0
- data/public/javascripts/assets/search_data.js +1 -0
- data/public/javascripts/class_index.html +215 -0
- data/public/javascripts/class_list.html +58 -0
- data/public/javascripts/classes/Close.html +259 -0
- data/public/javascripts/classes/GAEvent.html +231 -0
- data/public/javascripts/classes/ResizeHandler.html +225 -0
- data/public/javascripts/classes/Switch.html +318 -0
- data/public/javascripts/classes/TBGForm.html +373 -0
- data/public/javascripts/extra_list.html +36 -0
- data/public/javascripts/file_list.html +74 -0
- data/public/javascripts/files/styleguide/plugins/tbg-close.js.coffee.html +160 -0
- data/public/javascripts/files/styleguide/plugins/tbg-forms.js.coffee.html +160 -0
- data/public/javascripts/files/styleguide/plugins/tbg-ga-events.js.coffee.html +160 -0
- data/public/javascripts/files/styleguide/plugins/tbg-respinsiveresize.js.coffee.html +160 -0
- data/public/javascripts/files/styleguide/plugins/tbg-switch.js.coffee.html +160 -0
- data/public/javascripts/index.html +14 -0
- data/public/javascripts/method_list.html +187 -0
- data/public/javascripts/mixin_list.html +28 -0
- data/public/robots.txt +5 -0
- data/script/rails +6 -0
- data/spec/javascripts/fixtures/plugins/tbg-close_fixture.html.haml +4 -0
- data/spec/javascripts/fixtures/plugins/tbg-forms_fixture.html.haml +12 -0
- data/spec/javascripts/fixtures/plugins/tbg-ga-events_fixture.html.haml +9 -0
- data/spec/javascripts/fixtures/plugins/tbg-switch_fixture.html.haml +11 -0
- data/spec/javascripts/plugins/tbg-close_spec.js.coffee +54 -0
- data/spec/javascripts/plugins/tbg-forms_spec.js.coffee +87 -0
- data/spec/javascripts/plugins/tbg-ga-events_spec.js.coffee +83 -0
- data/spec/javascripts/plugins/tbg-switch_spec.js.coffee +96 -0
- data/spec/javascripts/spec.js.coffee +2 -0
- data/vendor/assets/fonts/ss-social-circle.eot +0 -0
- data/vendor/assets/fonts/ss-social-circle.svg +139 -0
- data/vendor/assets/fonts/ss-social-circle.ttf +0 -0
- data/vendor/assets/fonts/ss-social-circle.woff +0 -0
- data/vendor/assets/fonts/ss-social-regular.eot +0 -0
- data/vendor/assets/fonts/ss-social-regular.svg +133 -0
- data/vendor/assets/fonts/ss-social-regular.ttf +0 -0
- data/vendor/assets/fonts/ss-social-regular.woff +0 -0
- data/vendor/assets/fonts/ss-social.js +75 -0
- data/vendor/assets/fonts/ss-standard.eot +0 -0
- data/vendor/assets/fonts/ss-standard.js +75 -0
- data/vendor/assets/fonts/ss-standard.svg +207 -0
- data/vendor/assets/fonts/ss-standard.ttf +0 -0
- data/vendor/assets/fonts/ss-standard.woff +0 -0
- data/vendor/assets/images/background.png +0 -0
- data/vendor/assets/images/logos/sb-logo-white.png +0 -0
- data/vendor/assets/images/logos/sb-logo-white.svg +5 -0
- data/vendor/assets/images/middleman.png +0 -0
- data/vendor/assets/index.html.haml +8 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/javascripts/plinth/lib/handlebars.js +3 -0
- data/vendor/assets/javascripts/plinth/lib/jquery.fitvids.js +81 -0
- data/vendor/assets/javascripts/plinth/lib/ss-social.js +75 -0
- data/vendor/assets/javascripts/plinth/lib/ss-standard.js +78 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/assets/codo.css +1 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/assets/codo.js +21 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/assets/search_data.js +1 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/class_index.html +194 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/class_list.html +58 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/classes/Close.html +215 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/classes/GAEvent.html +235 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/classes/ResizeHandler.html +192 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/classes/Switch.html +233 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/classes/TBGForm.html +318 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/extra_list.html +30 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/file_list.html +58 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/files/tbg-close.js.coffee.html +154 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/files/tbg-forms.js.coffee.html +154 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/files/tbg-ga-events.js.coffee.html +154 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/files/tbg-respinsiveresize.js.coffee.html +154 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/files/tbg-switch.js.coffee.html +154 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/index.html +14 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/method_list.html +163 -0
- data/vendor/assets/javascripts/plinth/plugins/doc/mixin_list.html +28 -0
- data/vendor/assets/javascripts/plinth/plugins/tbg-close.js.coffee +97 -0
- data/vendor/assets/javascripts/plinth/plugins/tbg-forms.js.coffee +156 -0
- data/vendor/assets/javascripts/plinth/plugins/tbg-ga-events.js.coffee +107 -0
- data/vendor/assets/javascripts/plinth/plugins/tbg-respinsiveresize.js.coffee +73 -0
- data/vendor/assets/javascripts/plinth/plugins/tbg-switch.js.coffee +121 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/assets/stylesheets/_functions.scss +28 -0
- data/vendor/assets/stylesheets/_mixins.css.scss +273 -0
- data/vendor/assets/stylesheets/_settings.css.scss +120 -0
- data/vendor/assets/stylesheets/plinth/base/_all.css.scss +7 -0
- data/vendor/assets/stylesheets/plinth/base/_buttons.css.scss +166 -0
- data/vendor/assets/stylesheets/plinth/base/_form.css.scss +196 -0
- data/vendor/assets/stylesheets/plinth/base/_labels.css.scss +58 -0
- data/vendor/assets/stylesheets/plinth/base/_lists.css.scss +57 -0
- data/vendor/assets/stylesheets/plinth/base/_reset.css.scss +284 -0
- data/vendor/assets/stylesheets/plinth/base/_type.css.scss +328 -0
- data/vendor/assets/stylesheets/plinth/base/webfonts/_all.css.scss +2 -0
- data/vendor/assets/stylesheets/plinth/base/webfonts/ss-social.css.scss +57 -0
- data/vendor/assets/stylesheets/plinth/base/webfonts/ss-standard.css.scss +48 -0
- data/vendor/assets/stylesheets/plinth/grid/_grid.css.scss +127 -0
- data/vendor/assets/stylesheets/plinth/modules/_alert.css.scss +71 -0
- data/vendor/assets/stylesheets/plinth/modules/_all-grid.css.scss +1 -0
- data/vendor/assets/stylesheets/plinth/modules/_all-no-grid.css.scss +4 -0
- data/vendor/assets/stylesheets/plinth/modules/_footer.css.scss +93 -0
- data/vendor/assets/stylesheets/plinth/modules/_nav.css.scss +106 -0
- data/vendor/assets/stylesheets/plinth/modules/_panel.css.scss +28 -0
- data/vendor/assets/stylesheets/plinth/modules/_switch.css.scss +88 -0
- data/vendor/assets/stylesheets/plinth.css.scss +15 -0
- data/vendor/assets/views/buttons/_buttons.haml +9 -0
- data/vendor/assets/views/forms/_vertical_form.haml +7 -0
- data/vendor/assets/views/type/_headings.haml +6 -0
- data/vendor/assets/views/type/_paragraphs.haml +4 -0
- metadata +537 -0
@@ -0,0 +1,171 @@
|
|
1
|
+
//
|
2
|
+
// Coderay Example Module
|
3
|
+
// $author Ad Taylor
|
4
|
+
|
5
|
+
// ======================================================
|
6
|
+
// Add example block to coderay blocks
|
7
|
+
// ======================================================
|
8
|
+
|
9
|
+
.sg-example, .CodeRay {
|
10
|
+
margin: $base-line-height-px 0;
|
11
|
+
}
|
12
|
+
|
13
|
+
.example-highlight {
|
14
|
+
background-color: rgba(0,0,0,0.05);
|
15
|
+
font-weight: bold;
|
16
|
+
text-align: center;
|
17
|
+
}
|
18
|
+
|
19
|
+
.CodeRay, .sg-example, pre code {
|
20
|
+
font-size: 0.85em;
|
21
|
+
}
|
22
|
+
|
23
|
+
.CodeRay {
|
24
|
+
background-color: #F8F8F7;
|
25
|
+
border-bottom: 3px solid $main-color;
|
26
|
+
|
27
|
+
.line-numbers {
|
28
|
+
margin-right: $column-gutter*2;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.sg-example {
|
33
|
+
border: 1px dashed #ccc;
|
34
|
+
padding: 20px;
|
35
|
+
}
|
36
|
+
|
37
|
+
// ======================================================
|
38
|
+
// Styles to give coderay a more 'githubish' feel
|
39
|
+
// ======================================================
|
40
|
+
|
41
|
+
.CodeRay {
|
42
|
+
font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
|
43
|
+
color: #000;
|
44
|
+
padding: 1em 0px 1em 1em;
|
45
|
+
}
|
46
|
+
|
47
|
+
.CodeRay pre {
|
48
|
+
margin: 0px;
|
49
|
+
}
|
50
|
+
|
51
|
+
div.CodeRay { }
|
52
|
+
span.CodeRay { white-space: pre; border: 0px; padding: 2px }
|
53
|
+
|
54
|
+
table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
|
55
|
+
table.CodeRay td {
|
56
|
+
padding: 1em 0.5em;
|
57
|
+
vertical-align: top;
|
58
|
+
}
|
59
|
+
|
60
|
+
.CodeRay .line-numbers, .CodeRay .no {
|
61
|
+
background-color: #ECECEC;
|
62
|
+
color: #AAA;
|
63
|
+
text-align: right;
|
64
|
+
}
|
65
|
+
|
66
|
+
.CodeRay .line-numbers a {
|
67
|
+
color: #AAA;
|
68
|
+
border: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
.CodeRay .line-numbers tt { font-weight: bold }
|
72
|
+
.CodeRay .line-numbers .highlighted { color: red }
|
73
|
+
.CodeRay .line { display: block; float: left; width: 100%; }
|
74
|
+
.CodeRay span.line-numbers { padding: 0px 4px }
|
75
|
+
.CodeRay .code { width: 100% }
|
76
|
+
|
77
|
+
ol.CodeRay { font-size: 10pt }
|
78
|
+
ol.CodeRay li { white-space: pre }
|
79
|
+
|
80
|
+
.CodeRay .code pre { overflow: auto }
|
81
|
+
.CodeRay .debug { color:white ! important; background:blue ! important; }
|
82
|
+
|
83
|
+
.CodeRay .annotation { color:#007 }
|
84
|
+
.CodeRay .attribute-name { color:#f08 }
|
85
|
+
.CodeRay .attribute-value { color:#700 }
|
86
|
+
.CodeRay .binary { color:#509; font-weight:bold }
|
87
|
+
.CodeRay .comment { color:#998; font-style: italic;}
|
88
|
+
.CodeRay .char { color:#04D }
|
89
|
+
.CodeRay .char .content { color:#04D }
|
90
|
+
.CodeRay .char .delimiter { color:#039 }
|
91
|
+
.CodeRay .class { color:#458; font-weight:bold }
|
92
|
+
.CodeRay .complex { color:#A08; font-weight:bold }
|
93
|
+
.CodeRay .constant { color:teal; }
|
94
|
+
.CodeRay .color { color:#0A0 }
|
95
|
+
.CodeRay .class-variable { color:#369 }
|
96
|
+
.CodeRay .decorator { color:#B0B; }
|
97
|
+
.CodeRay .definition { color:#099; font-weight:bold }
|
98
|
+
.CodeRay .directive { color:#088; font-weight:bold }
|
99
|
+
.CodeRay .delimiter { color:black }
|
100
|
+
.CodeRay .doc { color:#970 }
|
101
|
+
.CodeRay .doctype { color:#34b }
|
102
|
+
.CodeRay .doc-string { color:#D42; font-weight:bold }
|
103
|
+
.CodeRay .escape { color:#666; font-weight:bold }
|
104
|
+
.CodeRay .entity { color:#800; font-weight:bold }
|
105
|
+
.CodeRay .error { color:#F00; background-color:#FAA }
|
106
|
+
.CodeRay .exception { color:#C00; font-weight:bold }
|
107
|
+
.CodeRay .filename { color:#099; }
|
108
|
+
.CodeRay .function { color:#900; font-weight:bold }
|
109
|
+
.CodeRay .global-variable { color:teal; font-weight:bold }
|
110
|
+
.CodeRay .hex { color:#058; font-weight:bold }
|
111
|
+
.CodeRay .integer { color:#099; }
|
112
|
+
.CodeRay .include { color:#B44; font-weight:bold }
|
113
|
+
.CodeRay .inline { color: black }
|
114
|
+
.CodeRay .inline .inline { background: #ccc }
|
115
|
+
.CodeRay .inline .inline .inline { background: #bbb }
|
116
|
+
.CodeRay .inline .inline-delimiter { color: #D14; }
|
117
|
+
.CodeRay .inline-delimiter { color: #D14; }
|
118
|
+
.CodeRay .important { color:#f00; }
|
119
|
+
.CodeRay .interpreted { color:#B2B; font-weight:bold }
|
120
|
+
.CodeRay .instance-variable { color:teal }
|
121
|
+
.CodeRay .label { color:#970; font-weight:bold }
|
122
|
+
.CodeRay .local-variable { color:#963 }
|
123
|
+
.CodeRay .octal { color:#40E; font-weight:bold }
|
124
|
+
.CodeRay .operator { }
|
125
|
+
.CodeRay .predefined-constant { font-weight:bold }
|
126
|
+
.CodeRay .predefined { color:#369; font-weight:bold }
|
127
|
+
.CodeRay .preprocessor { color:#579; }
|
128
|
+
.CodeRay .pseudo-class { color:#00C; font-weight:bold }
|
129
|
+
.CodeRay .predefined-type { color:#074; font-weight:bold }
|
130
|
+
.CodeRay .reserved, .keyword { color:#000; font-weight:bold }
|
131
|
+
|
132
|
+
.CodeRay .key { color: #808; }
|
133
|
+
.CodeRay .key .delimiter { color: #606; }
|
134
|
+
.CodeRay .key .char { color: #80f; }
|
135
|
+
.CodeRay .value { color: #088; }
|
136
|
+
|
137
|
+
.CodeRay .regexp { background-color:#fff0ff }
|
138
|
+
.CodeRay .regexp .content { color:#808 }
|
139
|
+
.CodeRay .regexp .delimiter { color:#404 }
|
140
|
+
.CodeRay .regexp .modifier { color:#C2C }
|
141
|
+
.CodeRay .regexp .function { color:#404; font-weight: bold }
|
142
|
+
|
143
|
+
.CodeRay .string { color: #D20; }
|
144
|
+
.CodeRay .string .string { }
|
145
|
+
.CodeRay .string .string .string { background-color:#ffd0d0 }
|
146
|
+
.CodeRay .string .content { color: #D14; }
|
147
|
+
.CodeRay .string .char { color: #D14; }
|
148
|
+
.CodeRay .string .delimiter { color: #D14; }
|
149
|
+
|
150
|
+
.CodeRay .shell { color:#D14 }
|
151
|
+
.CodeRay .shell .content { }
|
152
|
+
.CodeRay .shell .delimiter { color:#D14 }
|
153
|
+
|
154
|
+
.CodeRay .symbol { color:#990073 }
|
155
|
+
.CodeRay .symbol .content { color:#A60 }
|
156
|
+
.CodeRay .symbol .delimiter { color:#630 }
|
157
|
+
|
158
|
+
.CodeRay .tag { color:#070 }
|
159
|
+
.CodeRay .tag-special { color:#D70; font-weight:bold }
|
160
|
+
.CodeRay .type { color:#339; font-weight:bold }
|
161
|
+
.CodeRay .variable { color:#036 }
|
162
|
+
|
163
|
+
.CodeRay .insert { background: #afa; }
|
164
|
+
.CodeRay .delete { background: #faa; }
|
165
|
+
.CodeRay .change { color: #aaf; background: #007; }
|
166
|
+
.CodeRay .head { color: #f8f; background: #505 }
|
167
|
+
|
168
|
+
.CodeRay .insert .insert { color: #080; font-weight:bold }
|
169
|
+
.CodeRay .delete .delete { color: #800; font-weight:bold }
|
170
|
+
.CodeRay .change .change { color: #66f; }
|
171
|
+
.CodeRay .head .head { color: #f4f; }
|
@@ -0,0 +1,13 @@
|
|
1
|
+
//
|
2
|
+
// Layout Examples Module
|
3
|
+
// $author Ad Taylor
|
4
|
+
|
5
|
+
// ======================================================
|
6
|
+
// Layout example image shift
|
7
|
+
// ======================================================
|
8
|
+
|
9
|
+
.layout-example {
|
10
|
+
figure {
|
11
|
+
margin-left: -1.5em;
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
.webfonts-example {
|
2
|
+
width: 100%;
|
3
|
+
border-collapse:collapse;
|
4
|
+
border-spacing:0;
|
5
|
+
|
6
|
+
tr {
|
7
|
+
border-top:1px solid #e6eae8;
|
8
|
+
}
|
9
|
+
|
10
|
+
td {
|
11
|
+
padding-bottom:15px;padding-top:18px;vertical-align:top;
|
12
|
+
}
|
13
|
+
|
14
|
+
ul {
|
15
|
+
padding: 0;
|
16
|
+
list-style: none;
|
17
|
+
}
|
18
|
+
|
19
|
+
.set {
|
20
|
+
margin-bottom:84px;
|
21
|
+
}
|
22
|
+
|
23
|
+
.encode, .keyword {
|
24
|
+
width:41.667%;
|
25
|
+
}
|
26
|
+
|
27
|
+
.css, .keyword li {
|
28
|
+
white-space: nowrap;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ss-icon {
|
32
|
+
padding-left:0;
|
33
|
+
width:16.667%;
|
34
|
+
font-size:32px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.encode {
|
38
|
+
font-size:14px;
|
39
|
+
text-align:center;
|
40
|
+
padding-right:20px;
|
41
|
+
line-height:1.8;
|
42
|
+
}
|
43
|
+
|
44
|
+
.unicode {
|
45
|
+
color:#949FA2;
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
@import "plinth";
|
4
|
+
|
5
|
+
// ======================================================
|
6
|
+
// Settings grids
|
7
|
+
// ======================================================
|
8
|
+
|
9
|
+
// No settings changed - using defaults
|
10
|
+
|
11
|
+
// ======================================================
|
12
|
+
// Stylguide
|
13
|
+
// ======================================================
|
14
|
+
|
15
|
+
@import "plinth/base/_all";
|
16
|
+
@import "plinth/modules/_all-grid";
|
17
|
+
@import "plinth/modules/_all-no-grid";
|
18
|
+
|
19
|
+
|
20
|
+
// ======================================================
|
21
|
+
// Default grids
|
22
|
+
// ======================================================
|
23
|
+
|
24
|
+
@import "plinth/grid/_grid";
|
25
|
+
|
26
|
+
|
27
|
+
// ======================================================
|
28
|
+
// Build grid sizes
|
29
|
+
// ======================================================
|
30
|
+
|
31
|
+
@include create-column-sizes($grids);
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
class BaseController < ApplicationController
|
2
|
+
def index
|
3
|
+
@page_title = "Base <small>type</small>"
|
4
|
+
@page_description = "Arguably the most important section of the style guide, where the foundations of the site are set. All modules will be extended from these base styles."
|
5
|
+
@page_nav = base_nav
|
6
|
+
end
|
7
|
+
|
8
|
+
def lists
|
9
|
+
@page_title = "Base <small>lists</small>"
|
10
|
+
@page_nav = base_nav
|
11
|
+
end
|
12
|
+
|
13
|
+
def buttons
|
14
|
+
@page_title = "Base <small>Buttons</small>"
|
15
|
+
@page_nav = base_nav
|
16
|
+
end
|
17
|
+
|
18
|
+
def labels
|
19
|
+
@page_title = "Base <small>Labels</small>"
|
20
|
+
@page_nav = base_nav
|
21
|
+
end
|
22
|
+
|
23
|
+
def forms
|
24
|
+
@page_title = "Base <small>Forms</small>"
|
25
|
+
@page_nav = base_nav
|
26
|
+
end
|
27
|
+
|
28
|
+
def images
|
29
|
+
@page_title = "Base <small>Images</small>"
|
30
|
+
@page_nav = base_nav
|
31
|
+
end
|
32
|
+
|
33
|
+
def webfonts
|
34
|
+
@page_title = "Base <small>Web Fonts</small>"
|
35
|
+
@page_description = "These are the web fonts that we have at our disposal. When using these fonts you should be certain they are neccessary, when you use just 1 character the user must downloaded the full font."
|
36
|
+
@page_nav = base_nav
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
def base_nav
|
41
|
+
{
|
42
|
+
"Type" => base_path,
|
43
|
+
"Lists" => base_lists_path,
|
44
|
+
"Labels" => base_labels_path,
|
45
|
+
"Buttons" => base_buttons_path,
|
46
|
+
"Forms" => base_forms_path,
|
47
|
+
"Images" => base_images_path,
|
48
|
+
"Web Fonts" => base_webfonts_path
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
class GridsController < ApplicationController
|
2
|
+
def index
|
3
|
+
@page_title = "Grid System<small>(s)</small>"
|
4
|
+
@page_description = "This grid system is built to be flexible but still simple enough to read. It can scale up and down, it can fold up and it can be pushed around."
|
5
|
+
@page_nav = grids_nav
|
6
|
+
end
|
7
|
+
|
8
|
+
def show
|
9
|
+
if example_layouts.has_key? params[:id]
|
10
|
+
render_example_layout params[:id], params[:format]
|
11
|
+
else
|
12
|
+
raise ActionController::RoutingError.new("Can not find example layout named: #{params[:id]}")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def layouts
|
17
|
+
@page_title = "Example Layouts."
|
18
|
+
@page_description = "A few example layouts for experimentation"
|
19
|
+
@page_nav = grids_nav
|
20
|
+
@layouts = example_layouts
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
def grids_nav
|
25
|
+
{
|
26
|
+
"Grid Settings File" => grid_path + "#Setting-Grids" ,
|
27
|
+
"Grid Example" => grid_path + "#Live-Grid-Example" ,
|
28
|
+
"Layouts" => grid_layouts_path
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def example_layouts
|
33
|
+
{
|
34
|
+
"basic-marketing-site" => "Basic Marketing Site",
|
35
|
+
"jumbotron-site" => "Jumbotron Site"
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def render_example_layout( template, format )
|
40
|
+
case format
|
41
|
+
when "haml"
|
42
|
+
render :text => File.open(Rails.root.join("app/views/grids/layouts/#{template}.haml")).read
|
43
|
+
else
|
44
|
+
render :template => "grids/layouts/#{template}.haml", :layout => false
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class ModulesController < ApplicationController
|
2
|
+
def index
|
3
|
+
@page_title = "Modules"
|
4
|
+
@page_description = "On top of the grid and the base styles, a site is built up of modules of functionality. The modules within the style guide are common and reusable and should not be overly content specific."
|
5
|
+
@page_nav = modules_nav
|
6
|
+
end
|
7
|
+
|
8
|
+
def alerts
|
9
|
+
@page_title = "Alerts <small>Module</small>"
|
10
|
+
@page_nav = modules_nav
|
11
|
+
end
|
12
|
+
|
13
|
+
def footer
|
14
|
+
end
|
15
|
+
|
16
|
+
def nav
|
17
|
+
@page_title = "Alerts <small>Module</small>"
|
18
|
+
@page_nav = modules_nav
|
19
|
+
end
|
20
|
+
|
21
|
+
def panels
|
22
|
+
@page_title = "Panel <small>Module</small>"
|
23
|
+
@page_description = "Without doubt, the least exciting module we have."
|
24
|
+
@page_nav = modules_nav
|
25
|
+
end
|
26
|
+
|
27
|
+
def tabs
|
28
|
+
@page_title = "Tabs <small>Module</small>"
|
29
|
+
@page_nav = modules_nav
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
def modules_nav
|
34
|
+
{
|
35
|
+
"Alerts" => modules_alerts_path,
|
36
|
+
"Tabs" => modules_tabs_path,
|
37
|
+
"Navigation" => modules_nav_path,
|
38
|
+
"Panels" => modules_panels_path
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'coderay'
|
2
|
+
|
3
|
+
module PlinthHelper
|
4
|
+
|
5
|
+
def example
|
6
|
+
capture_haml do
|
7
|
+
haml_tag :div, :class => "sg-example" do
|
8
|
+
yield
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def example( section, partial )
|
14
|
+
contents = File.open(Rails.root.join("app/views/parts/#{section}/_#{partial}.haml")).read
|
15
|
+
haml_contents = Haml::Engine.new(contents).render
|
16
|
+
code_contents = CodeRay.scan( contents , :haml).div(:line_numbers => :table)
|
17
|
+
"<div><div class='sg-example'>#{haml_contents}</div>#{code_contents}</div>".html_safe
|
18
|
+
end
|
19
|
+
|
20
|
+
def nav_link(text, path)
|
21
|
+
classes = ""
|
22
|
+
classes += "is-active" if path.include? controller.controller_name
|
23
|
+
content_tag :li, link_to( text, path), class: classes
|
24
|
+
end
|
25
|
+
|
26
|
+
def sassie_stylesheets(file)
|
27
|
+
ie_stylesheet = stylesheet_link_tag file + '-old-ie'
|
28
|
+
non_ie_stylesheet = stylesheet_link_tag file
|
29
|
+
|
30
|
+
"<!--[if lte IE 8]>#{ie_stylesheet}<![endif]-->\n<!--[if gt IE 8]><!-->#{non_ie_stylesheet}<!--<![endif]-->".html_safe
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|