8 | {% include share-page.html %} 9 |
├── .gitignore ├── 404.html ├── static ├── img │ ├── avatar.png │ ├── favicon.ico │ ├── macFFBgHack.png │ ├── placeholder.jpg │ ├── loadingAnimation.gif │ └── screenshot-post-page.png ├── projects │ └── placeholder.jpg ├── js │ ├── main.js │ ├── projects.js │ ├── material.min.js │ ├── super-search.js │ ├── thickbox-compressed.js │ └── bootstrap.min.js └── css │ ├── projects.scss │ ├── syntax.css │ ├── thickbox.css │ ├── main.css │ └── bootstrap-material-design.min.css ├── assets └── test-page-image-1.jpg ├── projects.md ├── category ├── jekyll.md └── others.md ├── _includes ├── sidemenu.html ├── social_links.html ├── analytics.html ├── footer.html ├── main.html ├── js.html ├── navigation.html ├── project_tags.html ├── css.html ├── share-page.html ├── header.html └── meta.html ├── Gemfile ├── _layouts ├── page.html ├── default.html ├── project.html ├── posts_by_category.html └── post.html ├── _data ├── social.json ├── projects.json └── urls.json ├── about.md ├── _config.yml ├── README.md ├── _posts ├── 2016-06-04-test-page.md ├── 2015-07-11-welcome-to-jekyll.md └── 2016-06-04-example-content.md ├── LICENSE ├── feed.xml ├── Gemfile.lock ├── sitemap.xml ├── index.html └── _sass ├── _syntax-highlighting.scss ├── _base.scss └── _layout.scss /.gitignore: -------------------------------------------------------------------------------- 1 | Gemfile.lock 2 | _site/ 3 | _posts/ 4 | category/ 5 | *~ 6 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | permalink: /404.html 4 | --- 5 |
{{ post.content | strip_html | truncatewords: 20 }}
17 |{{ site.about }}
11 | {% include social_links.html %} 12 |31 | {% if page.date %} 32 | {{ page.date | date_to_string }} 33 | {% endif %} 34 | {% if page.categories.size > 0 %} 35 | 36 | » 37 | {% for category in page.categories %} 38 | {{ category }} 39 | {% if forloop.last == false %}, {% endif %} 40 | {% endfor %} 41 | 42 | {% endif %} 43 |
44 |{{ post.content | strip_html | truncatewords: 20 }}
46 | 47 |There are no posts in this categories.
54 | {% endif %} 55 |This demo page has been used from http://jasonm23.github.io/markdown-css-themes/.
9 | 10 |Now is the time for all good men to come to 23 | the aid of their country. This is just a 24 | regular paragraph.
25 | 26 |The quick brown fox jumped over the lazy 27 | dog’s back.
28 | 29 |47 | 48 |This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, 34 | consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. 35 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
36 | 37 |Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse 38 | id sem consectetuer libero luctus adipiscing.
39 | 40 |This is an H2 in a blockquote
41 | 42 |This is the first level of quoting.
43 | 44 |45 | 46 |This is nested blockquote.
Back to the first level.
Some of these words are emphasized. 49 | Some of these words are emphasized also.
50 | 51 |Use two asterisks for strong emphasis. 52 | Or, if you prefer, use two underscores instead.
53 | 54 |Blue
A list item.
With multiple paragraphs.
66 | 67 |Another item in the list.
This is a list item with two paragraphs. Lorem ipsum dolor 70 | sit amet, consectetuer adipiscing elit. Aliquam hendrerit 71 | mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet 76 | vitae, risus. Donec sit amet nisl. Aliquam semper ipsum 77 | sit amet velit.* Suspendisse id sem consectetuer libero luctus adipiscing.
78 | 79 |This is the second paragraph in the list item. You’re 85 | only required to indent the first line. Lorem ipsum dolor 86 | sit amet, consectetuer adipiscing elit.
87 | 88 |Another item in the same list.
A list item with a bit of code inline.
A list item with a blockquote:
92 | 93 |This is a blockquote 94 | inside a list item.
Here is an example of a pre code block
99 | 100 |tell application "Foo"
101 | beep
102 | end tell
103 |
104 |
105 | This is an example link.
106 | 107 |I start my morning with a cup of coffee and 108 | The New York Times.
109 | 110 | ### Code snippet 111 | 112 | {% highlight python %} 113 | if __name__ =='__main__': 114 | img_thread = threading.Thread(target=downloadWallpaper) 115 | img_thread.start() 116 | st = '\rDownloading Image' 117 | current = 1 118 | while img_thread.is_alive(): 119 | sys.stdout.write(st+'.'*((current)%5)) 120 | current=current+1 121 | time.sleep(0.3) 122 | img_thread.join() 123 | print('\nImage of the day downloaded.') 124 | {% endhighlight %} -------------------------------------------------------------------------------- /_sass/_base.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Reset some basic elements 3 | */ 4 | body, h1, h2, h3, h4, h5, h6, 5 | p, blockquote, pre, hr, 6 | dl, dd, ol, ul, figure { 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | 12 | 13 | /** 14 | * Basic styling 15 | */ 16 | body { 17 | font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; 18 | color: $text-color; 19 | background-color: $background-color; 20 | -webkit-text-size-adjust: 100%; 21 | -webkit-font-feature-settings: "kern" 1; 22 | -moz-font-feature-settings: "kern" 1; 23 | -o-font-feature-settings: "kern" 1; 24 | font-feature-settings: "kern" 1; 25 | font-kerning: normal; 26 | } 27 | 28 | 29 | 30 | /** 31 | * Set `margin-bottom` to maintain vertical rhythm 32 | */ 33 | h1, h2, h3, h4, h5, h6, 34 | p, blockquote, pre, 35 | ul, ol, dl, figure, 36 | %vertical-rhythm { 37 | margin-bottom: $spacing-unit / 2; 38 | } 39 | 40 | 41 | 42 | /** 43 | * Images 44 | */ 45 | img { 46 | max-width: 100%; 47 | vertical-align: middle; 48 | } 49 | 50 | 51 | 52 | /** 53 | * Figures 54 | */ 55 | figure > img { 56 | display: block; 57 | } 58 | 59 | figcaption { 60 | font-size: $small-font-size; 61 | } 62 | 63 | 64 | 65 | /** 66 | * Lists 67 | */ 68 | ul, ol { 69 | margin-left: $spacing-unit; 70 | } 71 | 72 | li { 73 | > ul, 74 | > ol { 75 | margin-bottom: 0; 76 | } 77 | } 78 | 79 | 80 | 81 | /** 82 | * Headings 83 | */ 84 | h1, h2, h3, h4, h5, h6 { 85 | font-weight: $base-font-weight; 86 | } 87 | 88 | 89 | 90 | /** 91 | * Links 92 | */ 93 | a { 94 | color: $brand-color; 95 | text-decoration: none; 96 | 97 | &:visited { 98 | color: darken($brand-color, 15%); 99 | } 100 | 101 | &:hover { 102 | color: $text-color; 103 | text-decoration: underline; 104 | } 105 | } 106 | 107 | 108 | 109 | /** 110 | * Blockquotes 111 | */ 112 | blockquote { 113 | color: $grey-color; 114 | border-left: 4px solid $grey-color-light; 115 | padding-left: $spacing-unit / 2; 116 | font-size: 18px; 117 | letter-spacing: -1px; 118 | font-style: italic; 119 | 120 | > :last-child { 121 | margin-bottom: 0; 122 | } 123 | } 124 | 125 | 126 | 127 | /** 128 | * Code formatting 129 | */ 130 | pre, 131 | code { 132 | font-size: 15px; 133 | border: 1px solid $grey-color-light; 134 | border-radius: 3px; 135 | background-color: #eef; 136 | } 137 | 138 | code { 139 | padding: 1px 5px; 140 | } 141 | 142 | pre { 143 | padding: 8px 12px; 144 | overflow-x: auto; 145 | 146 | > code { 147 | border: 0; 148 | padding-right: 0; 149 | padding-left: 0; 150 | } 151 | } 152 | 153 | 154 | 155 | /** 156 | * Wrapper 157 | */ 158 | .wrapper { 159 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); 160 | max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); 161 | margin-right: auto; 162 | margin-left: auto; 163 | padding-right: $spacing-unit; 164 | padding-left: $spacing-unit; 165 | @extend %clearfix; 166 | 167 | @include media-query($on-laptop) { 168 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); 169 | max-width: calc(#{$content-width} - (#{$spacing-unit})); 170 | padding-right: $spacing-unit / 2; 171 | padding-left: $spacing-unit / 2; 172 | } 173 | } 174 | 175 | 176 | 177 | /** 178 | * Clearfix 179 | */ 180 | %clearfix { 181 | 182 | &:after { 183 | content: ""; 184 | display: table; 185 | clear: both; 186 | } 187 | } 188 | 189 | 190 | 191 | /** 192 | * Icons 193 | */ 194 | .icon { 195 | 196 | > svg { 197 | display: inline-block; 198 | width: 16px; 199 | height: 16px; 200 | vertical-align: middle; 201 | 202 | path { 203 | fill: $grey-color; 204 | } 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /static/css/syntax.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #f8f8f8; } 3 | .highlight .c { color: #408080; font-style: italic } /* Comment */ 4 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 5 | .highlight .o { color: #666666 } /* Operator */ 6 | .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 7 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */ 8 | .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ 9 | .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ 10 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 11 | .highlight .ge { font-style: italic } /* Generic.Emph */ 12 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 13 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 14 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 15 | .highlight .go { color: #888888 } /* Generic.Output */ 16 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 17 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 18 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 19 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 20 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 21 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 22 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 23 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 24 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 25 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 26 | .highlight .m { color: #666666 } /* Literal.Number */ 27 | .highlight .s { color: #BA2121 } /* Literal.String */ 28 | .highlight .na { color: #7D9029 } /* Name.Attribute */ 29 | .highlight .nb { color: #008000 } /* Name.Builtin */ 30 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 31 | .highlight .no { color: #880000 } /* Name.Constant */ 32 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 33 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ 34 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 35 | .highlight .nf { color: #0000FF } /* Name.Function */ 36 | .highlight .nl { color: #A0A000 } /* Name.Label */ 37 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 38 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 39 | .highlight .nv { color: #19177C } /* Name.Variable */ 40 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 43 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 44 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 45 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 46 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 47 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 48 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 49 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 50 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 51 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 52 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 53 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 54 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */ 55 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 56 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 57 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 58 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 59 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 60 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 61 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /static/css/thickbox.css: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------------------------------------------*/ 2 | /* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ 3 | /* ----------------------------------------------------------------------------------------------------------------*/ 4 | *{padding: 0; margin: 0;} 5 | 6 | /* ----------------------------------------------------------------------------------------------------------------*/ 7 | /* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ 8 | /* ----------------------------------------------------------------------------------------------------------------*/ 9 | #TB_window { 10 | font: 12px Arial, Helvetica, sans-serif; 11 | color: #333333; 12 | } 13 | 14 | #TB_secondLine { 15 | font: 10px Arial, Helvetica, sans-serif; 16 | color:#666666; 17 | } 18 | 19 | #TB_window a:link {color: #666666;} 20 | #TB_window a:visited {color: #666666;} 21 | #TB_window a:hover {color: #000;} 22 | #TB_window a:active {color: #666666;} 23 | #TB_window a:focus{color: #666666;} 24 | 25 | /* ----------------------------------------------------------------------------------------------------------------*/ 26 | /* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ 27 | /* ----------------------------------------------------------------------------------------------------------------*/ 28 | #TB_overlay { 29 | position: fixed; 30 | z-index:100; 31 | top: 0px; 32 | left: 0px; 33 | height:100%; 34 | width:100%; 35 | } 36 | 37 | .TB_overlayMacFFBGHack {background: url(/static/img/macFFBgHack.png) repeat;} 38 | .TB_overlayBG { 39 | background-color:#000; 40 | filter:alpha(opacity=75); 41 | -moz-opacity: 0.75; 42 | opacity: 0.75; 43 | } 44 | 45 | * html #TB_overlay { /* ie6 hack */ 46 | position: absolute; 47 | height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); 48 | } 49 | 50 | #TB_window { 51 | position: fixed; 52 | background: #ffffff; 53 | z-index: 102; 54 | color:#000000; 55 | display:none; 56 | border: 4px solid #525252; 57 | text-align:left; 58 | top:50%; 59 | left:50%; 60 | } 61 | 62 | * html #TB_window { /* ie6 hack */ 63 | position: absolute; 64 | margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); 65 | } 66 | 67 | #TB_window img#TB_Image { 68 | display:block; 69 | margin: 15px 0 0 15px; 70 | border-right: 1px solid #ccc; 71 | border-bottom: 1px solid #ccc; 72 | border-top: 1px solid #666; 73 | border-left: 1px solid #666; 74 | } 75 | 76 | #TB_caption{ 77 | height:25px; 78 | padding:7px 30px 10px 25px; 79 | float:left; 80 | } 81 | 82 | #TB_closeWindow{ 83 | height:25px; 84 | padding:11px 25px 10px 0; 85 | float:right; 86 | } 87 | 88 | #TB_closeAjaxWindow{ 89 | padding:7px 10px 5px 0; 90 | margin-bottom:1px; 91 | text-align:right; 92 | float:right; 93 | } 94 | 95 | #TB_ajaxWindowTitle{ 96 | float:left; 97 | padding:7px 0 5px 10px; 98 | margin-bottom:1px; 99 | } 100 | 101 | #TB_title{ 102 | background-color:#e8e8e8; 103 | height:27px; 104 | } 105 | 106 | #TB_ajaxContent{ 107 | clear:both; 108 | padding:2px 15px 15px 15px; 109 | overflow:auto; 110 | text-align:left; 111 | line-height:1.4em; 112 | } 113 | 114 | #TB_ajaxContent.TB_modal{ 115 | padding:15px; 116 | } 117 | 118 | #TB_ajaxContent p{ 119 | padding:5px 0px 5px 0px; 120 | } 121 | 122 | #TB_load{ 123 | position: fixed; 124 | display:none; 125 | height:13px; 126 | width:208px; 127 | z-index:103; 128 | top: 50%; 129 | left: 50%; 130 | margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ 131 | } 132 | 133 | * html #TB_load { /* ie6 hack */ 134 | position: absolute; 135 | margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); 136 | } 137 | 138 | #TB_HideSelect{ 139 | z-index:99; 140 | position:fixed; 141 | top: 0; 142 | left: 0; 143 | background-color:#fff; 144 | border:none; 145 | filter:alpha(opacity=0); 146 | -moz-opacity: 0; 147 | opacity: 0; 148 | height:100%; 149 | width:100%; 150 | } 151 | 152 | * html #TB_HideSelect { /* ie6 hack */ 153 | position: absolute; 154 | height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); 155 | } 156 | 157 | #TB_iframeContent{ 158 | clear:both; 159 | border:none; 160 | margin-bottom:-1px; 161 | margin-top:1px; 162 | _margin-bottom:1px; 163 | } 164 | -------------------------------------------------------------------------------- /static/js/material.min.js: -------------------------------------------------------------------------------- 1 | !function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which&&9!=a.which&&13!=a.which&&16!=a.which&&17!=a.which&&20!=a.which&&27!=a.which:!1}function c(b){var c=a(b);c.prop("disabled")||c.closest(".form-group").addClass("is-focused")}function d(b){b.closest("label").hover(function(){var b=a(this).find("input");b.prop("disabled")||c(b)},function(){e(a(this).find("input"))})}function e(b){a(b).closest(".form-group").removeClass("is-focused")}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{validate:!0,input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){var c=a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("");d(c)},togglebutton:function(b){var c=a(b?b:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("");d(c)},radio:function(b){var c=a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("");d(c)},input:function(b){a(b?b:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this),c=b.closest(".form-group");0===c.length&&(b.wrap(""),c=b.closest(".form-group")),b.attr("data-hint")&&(b.after(""+b.attr("data-hint")+"
"),b.removeAttr("data-hint"));var d={"input-lg":"form-group-lg","input-sm":"form-group-sm"};if(a.each(d,function(a,d){b.hasClass(a)&&(b.removeClass(a),c.addClass(d))}),b.hasClass("floating-label")){var e=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label");var f=b.attr("id"),g="";f&&(g="for='"+f+"'"),c.addClass("label-floating"),b.after("")}(null===b.val()||"undefined"==b.val()||""===b.val())&&c.addClass("is-empty"),c.append(""),c.find("input[type=file]").length>0&&c.addClass("is-fileinput")})},attachInputEventHandlers:function(){var d=this.options.validate;a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).closest(".form-group").removeClass("is-empty")}).on("keyup change",".form-control",function(){var b=a(this),c=b.closest(".form-group"),e="undefined"==typeof b[0].checkValidity||b[0].checkValidity();""===b.val()?c.addClass("is-empty"):c.removeClass("is-empty"),d&&(e?c.removeClass("has-error"):c.addClass("has-error"))}).on("focus",".form-control, .form-group.is-fileinput",function(){c(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){e(this)}).on("change",".form-group input",function(){var b=a(this);if("file"!=b.attr("type")){var c=b.closest(".form-group"),d=b.val();d?c.removeClass("is-empty"):c.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var b=a(this),c=b.closest(".form-group"),d="";a.each(this.files,function(a,b){d+=b.name+", "}),d=d.substring(0,d.length-2),d?c.removeClass("is-empty"):c.addClass("is-empty"),c.find("input.form-control[readonly]").val(d)})},ripples:function(b){a(b?b:this.options.withRipples).ripples()},autofill:function(){var b=setInterval(function(){a("input[type!=checkbox]").each(function(){var b=a(this);b.val()&&b.val()!==b.attr("value")&&b.trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4)},attachAutofillEventHandlers:function(){var b;a(document).on("focus","input",function(){var c=a(this).parents("form").find("input").not("[type=file]");b=setInterval(function(){c.each(function(){var b=a(this);b.val()!==b.attr("value")&&b.trigger("change")})},100)}).on("blur",".form-group input",function(){clearInterval(b)})},init:function(b){this.options=a.extend({},this.options,b);var c=a(document);a.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&(this.input(),this.attachInputEventHandlers()),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&(this.autofill(),this.attachAutofillEventHandlers()),document.arrive&&this.options.arrive&&(a.fn.ripples&&this.options.ripples&&c.arrive(this.options.withRipples,function(){a.material.ripples(a(this))}),this.options.input&&c.arrive(this.options.inputElements,function(){a.material.input(a(this))}),this.options.checkbox&&c.arrive(this.options.checkboxElements,function(){a.material.checkbox(a(this))}),this.options.radio&&c.arrive(this.options.radioElements,function(){a.material.radio(a(this))}),this.options.togglebutton&&c.arrive(this.options.togglebuttonElements,function(){a.material.togglebutton(a(this))}))}}}(jQuery); 2 | //# sourceMappingURL=material.min.js.map -------------------------------------------------------------------------------- /_sass/_layout.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Site header 3 | */ 4 | .site-header { 5 | border-top: 5px solid $grey-color-dark; 6 | border-bottom: 1px solid $grey-color-light; 7 | min-height: 56px; 8 | 9 | // Positioning context for the mobile navigation icon 10 | position: relative; 11 | } 12 | 13 | .site-title { 14 | font-size: 26px; 15 | font-weight: 300; 16 | line-height: 56px; 17 | letter-spacing: -1px; 18 | margin-bottom: 0; 19 | float: left; 20 | 21 | &, 22 | &:visited { 23 | color: $grey-color-dark; 24 | } 25 | } 26 | 27 | .site-nav { 28 | float: right; 29 | line-height: 56px; 30 | 31 | .menu-icon { 32 | display: none; 33 | } 34 | 35 | .page-link { 36 | color: $text-color; 37 | line-height: $base-line-height; 38 | 39 | // Gaps between nav items, but not on the last one 40 | &:not(:last-child) { 41 | margin-right: 20px; 42 | } 43 | } 44 | 45 | @include media-query($on-palm) { 46 | position: absolute; 47 | top: 9px; 48 | right: $spacing-unit / 2; 49 | background-color: $background-color; 50 | border: 1px solid $grey-color-light; 51 | border-radius: 5px; 52 | text-align: right; 53 | 54 | .menu-icon { 55 | display: block; 56 | float: right; 57 | width: 36px; 58 | height: 26px; 59 | line-height: 0; 60 | padding-top: 10px; 61 | text-align: center; 62 | 63 | > svg { 64 | width: 18px; 65 | height: 15px; 66 | 67 | path { 68 | fill: $grey-color-dark; 69 | } 70 | } 71 | } 72 | 73 | .trigger { 74 | clear: both; 75 | display: none; 76 | } 77 | 78 | &:hover .trigger { 79 | display: block; 80 | padding-bottom: 5px; 81 | } 82 | 83 | .page-link { 84 | display: block; 85 | padding: 5px 10px; 86 | 87 | &:not(:last-child) { 88 | margin-right: 0; 89 | } 90 | margin-left: 20px; 91 | } 92 | } 93 | } 94 | 95 | 96 | 97 | /** 98 | * Site footer 99 | */ 100 | .site-footer { 101 | border-top: 1px solid $grey-color-light; 102 | padding: $spacing-unit 0; 103 | } 104 | 105 | .footer-heading { 106 | font-size: 18px; 107 | margin-bottom: $spacing-unit / 2; 108 | } 109 | 110 | .contact-list, 111 | .social-media-list { 112 | list-style: none; 113 | margin-left: 0; 114 | } 115 | 116 | .footer-col-wrapper { 117 | font-size: 15px; 118 | color: $grey-color; 119 | margin-left: -$spacing-unit / 2; 120 | @extend %clearfix; 121 | } 122 | 123 | .footer-col { 124 | float: left; 125 | margin-bottom: $spacing-unit / 2; 126 | padding-left: $spacing-unit / 2; 127 | } 128 | 129 | .footer-col-1 { 130 | width: -webkit-calc(35% - (#{$spacing-unit} / 2)); 131 | width: calc(35% - (#{$spacing-unit} / 2)); 132 | } 133 | 134 | .footer-col-2 { 135 | width: -webkit-calc(20% - (#{$spacing-unit} / 2)); 136 | width: calc(20% - (#{$spacing-unit} / 2)); 137 | } 138 | 139 | .footer-col-3 { 140 | width: -webkit-calc(45% - (#{$spacing-unit} / 2)); 141 | width: calc(45% - (#{$spacing-unit} / 2)); 142 | } 143 | 144 | @include media-query($on-laptop) { 145 | .footer-col-1, 146 | .footer-col-2 { 147 | width: -webkit-calc(50% - (#{$spacing-unit} / 2)); 148 | width: calc(50% - (#{$spacing-unit} / 2)); 149 | } 150 | 151 | .footer-col-3 { 152 | width: -webkit-calc(100% - (#{$spacing-unit} / 2)); 153 | width: calc(100% - (#{$spacing-unit} / 2)); 154 | } 155 | } 156 | 157 | @include media-query($on-palm) { 158 | .footer-col { 159 | float: none; 160 | width: -webkit-calc(100% - (#{$spacing-unit} / 2)); 161 | width: calc(100% - (#{$spacing-unit} / 2)); 162 | } 163 | } 164 | 165 | 166 | 167 | /** 168 | * Page content 169 | */ 170 | .page-content { 171 | padding: $spacing-unit 0; 172 | } 173 | 174 | .page-heading { 175 | font-size: 20px; 176 | } 177 | 178 | .post-list { 179 | margin-left: 0; 180 | list-style: none; 181 | 182 | > li { 183 | margin-bottom: $spacing-unit; 184 | } 185 | } 186 | 187 | .post-meta { 188 | font-size: $small-font-size; 189 | color: $grey-color; 190 | } 191 | 192 | .post-link { 193 | display: block; 194 | font-size: 24px; 195 | } 196 | 197 | 198 | 199 | /** 200 | * Posts 201 | */ 202 | .post-header { 203 | margin-bottom: $spacing-unit; 204 | } 205 | 206 | .post-title { 207 | font-size: 42px; 208 | letter-spacing: -1px; 209 | line-height: 1; 210 | 211 | @include media-query($on-laptop) { 212 | font-size: 36px; 213 | } 214 | } 215 | 216 | .post-content { 217 | margin-bottom: $spacing-unit; 218 | 219 | h2 { 220 | font-size: 32px; 221 | 222 | @include media-query($on-laptop) { 223 | font-size: 28px; 224 | } 225 | } 226 | 227 | h3 { 228 | font-size: 26px; 229 | 230 | @include media-query($on-laptop) { 231 | font-size: 22px; 232 | } 233 | } 234 | 235 | h4 { 236 | font-size: 20px; 237 | 238 | @include media-query($on-laptop) { 239 | font-size: 18px; 240 | } 241 | } 242 | } 243 | -------------------------------------------------------------------------------- /static/js/super-search.js: -------------------------------------------------------------------------------- 1 | /* Super Search 2 | Author: Kushagra Gour (http://kushagragour.in) 3 | MIT Licensed 4 | */ 5 | 6 | (function () { 7 | var isSearchOpen = false, 8 | searchEl = document.querySelector('#js-search'), 9 | searchInputEl = document.querySelector('#js-search__input'), 10 | searchResultsEl = document.querySelector('#js-search__results'), 11 | currentInputValue = '', 12 | lastSearchResultHash, 13 | posts = [], 14 | sitemap = (baseurl || '') + '/sitemap.xml'; 15 | 16 | // Changes XML to JSON 17 | // Modified version from here: http://davidwalsh.name/convert-xml-json 18 | function xmlToJson(xml) { 19 | 20 | // Create the return object 21 | var obj = {}; 22 | 23 | if (xml.nodeType == 1) { // element 24 | // do attributes 25 | if (xml.attributes.length > 0) { 26 | obj["@attributes"] = {}; 27 | for (var j = 0; j < xml.attributes.length; j++) { 28 | var attribute = xml.attributes.item(j); 29 | obj["@attributes"][attribute.nodeName] = attribute.nodeValue; 30 | } 31 | } 32 | } else if (xml.nodeType == 3) { // text 33 | obj = xml.nodeValue; 34 | } 35 | 36 | // do children 37 | // If all text nodes inside, get concatenated text from them. 38 | var textNodes = [].slice.call(xml.childNodes).filter(function (node) { return node.nodeType === 3; }); 39 | if (xml.hasChildNodes() && xml.childNodes.length === textNodes.length) { 40 | obj = [].slice.call(xml.childNodes).reduce(function (text, node) { return text + node.nodeValue; }, ''); 41 | } 42 | else if (xml.hasChildNodes()) { 43 | for(var i = 0; i < xml.childNodes.length; i++) { 44 | var item = xml.childNodes.item(i); 45 | var nodeName = item.nodeName; 46 | if (typeof(obj[nodeName]) == "undefined") { 47 | obj[nodeName] = xmlToJson(item); 48 | } else { 49 | if (typeof(obj[nodeName].push) == "undefined") { 50 | var old = obj[nodeName]; 51 | obj[nodeName] = []; 52 | obj[nodeName].push(old); 53 | } 54 | obj[nodeName].push(xmlToJson(item)); 55 | } 56 | } 57 | } 58 | return obj; 59 | } 60 | 61 | function getPostsFromXml(xml) { 62 | var json = xmlToJson(xml); 63 | return json.channel.item; 64 | } 65 | 66 | var xmlhttp=new XMLHttpRequest(); 67 | xmlhttp.open("GET",sitemap); 68 | xmlhttp.onreadystatechange = function () { 69 | if (xmlhttp.readyState != 4) return; 70 | if (xmlhttp.status != 200 && xmlhttp.status != 304) { return; } 71 | var node = (new DOMParser).parseFromString(xmlhttp.responseText, 'text/xml'); 72 | node = node.children[0]; 73 | posts = getPostsFromXml(node); 74 | } 75 | xmlhttp.send(); 76 | 77 | window.toggleSearch = function toggleSearch() { 78 | _gaq.push(['_trackEvent', 'supersearch', searchEl.classList.contains('is-active')]); 79 | searchEl.classList.toggle('is-active'); 80 | if (searchEl.classList.contains('is-active')) { 81 | // while opening 82 | searchInputEl.value = ''; 83 | } else { 84 | // while closing 85 | searchResultsEl.classList.add('is-hidden'); 86 | } 87 | setTimeout(function () { 88 | searchInputEl.focus(); 89 | }, 210); 90 | } 91 | 92 | window.addEventListener('keyup', function onKeyPress(e) { 93 | if (e.which === 27) { 94 | toggleSearch(); 95 | } 96 | }); 97 | window.addEventListener('keypress', function onKeyPress(e) { 98 | if (e.which === 47 && !searchEl.classList.contains('is-active')) { 99 | toggleSearch(); 100 | } 101 | }); 102 | 103 | searchInputEl.addEventListener('input', function onInputChange() { 104 | var currentResultHash, d; 105 | 106 | currentInputValue = (searchInputEl.value + '').toLowerCase(); 107 | if (!currentInputValue || currentInputValue.length < 3) { 108 | lastSearchResultHash = ''; 109 | searchResultsEl.classList.add('is-hidden'); 110 | return; 111 | } 112 | searchResultsEl.style.offsetWidth; 113 | 114 | var matchingPosts = posts.filter(function (post) { 115 | if ((post.title + '').toLowerCase().indexOf(currentInputValue) !== -1 || (post.description + '').toLowerCase().indexOf(currentInputValue) !== -1) { 116 | return true; 117 | } 118 | }); 119 | if (!matchingPosts.length) { 120 | searchResultsEl.classList.add('is-hidden'); 121 | } 122 | currentResultHash = matchingPosts.reduce(function(hash, post) { return post.title + hash; }, ''); 123 | if (matchingPosts.length && currentResultHash !== lastSearchResultHash) { 124 | searchResultsEl.classList.remove('is-hidden'); 125 | searchResultsEl.innerHTML = matchingPosts.map(function (post) { 126 | d = new Date(post.pubDate); 127 | return '