frozen 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +11 -0
- data/bin/frozen +56 -0
- data/dummy/assets/javascripts/coffee/test.js.coffee +8 -0
- data/dummy/assets/javascripts/main.js +11 -0
- data/dummy/assets/javascripts/sub/sub_script.js +11 -0
- data/dummy/assets/stylesheets/base/_base.scss +24 -0
- data/dummy/assets/stylesheets/base/_buttons.scss +10 -0
- data/dummy/assets/stylesheets/base/_forms.scss +78 -0
- data/dummy/assets/stylesheets/base/_grid-settings.scss +14 -0
- data/dummy/assets/stylesheets/base/_lists.scss +31 -0
- data/dummy/assets/stylesheets/base/_tables.scss +24 -0
- data/dummy/assets/stylesheets/base/_typography.scss +93 -0
- data/dummy/assets/stylesheets/base/_variables.scss +65 -0
- data/dummy/assets/stylesheets/base/extends/_button.scss +22 -0
- data/dummy/assets/stylesheets/base/extends/_clearfix.scss +3 -0
- data/dummy/assets/stylesheets/base/extends/_errors.scss +11 -0
- data/dummy/assets/stylesheets/base/extends/_flashes.scss +38 -0
- data/dummy/assets/stylesheets/base/extends/_hide-text.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/_bourbon-deprecated-upcoming.scss +402 -0
- data/dummy/assets/stylesheets/bourbon/_bourbon.scss +86 -0
- data/dummy/assets/stylesheets/bourbon/addons/_clearfix.scss +18 -0
- data/dummy/assets/stylesheets/bourbon/addons/_directional-values.scss +111 -0
- data/dummy/assets/stylesheets/bourbon/addons/_ellipsis.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/addons/_font-family.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/addons/_hide-text.scss +12 -0
- data/dummy/assets/stylesheets/bourbon/addons/_html5-input-types.scss +90 -0
- data/dummy/assets/stylesheets/bourbon/addons/_position.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/addons/_prefixer.scss +45 -0
- data/dummy/assets/stylesheets/bourbon/addons/_retina-image.scss +31 -0
- data/dummy/assets/stylesheets/bourbon/addons/_size.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/addons/_timing-functions.scss +32 -0
- data/dummy/assets/stylesheets/bourbon/addons/_triangle.scss +83 -0
- data/dummy/assets/stylesheets/bourbon/addons/_word-wrap.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_animation.scss +52 -0
- data/dummy/assets/stylesheets/bourbon/css3/_appearance.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/css3/_backface-visibility.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/css3/_background-image.scss +42 -0
- data/dummy/assets/stylesheets/bourbon/css3/_background.scss +55 -0
- data/dummy/assets/stylesheets/bourbon/css3/_border-image.scss +59 -0
- data/dummy/assets/stylesheets/bourbon/css3/_border-radius.scss +22 -0
- data/dummy/assets/stylesheets/bourbon/css3/_box-sizing.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_calc.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_columns.scss +47 -0
- data/dummy/assets/stylesheets/bourbon/css3/_filter.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/css3/_flex-box.scss +320 -0
- data/dummy/assets/stylesheets/bourbon/css3/_font-face.scss +24 -0
- data/dummy/assets/stylesheets/bourbon/css3/_font-feature-settings.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/css3/_hyphens.scss +4 -0
- data/dummy/assets/stylesheets/bourbon/css3/_image-rendering.scss +14 -0
- data/dummy/assets/stylesheets/bourbon/css3/_keyframes.scss +35 -0
- data/dummy/assets/stylesheets/bourbon/css3/_linear-gradient.scss +38 -0
- data/dummy/assets/stylesheets/bourbon/css3/_perspective.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/css3/_placeholder.scss +8 -0
- data/dummy/assets/stylesheets/bourbon/css3/_radial-gradient.scss +39 -0
- data/dummy/assets/stylesheets/bourbon/css3/_selection.scss +14 -0
- data/dummy/assets/stylesheets/bourbon/css3/_text-decoration.scss +19 -0
- data/dummy/assets/stylesheets/bourbon/css3/_transform.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/css3/_transition.scss +77 -0
- data/dummy/assets/stylesheets/bourbon/css3/_user-select.scss +3 -0
- data/dummy/assets/stylesheets/bourbon/functions/_assign.scss +11 -0
- data/dummy/assets/stylesheets/bourbon/functions/_color-lightness.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/functions/_contains.scss +12 -0
- data/dummy/assets/stylesheets/bourbon/functions/_is-length.scss +7 -0
- data/dummy/assets/stylesheets/bourbon/functions/_is-size.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/functions/_modular-scale.scss +69 -0
- data/dummy/assets/stylesheets/bourbon/functions/_px-to-em.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/functions/_px-to-rem.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/functions/_strip-units.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/functions/_tint-shade.scss +9 -0
- data/dummy/assets/stylesheets/bourbon/functions/_transition-property-name.scss +22 -0
- data/dummy/assets/stylesheets/bourbon/functions/_unpack.scss +17 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_convert-units.scss +15 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_font-source-declaration.scss +36 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_is-num.scss +5 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_render-gradients.scss +26 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/dummy/assets/stylesheets/bourbon/helpers/_str-to-num.scss +50 -0
- data/dummy/assets/stylesheets/bourbon/settings/_asset-pipeline.scss +1 -0
- data/dummy/assets/stylesheets/bourbon/settings/_prefixer.scss +6 -0
- data/dummy/assets/stylesheets/bourbon/settings/_px-to-em.scss +1 -0
- data/dummy/assets/stylesheets/main.scss +6 -0
- data/dummy/assets/stylesheets/neat/_neat-helpers.scss +8 -0
- data/dummy/assets/stylesheets/neat/_neat.scss +23 -0
- data/dummy/assets/stylesheets/neat/functions/_new-breakpoint.scss +49 -0
- data/dummy/assets/stylesheets/neat/functions/_private.scss +114 -0
- data/dummy/assets/stylesheets/neat/grid/_box-sizing.scss +15 -0
- data/dummy/assets/stylesheets/neat/grid/_direction-context.scss +33 -0
- data/dummy/assets/stylesheets/neat/grid/_display-context.scss +28 -0
- data/dummy/assets/stylesheets/neat/grid/_fill-parent.scss +24 -0
- data/dummy/assets/stylesheets/neat/grid/_media.scss +92 -0
- data/dummy/assets/stylesheets/neat/grid/_omega.scss +87 -0
- data/dummy/assets/stylesheets/neat/grid/_outer-container.scss +38 -0
- data/dummy/assets/stylesheets/neat/grid/_pad.scss +25 -0
- data/dummy/assets/stylesheets/neat/grid/_private.scss +35 -0
- data/dummy/assets/stylesheets/neat/grid/_row.scss +52 -0
- data/dummy/assets/stylesheets/neat/grid/_shift.scss +50 -0
- data/dummy/assets/stylesheets/neat/grid/_span-columns.scss +92 -0
- data/dummy/assets/stylesheets/neat/grid/_to-deprecate.scss +97 -0
- data/dummy/assets/stylesheets/neat/grid/_visual-grid.scss +42 -0
- data/dummy/assets/stylesheets/neat/settings/_disable-warnings.scss +13 -0
- data/dummy/assets/stylesheets/neat/settings/_grid.scss +55 -0
- data/dummy/assets/stylesheets/neat/settings/_visual-grid.scss +27 -0
- data/dummy/assets/stylesheets/sub/sub.scss +8 -0
- data/dummy/build/about/index.html +1 -0
- data/dummy/build/css/main.css +1 -0
- data/dummy/build/css/sub/sub.css +1 -0
- data/dummy/build/index.html +1 -0
- data/dummy/build/js/coffee/test.js +1 -0
- data/dummy/build/js/main.js +1 -0
- data/dummy/build/js/sub/sub_script.js +1 -0
- data/dummy/config.yaml +3 -0
- data/dummy/layouts/default.html.slim +7 -0
- data/dummy/views/about/index.html.slim +1 -0
- data/dummy/views/index.html.slim +2 -0
- data/frozen.gemspec +37 -0
- data/lib/frozen.rb +13 -0
- data/lib/frozen/environment/base.rb +36 -0
- data/lib/frozen/rack/request_controller.rb +37 -0
- data/lib/frozen/site/base.rb +83 -0
- data/lib/frozen/site/local_site.rb +131 -0
- data/lib/frozen/template/base.rb +77 -0
- data/lib/frozen/template/javascript.rb +44 -0
- data/lib/frozen/template/stylesheet.rb +48 -0
- data/lib/frozen/template/view.rb +40 -0
- data/lib/frozen/version.rb +3 -0
- data/spec/lib/frozen/rack/request_controller_spec.rb +22 -0
- data/spec/lib/frozen/site/base_spec.rb +17 -0
- data/spec/lib/frozen/site/local_site_spec.rb +13 -0
- data/spec/lib/frozen/template/base_spec.rb +101 -0
- data/spec/lib/frozen/template/stylesheet_spec.rb +42 -0
- data/spec/spec_helper.rb +9 -0
- metadata +393 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
@mixin grid-column-gradient($values...) {
|
|
4
|
+
background-image: -webkit-linear-gradient(left, $values);
|
|
5
|
+
background-image: -moz-linear-gradient(left, $values);
|
|
6
|
+
background-image: -ms-linear-gradient(left, $values);
|
|
7
|
+
background-image: -o-linear-gradient(left, $values);
|
|
8
|
+
background-image: unquote("linear-gradient(to left, #{$values})");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@if $visual-grid == true or $visual-grid == yes {
|
|
12
|
+
body:before {
|
|
13
|
+
@include grid-column-gradient(gradient-stops($grid-columns));
|
|
14
|
+
content: "";
|
|
15
|
+
display: inline-block;
|
|
16
|
+
height: 100%;
|
|
17
|
+
left: 0;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
max-width: $max-width;
|
|
20
|
+
opacity: $visual-grid-opacity;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
position: fixed;
|
|
23
|
+
right: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
|
|
26
|
+
@if $visual-grid-index == back {
|
|
27
|
+
z-index: -1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@else if $visual-grid-index == front {
|
|
31
|
+
z-index: 9999;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@each $breakpoint in $visual-grid-breakpoints {
|
|
35
|
+
@if $breakpoint {
|
|
36
|
+
@include media($breakpoint) {
|
|
37
|
+
@include grid-column-gradient(gradient-stops($grid-columns));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag.
|
|
4
|
+
///
|
|
5
|
+
/// @type Bool
|
|
6
|
+
|
|
7
|
+
$disable-warnings: false !default;
|
|
8
|
+
|
|
9
|
+
@mixin -neat-warn($message) {
|
|
10
|
+
@if $disable-warnings == false {
|
|
11
|
+
@warn "#{$message}";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with a `!global` flag.
|
|
4
|
+
///
|
|
5
|
+
/// @type Number (Unit)
|
|
6
|
+
|
|
7
|
+
$column: golden-ratio(1em, 3) !default;
|
|
8
|
+
|
|
9
|
+
/// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with the `!global` flag.
|
|
10
|
+
///
|
|
11
|
+
/// @type Number (Unit)
|
|
12
|
+
|
|
13
|
+
$gutter: golden-ratio(1em, 1) !default;
|
|
14
|
+
|
|
15
|
+
/// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag.
|
|
16
|
+
///
|
|
17
|
+
/// @type Number (Unitless)
|
|
18
|
+
|
|
19
|
+
$grid-columns: 12 !default;
|
|
20
|
+
|
|
21
|
+
/// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag.
|
|
22
|
+
///
|
|
23
|
+
/// @type Number (Unit)
|
|
24
|
+
///
|
|
25
|
+
$max-width: em(1088) !default;
|
|
26
|
+
|
|
27
|
+
/// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag.
|
|
28
|
+
///
|
|
29
|
+
/// @type Bool
|
|
30
|
+
///
|
|
31
|
+
/// @example css - CSS Output
|
|
32
|
+
/// html {
|
|
33
|
+
/// -webkit-box-sizing: border-box;
|
|
34
|
+
/// -moz-box-sizing: border-box;
|
|
35
|
+
/// box-sizing: border-box; }
|
|
36
|
+
///
|
|
37
|
+
/// *, *:before, *:after {
|
|
38
|
+
/// -webkit-box-sizing: inherit;
|
|
39
|
+
/// -moz-box-sizing: inherit;
|
|
40
|
+
/// box-sizing: inherit;
|
|
41
|
+
/// }
|
|
42
|
+
|
|
43
|
+
$border-box-sizing: true !default;
|
|
44
|
+
|
|
45
|
+
/// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag.
|
|
46
|
+
///
|
|
47
|
+
/// @type String
|
|
48
|
+
|
|
49
|
+
$default-feature: min-width; // Default @media feature for the breakpoint() mixin
|
|
50
|
+
|
|
51
|
+
///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag.
|
|
52
|
+
///
|
|
53
|
+
///@type String
|
|
54
|
+
|
|
55
|
+
$default-layout-direction: LTR !default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Displays the visual grid when set to true. The overlaid grid may be few pixels off depending on the browser's rendering engine and pixel rounding algorithm. Set with the `!global` flag.
|
|
4
|
+
///
|
|
5
|
+
/// @type Bool
|
|
6
|
+
|
|
7
|
+
$visual-grid: false !default;
|
|
8
|
+
|
|
9
|
+
/// Sets the visual grid color. Set with `!global` flag.
|
|
10
|
+
///
|
|
11
|
+
/// @type Color
|
|
12
|
+
|
|
13
|
+
$visual-grid-color: #eee !default;
|
|
14
|
+
|
|
15
|
+
/// Sets the `z-index` property of the visual grid. Can be `back` (behind content) or `front` (in front of content). Set with `!global` flag.
|
|
16
|
+
///
|
|
17
|
+
/// @type String
|
|
18
|
+
|
|
19
|
+
$visual-grid-index: back !default;
|
|
20
|
+
|
|
21
|
+
/// Sets the opacity property of the visual grid. Set with `!global` flag.
|
|
22
|
+
///
|
|
23
|
+
/// @type Number (unitless)
|
|
24
|
+
|
|
25
|
+
$visual-grid-opacity: 0.4 !default;
|
|
26
|
+
|
|
27
|
+
$visual-grid-breakpoints: () !default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><link href="../css/main.css" rel="stylesheet" type="text/css"/></head><body><p>current page is about/index.html</p><h1>about page this</h1></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*,*:before,*:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}button,input[type="submit"]{-webkit-font-smoothing:antialiased;background-color:#477DCA;border-radius:3px;color:white;display:inline-block;font-size:1em;font-weight:bold;line-height:1;padding:0.75em 1em;text-decoration:none}button:hover,input[type="submit"]:hover{background-color:#2c5999;color:white}button:disabled,input[type="submit"]:disabled{cursor:not-allowed;opacity:0.5}body{-webkit-font-smoothing:antialiased;background-color:#fff;color:#333;font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em;line-height:1.5}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;line-height:1.25;margin:0;text-rendering:optimizeLegibility}h1{font-size:2.25em}h2{font-size:2em}h3{font-size:1.75em}h4{font-size:1.5em}h5{font-size:1.25em}h6{font-size:1em}p{margin:0 0 0.75em}a{-webkit-transition:color 0.1s linear;-moz-transition:color 0.1s linear;transition:color 0.1s linear;color:#477DCA;text-decoration:none}a:hover{color:#2c5999}a:active,a:focus{color:#2c5999;outline:none}hr{border-bottom:1px solid #DDD;border-left:none;border-right:none;border-top:none;margin:1.5em 0}img,picture{margin:0;max-width:100%}blockquote{border-left:2px solid #DDD;color:#595959;margin:1.5em 0;padding-left:0.75em}cite{color:#737373;font-style:italic}cite:before{content:"\2014 \00A0"}fieldset{background:#f7f7f7;border:1px solid #DDD;margin:0 0 0.75em 0;padding:1.5em}input,label,select{display:block;font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em}label{font-weight:bold;margin-bottom:0.375em}label.required:after{content:"*"}label abbr{display:none}textarea,input[type="email"],input[type="number"],input[type="password"],input[type="search"],input[type="tel"],input[type="text"],input[type="url"],input[type="color"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="time"],input[type="week"],select[multiple=multiple]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:border-color;-moz-transition:border-color;transition:border-color;background-color:white;border-radius:3px;border:1px solid #DDD;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06);font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em;margin-bottom:0.75em;padding:0.5em 0.5em;width:100%}textarea:hover,input[type="email"]:hover,input[type="number"]:hover,input[type="password"]:hover,input[type="search"]:hover,input[type="tel"]:hover,input[type="text"]:hover,input[type="url"]:hover,input[type="color"]:hover,input[type="date"]:hover,input[type="datetime"]:hover,input[type="datetime-local"]:hover,input[type="month"]:hover,input[type="time"]:hover,input[type="week"]:hover,select[multiple=multiple]:hover{border-color:#c4c4c4}textarea:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="text"]:focus,input[type="url"]:focus,input[type="color"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,select[multiple=multiple]:focus{border-color:#477DCA;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06),0 0 5px rgba(55,112,192,0.7);outline:none}textarea{resize:vertical}input[type="search"]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}input[type="checkbox"],input[type="radio"]{display:inline;margin-right:0.375em}input[type="file"]{padding-bottom:0.75em;width:100%}select{margin-bottom:1.5em;max-width:100%;width:auto}table{border-collapse:collapse;margin:0.75em 0;table-layout:fixed;width:100%}th{border-bottom:1px solid #b7b7b7;font-weight:bold;padding:0.75em 0;text-align:left}td{border-bottom:1px solid #DDD;padding:0.75em 0}tr,td,th{vertical-align:middle}ul,ol{margin:0;padding:0;list-style-type:none}dl{margin-bottom:0.75em}dl dt{font-weight:bold;margin-top:0.75em}dl dd{margin:0}button,input[type="submit"]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;border:none;cursor:pointer;user-select:none;vertical-align:middle;white-space:nowrap}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*,*:before,*:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}button,input[type="submit"]{-webkit-font-smoothing:antialiased;background-color:#477DCA;border-radius:3px;color:white;display:inline-block;font-size:1em;font-weight:bold;line-height:1;padding:0.75em 1em;text-decoration:none}button:hover,input[type="submit"]:hover{background-color:#2c5999;color:white}button:disabled,input[type="submit"]:disabled{cursor:not-allowed;opacity:0.5}body{-webkit-font-smoothing:antialiased;background-color:#fff;color:#333;font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em;line-height:1.5}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;line-height:1.25;margin:0;text-rendering:optimizeLegibility}h1{font-size:2.25em}h2{font-size:2em}h3{font-size:1.75em}h4{font-size:1.5em}h5{font-size:1.25em}h6{font-size:1em}p{margin:0 0 0.75em}a{-webkit-transition:color 0.1s linear;-moz-transition:color 0.1s linear;transition:color 0.1s linear;color:#477DCA;text-decoration:none}a:hover{color:#2c5999}a:active,a:focus{color:#2c5999;outline:none}hr{border-bottom:1px solid #DDD;border-left:none;border-right:none;border-top:none;margin:1.5em 0}img,picture{margin:0;max-width:100%}blockquote{border-left:2px solid #DDD;color:#595959;margin:1.5em 0;padding-left:0.75em}cite{color:#737373;font-style:italic}cite:before{content:"\2014 \00A0"}fieldset{background:#f7f7f7;border:1px solid #DDD;margin:0 0 0.75em 0;padding:1.5em}input,label,select{display:block;font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em}label{font-weight:bold;margin-bottom:0.375em}label.required:after{content:"*"}label abbr{display:none}textarea,input[type="email"],input[type="number"],input[type="password"],input[type="search"],input[type="tel"],input[type="text"],input[type="url"],input[type="color"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="time"],input[type="week"],select[multiple=multiple]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:border-color;-moz-transition:border-color;transition:border-color;background-color:white;border-radius:3px;border:1px solid #DDD;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06);font-family:"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:1em;margin-bottom:0.75em;padding:0.5em 0.5em;width:100%}textarea:hover,input[type="email"]:hover,input[type="number"]:hover,input[type="password"]:hover,input[type="search"]:hover,input[type="tel"]:hover,input[type="text"]:hover,input[type="url"]:hover,input[type="color"]:hover,input[type="date"]:hover,input[type="datetime"]:hover,input[type="datetime-local"]:hover,input[type="month"]:hover,input[type="time"]:hover,input[type="week"]:hover,select[multiple=multiple]:hover{border-color:#c4c4c4}textarea:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="text"]:focus,input[type="url"]:focus,input[type="color"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,select[multiple=multiple]:focus{border-color:#477DCA;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06),0 0 5px rgba(55,112,192,0.7);outline:none}textarea{resize:vertical}input[type="search"]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}input[type="checkbox"],input[type="radio"]{display:inline;margin-right:0.375em}input[type="file"]{padding-bottom:0.75em;width:100%}select{margin-bottom:1.5em;max-width:100%;width:auto}table{border-collapse:collapse;margin:0.75em 0;table-layout:fixed;width:100%}th{border-bottom:1px solid #b7b7b7;font-weight:bold;padding:0.75em 0;text-align:left}td{border-bottom:1px solid #DDD;padding:0.75em 0}tr,td,th{vertical-align:middle}ul,ol{margin:0;padding:0;list-style-type:none}dl{margin-bottom:0.75em}dl dt{font-weight:bold;margin-top:0.75em}dl dd{margin:0}button,input[type="submit"]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;border:none;cursor:pointer;user-select:none;vertical-align:middle;white-space:nowrap}body a{border:1px solid #dbdbdb;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;display:inline-block;font-size:inherit;font-weight:bold;background-color:#fff;background-image:-webkit-linear-gradient(#fff,#e3e3e3);background-image:linear-gradient(#fff,#e3e3e3);padding:7px 18px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;border:1px solid #dfd8d8;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;display:inline-block;font-size:inherit;font-weight:bold;background-color:#fff;background-image:-webkit-linear-gradient(#fff,#e5e0e0);background-image:linear-gradient(#fff,#e5e0e0);padding:7px 18px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}body a:hover:not(:disabled){box-shadow:inset 0 1px 0 0 #fff;cursor:pointer;background-color:#f2f2f2;background-image:-webkit-linear-gradient(#f2f2f2,#dbdbdb);background-image:linear-gradient(#f2f2f2,#dbdbdb)}body a:active:not(:disabled),body a:focus:not(:disabled){border:1px solid #dbdbdb;box-shadow:inset 0 0 8px 4px #d4d4d4,inset 0 0 8px 4px #d4d4d4}body a:hover:not(:disabled){box-shadow:inset 0 1px 0 0 #fff;cursor:pointer;background-color:#f2f2f2;background-image:-webkit-linear-gradient(#f2f2f2,#ded8d8);background-image:linear-gradient(#f2f2f2,#ded8d8)}body a:active:not(:disabled),body a:focus:not(:disabled){border:1px solid #dfd8d8;box-shadow:inset 0 0 8px 4px #d7d1d1,inset 0 0 8px 4px #d7d1d1}body a:disabled{opacity:0.5;cursor:not-allowed}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<html><head><link href="./css/main.css" rel="stylesheet" type="text/css"/></head><body><p>current page is index.html</p><h1>Page title</h1><p>a placedholer paragraph</p></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var n;n=function(n){return $(n).transition({opacity:0},500,"ease",function(){return console.log("finished")})},$(function(){return $(document).on("click",function(){return n()})})}).call(this);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$(function(){var t=$(".body"),n=t.find("table.someclass");n.data("id","test"),docuemnt.on("click",".submit-button",function(t){console.log("form submitted"),t.cancelEvent()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$(function(){var t=$(".body"),n=t.find("table.someclass");n.data("id","test"),docuemnt.on("click",".submit-button",function(t){console.log("form submitted"),t.cancelEvent()})});
|
data/dummy/config.yaml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1 about page this
|
data/frozen.gemspec
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'frozen/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "frozen"
|
|
8
|
+
spec.version = Frozen::VERSION
|
|
9
|
+
spec.authors = ["Joe Bellus"]
|
|
10
|
+
spec.email = ["joe@5sigma.io"]
|
|
11
|
+
spec.summary = %q{A static site templating engine}
|
|
12
|
+
spec.description = %q{Frozen controls building static webpages using various templating engines such ass sass,scss,coffeescript, and slim.}
|
|
13
|
+
spec.homepage = "https://github.com/5Sigma/frozen"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_dependency "slim"
|
|
22
|
+
spec.add_dependency "aws-sdk"
|
|
23
|
+
spec.add_dependency "filewatcher"
|
|
24
|
+
spec.add_dependency "sass"
|
|
25
|
+
spec.add_dependency "colorize"
|
|
26
|
+
spec.add_dependency "bourbon"
|
|
27
|
+
spec.add_dependency "neat"
|
|
28
|
+
spec.add_dependency "bitters"
|
|
29
|
+
spec.add_dependency "uglifier"
|
|
30
|
+
spec.add_dependency "coffee-script"
|
|
31
|
+
spec.add_dependency "rack"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
|
35
|
+
spec.add_development_dependency "rake"
|
|
36
|
+
spec.add_development_dependency "rspec"
|
|
37
|
+
end
|
data/lib/frozen.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
require "frozen/version"
|
|
3
|
+
|
|
4
|
+
require 'frozen/template/stylesheet'
|
|
5
|
+
require 'frozen/template/javascript'
|
|
6
|
+
require 'frozen/template/view'
|
|
7
|
+
require 'frozen/site/local_site'
|
|
8
|
+
|
|
9
|
+
require 'frozen/rack/request_controller'
|
|
10
|
+
|
|
11
|
+
module Frozen
|
|
12
|
+
# Your code goes here...
|
|
13
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require 'temple/html/safe'
|
|
2
|
+
module Frozen
|
|
3
|
+
module Environment
|
|
4
|
+
class Base
|
|
5
|
+
attr_accessor :view
|
|
6
|
+
def initialize(view)
|
|
7
|
+
@view = view
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def current_page
|
|
11
|
+
view.build_file_path
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def current_page?(path)
|
|
15
|
+
current_page == path
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def stylesheet(name)
|
|
19
|
+
name << ".css" unless File.basename(name) == ".css"
|
|
20
|
+
name = "#{view.relative_to_root}/css/#{name}"
|
|
21
|
+
%Q|<link href="#{name}" rel="stylesheet" type="text/css"/>|.html_safe
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def javascript(name)
|
|
25
|
+
name << ".js" unless File.basename(name) == ".js"
|
|
26
|
+
name = "#{view.relative_to_root}/js/#{name}"
|
|
27
|
+
%Q|<script src="#{name}" language="javascript"></script>|
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def html_safe?
|
|
31
|
+
true
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module Frozen
|
|
2
|
+
module Rack
|
|
3
|
+
class RequestController
|
|
4
|
+
attr_accessor :site
|
|
5
|
+
def initialize(site)
|
|
6
|
+
@site = site
|
|
7
|
+
end
|
|
8
|
+
def call(env)
|
|
9
|
+
file_path = env["PATH_INFO"]
|
|
10
|
+
engine = get_stylesheet(file_path) if get_stylesheet(file_path)
|
|
11
|
+
engine = get_view(file_path) if get_view(file_path)
|
|
12
|
+
engine = get_javascript(file_path) if get_javascript(file_path)
|
|
13
|
+
return [200, {"Content-Type" => "text/html"}, [engine.render]]
|
|
14
|
+
end
|
|
15
|
+
def get_stylesheet(file_path)
|
|
16
|
+
site.stylesheets.find { |s|
|
|
17
|
+
s.build_file_path == file_path.sub(/^\//,'')
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
def get_view(file_path)
|
|
21
|
+
site.views.find { |v|
|
|
22
|
+
v.build_file_path == file_path.sub(/^\//,'') ||
|
|
23
|
+
v.build_file_path == File.join(file_path, "index.html").sub(/^\//,'')
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def get_javascript(file_path)
|
|
28
|
+
site.javascripts.find { |v|
|
|
29
|
+
site.javascripts.find { |i|
|
|
30
|
+
i.build_file_path == file_path.sub(/^\//,'')
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
module Frozen
|
|
2
|
+
module Site
|
|
3
|
+
class Base
|
|
4
|
+
attr_accessor :site_root_path
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
@options = {}
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def build_path
|
|
11
|
+
File.join(site_root_path, "build")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def stylesheet_template_path
|
|
15
|
+
File.join(site_root_path, "assets/stylesheets")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def javascript_template_path
|
|
19
|
+
File.join(site_root_path, "assets/javascripts")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def view_template_path
|
|
23
|
+
File.join(site_root_path, "views")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def layout_template_path
|
|
27
|
+
File.join(site_root_path, "layouts")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def stylesheet_build_path
|
|
31
|
+
File.join(build_path, "css")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def javascript_build_path
|
|
35
|
+
File.join(build_path, "js")
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def view_build_path
|
|
39
|
+
site_root_path
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def image_template_path
|
|
43
|
+
File.join(site_root_path, 'assets/images')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def file_is_view?(file)
|
|
47
|
+
file =~ /^views/
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def file_is_layout?(file)
|
|
51
|
+
file =~ /^layouts/
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def file_is_stylesheet?(file)
|
|
55
|
+
file =~ /^assets\/stylesheets/
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def file_is_javascript?(file)
|
|
59
|
+
file =~ /^assets\/javascripts/
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def image_build_path
|
|
63
|
+
File.join(build_path, 'images')
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def files_in_path(path, ext)
|
|
67
|
+
files = []
|
|
68
|
+
if ext.is_a? String
|
|
69
|
+
files = Dir.glob(File.join(path, "/**/*.#{ext}"))
|
|
70
|
+
end
|
|
71
|
+
if ext.is_a? Array
|
|
72
|
+
ext.each do |e|
|
|
73
|
+
files += Dir.glob(File.join(path, "/**/*.#{e}"))
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
if files
|
|
77
|
+
files.delete_if { |i| File.basename(i) =~ /^\_/ }
|
|
78
|
+
end
|
|
79
|
+
files
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
require 'frozen/site/base'
|
|
2
|
+
require 'colorize'
|
|
3
|
+
|
|
4
|
+
module Frozen
|
|
5
|
+
module Site
|
|
6
|
+
class LocalSite < Base
|
|
7
|
+
|
|
8
|
+
def initialize(site_root_path)
|
|
9
|
+
@site_root_path = File.expand_path(site_root_path)
|
|
10
|
+
super()
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build
|
|
14
|
+
build_stylesheets
|
|
15
|
+
build_javascripts
|
|
16
|
+
build_views
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def stylesheet_file_paths
|
|
20
|
+
@stylesheet_file_paths ||= files_in_path(
|
|
21
|
+
stylesheet_template_path,
|
|
22
|
+
"scss")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def stylesheets
|
|
26
|
+
@stylesheets ||= stylesheet_file_paths.map {|file_path|
|
|
27
|
+
engine = Frozen::Template::Stylesheet.new(
|
|
28
|
+
load_path: stylesheet_template_path
|
|
29
|
+
)
|
|
30
|
+
engine.template_root_path = stylesheet_template_path
|
|
31
|
+
engine.file_path = file_path
|
|
32
|
+
engine
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def build_stylesheets
|
|
38
|
+
stylesheets.each do |stylesheet|
|
|
39
|
+
build_stylesheet(stylesheet)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def build_stylesheet(stylesheet)
|
|
44
|
+
if stylesheet.is_a? Frozen::Template::Stylesheet
|
|
45
|
+
stylesheet.render_to_file(
|
|
46
|
+
File.join(site_build_path,stylesheet.build_file_path)
|
|
47
|
+
)
|
|
48
|
+
puts "#{"[stylesheet]".green} #{stylesheet.build_file_path}"
|
|
49
|
+
end
|
|
50
|
+
if stylesheet.is_a? String
|
|
51
|
+
engine = Frozen::Template::Stylesheet.new(
|
|
52
|
+
load_path: stylesheet_template_path
|
|
53
|
+
)
|
|
54
|
+
engine.template_root_path = stylesheet_template_path
|
|
55
|
+
engine.file_path = file_path
|
|
56
|
+
engine.render_to_file(
|
|
57
|
+
File.join(site_build_path,stylesheet.build_file_path)
|
|
58
|
+
)
|
|
59
|
+
puts "#{"[view]".green} #{engine.build_file_path}"
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
def javascript_file_paths
|
|
63
|
+
@javascript_file_paths ||= files_in_path(
|
|
64
|
+
javascript_template_path,
|
|
65
|
+
["js", "coffee"])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def javascripts
|
|
69
|
+
@javascripts ||= javascript_file_paths.map{ |file_path|
|
|
70
|
+
engine = Frozen::Template::Javascript.new
|
|
71
|
+
engine.template_root_path = javascript_template_path
|
|
72
|
+
engine.file_path = file_path
|
|
73
|
+
engine
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def build_javascript(javascript)
|
|
78
|
+
if javascript.is_a? Frozen::Template::Javascript
|
|
79
|
+
javascript.render_to_file(
|
|
80
|
+
File.join(site_build_path,javascript.build_file_path)
|
|
81
|
+
)
|
|
82
|
+
puts "#{"[javascript]".green} #{javascript.build_file_path}"
|
|
83
|
+
end
|
|
84
|
+
if javascript.is_a? String
|
|
85
|
+
engine = Frozen::Template::Javascript.new
|
|
86
|
+
engine.template_root_path = javascript_template_path
|
|
87
|
+
engine.file_path = file_path
|
|
88
|
+
engine.render_to_file(
|
|
89
|
+
File.join(site_build_path,engine.build_file_path)
|
|
90
|
+
)
|
|
91
|
+
puts "#{"[javascript]".green} #{engine.build_file_path}"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def build_javascripts
|
|
96
|
+
javascripts.each {|i| build_javascript(i)}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def view_file_paths
|
|
101
|
+
@view_file_paths ||= files_in_path(view_template_path, "slim")
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def views
|
|
105
|
+
@views ||= view_file_paths.map{|file_path|
|
|
106
|
+
engine = Frozen::Template::View.new
|
|
107
|
+
engine.file_path = file_path
|
|
108
|
+
engine.template_root_path = view_template_path
|
|
109
|
+
engine.layout_path = layout_template_path
|
|
110
|
+
engine
|
|
111
|
+
}
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def build_views
|
|
115
|
+
views.each { |v| build_view(v) }
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def build_view(view)
|
|
119
|
+
view.render_to_file(
|
|
120
|
+
File.join(site_build_path, view.build_file_path)
|
|
121
|
+
)
|
|
122
|
+
puts "#{"[view]".green} #{view.build_file_path}"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def site_build_path
|
|
126
|
+
File.join(site_root_path, "build")
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|