From 9422583e4c8bda8aacfa2d3df0a355d171d9f58b Mon Sep 17 00:00:00 2001 From: Shawn Johnson Date: Fri, 15 Aug 2014 18:34:56 -0400 Subject: [PATCH] #2 - Initial changes to leverage scss. Updated default template to refer to local resources (though I think we need a variable here for ghpages branches). Created placeholder includes. --- .gitignore | 2 ++ _config.yml | 2 ++ _layouts/default.html | 10 +++++----- static/{css/style.css => _sass/_base.scss} | 23 +++++++++++----------- static/_sass/_custom.scss | 0 static/_sass/_variables.scss | 1 + static/css/style.scss | 5 +++++ 7 files changed, 27 insertions(+), 16 deletions(-) rename static/{css/style.css => _sass/_base.scss} (97%) create mode 100644 static/_sass/_custom.scss create mode 100644 static/_sass/_variables.scss create mode 100644 static/css/style.scss diff --git a/.gitignore b/.gitignore index 0babf0c..54a2568 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ _site _components node_modules + +.project diff --git a/_config.yml b/_config.yml index 1492bd6..978c09d 100644 --- a/_config.yml +++ b/_config.yml @@ -4,3 +4,5 @@ pygments: true safe: true baseurl: / exclude: ['.ruby-version', 'node_modules', 'package.json', 'bower.json'] +sass: + sass_dir: static/_sass \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index f7b111a..e8f6972 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,15 +6,15 @@ API documentation - [Agency] Open Tech - - + + @@ -42,7 +42,7 @@ {% include footer.html %} - - + + diff --git a/static/css/style.css b/static/_sass/_base.scss similarity index 97% rename from static/css/style.css rename to static/_sass/_base.scss index 9601915..4d5a230 100644 --- a/static/css/style.css +++ b/static/_sass/_base.scss @@ -360,7 +360,7 @@ nav a:visited { nav li:hover { color: #75787b; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; border-bottom: 1px solid #d0d0ce; padding-left: 0; @@ -368,7 +368,7 @@ nav li:hover { nav li:active { color: #75787b; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; border-bottom: 1px solid #d0d0ce; padding-left: 0; @@ -391,7 +391,7 @@ nav li { #overview a.overview { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -399,7 +399,7 @@ nav li { #basics a.basics { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -407,7 +407,7 @@ nav li { #console a.console { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -415,7 +415,7 @@ nav li { #queries a.queries { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -423,7 +423,7 @@ nav li { #fields a.fields { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -431,7 +431,7 @@ nav li { #contribute a.contribute { color: #101820; border-bottom: none; - border-left: 4px solid #2CB34A; + border-left: 4px solid $nav-color; background-color: transparent; margin-left: -4px; } @@ -497,7 +497,7 @@ ul.repo-list.no-padding { } .header { - border-bottom: 4px solid #2CB34A; + border-bottom: 4px solid $nav-color; width: 100%; background-color: #fff; /*position: fixed;*/ @@ -935,7 +935,7 @@ input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } -button:: -moz-focus-inner, input::-moz-focus-inner { +button::-moz-focus-inner, input::-moz-focus-inner { border:0; padding:0; } @@ -1110,7 +1110,7 @@ del { thead {display: table-header-group; } /* Repeat header row at top of each printed page */ tr, img {page-break-inside: avoid; } img {max-width: 100% !important; } - @page {margin: 0.5cm} + page {margin: 0.5cm} p, h2, h3 {orphans: 3; widows: 3} h2, h3{page-break-after: avoid} } @@ -1167,6 +1167,7 @@ del { .open .expandable-button:before { content: "\f056"; +} /* custom class as .hidden is already used in the guide */ .expandable-hidden { diff --git a/static/_sass/_custom.scss b/static/_sass/_custom.scss new file mode 100644 index 0000000..e69de29 diff --git a/static/_sass/_variables.scss b/static/_sass/_variables.scss new file mode 100644 index 0000000..9edb521 --- /dev/null +++ b/static/_sass/_variables.scss @@ -0,0 +1 @@ +$nav-color: #09c; \ No newline at end of file diff --git a/static/css/style.scss b/static/css/style.scss new file mode 100644 index 0000000..ccf8a3d --- /dev/null +++ b/static/css/style.scss @@ -0,0 +1,5 @@ +--- +--- +@import 'variables'; +@import 'base'; +@import 'custom';