diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..650200a --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.gem +.bundle +.sass-cache +_site +Gemfile.lock +.DS_Store +vendor +.jekyll-cache +tags diff --git a/404.html b/404.html new file mode 100644 index 0000000..cdc90db --- /dev/null +++ b/404.html @@ -0,0 +1,34 @@ +--- +title: Page Not Found +--- + + + + {%- include head.html -%} + + + +

404

+

Page not found.

+ + \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..bb94df8 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +source "https://rubygems.org" +gemspec diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..432a204 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Samarjeet + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 6db3447..91ceb7f 100644 --- a/README.md +++ b/README.md @@ -1 +1,222 @@ -# mmminji.github.io \ No newline at end of file +# plainwhite + +Simplistic jekyll portfolio-style theme for writers. + +**Demo**: [samarsault.com](https://samarsault.com) + +![plainwhite theme preview](/screenshot.png) + +## Installation on Github Pages + +Add this line to your site's `_config.yml`: + +```yaml +remote_theme: samarsault/plainwhite-jekyll +``` + +## Installation + +Add this line to your Jekyll site's `Gemfile`: + +```ruby +gem "plainwhite" +``` + +And add this line to your Jekyll site's `_config.yml`: + +```yaml +theme: plainwhite +``` + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install plainwhite + +## Usage + +The "plainwhite" key in \_config.yml is used to customize the theme data. + +```yaml +plainwhite: + name: Adam Denisov + tagline: Developer. Designer + date_format: "%b %-d, %Y" + + social_links: + twitter: samarsault + github: samarsault + linkedIn: in/samarsault # format: locale/username +``` + +**Updating Placeholder Image** + +The placeholder portfolio image can be replaced by the desired image by placing it as `assets/portfolio.png` in your jekyll website, or by changing the following line in `_config.yaml` + +```yaml +plainwhite: + portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start) +``` + +To use a different image for dark mode, e.g. with different colors that work better in dark mode, add a `portfolio_image_dark` entry in addition to the `portfolio_image`. + +```yaml +plainwhite: + portfolio_image: "assets/portfolio.png" + portfolio_image_dark: "assets/portfolio_dark.png" +``` + +**Comments (Disqus)** + +Comments on posts can be enabled by specifying your disqus_shortname under plainwhite in `_config.yml`. For example, + +```yaml +plainwhite: + disqus_shortname: games +``` + +**Google Analytics** + +It can be enabled by specifying your analytics id under plainwhite in `_config.yml` + +```yaml +plainwhite: + analytics_id: "< YOUR ID >" +``` + +**Sitemap** + +It can be toggled by the following line to under plainwhite in `_config.yml` + +```yaml +plainwhite: + sitemap: true +``` + +**Excerpts** + +Excerpts can be enabled by adding the following line to your `_config.yml` + +```yaml +show_excerpts: true +``` + +**Layouts** + +- Home +- Page +- Post + +**Navigation** + +Navigation can be enabled by adding the following line to your `_config.yml` + +```yaml +plainwhite: + navigation: + - title: My Work + url: "/my-work" + - title: Resume + url: "/resume" +``` + +**Mobile** + +By default, Plainwhite places the sidebar (logo, name, tagline etc.) above the content on mobile (narrow screens). +To condense it (moving some things to the bottom of the page and making the rest smaller) so it takes up less space, add the following to your `_config.yml`: + +```yaml +plainwhite: + condensed_mobile: + - home + - post + - page +``` + +This chooses which layouts (types of page) should be condensed on mobile screens. E.g. if you want everything but the landing page to be condensed, remove `home` from the list. This option does not affect rendering on wider screens. + +**Dark mode** + +Dark mode can be enabled by setting the `dark_mode` flag in your `_config.yml` + +The website will check the OS preferred color scheme and set the theme accordingly, the preference will then be saved in a cookie + +```yaml +plainwhite: + dark_mode: true +``` + +![plainwhite dark theme previe](/dark.png) + +**Multiline tagline** + +Tagline can be multiline in this way + +```yaml +plainwhite: + tagline: | + First Line. + + Second Line. + + Third Line. +``` + +**Search-bar** + +Search-bar can be enabled by adding the following line to `config.yml` + +```yaml +plainwhite: + search: true +``` + +Search is powered by [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search) Jekyll plugin. A `search.json` containing post meta and contents will be generated in site root folder. Plugin JavaScript will then match for posts based on user input. More info and `search.json` customization documentation can be found in plugin repository. + +**Base URL** + +You can specify a custom base URL (eg. example.com/blog/) by adding the following line to `_config.yaml`. Note that there is no trailing slash on the URL. + +```yaml +baseurl: "/blog" +``` + +**Language** + +You can set the `lang` attribute of the `` tag on your pages by changing the following line in `_config.yml`: + +```yaml +plainwhite: + html_lang: "en" +``` + +[See here for a full list of available language codes](https://www.w3schools.com/tags/ref_country_codes.asp) + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/samarsault/plainwhite-jekyll. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. + +## Development + +To set up your environment to develop this theme, run `bundle install`. + +Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal. + +When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled. +To add a custom directory to your theme-gem, please edit the regexp in `plainwhite.gemspec` accordingly. + +## Donation +If this project help you reduce time to develop, you can give me a cup of coffee :) + +[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/thelehhman) + +## License + +The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). + +## More themes + +- [Texture](https://github.com/samarsault/texture) diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..1ab00f8 --- /dev/null +++ b/_config.yml @@ -0,0 +1,61 @@ +title: Your awesome title +author: GitHub User +email: your-email@domain.com +description: > # this means to ignore newlines until "show_exerpts:" + Write an awesome description for your new site here. You can edit this + line in _config.yml. It will appear in your document head meta (for + Google search results) and in your feed.xml site description. +show_excerpts: true # set to true to show excerpts on the homepage + +# Minima date format +# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this +sass: + sass_dir: _sass +plainwhite: + name: Adam Denisov + tagline: Developer. Designer + date_format: "%b %-d, %Y" + sitemap: true # set to true to generate sitemap.xml content + search: true # set to true to enable searchbar + dark_mode: true # set to true to add dark mode toggle + portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start) + html_lang: "en" # set the lang attribute of the tag for the pages. See here for a list of codes: https://www.w3schools.com/tags/ref_country_codes.asp + condensed_mobile: + #- home + - page + - post + # generate social links in footer + social_links: + twitter: samarsault + github: samarsault + linkedIn: in/samarsault + #rss: rss + #dribbble: jekyll + #flickr: jekyll + #instagram: jekyll + #pinterest: jekyll + #youtube: jekyll + #facebook: jekyll + #soundcloud: jekyll + #telegram: jekyll + #gitlab: jekyll + #email: jekyll + + # Mastodon instances + # mastodon: + # - username: jekyll + # instance: example.com + # - username: jekyll2 + # instance: example.com + +# If you want to link only specific pages in your header, uncomment +# this and add the path to the pages in order as they should show up +#header_pages: +# - about.md + +# Build settings +theme: plainwhite + +plugins: + - jekyll-seo-tag +# - jekyll-feed diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..88073eb --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,10 @@ + + + + + +{{ page.title | default: site.title }} +{% seo %} +{% if site.plainwhite.dark_mode %} + +{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..ed1eceb --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,192 @@ + + + + + {%- include head.html -%} + + +{%- if site.plainwhite.condensed_mobile contains page.layout -%} +{% assign condensed_class = "condensed" %} +{% else %} +{% assign condensed_class = "" %} +{%- endif -%} + + +
+
+
+ + {%- if site.plainwhite.tagline -%} +

{{ site.plainwhite.tagline }}

+ {%- endif -%} +
+ {% capture footer %} + {%- if site.plainwhite.social_links != '' -%} + + {%- endif -%} + {%- if site.plainwhite.navigation -%} + + {%- endif -%} + + {%- if site.plainwhite.dark_mode -%} + + {%- endif -%} + {% endcapture %} + {{ footer }} +
+
+ {{ content }} +
+ +
+ {% if site.plainwhite.dark_mode %} + + {% endif %} + + {%- if site.plainwhite.analytics_id -%} + + + {%- endif -%} + + {% if site.plainwhite.search %} + + + {% endif %} + + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..8d37efe --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,57 @@ +--- +layout: default +--- + +{%- if page.title -%} +

{{ page.title }}

+{%- endif -%} + +{{ content }} + +{%- if site.posts.size > 0 -%} + + + +{%- endif -%} diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..91df6ba --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,8 @@ +--- +layout: default +--- +
+
+ {{ content }} +
+
\ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..0e0e90e --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,39 @@ +--- +layout: default +--- +{%- assign date_format = site.plainwhite.date_format | default: "%b %-d, %Y" -%} +
+ +

{{ page.title | escape }}

+
+
+ + {%- if page.categories.size > 0 -%} + + {%- endif -%} +
+
+ {{ content }} +
+ {%- if site.plainwhite.disqus_shortname -%} +
+ + + {%- endif -%} +
diff --git a/_posts/2019-03-23-welcome-to-jekyll.markdown b/_posts/2019-03-23-welcome-to-jekyll.markdown new file mode 100644 index 0000000..bbfd553 --- /dev/null +++ b/_posts/2019-03-23-welcome-to-jekyll.markdown @@ -0,0 +1,28 @@ +--- +layout: post +title: "Integrating razorpay into your webapp" +date: 2019-03-23 21:03:36 +0530 +categories: Javascript NodeJS +--- +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + +```javascript +const Razorpay = require('razorpay'); + +let rzp = Razorpay({ + key_id: 'KEY_ID', + secret: 'name' +}); + +// capture request +rzp.capture(payment_id, cost) + .then(function (data) { + return 2; + }) +``` + +Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. + +[jekyll-docs]: https://jekyllrb.com/docs/home +[jekyll-gh]: https://github.com/jekyll/jekyll +[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/_sass/_syntax.scss b/_sass/_syntax.scss new file mode 100644 index 0000000..e46cdc9 --- /dev/null +++ b/_sass/_syntax.scss @@ -0,0 +1,14 @@ +@import 'ext/solarized-light'; + +.highlight { + background-color: #f4f4f4; +} + +div.highlight { + padding: 5px 20px; +} +pre.highlight, code { + font-family: 'Consolas', Menlo, monospace; + line-height: 1.4em; + tab-size: 4; +} \ No newline at end of file diff --git a/_sass/dark.scss b/_sass/dark.scss new file mode 100644 index 0000000..b998dfa --- /dev/null +++ b/_sass/dark.scss @@ -0,0 +1,117 @@ +.dark, +.dark * { + $dark_text_color: #f6f6f6; + $dark_link_color: #4da3ff; + background-color: #171717; + color: $dark_text_color; + border-color: #e6e6e6; + + .about{ + img.light { + display: none; + } + img.dark { + display: inline; + } + } + .post p { + color: #ddd; + } + + .social [class^="icon-"] { + color: $dark_text_color + } + + #posts-label { + color: $dark_text_color; + border-bottom: 1px solid #272727; + } + + @import 'ext/solarized-dark'; + .highlight, .highlight * + { + background-color: #00080a; + color: #93a1a1; + } + + div.highlight-dark { + padding: 5px 20px; + } + pre.highlight-dark, code { + font-family: 'Consolas', Menlo, monospace; + line-height: 1.4em; + tab-size: 4; + } + + .post-categories { + li { + background-color: #333; + color: #fff; + } + } + + a { + color: $dark_link_color; + } + #title a { + color: #fff; + &:hover { + color: $dark_link_color; + } + } + + .posts-labelgroup { + + border-bottom: 1px solid #333; + .search-results { + background-color: #333; + + a { + color: white; + + &:hover { + background-color: #171717; + } + } + } + + .search-section i { + background-color: transparent; + } + } + + .posts-labelgroup:hover { + + i { + color: white; + } + + input { + color: white; + } + } + + + .posts-labelgroup.focus-within { + + .search-section { + background-color: #333; + } + + input { + color: $dark_text_color; + } + + i { + color: white; + } + } +} +.dark table { + th, td { + border: 1px solid #333; + } + th { + background-color: #0d0d0d; + } +} diff --git a/_sass/ext/_fonts.scss b/_sass/ext/_fonts.scss new file mode 100644 index 0000000..901958f --- /dev/null +++ b/_sass/ext/_fonts.scss @@ -0,0 +1,74 @@ +@font-face { + font-family: 'fontello'; + src: url('../font/fontello.eot?5c4bea36'); + src: url('../font/fontello.eot?5c4bea36#iefix') format('embedded-opentype'), + url('../font/fontello.woff2?5c4bea36') format('woff2'), + url('../font/fontello.woff?5c4bea36') format('woff'), + url('../font/fontello.ttf?5c4bea36') format('truetype'), + url('../font/fontello.svg?5c4bea36#fontello') format('svg'); + font-weight: normal; + font-style: normal; +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'fontello'; + src: url('../font/fontello.svg?5c4bea36#fontello') format('svg'); + } +} +*/ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "fontello"; + font-style: normal; + font-weight: normal; + speak: never; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} + +.icon-calendar:before { content: '\e800'; } /* '' */ +.icon-calendar-1:before { content: '\e801'; } /* '' */ +.icon-search:before { content: '\e805'; } /* '' */ +.icon-github-circled:before { content: '\f09b'; } /* '' */ +.icon-pinterest-squared:before { content: '\f0d3'; } /* '' */ +.icon-mail-alt:before { content: '\f0e0'; } /* '' */ +.icon-youtube:before { content: '\f167'; } /* '' */ +.icon-instagram:before { content: '\f16d'; } /* '' */ +.icon-flickr:before { content: '\f16e'; } /* '' */ +.icon-dribbble:before { content: '\f17d'; } /* '' */ +.icon-gitlab:before { content: '\f296'; } /* '' */ +.icon-telegram:before { content: '\f2c6'; } /* '' */ +.icon-twitter-squared:before { content: '\f304'; } /* '' */ +.icon-facebook-squared:before { content: '\f308'; } /* '' */ +.icon-linkedin-squared:before { content: '\f30c'; } /* '' */ +.icon-soundcloud:before { content: '\f348'; } /* '' */ +.icon-stack-overflow:before { content: '\f16c'; } /* '' */ diff --git a/_sass/ext/_normalize.scss b/_sass/ext/_normalize.scss new file mode 100644 index 0000000..95a98dd --- /dev/null +++ b/_sass/ext/_normalize.scss @@ -0,0 +1,428 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +// +// 1. Set default font family to sans-serif. +// 2. Prevent iOS text size adjust after orientation change, without disabling +// user zoom. +// + +html { + font-family: sans-serif; // 1 + -ms-text-size-adjust: 100%; // 2 + -webkit-text-size-adjust: 100%; // 2 +} + +// +// Remove default margin. +// + +body { + margin: 0; +} + +// HTML5 display definitions +// ========================================================================== + +// +// Correct `block` display not defined for any HTML5 element in IE 8/9. +// Correct `block` display not defined for `details` or `summary` in IE 10/11 +// and Firefox. +// Correct `block` display not defined for `main` in IE 11. +// + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +// +// 1. Correct `inline-block` display not defined in IE 8/9. +// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. +// + +audio, +canvas, +progress, +video { + display: inline-block; // 1 + vertical-align: baseline; // 2 +} + +// +// Prevent modern browsers from displaying `audio` without controls. +// Remove excess height in iOS 5 devices. +// + +audio:not([controls]) { + display: none; + height: 0; +} + +// +// Address `[hidden]` styling not present in IE 8/9/10. +// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. +// + +[hidden], +template { + display: none; +} + +// Links +// ========================================================================== + +// +// Remove the gray background color from active links in IE 10. +// + +a { + background-color: transparent; +} + +// +// Improve readability when focused and also mouse hovered in all browsers. +// + +a:active, +a:hover { + outline: 0; +} + +// Text-level semantics +// ========================================================================== + +// +// Address styling not present in IE 8/9/10/11, Safari, and Chrome. +// + +abbr[title] { + border-bottom: 1px dotted; +} + +// +// Address style set to `bolder` in Firefox 4+, Safari, and Chrome. +// + +b, +strong { + font-weight: bold; +} + +// +// Address styling not present in Safari and Chrome. +// + +dfn { + font-style: italic; +} + +// +// Address variable `h1` font-size and margin within `section` and `article` +// contexts in Firefox 4+, Safari, and Chrome. +// + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +// +// Address styling not present in IE 8/9. +// + +mark { + background: #ff0; + color: #000; +} + +// +// Address inconsistent and variable font size in all browsers. +// + +small { + font-size: 80%; +} + +// +// Prevent `sub` and `sup` affecting `line-height` in all browsers. +// + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +// Embedded content +// ========================================================================== + +// +// Remove border when inside `a` element in IE 8/9/10. +// + +img { + border: 0; +} + +// +// Correct overflow not hidden in IE 9/10/11. +// + +svg:not(:root) { + overflow: hidden; +} + +// Grouping content +// ========================================================================== + +// +// Address margin not present in IE 8/9 and Safari. +// + +figure { + margin: 1em 40px; +} + +// +// Address differences between Firefox and other browsers. +// + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +// +// Contain overflow in all browsers. +// + +pre { + overflow: auto; +} + +// +// Address odd `em`-unit font size rendering in all browsers. +// + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +// Forms +// ========================================================================== + +// +// Known limitation: by default, Chrome and Safari on OS X allow very limited +// styling of `select`, unless a `border` property is set. +// + +// +// 1. Correct color not being inherited. +// Known issue: affects color of disabled elements. +// 2. Correct font properties not being inherited. +// 3. Address margins set differently in Firefox 4+, Safari, and Chrome. +// + +button, +input, +optgroup, +select, +textarea { + color: inherit; // 1 + font: inherit; // 2 + margin: 0; // 3 +} + +// +// Address `overflow` set to `hidden` in IE 8/9/10/11. +// + +button { + overflow: visible; +} + +// +// Address inconsistent `text-transform` inheritance for `button` and `select`. +// All other form control elements do not inherit `text-transform` values. +// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. +// Correct `select` style inheritance in Firefox. +// + +button, +select { + text-transform: none; +} + +// +// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` +// and `video` controls. +// 2. Correct inability to style clickable `input` types in iOS. +// 3. Improve usability and consistency of cursor style between image-type +// `input` and others. +// + +button, +html input[type="button"], +// 1 +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; // 2 + cursor: pointer; // 3 +} + +// +// Re-set default cursor for disabled elements. +// + +button[disabled], +html input[disabled] { + cursor: default; +} + +// +// Remove inner padding and border in Firefox 4+. +// + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +// +// Address Firefox 4+ setting `line-height` on `input` using `!important` in +// the UA stylesheet. +// + +input { + line-height: normal; +} + +// +// It's recommended that you don't attempt to style these elements. +// Firefox's implementation doesn't respect box-sizing, padding, or width. +// +// 1. Address box sizing set to `content-box` in IE 8/9/10. +// 2. Remove excess padding in IE 8/9/10. +// + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; // 1 + padding: 0; // 2 +} + +// +// Fix the cursor style for Chrome's increment/decrement buttons. For certain +// `font-size` values of the `input`, it causes the cursor style of the +// decrement button to change from `default` to `text`. +// + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +// +// 1. Address `appearance` set to `searchfield` in Safari and Chrome. +// 2. Address `box-sizing` set to `border-box` in Safari and Chrome +// (include `-moz` to future-proof). +// + +input[type="search"] { + -webkit-appearance: textfield; // 1 + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; // 2 + box-sizing: content-box; +} + +// +// Remove inner padding and search cancel button in Safari and Chrome on OS X. +// Safari (but not Chrome) clips the cancel button when the search input has +// padding (and `textfield` appearance). +// + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +// +// Define consistent border, margin, and padding. +// + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +// +// 1. Correct `color` not being inherited in IE 8/9/10/11. +// 2. Remove padding so people aren't caught out if they zero out fieldsets. +// + +legend { + border: 0; // 1 + padding: 0; // 2 +} + +// +// Remove default vertical scrollbar in IE 8/9/10/11. +// + +textarea { + overflow: auto; +} + +// +// Don't inherit the `font-weight` (applied by a rule above). +// NOTE: the default cannot safely be changed in Chrome and Safari on OS X. +// + +optgroup { + font-weight: bold; +} + +// Tables +// ========================================================================== + +// +// Remove most spacing between table cells. +// + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/_sass/ext/_solarized-dark.scss b/_sass/ext/_solarized-dark.scss new file mode 100644 index 0000000..91ae326 --- /dev/null +++ b/_sass/ext/_solarized-dark.scss @@ -0,0 +1,87 @@ +/* Solarized Dark + +For use with Jekyll and Pygments + +http://ethanschoonover.com/solarized + +SOLARIZED HEX ROLE +--------- -------- ------------------------------------------ +base03 #002b36 background +base01 #586e75 comments / secondary content +base1 #93a1a1 body text / default code / primary content +orange #cb4b16 constants +red #dc322f regex, special keywords +blue #268bd2 reserved keywords +cyan #2aa198 strings, numbers +green #859900 operators, other keywords +*/ + +.highlight { background-color: #002b36; color: #93a1a1 } +.highlight .c { color: #586e75 } /* Comment */ +.highlight .err { color: #93a1a1 } /* Error */ +.highlight .g { color: #93a1a1 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #93a1a1 } /* Literal */ +.highlight .n { color: #93a1a1 } /* Name */ +.highlight .o { color: #859900 } /* Operator */ +.highlight .x { color: #cb4b16 } /* Other */ +.highlight .p { color: #93a1a1 } /* Punctuation */ +.highlight .cm { color: #586e75 } /* Comment.Multiline */ +.highlight .cp { color: #859900 } /* Comment.Preproc */ +.highlight .c1 { color: #586e75 } /* Comment.Single */ +.highlight .cs { color: #859900 } /* Comment.Special */ +.highlight .gd { color: #2aa198 } /* Generic.Deleted */ +.highlight .ge { color: #93a1a1; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #cb4b16 } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #93a1a1 } /* Generic.Output */ +.highlight .gp { color: #93a1a1 } /* Generic.Prompt */ +.highlight .gs { color: #93a1a1; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #cb4b16 } /* Generic.Subheading */ +.highlight .gt { color: #93a1a1 } /* Generic.Traceback */ +.highlight .kc { color: #cb4b16 } /* Keyword.Constant */ +.highlight .kd { color: #268bd2 } /* Keyword.Declaration */ +.highlight .kn { color: #859900 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #268bd2 } /* Keyword.Reserved */ +.highlight .kt { color: #dc322f } /* Keyword.Type */ +.highlight .ld { color: #93a1a1 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #93a1a1 } /* Name.Attribute */ +.highlight .nb { color: #B58900 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #cb4b16 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #cb4b16 } /* Name.Entity */ +.highlight .ne { color: #cb4b16 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #93a1a1 } /* Name.Label */ +.highlight .nn { color: #93a1a1 } /* Name.Namespace */ +.highlight .nx { color: #93a1a1 } /* Name.Other */ +.highlight .py { color: #93a1a1 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #93a1a1 } /* Text.Whitespace */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sb { color: #586e75 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .sd { color: #93a1a1 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #cb4b16 } /* Literal.String.Escape */ +.highlight .sh { color: #93a1a1 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #dc322f } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_sass/ext/_solarized-light.scss b/_sass/ext/_solarized-light.scss new file mode 100644 index 0000000..63629f8 --- /dev/null +++ b/_sass/ext/_solarized-light.scss @@ -0,0 +1,84 @@ +/* Solarized Light +For use with Jekyll and Pygments +http://ethanschoonover.com/solarized +SOLARIZED HEX ROLE +--------- -------- ------------------------------------------ +base01 #586e75 body text / default code / primary content +base1 #93a1a1 comments / secondary content +base3 #fdf6e3 background +orange #cb4b16 constants +red #dc322f regex, special keywords +blue #268bd2 reserved keywords +cyan #2aa198 strings, numbers +green #859900 operators, other keywords +*/ + +.highlight { background-color: #fdf6e3; color: #586e75 } +.highlight .c { color: #93a1a1 } /* Comment */ +.highlight .err { color: #586e75 } /* Error */ +.highlight .g { color: #586e75 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #586e75 } /* Literal */ +.highlight .n { color: #586e75 } /* Name */ +.highlight .o { color: #859900 } /* Operator */ +.highlight .x { color: #cb4b16 } /* Other */ +.highlight .p { color: #586e75 } /* Punctuation */ +.highlight .cm { color: #93a1a1 } /* Comment.Multiline */ +.highlight .cp { color: #859900 } /* Comment.Preproc */ +.highlight .c1 { color: #93a1a1 } /* Comment.Single */ +.highlight .cs { color: #859900 } /* Comment.Special */ +.highlight .gd { color: #2aa198 } /* Generic.Deleted */ +.highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #cb4b16 } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #586e75 } /* Generic.Output */ +.highlight .gp { color: #586e75 } /* Generic.Prompt */ +.highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #cb4b16 } /* Generic.Subheading */ +.highlight .gt { color: #586e75 } /* Generic.Traceback */ +.highlight .kc { color: #cb4b16 } /* Keyword.Constant */ +.highlight .kd { color: #268bd2 } /* Keyword.Declaration */ +.highlight .kn { color: #859900 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #268bd2 } /* Keyword.Reserved */ +.highlight .kt { color: #dc322f } /* Keyword.Type */ +.highlight .ld { color: #586e75 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #586e75 } /* Name.Attribute */ +.highlight .nb { color: #B58900 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #cb4b16 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #cb4b16 } /* Name.Entity */ +.highlight .ne { color: #cb4b16 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #586e75 } /* Name.Label */ +.highlight .nn { color: #586e75 } /* Name.Namespace */ +.highlight .nx { color: #586e75 } /* Name.Other */ +.highlight .py { color: #586e75 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #586e75 } /* Text.Whitespace */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .sd { color: #586e75 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #cb4b16 } /* Literal.String.Escape */ +.highlight .sh { color: #586e75 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #dc322f } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_sass/plain.scss b/_sass/plain.scss new file mode 100644 index 0000000..f9ff8fa --- /dev/null +++ b/_sass/plain.scss @@ -0,0 +1,336 @@ +@import "ext/fonts"; +@import "ext/normalize"; +@import "syntax"; + +$linkColor: #0a59b0; +$mobileW: 768px; +$smallMobileW: 480px; +$bigScreenW: 1600px; +$leftWidth: 220px; + +*, +*:before, +*:after { + box-sizing: border-box; +} + +body { + font-family: "Raleway", sans-serif; + font-size: 16px; + line-height: 1.2em; + margin: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +img, +embed, +object, +video { + max-width: 100%; +} + +a { + color: #000; + transition: color 0.3s; + &:hover { + color: $linkColor; + } +} + +h2 { + margin: 0.7em 0; + @media screen and (max-width: $mobileW) { + margin: 0.3em 0; + } +} +main { + margin: 0 90px; + display: flex; + height: 100%; + + @media screen and (min-width: $bigScreenW) { + margin: 0 auto; + max-width: 1440px; + } + @media screen and (max-width: 1280px) { + margin: 0 75px; + } + @media screen and (max-width: 1024px) { + margin: 0 35px; + } + + @media screen and (max-width: $mobileW) { + margin: 0 10px; + flex-direction: column; + } + @media screen and (max-width: $smallMobileW) { + margin: 0; + } + + .content { + @media screen and (min-width: $mobileW + 1) { + max-width: calc(100% - #{$leftWidth}); + margin-left: $leftWidth; + width: 100%; + } + } + .about { + display: flex; + height: 100vh; + padding-bottom: 15vh; + @media screen and (max-width: $mobileW) { + height: auto; + padding: 5vh 30px; + } + @media screen and (max-width: $smallMobileW) { + padding: 5vh 20px; + } + @media screen and (min-width: $mobileW + 1) { + position: fixed; + max-width: 280px; + } + min-width: $leftWidth; + justify-content: center; + flex-direction: column; + align-items: center; + h2 { + font-size: 22px; + margin-top: 25px; + margin-bottom: 0; + color: #222222; + font-weight: normal; + } + .tagline { + text-align: center; + font-size: 22px; + margin-top: 0px; + color: #aaa; + white-space: pre-wrap; + line-height: normal; + } + img { + max-width: 150px; + } + img.dark { + display: none; + } + .about-header { + display: flex; + flex-direction: column; + .about-title { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 17px; + } + } + } +} +#title { + a { + text-decoration: none; + } +} +.social { + list-style-type: none; + padding: 0; + display: flex; + flex-wrap: wrap; + justify-content: center; + a { + margin-bottom: .5em; + } + li { + i { + font-size: 34px; + } + } +} + +.navigation { + width: 80%; + + ul { + list-style-type: none; + padding: 0; + margin-top: 0; + + li:last-child { + a { + border-bottom: 0; + } + } + + a { + display: block; + font-family: 'Merriweather'; + text-align: center; + padding: 1rem 0; + text-decoration: none; + border-bottom: 1px solid #ececec; + + @media screen and (max-width: $mobileW) { + padding: 2rem 0; + } + } + } +} + +.post-wrapper { + border-bottom: 1px solid #ececec; + margin-bottom: 1rem; + padding-bottom: 1rem; +} + +.post-categories { + list-style-type: none; + margin: 0; + padding: 0; + li { + font-size: 14px; + float: left; + background-color: #e3e3e3; + padding: 5px 20px; + border-radius: 2px; + @media screen and (max-width: $mobileW) { + margin-top: 5px; + } + margin-right: 10px; + } +} +.post-date { + margin-right: 10px; + color: #555; + min-width: 150px; +} +.post-meta { + display: flex; + justify-content: space-between; + align-items: center; + min-height: 30px; + @media screen and (max-width: $mobileW) { + flex-direction: column; + align-items: baseline; + .post-date { + margin: 10px 0; + } + } +} +.post-link { + text-decoration: none; +} + +.post-title { + line-height: 1.2em; + font-size: 28px; + margin-bottom: 10px; +} +.posts, +.post-container { + list-style-type: none; + margin: 45px 30px; + @media screen and (max-width: $smallMobileW) { + margin-left: 20px; + margin-right: 20px; + } + @media screen and (max-width: $mobileW) { + padding: 0 !important; + margin-top: 0; + } +} +.post-container { + padding-left: 30px; +} +.post { + font-family: "Merriweather", sans-serif; + font-weight: 300; + color: #222; + line-height: 1.9em; + p { + margin-top: 10px; + } + a { + color: $linkColor; + text-decoration: none; + transition: border-bottom 0.4s; + &:hover { + border-bottom: 0.5px solid $linkColor; + } + } + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: Raleway, sans-serif; + } +} +.posts-labelgroup { + margin: 0 0 0.67em 0; + display: flex; + align-items: baseline; + border-bottom: 1px solid #eee; +} + +#posts-label { + font-size: 15px; + color: #555; + text-transform: uppercase; + letter-spacing: 0.5px; + padding: 10px 0; + font-weight: normal; + margin: 0; + overflow: hidden; + transition: width 0.1s; +} +table { + th, td { + padding: 8px 13px; + border: 1px solid #dfe2e5; + } + th { + background-color: #eee; + font-family: Raleway; + } +} + +footer { + display: none; +} +@media screen and (max-width: $mobileW) { + .about { + .about-header.condensed { + align-items: start; + align-self: start; + .about-title { + flex-direction: row; + margin-bottom: 10px; + img { + max-height: 40px; + } + h2 { + margin: 0 10px; + } + } + .tagline { + font-size: 18px; + margin-bottom: 0px; + } + } + .about-footer.condensed { + display: none; + } + } + footer.condensed { + display: flex; + flex-direction: column; + align-items: center; + margin: 0 40px; + @media screen and (max-width: $smallMobileW){ + margin: 0 20px; + } + border-top: 1px solid #eee; + } +} diff --git a/_sass/search.scss b/_sass/search.scss new file mode 100644 index 0000000..a63719a --- /dev/null +++ b/_sass/search.scss @@ -0,0 +1,130 @@ +/* Post Label And Search */ + +/* Hack iOS Safari Unfocus */ +main { + outline: none; + min-height: 100vh; // Click Anywhere to Unfocus +} + +.posts-labelgroup { + /* Firefox Flex Hack */ + @-moz-document url-prefix() { + align-items: center; + } + + .search-section { + display: flex; + flex-grow: 1; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + align-items: center; + border-radius: 5px; + } + + i { + color: #777; + flex-grow: 0; + padding: 0 8px; + transition: color 0.5s; + font-size: 15px; + } + + input { + color: #555; + background-color: transparent; + font-size: 15px; + flex-grow: 1; + height: 39px; + border: none; + padding: 10px 0; + outline: none; + transition: color 0.5s; + } + + .search-results { + display: flex; + flex-direction: column; + border-radius: 5px; + border-top-left-radius: 0; + border-top-right-radius: 0; + position: absolute; + background-color: #fff; + min-width: 160px; + width: 100%; + min-height: 50px; + box-shadow: 0 1px 2px 0 rgba(32, 33, 36, 0.28); + z-index: 3; + padding: 10px 0; + font-size: 15px; + border: 1px solid rgba(223,225,229,0); + + &:empty::before { + content: attr(data-placeholder); + padding: 8px 25px 8px 14px; + } + + a { + padding: 8px 25px 8px 14px; + text-decoration: none; + display: flex; + background-color: transparent; + + &:hover { + color: black; + background-color: #eee; + } + + &::before { + content: '\e805'; + font-family: "fontello"; + font-style: normal; + speak: none; + display: inline-block; + text-decoration: inherit; + font-variant: normal; + text-transform: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-feature-settings: 'liga'; + margin-right: 14px; + padding: 0 3px; + color: #9aa0a6; + } + } + } + + .search-container { + display: block; + flex-grow: 1; + position: relative; + } + + &:hover { + + i { + color: $linkColor; + } + } + + &.focus-within { + + .search-section { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + box-shadow: 0 1px 2px 0 rgba(32,33,36,0.28); + border: 1px solid rgba(223,225,229,0); + border-bottom: solid 1px #eee; + z-index: 3; + margin: 0 auto; + } + + input { + color: black; + } + + i { + color: $linkColor; + padding: 0 14px; + } + } +} diff --git a/_sass/toggle.scss b/_sass/toggle.scss new file mode 100644 index 0000000..1e242e2 --- /dev/null +++ b/_sass/toggle.scss @@ -0,0 +1,59 @@ + +.switch { + position: relative; + display: inline-block; + width: 30px; + height: 17px; + } + + .switch input { + opacity: 0; + width: 0; + height: 0; + } + + .slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; + } + + .slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; + } + + input:checked + .slider { + background-color: #002b36 } + + input:focus + .slider { + box-shadow: 0 0 1px #2196F3; + } + + input:checked + .slider:before { + -webkit-transform: translateX(13px); + -ms-transform: translateX(13px); + transform: translateX(13px); + } + + /* Rounded sliders */ + .slider.round { + border-radius: 17px; + } + + .slider.round:before { + border-radius: 50%; + } \ No newline at end of file diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100644 index 0000000..fbff217 --- /dev/null +++ b/assets/css/style.scss @@ -0,0 +1,13 @@ +--- +--- + +@import "plain"; + +{% if site.plainwhite.search %} + @import "search"; +{% endif %} + +{%- if site.plainwhite.dark_mode -%} + @import "toggle"; + @import "dark"; +{%- endif -%} diff --git a/assets/font/fontello-config.json b/assets/font/fontello-config.json new file mode 100644 index 0000000..5991985 --- /dev/null +++ b/assets/font/fontello-config.json @@ -0,0 +1,254 @@ +{ + "name": "", + "css_prefix_text": "icon-", + "css_use_suffix": false, + "hinting": true, + "units_per_em": 1000, + "ascent": 850, + "glyphs": [ + { + "uid": "531bc468eecbb8867d822f1c11f1e039", + "css": "calendar", + "code": 59392, + "src": "fontawesome" + }, + { + "uid": "0f6a2573a7b6df911ed199bb63717e27", + "css": "github-circled", + "code": 61595, + "src": "fontawesome" + }, + { + "uid": "906348dc798a0d42715cc97c875e3ac6", + "css": "twitter-squared", + "code": 62212, + "src": "fontawesome" + }, + { + "uid": "1145676a91138011729fa2909997af66", + "css": "linkedin-squared", + "code": 62220, + "src": "fontawesome" + }, + { + "uid": "4743b088aa95d6f3b6b990e770d3b647", + "css": "facebook-squared", + "code": 62216, + "src": "fontawesome" + }, + { + "uid": "4c1ef492f1d2c39a2250ae457cee2a6e", + "css": "instagram", + "code": 61805, + "src": "fontawesome" + }, + { + "uid": "a9862b9d5197886c1ad693ecd7120b31", + "css": "youtube", + "code": 61799, + "src": "fontawesome" + }, + { + "uid": "199c44bca402ec5a6351f75ba5228375", + "css": "dribbble", + "code": 61821, + "src": "fontawesome" + }, + { + "uid": "79689c4c425b7cdaa2746f510e81e27a", + "css": "pinterest-squared", + "code": 61651, + "src": "fontawesome" + }, + { + "uid": "649004fb1ed50395a33c3780236ba8aa", + "css": "flickr", + "code": 61806, + "src": "fontawesome" + }, + { + "uid": "779b400b6802edc26f52f0be71977ea5", + "css": "search", + "code": 59397, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M397 584C500 584 584 500 584 396S500 209 397 209 209 293 209 396 293 584 397 584ZM647 584L854 791 791 854 584 646V613L572 602C525 643 463 666 397 666 246 666 125 547 125 396S246 125 397 125 666 246 666 396C666 463 643 525 602 572L613 584H647Z", + "width": 1000 + }, + "search": [ + "search" + ] + }, + { + "uid": "26780f48c9ebffeab4e0402830aa8aa1", + "css": "calendar-1", + "code": 59393, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M71 929H232V768H71V929ZM268 929H446V768H268V929ZM71 732H232V554H71V732ZM268 732H446V554H268V732ZM71 518H232V357H71V518ZM482 929H661V768H482V929ZM268 518H446V357H268V518ZM696 929H857V768H696V929ZM482 732H661V554H482V732ZM286 250V89Q286 82 280 77T268 71H232Q225 71 220 77T214 89V250Q214 257 220 263T232 268H268Q275 268 280 263T286 250ZM696 732H857V554H696V732ZM482 518H661V357H482V518ZM696 518H857V357H696V518ZM714 250V89Q714 82 709 77T696 71H661Q654 71 648 77T643 89V250Q643 257 648 263T661 268H696Q704 268 709 263T714 250ZM929 214V929Q929 958 907 979T857 1000H71Q42 1000 21 979T0 929V214Q0 185 21 164T71 143H143V89Q143 52 169 26T232 0H268Q305 0 331 26T357 89V143H571V89Q571 52 598 26T661 0H696Q733 0 760 26T786 89V143H857Q886 143 907 164T929 214Z", + "width": 928.6 + }, + "search": [ + "calendar" + ] + }, + { + "uid": "b86600decaba538aca184421752cd640", + "css": "soundcloud", + "code": 62280, + "src": "entypo" + }, + { + "uid": "531359183f9fedb14b23666f1308591f", + "css": "telegram", + "code": 62150, + "src": "fontawesome" + }, + { + "uid": "7cca4643f1e938c673e91c0c78058ddf", + "css": "gitlab", + "code": 62102, + "src": "fontawesome" + }, + { + "uid": "ccc2329632396dc096bb638d4b46fb98", + "css": "mail-alt", + "code": 61664, + "src": "fontawesome" + }, + { + "uid": "e1597911f34fea0a188ae51fe4a2d9a9", + "css": "stackoverflow", + "code": 61804, + "src": "fontawesome" + }, + { + "uid": "1f1877aff7a2cd39092fcf73c3b5e7cb", + "css": "github-circled", + "code": 61595, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M429 71Q545 71 644 129T800 285 857 500Q857 640 775 752T564 907Q549 910 542 903T535 886Q535 885 535 843T535 768Q535 714 506 689 538 686 563 679T616 657 661 620 691 562 702 478Q702 411 658 363 679 312 654 249 638 244 608 255T557 280L536 293Q484 278 429 278T321 293Q313 287 298 278T251 256 204 249Q179 312 199 363 155 411 155 478 155 525 167 561T196 620 241 657 293 679 350 689Q329 709 323 747 311 752 298 755T266 758 230 746 199 711Q188 693 172 682T144 668L133 667Q121 667 117 669T114 676 119 684 126 690L130 693Q142 699 154 714T172 743L178 756Q185 777 202 790T239 807 278 810 309 809L322 806Q322 828 322 856T323 886Q323 896 315 903T293 907Q164 864 82 752T0 500Q0 383 58 285T213 129 429 71ZM162 687Q164 683 159 680 153 679 151 681 150 685 155 688 160 691 162 687ZM180 706Q184 703 179 697 173 692 170 695 166 698 171 704 176 710 180 706ZM196 731Q202 727 196 720 192 713 187 717 182 720 187 727T196 731ZM220 754Q224 750 218 744 211 737 207 742 202 747 209 753 215 759 220 754ZM252 768Q253 762 244 759 236 757 234 763T241 772Q249 775 252 768ZM287 771Q287 764 277 765 268 765 268 771 268 778 278 777 287 777 287 771ZM319 766Q318 759 309 761 300 762 301 769T311 773 319 766Z", + "width": 857.1 + }, + "search": [ + "github-circled" + ] + }, + { + "uid": "c11ff28bd5952cf3f8fde53106c1f264", + "css": "pinterest-squared", + "code": 61651, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M696 71Q763 71 810 119T857 232V768Q857 834 810 881T696 929H292Q339 861 352 811 357 792 382 695 393 716 423 732T486 748Q587 748 650 665T714 457Q714 410 695 366T641 289 556 235 446 214Q388 214 337 230T252 273 192 334 155 405 143 479Q143 536 165 580T230 641Q237 644 243 641T251 631Q257 606 260 596 263 584 253 573 225 538 225 489 225 406 283 346T434 287Q517 287 564 332T611 449Q611 543 573 609T476 675Q443 675 422 650T409 593Q414 574 424 541T440 484 446 442Q446 415 432 397T390 379Q356 379 332 410T308 488Q308 528 321 556L267 787Q253 843 263 929H161Q94 929 47 881T0 768V232Q0 166 47 119T161 71H696Z", + "width": 857.1 + }, + "search": [ + "pinterest-squared" + ] + }, + { + "uid": "9da2fbf959f6a46cecb184d8ce8a946f", + "css": "youtube", + "code": 61799, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M542 694V812Q542 849 520 849 507 849 495 837V669Q507 657 520 657 542 657 542 694ZM731 695V720H680V695Q680 657 705 657T731 695ZM191 573H251V521H77V573H136V891H191V573ZM352 891H402V615H352V826Q335 849 320 849 310 849 309 838 308 836 308 818V615H258V833Q258 861 263 874 270 895 295 895 322 895 352 861V891ZM592 808V698Q592 657 587 643 577 612 547 612 519 612 495 642V521H445V891H495V864Q520 895 547 895 577 895 587 864 592 849 592 808ZM780 802V795H729Q729 824 728 829 724 849 706 849 680 849 680 811V762H780V705Q780 661 765 640 743 612 706 612 668 612 646 640 631 661 631 705V801Q631 845 647 866 669 895 707 895 747 895 767 865 777 850 779 835 780 830 780 802ZM441 293V176Q441 137 417 137T393 176V293Q393 332 417 332T441 293ZM842 712Q842 843 828 907 820 940 795 963T738 988Q636 1000 429 1000T119 988Q87 985 62 963T30 907Q15 845 15 712 15 581 30 517 37 484 62 461T119 435Q222 424 429 424T738 435Q771 439 796 461T828 517Q842 579 842 712ZM285 0H342L275 223V374H219V223Q211 181 185 104 164 47 148 0H208L247 147ZM492 186V283Q492 329 476 349 455 378 417 378 380 378 358 349 343 328 343 283V186Q343 141 358 120 380 92 417 92 455 92 476 120 492 141 492 186ZM679 95V374H628V343Q598 378 570 378 545 378 537 357 533 344 533 315V95H584V300Q584 319 584 320 586 332 596 332 611 332 628 308V95H679Z", + "width": 857.1 + }, + "search": [ + "youtube" + ] + }, + { + "uid": "15181978a747995fe1633ad28b6ae367", + "css": "instagram", + "code": 61805, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M571 500Q571 441 530 399T429 357 328 399 286 500 328 601 429 643 530 601 571 500ZM648 500Q648 591 584 656T429 720 273 656 209 500 273 344 429 280 584 344 648 500ZM709 271Q709 292 694 307T657 322 621 307 606 271 621 235 657 220 694 235 709 271ZM429 148Q425 148 386 148T327 148 273 150 216 155 176 166Q148 177 127 198T94 247Q88 263 84 287T78 345 77 398 77 457 77 500 77 543 77 602 78 655 84 713 94 753Q106 781 127 802T176 834Q192 840 216 845T273 850 327 852 386 852 429 852 471 852 530 852 584 850 642 845 681 834Q709 823 731 802T763 753Q769 737 773 713T779 655 780 602 780 543 780 500 780 457 780 398 779 345 773 287 763 247Q752 219 731 198T681 166Q665 160 642 155T584 150 530 148 471 148 429 148ZM857 500Q857 628 854 677 849 793 785 857T606 926Q556 929 429 929T252 926Q136 920 72 857T3 677Q0 628 0 500T3 323Q8 207 72 143T252 74Q301 71 429 71T606 74Q722 80 785 143T854 323Q857 372 857 500Z", + "width": 857.1 + }, + "search": [ + "instagram" + ] + }, + { + "uid": "3caed0e59d10d08f954176c133c9a97e", + "css": "flickr", + "code": 61806, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M696 71Q763 71 810 119T857 232V768Q857 834 810 881T696 929H161Q94 929 47 881T0 768V232Q0 166 47 119T161 71H696ZM390 500Q390 451 355 416T271 382 188 416 153 500 188 584 271 618 355 584 390 500ZM704 500Q704 451 670 416T586 382 502 416 468 500 502 584 586 618 670 584 704 500Z", + "width": 857.1 + }, + "search": [ + "flickr" + ] + }, + { + "uid": "f6b9f865160c1592992c1c667878a429", + "css": "dribbble", + "code": 61821, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M571 837Q548 703 493 559H492L491 560Q482 563 467 569T411 596 334 642 261 706 204 788L195 782Q298 866 429 866 502 866 571 837ZM468 498Q457 471 439 436 265 488 63 488 63 492 63 500 63 569 87 632T156 744Q184 695 225 651T305 582 378 537 433 510L454 503Q456 502 461 501T468 498ZM409 380Q342 261 272 169 195 205 142 273T70 425Q239 425 409 380ZM790 558Q673 525 562 542 611 675 633 804 695 762 737 698T790 558ZM341 144Q340 144 340 145 340 144 341 144ZM670 225Q567 134 429 134 386 134 342 144 415 239 479 358 518 343 552 324T606 290 642 258 663 235ZM795 496Q793 367 712 267L711 268Q706 275 700 281T676 306 636 340 581 376 507 412Q521 442 532 465 533 468 535 475T540 484Q560 482 581 480T622 479 661 480 696 482 728 485 755 489 775 492 789 495ZM857 500Q857 617 800 715T644 871 429 929 213 871 58 715 0 500 58 285 213 129 429 71 644 129 800 285 857 500Z", + "width": 857.1 + }, + "search": [ + "dribbble" + ] + }, + { + "uid": "c56117c12f520ffd7bc4258105371001", + "css": "twitter-squared", + "code": 62212, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M714 340Q683 354 647 359 685 337 699 294 662 315 624 322 590 286 539 286 490 286 456 320T421 403Q421 419 424 430 352 426 289 393T182 307Q166 335 166 366 166 430 217 464 190 463 161 449V450Q161 492 189 525T257 565Q241 570 229 570 222 570 207 567 219 603 249 626T316 649Q252 699 171 699 156 699 143 697 225 750 323 750 385 750 440 730T534 677 601 601 643 510 656 416Q656 406 656 401 691 376 714 340ZM857 232V768Q857 834 810 881T696 929H161Q94 929 47 881T0 768V232Q0 166 47 119T161 71H696Q763 71 810 119T857 232Z", + "width": 857.1 + }, + "search": [ + "twitter-squared" + ] + }, + { + "uid": "7616a1175ef5c5701831c9653d9a5198", + "css": "facebook-squared", + "code": 62216, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M696 71Q763 71 810 119T857 232V768Q857 834 810 881T696 929H592V596H703L719 467H592V384Q592 353 605 338T656 322L724 321V206Q689 201 624 201 549 201 503 245T458 372V467H346V596H458V929H161Q94 929 47 881T0 768V232Q0 166 47 119T161 71H696Z", + "width": 857.1 + }, + "search": [ + "facebook-squared" + ] + }, + { + "uid": "cb9a04e90d634d6b92e1412678342bce", + "css": "linkedin-squared-1", + "code": 59393, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M132 789H261V402H132V789ZM270 282Q269 253 249 234T198 215 145 234 124 282Q124 311 144 330T196 349H196Q229 349 249 330T270 282ZM596 789H725V567Q725 481 684 437T577 393Q501 393 460 458H461V402H332Q334 439 332 789H461V572Q461 551 465 541 473 522 490 508T531 494Q596 494 596 582V789ZM857 232V768Q857 834 810 881T696 929H161Q94 929 47 881T0 768V232Q0 166 47 119T161 71H696Q763 71 810 119T857 232Z", + "width": 857.1 + }, + "search": [ + "linkedin-squared" + ] + } + ] +} \ No newline at end of file diff --git a/assets/font/fontello.eot b/assets/font/fontello.eot new file mode 100644 index 0000000..4992c2f Binary files /dev/null and b/assets/font/fontello.eot differ diff --git a/assets/font/fontello.svg b/assets/font/fontello.svg new file mode 100644 index 0000000..d418f49 --- /dev/null +++ b/assets/font/fontello.svg @@ -0,0 +1,44 @@ + + + +Copyright (C) 2021 by original authors @ fontello.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/font/fontello.ttf b/assets/font/fontello.ttf new file mode 100644 index 0000000..70da713 Binary files /dev/null and b/assets/font/fontello.ttf differ diff --git a/assets/font/fontello.woff b/assets/font/fontello.woff new file mode 100644 index 0000000..0621479 Binary files /dev/null and b/assets/font/fontello.woff differ diff --git a/assets/font/fontello.woff2 b/assets/font/fontello.woff2 new file mode 100644 index 0000000..55f9f7d Binary files /dev/null and b/assets/font/fontello.woff2 differ diff --git a/assets/js/darkmode.js b/assets/js/darkmode.js new file mode 100644 index 0000000..2c3bac1 --- /dev/null +++ b/assets/js/darkmode.js @@ -0,0 +1,47 @@ +function toggleDarkMode() { + const DARK_CLASS = 'dark'; + + var body = document.querySelector("body"); + if (body.classList.contains(DARK_CLASS)) { + setCookie('theme', 'light'); + body.classList.remove(DARK_CLASS); + } else { + setCookie('theme', 'dark'); + body.classList.add(DARK_CLASS); + } +} + +function getCookie(name) { + var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); + return v ? v[2] : null; +} +function setCookie(name, value, days) { + var d = new Date; + d.setTime(d.getTime() + 24*60*60*1000*days); + document.cookie = name + "=" + value + ";path=/;SameSite=strict;expires=" + d.toGMTString(); +} + +function deleteCookie(name) { setCookie(name, '', -1); } + + +const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; +var theme = getCookie('theme'); +if ( (theme === null && userPrefersDark) || theme === 'dark') { + var checkDarkDone = false; + function checkDark() { + if (!checkDarkDone) { + toggleDarkMode(); + } + checkDarkDone = true; + }; + + function toggleSwitch() { + document.querySelectorAll('.dark-mode-toggle').forEach(ti => ti.checked = true); + }; + + // Attempt both requestAnimationFrame and DOMContentLoaded, whichever comes first. + if (window.requestAnimationFrame) window.requestAnimationFrame(checkDark); + window.addEventListener('DOMContentLoaded', checkDark); + + window.addEventListener('DOMContentLoaded', toggleSwitch); +} diff --git a/assets/js/search.js b/assets/js/search.js new file mode 100644 index 0000000..c0c3321 --- /dev/null +++ b/assets/js/search.js @@ -0,0 +1,43 @@ +--- +--- + +window.onload = function () { + var sjs = SimpleJekyllSearch({ + searchInput: document.getElementById('searchbar'), + resultsContainer: document.getElementById('search-results'), + json: '{{ "/search.json" | relative_url }}', + searchResultTemplate: '{title}', + noResultsText: '' + }); + + /* hack ios safari unfocus */ + if (/Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent)) + document.body.firstElementChild.tabIndex = 1; + + var $labelGroup = document.querySelector(".posts-labelgroup"); + var $searchbar = document.getElementById("searchbar"); + var $postLabel = document.getElementById("posts-label"); + var $searchResults = document.querySelector(".search-results"); + var labelWidth = $postLabel.scrollWidth; + $postLabel.style.width = labelWidth + "px"; + + $labelGroup.addEventListener("click", function (e) { + $searchResults.style.display = null; + $postLabel.style.width = "0"; + $labelGroup.setAttribute("class", "posts-labelgroup focus-within"); + $searchbar.focus(); + e.stopPropagation(); + }, false); + + $labelGroup.addEventListener("mouseleave", function () { + document.body.onclick = searchCollapse; + }); + + var searchCollapse = function (e) { + $searchResults.style.display = "none"; + $labelGroup.setAttribute("class", "posts-labelgroup"); + $postLabel.style.width = labelWidth + "px"; + document.body.onclick = null; + }; +} + diff --git a/assets/js/simple-jekyll-search.min.js b/assets/js/simple-jekyll-search.min.js new file mode 100644 index 0000000..578494a --- /dev/null +++ b/assets/js/simple-jekyll-search.min.js @@ -0,0 +1,6 @@ +/*! + * Simple-Jekyll-Search v1.7.4 (https://github.com/christian-fei/Simple-Jekyll-Search) + * Copyright 2015-2020, Christian Fei + * Licensed under the MIT License. + */ + !function(){"use strict";var o={compile:function M(r){return i.template.replace(i.pattern,function(t,e){var n=i.middleware(e,r[e],i.template);return void 0!==n?n:r[e]||t})},setOptions:function T(t){i.pattern=t.pattern||i.pattern,i.template=t.template||i.template,"function"==typeof t.middleware&&(i.middleware=t.middleware)}},i={};i.pattern=/\{(.*?)\}/g,i.template="",i.middleware=function(){};var n=function x(t,e){var n=e.length,r=t.length;if(n{title}',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},O=t({required:g=["searchInput","resultsContainer","json"]}),z=function(t){return 0= 3.7.3" + spec.add_runtime_dependency "jekyll-seo-tag", ">= 2.1.0" + + spec.add_development_dependency "bundler", "> 1.16" + spec.add_development_dependency "rake", "~> 12.0" +end diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..ac9bf81 Binary files /dev/null and b/screenshot.png differ diff --git a/search.json b/search.json new file mode 100644 index 0000000..f893ed3 --- /dev/null +++ b/search.json @@ -0,0 +1,20 @@ +--- +layout: null +sitemap: + exclude: 'yes' +--- +[ + {% for post in site.posts %} + { + "title" : "{{ post.title | escape }}", + "title-lower" : "{{ post.title | escape | downcase}}", + "sub-titile" : "{{ post.subtitle | escape }}", + "sub-titile-lower" : "{{ post.subtitle | escape | downcase}}", + "categories" : "{{ post.categories }}", + "tags" : "{{ post.tags | join: ', ' }}", + "url" : "{{ site.baseurl }}{{ post.url }}", + "date" : "{{ post.date }}", + "content" : "{{ post.content | strip_html | strip_newlines | remove_chars | escape | truncate:200 }}" + } {% unless forloop.last %},{% endunless %} + {% endfor %} +] \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..4532d94 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,25 @@ +--- +layout: null +--- +{%-if site.plainwhite.sitemap -%} + + + + {{ site.url }} + {{ 'now' | date_to_xmlschema }} + 1.00 + + {%- for post in site.posts -%} + + {{ site.url }}{{ post.url }} + {{ post.date | date_to_xmlschema }} + weekly + 0.80 + + {%- endfor -%} + +{%- endif -%}