diff --git a/.metalsmith/client/search.coffee b/.metalsmith/client/search.coffee
index ec8c0734f..2167ea586 100644
--- a/.metalsmith/client/search.coffee
+++ b/.metalsmith/client/search.coffee
@@ -17,6 +17,7 @@ setupSearch = ->
# Get the search results element, and use tapir to populate it.
jQuery '#search-results'
.tapir
+ 'host': 'http://ulkk65a182f3.leeolayvar.koding.io:3000/search'
'token': '543475ab3493cda4d1000001'
'query_param': 'q'
'summary_limit': 400
diff --git a/.metalsmith/helper b/.metalsmith/helper
index 49a99edd6..897939944 100755
--- a/.metalsmith/helper
+++ b/.metalsmith/helper
@@ -29,10 +29,10 @@ Example Deploy:
case "build"
cd ./build
and set -l cur_br (git branch | sed -n 's/^\* //p')
- and test "$cur_br" = "gh-pages"
+ and test "$cur_br" = "production"
and git reset --hard HEAD
and git clean -fd
- and git pull origin gh-pages
+ and git pull origin production
and cd ..
and gulp
or begin
@@ -56,7 +56,7 @@ Example Deploy:
rm -rf ./build
and git clone git@github.com:koding/kdlearn build
and cd ./build
- and git checkout gh-pages
+ and git checkout production
and cd ..
or begin
set -l err $status
diff --git a/.metalsmith/metal.coffee b/.metalsmith/metal.coffee
index 0477ef6c2..c8c67dd5e 100644
--- a/.metalsmith/metal.coffee
+++ b/.metalsmith/metal.coffee
@@ -17,6 +17,7 @@ permalinks = require 'metalsmith-permalinks'
templates = require 'metalsmith-templates'
aboutSchema = require './plugins/about-schema'
authors = require './plugins/authors'
+autoDate = require './plugins/autodate'
defaultMeta = require './plugins/defaultmeta'
descMeta = require './plugins/descriptionMeta'
paginate = require './plugins/paginate'
@@ -70,10 +71,8 @@ markedRenderer.heading = (text, level) ->
# ensure a new paragraph.
markedRenderer.blockquote = (quote) ->
quoteTypes =
- "success": "success fa fa-check-circle"
- "warning": "warning fa fa-exclamation-circle"
- "error": "error fa fa-exclamation-triangle"
- "tip": "tip fa fa-info-circle"
+ "tip": "tip fa fa-check-circle"
+ "alert": "alert fa fa-exclamation-circle"
# Blocks is the final list of blockquotes that we're going to return
blocks = []
@@ -96,7 +95,7 @@ markedRenderer.blockquote = (quote) ->
block = block[quoteType.length+1...]
# Add back the
that we stole, but ignore the type, since
# we don't want that in the final quote for matches
- block = "
" + block
+ block = "
" + quoteType + " " + block
# If there was no match for any quoteType, then add back the
#
type: that we stole
# Note that the zero index (0) wasn't actually split on the type,
@@ -144,6 +143,7 @@ module.exports = build = (callback=->) ->
highlight: (code, lang) ->
lang = [lang] if lang?
highlightjs.highlightAuto(code, lang).value
+ .use autoDate()
.use excerpts()
.use titleify()
.use moment()
@@ -183,6 +183,9 @@ module.exports = build = (callback=->) ->
.use newPage
output: '404'
metadata: template: '404.toffee'
+ .use newPage
+ output: '404-tag'
+ metadata: template: '404-tag.toffee'
.use snapshot collection: 'faq'
.use snapshot collection: 'guide'
.use paginateTags
diff --git a/.metalsmith/package.json b/.metalsmith/package.json
index 01694ba4d..96a4dca57 100644
--- a/.metalsmith/package.json
+++ b/.metalsmith/package.json
@@ -18,14 +18,14 @@
"metalsmith-drafts": "0.0.1",
"js-yaml": "^3.2.2",
"marked": "^0.3.2",
- "metalsmith": "https://github.com/leeolayvar/metalsmith/tarball/ignores-support",
- "metalsmith-collections": "https://github.com/leeolayvar/metalsmith-collections/tarball/fileName",
+ "metalsmith": "https://github.com/leeola/metalsmith/tarball/ignores-support-kdlearn",
+ "metalsmith-collections": "https://github.com/leeola/metalsmith-collections/tarball/fileName",
"metalsmith-excerpts": "^1.0.0",
"metalsmith-ignore": "^0.1.2",
"metalsmith-markdown": "^0.2.1",
"metalsmith-metadata": "0.0.1",
"metalsmith-permalinks": "^0.3.0",
- "metalsmith-templates": "^0.5.0",
+ "metalsmith-templates": "^0.7.0",
"moment": "^2.6.0",
"sanitize-html": "^1.1.5",
"toffee": "^0.1.8"
diff --git a/.metalsmith/plugins/autodate.coffee b/.metalsmith/plugins/autodate.coffee
new file mode 100644
index 000000000..a9daf356d
--- /dev/null
+++ b/.metalsmith/plugins/autodate.coffee
@@ -0,0 +1,28 @@
+#
+# # Autodate
+#
+# Automatically apply the Unix modified timestamp into the `date`
+# variable if not present.
+#
+
+
+###
+# @param {Object} opts
+# @param {Boolean} opts.replaceAll If true, Replace all of the `date`
+# values. If false, add `date` values only if it is null.
+# @param {Boolean} opts.trimTime Remove the hours/minutes/etc from time
+# values if they exist. This is useful to avoid the exact modified time,
+# which might be just seconds ago.
+###
+module.exports = (opts={}) ->
+ opts.replaceAll ?= false
+ opts.trimTime ?= true
+ (files, metalsmith, done) ->
+ for _, file of files
+ if not file.date? or opts.replaceAll is true
+ file.date = new Date file.stats.mtime
+ if opts.trimTime is true
+ file.date.setHours 0,0,0,0
+ done()
+
+
diff --git a/.metalsmith/plugins/popularapi.coffee b/.metalsmith/plugins/popularapi.coffee
index c26f68361..a0313e078 100644
--- a/.metalsmith/plugins/popularapi.coffee
+++ b/.metalsmith/plugins/popularapi.coffee
@@ -134,7 +134,7 @@ addApiFiles = (files, metalsmith, opts={}, callback) ->
# Now add our plain count apis
for count, json of api
- newFile files, "/api/popular/#{count}.json",
+ newFile files, "api/popular/#{count}.json",
#JSON.stringify json
# Temporarily pretty formatted
JSON.stringify json, null, 2
@@ -153,7 +153,7 @@ addApiFiles = (files, metalsmith, opts={}, callback) ->
# Now add the tag api to the files object
for tagName, tApi of api
for count, json of tApi
- newFile files, "/api/popular/#{tagName}/#{count}.json",
+ newFile files, "api/popular/#{tagName}/#{count}.json",
#JSON.stringify json
# Temporarily pretty formatted
JSON.stringify json, null, 2
diff --git a/.metalsmith/plugins/recentapi.coffee b/.metalsmith/plugins/recentapi.coffee
index d7474f858..74eb933ec 100644
--- a/.metalsmith/plugins/recentapi.coffee
+++ b/.metalsmith/plugins/recentapi.coffee
@@ -29,7 +29,7 @@ newFile = (files, uri, content) ->
null
printableFile = (file, opts={}) ->
- opts.baseHttp ?= "http://learn.koding.com/"
+ opts.baseHttp ?= "https://learn.koding.com/"
file =
title: file.title
url: [opts.baseHttp, file.filename].join ""
@@ -65,7 +65,7 @@ module.exports = (opts={}) ->
# Now add our plain count apis
for count, json of api
- newFile files, "/api/recent/#{count}.json",
+ newFile files, "api/recent/#{count}.json",
#JSON.stringify json
# Temporarily pretty formatted
JSON.stringify json, null, 2
@@ -85,7 +85,7 @@ module.exports = (opts={}) ->
# Now add the tag api to the files object
for tagName, tApi of api
for count, json of tApi
- newFile files, "/api/recent/#{tagName}/#{count}.json",
+ newFile files, "api/recent/#{tagName}/#{count}.json",
#JSON.stringify json
# Temporarily pretty formatted
JSON.stringify json, null, 2
diff --git a/.metalsmith/plugins/redirects.coffee b/.metalsmith/plugins/redirects.coffee
index f11304715..fb0bf7c83 100644
--- a/.metalsmith/plugins/redirects.coffee
+++ b/.metalsmith/plugins/redirects.coffee
@@ -24,8 +24,9 @@ module.exports = (opts={}) ->
if not rSource? then return done()
rDestination = redirects[rSource]
+ output = if rSource[0] is '/' then rSource[1..] else rSource
pageOpts =
- output: rSource
+ output: output
metadata:
template: opts.template
source: rSource
diff --git a/.metalsmith/sass/main.scss b/.metalsmith/sass/main.scss
index a5e02d43f..e28f627cc 100644
--- a/.metalsmith/sass/main.scss
+++ b/.metalsmith/sass/main.scss
@@ -74,7 +74,7 @@ body {
margin: 0;
padding: 0;
font-family: 'Open Sans', 'Proxima Nova', 'Helvetica Neue', Helvetica, Arial;
- font-size: $normal_font;
+ font-size: $normal_font;
text-rendering: optimizelegibility;
line-height: 2;
color: $grey;
@@ -215,15 +215,15 @@ header {
position: absolute;
top: 70px;
left: 50%;
- width: 1000px;
- margin-left: -500px;
+ width: 1090px;
+ margin-left: -645px;
padding: 0;
}
}
}
.container {
width: 95%;
- max-width: 1000px;
+ max-width: 1090px;
margin: 0 auto;
position: relative;
padding: 0 20px;
@@ -250,12 +250,12 @@ blockquote {
padding-left: 20px;
text-align: left;
}
-.success,
-.error,
-.warning,
-.tip {
+.tip,
+.alert {
display: block;
border-radius: 3px;
+ border: 1px solid #ededed;
+ border-left-width: 10px;
position: relative;
&:before {
position: absolute;
@@ -270,23 +270,24 @@ blockquote {
width: 93%;
vertical-align: middle;
font-family: 'Open Sans','Proxima Nova','Helvetica Neue',Helvetica,Arial;
+ .label {
+ text-transform: uppercase;
+ display: block;
+ font-size: 12px;
+ font-weight: bold;
+ margin: 2px 0 0;
+ }
}
}
-.success {
+.tip {
background-color: #f3f8f3;
- border: 1px solid #50af51;
+ border-left-color: #50af51;
+ .label { color: #4D844D; }
}
-.error {
+.alert {
background-color: #fdf7f7;
- border: 1px solid #d9534f;
-}
-.warning {
- background-color: #fcf8f2;
- border: 1px solid #f0ad4e;
-}
-.tip {
- background-color: #F7F9FD;
- border: 1px solid #4F7BD9;
+ border-left-color: #d9534f;
+ .label { color: #CF3F3F; }
}
dd {
padding: 0;
@@ -311,7 +312,7 @@ footer.main-footer {
border-top: 1px solid $color_gray_nurse_approx;
height: auto;
.inner-container {
- max-width: 1290px;
+ max-width: 1090px;
padding: 0 45px;
margin: 0 auto;
display: block;
@@ -392,27 +393,32 @@ footer.main-footer {
h1#logo {
margin: 10px 0;
}
-.hasHeader {
- #logo {
- span.img {
- width: 185px;
- }
- }
-}
+// .hasHeader {
+// #logo {
+// span.img {
+// width: 185px;
+// }
+// }
+// }
.noHeader {
#logo {
span.img {
- width: 216px;
+ // width: 185px;
+ margin-left: 15px;
}
}
+ .hiring {
+ left: 220px;
+ }
}
#logo {
span.img {
display: inline-block;
background-image: url(../img/logo.header.png);
background-size: 185px;
- background-position: center;
+ background-position: 0;
background-repeat: no-repeat;
+ width: 185px;
height: 23px;
vertical-align: middle;
margin-bottom: 10px;
@@ -422,6 +428,33 @@ h1#logo {
text-decoration: none;
}
}
+.hiring {
+ background-color: #F7E747 !important;
+ border-radius: 3px;
+ // text-transform: uppercase;
+ position: absolute;
+ top: 36px;
+ left: 205px;
+ &:before {
+ content: '';
+ top: 6px;
+ left: -5px;
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 8px 8px 8px 0;
+ border-color: transparent #f7e847 transparent transparent;
+ }
+ a {
+ color: #535353 !important;
+ font-size: 12px;
+ padding: 0 10px;
+ &:hover {
+ text-decoration: none;
+ }
+ }
+}
nav {
background: $dark-grey;
@@ -460,7 +493,7 @@ nav {
box-shadow: 0px 0px 0px 5px rgba(0,0,0,0.2);
border-radius: 4px;
top: 45px;
- left: -375px;
+ left: -355px;
z-index: 30;
cursor: initial;
&:before {
@@ -517,6 +550,7 @@ nav {
font-size: 12px;
line-height: 19px;
display: none;
+ padding-right: 10px;
}
.sub-icon {
display: none;
@@ -575,18 +609,21 @@ nav {
border-radius: 4px;
margin: 14px 0;
.searchIcon {
- background-image: url(../img/sprite.png);
- background-position: -6px -2px;
- background-repeat: no-repeat;
+ // background-image: url(../img/sprite.png);
+ // background-position: -6px -2px;
+ // background-repeat: no-repeat;
height: 20px;
width: 20px;
display: block;
+ font-size: 18px;
+ text-align: center;
+ color: $white;
}
}
}
.topSearchBox {
display: none;
- max-width: 1000px;
+ max-width: 1090px;
padding: 0 0 20px 0;
margin: 0 auto;
position: relative;
@@ -1674,6 +1711,7 @@ pre {
border-radius: 3px;
background-color: $light-grey;
overflow: scroll;
+ line-height: 1.5;
}
pre code {
padding: 0;
@@ -1768,6 +1806,7 @@ table {
font-size: 13px;
font-style: italic;
color: $light-grey2;
+ a { color: $color_4; }
}
.verbose-guide-list .title {
margin: 0;
@@ -1932,3 +1971,11 @@ footer.main-footer .cclicense img {
color: #a2a2a2;
}
}
+
+.tip:before {
+ color: #50af51;
+}
+
+.alert:before {
+ color: #d9534f;
+}
diff --git a/.metalsmith/sass/rwd.scss b/.metalsmith/sass/rwd.scss
index 84ea74ae4..293bdc31c 100644
--- a/.metalsmith/sass/rwd.scss
+++ b/.metalsmith/sass/rwd.scss
@@ -18,14 +18,31 @@
#menu {
padding-top: 20px;
li {
- width: 50%;
+ width: 55%;
display: inline-block;
margin-right: 0;
padding-bottom: 10px;
+ .icon {
+ float: right;
+ margin-top: 7px;
+ }
}
#mobile-menu {
display: block;
}
+ > .toplinks {
+ > li {
+ .submenu {
+ width: 280px;
+ left: -10px;
+ .column {
+ width: 100% !important;
+ min-height: auto;
+ display: block;
+ }
+ }
+ }
+ }
}
}
.topSearchBox {
@@ -55,6 +72,15 @@
width: 280px;
}
}
+ .noHeader #logo span.img {
+ margin-left: 0;
+ }
+ .hiring {
+ display: none;
+ }
+ .container {
+ max-width: 280px;
+ }
.page {
>.container {
width: 280px;
@@ -151,7 +177,7 @@
}
/* Landscape phone to portrait tablet */
-@media (min-width: 480px) and (max-width: 768px) {
+@media (min-width: 480px) and (max-width: 768px) {
body {
background-color: #5c656d !important;
background-image: none !important;
@@ -208,6 +234,9 @@
width: 400px;
}
}
+ .hiring {
+ display: none;
+ }
.page {
>.container {
width: 400px;
@@ -301,10 +330,3 @@
position: relative;
}
}
-
-/* Portrait tablet to landscape and desktop */
-@media (min-width: 768px) and (max-width: 940px) {
-
-
-
-}
\ No newline at end of file
diff --git a/.metalsmith/static/img/logo.header.png b/.metalsmith/static/img/logo.header.png
index 2cfe0861c..bd450e438 100644
Binary files a/.metalsmith/static/img/logo.header.png and b/.metalsmith/static/img/logo.header.png differ
diff --git a/.metalsmith/static/img/logo.header.svg b/.metalsmith/static/img/logo.header.svg
new file mode 100644
index 000000000..558787a27
--- /dev/null
+++ b/.metalsmith/static/img/logo.header.svg
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+University
+
diff --git a/.metalsmith/templates/404-tag.toffee b/.metalsmith/templates/404-tag.toffee
new file mode 100644
index 000000000..1166e5f06
--- /dev/null
+++ b/.metalsmith/templates/404-tag.toffee
@@ -0,0 +1,18 @@
+#{partial 'head.toffee'}
+#{partial 'topnav.toffee'}
+
+
+
+#{partial 'sidebar.toffee'}
+
+
+
No guides for this category yet!
+
+ Sorry, no guides have been created for this categoy yet. If you think there's a specific guide you would want to see under this
+ section then you can always request a new guide by contacting us or checkout how you can contribute one on your own!
+
+
+
+
+#{partial 'footer.toffee'}
+
diff --git a/.metalsmith/templates/404.toffee b/.metalsmith/templates/404.toffee
index 119b9c3ac..829ccaba8 100644
--- a/.metalsmith/templates/404.toffee
+++ b/.metalsmith/templates/404.toffee
@@ -1,9 +1,12 @@
#{partial 'head.toffee'}
#{partial 'topnav.toffee'}
-
-
-
Page Not Found
+
+
+#{partial 'sidebar.toffee'}
+
+
+
Page Not Found
The page you requested cannot be found. If you think this is in
error, please Contact Us .
diff --git a/.metalsmith/templates/faq.toffee b/.metalsmith/templates/faq.toffee
index fd984c461..1988b01a8 100644
--- a/.metalsmith/templates/faq.toffee
+++ b/.metalsmith/templates/faq.toffee
@@ -5,13 +5,13 @@
#{partial 'sidebar.toffee'}