Browse Source

first commit

itec78 1 year ago
commit
1589738532

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+*.gem
+.bundle
+.sass-cache
+_site
+Gemfile.lock

+ 4 - 0
Gemfile

@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+
+source "https://rubygems.org"
+gemspec

+ 21 - 0
LICENSE.txt

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Supun Kavinda
+
+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.

+ 139 - 0
README.md

@@ -0,0 +1,139 @@
+# jekyll-theme-leaf
+
+👇👇
+
+[Preview Theme](https://supunkavinda.github.io/jekyll-theme-leaf/) 
+
+Jekyll Theme Leaf is a very simple yet beautiful theme created by [Supun Kavinda](https://twitter.com/_SupunKavinda). It is designed for those who love dark sites.
+
+![Screenshot](https://i.imgur.com/fBiCIuL.png)
+
+## Installation
+
+Add this line to your Jekyll site's `Gemfile`:
+
+```ruby
+gem "jekyll-theme-leaf"
+```
+
+And add this line to your Jekyll site's `_config.yml`:
+
+```yaml
+theme: jekyll-theme-leaf
+```
+
+And then execute:
+
+    $ bundle
+
+Or install it yourself as:
+
+    $ gem install jekyll-theme-leaf
+
+## Usage
+
+### Layouts
+
+Refers to files within the `_layouts` directory, that define the markup for your theme.
+
+* `default.html` - The base markup of all other layouts.
+* `home.html` - Home or index page layout.
+* `page.html` - Page layout (These are not listed as posts).
+* `posts.html` - Posts layout. These are listed in the home directory.
+
+### Includes
+
+These are the files within the `_includes` directory.
+
+* `footer.html` - Markup for the footer. It's a minimal footer with the site title and twitter and github links.
+* `google-analytics.html` - Contains the [Google Analytics](https://analytics.google.com/analytics/web/) code.
+* `head.html` - Contains the HTML code for the `<head>`.
+* `header.html` - The header/top navigation bar of the site.
+* `hyvor-talk-comments.html` - [Hyvor Talk](https://talk.hyvor.com) installation code with a customized color palette.
+
+### Sass
+
+* `leaf.scss` - The main SCSS file. Contains several variables and mixins.
+* `_base.scss` - Primary styles
+* `_highlight-dark.scss` - Code highlighting
+* `_layout.scss` - Layout SCSS files
+    * `_layout_header.scss` - Styles of the header (`_includes/header.html`)
+    * `_layout_home.scss` - Styles of the home (`_layouts/home.html`)
+    * `_layout-post.scss` - Styles of the post and page layouts (`_layouts/posts.html`, `_layouts/page.html`)
+
+### Assets
+
+* `assets/css/style.css` - Imports `_sass/leaf.scss`.
+* `assets/default-icon.png` - The leaf icon.
+
+### Plugins
+
+Leaf Jekyll theme uses two plugins by default.
+
+* `jekyll-seo-tag` - For better SEO
+* `jekyll-feed` - For RSS feed
+
+## Configuration
+
+Here's the basic `_config.yml` file of this plugin.
+
+```yaml
+title: Leaf Blog
+iconURL: assets/default-icon.png
+theme: jekyll-theme-leaf
+
+permalink: :slug
+
+social:
+  twitter: YOUR_TWITTER
+  github: YOUR_GITHUB
+
+plugins:
+ - jekyll-feed
+ - jekyll-seo-tag
+
+### comments & analytics
+hyvor_talk_website_id: YOUR_WEBSITE_ID
+google_analytics: UA-NNNNNNNN-N
+```
+
+### Adding Comments
+
+The Leaf Jekyll theme uses [Hyvor Talk](https://talk.hyvor.com) comments. The colors are customized based for the theme therefore you don't need to customize colors in the console.
+
+* First, [login to the Hyvor Talk console](https://talk.hyvor.com/console)
+* Register your website
+* Get your website ID from the **General** section of the console.
+* Then, replace `YOUR_WEBSITE_ID` in the above code in `_config.yml` with your code.
+
+Ex: 
+
+```yaml
+hyvor_talk_website_id: 14
+```
+
+### Adding Google Analytics
+
+* Sign up to [Google Analytics](https://analytics.google.com)
+* Add your website and get the tracking ID.
+* Replace `UA-NNNNNNNN-N` with your tracking ID.
+
+Google Analytics will only appear in production.
+
+## Contributing
+
+Bug reports and pull requests are welcome on GitHub at https://github.com/SupunKavinda/jekyll-theme-leaf. 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 `leaf.gemspec` accordingly.
+
+## License
+
+The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
+

+ 18 - 0
_config.yml

@@ -0,0 +1,18 @@
+title: Leaf Blog
+iconURL: assets/default-icon.png
+theme: jekyll-theme-leaf
+
+# for a clean URL
+permalink: :slug
+
+social:
+  twitter: _SupunKavinda
+  github: SupunKavinda
+
+plugins:
+ - jekyll-feed
+ - jekyll-seo-tag
+
+### comments & analytics
+hyvor_talk_website_id: 14
+google_analytics: UA-NNNNNNNN-N

+ 20 - 0
_includes/footer.html

@@ -0,0 +1,20 @@
+<footer class="site-footer h-card">
+    <data class="u-url" href="{{ "/" | relative_url }}"></data>
+
+    <div class="wrapper">
+
+        <div class="footer">
+            <div class="footer-title">{{ 'now' | date: '%Y' }} &copy; {{site.title}}</div>
+
+            <div class="footer-social-links">
+                <a target="_blank" rel="me" href="https://github.com/{{ site.social.github }}">
+                    <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub icon</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
+                </a>
+                <a target="_blank" rel="me" href="https://twitter.com/{{ site.social.twitter }}">
+                    <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitter icon</title><path d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z"/></svg>
+                    </a>
+            </div>
+        </div>
+    </div>
+
+</footer>

+ 9 - 0
_includes/google-analytics.html

@@ -0,0 +1,9 @@
+<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
+<script>
+  window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
+
+  gtag('config', '{{ site.google_analytics }}');
+</script>

+ 12 - 0
_includes/head.html

@@ -0,0 +1,12 @@
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  {%- seo -%}
+  <link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
+  {%- feed_meta -%}
+  {%- if jekyll.environment == 'production' and site.google_analytics -%}
+    {%- include google-analytics.html -%}
+  {%- endif -%}
+
+</head>

+ 41 - 0
_includes/header.html

@@ -0,0 +1,41 @@
+<header class="site-header">
+  {%- assign default_paths = site.pages | map: "path" -%}
+  {%- assign page_paths = site.header_pages | default: default_paths -%}
+  {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
+  <a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
+
+  {%- if titles_size > 0 -%}
+    <nav class="site-nav">
+      <input type="checkbox" id="nav-trigger" class="nav-trigger" />
+      <label for="nav-trigger">
+        <span class="menu-icon">
+          <svg viewBox="0 0 18 15" width="18px" height="15px">
+            <path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
+          </svg>
+        </span>
+      </label>
+
+      <div class="trigger">
+        {%- for path in page_paths -%}
+          {%- assign my_page = site.pages | where: "path", path | first -%}
+          {%- if my_page.title -%}
+            {% if my_page.url == page.url %}
+              {% assign className = "page-link active" %}
+            {% else %}
+              {% assign className = "page-link" %}
+            {% endif %}
+            <a class="{{ className }}" href="{{ my_page.url | relative_url }}">
+              {{ my_page.title | escape }}
+            </a>
+          {%- endif -%}
+        {%- endfor -%}
+      </div>
+    </nav>
+  {%- endif -%}
+
+
+  <div class="site-icon">
+    <img src="{{ site.iconURL }}" />
+  </div>
+
+</header>

+ 19 - 0
_includes/hyvor-talk-comments.html

@@ -0,0 +1,19 @@
+<div id="hyvor-talk-view"></div>
+<script type="text/javascript">
+    var HYVOR_TALK_WEBSITE = '{{ site.hyvor_talk_website_id }}'; // DO NOT CHANGE THIS
+    var HYVOR_TALK_CONFIG = {
+        url: '{{ page.url | absolute_url }}',
+        id: '{{page.id}}',
+        palette: {
+            accent: "#86bb48",
+            accentText: "#080808",
+            footerHeader: "#171616",
+            footerHeaderText: "#656363",
+            box: "#3A3A38",
+            boxText: "#E0E0E0",
+            boxLightText: "#AAAAAA",
+            backgroundText: "#E0E0E0"
+        }
+    };
+</script>
+<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>

+ 20 - 0
_layouts/default.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="{{ page.lang | default: site.lang | default: "en" }}">
+
+{%- include head.html -%}
+
+<body>
+
+    {%- include header.html -%}
+
+    <main class="page-content" aria-label="Content">
+        <div class="wrapper">
+            {{ content }}
+        </div>
+    </main>
+
+    {%- include footer.html -%}
+
+</body>
+
+</html>

+ 28 - 0
_layouts/home.html

@@ -0,0 +1,28 @@
+---
+layout: default
+---
+
+<div class="home">
+
+  {{ content }}
+
+  {% assign posts = site.posts %}
+
+
+  {%- if posts.size > 0 -%}
+    {%- if page.list_title -%}
+      <h2 class="post-list-heading">{{ page.list_title }}</h2>
+    {%- endif -%}
+    <div class="box home-box">
+      <div class="post-list">
+        {%- for post in posts -%}
+          <a class="post-link" href="{{ post.url | relative_url }}">
+            <h3>{{ post.title | escape }}</h3>
+          </a>
+        {%- endfor -%}
+      </div>
+    </div>
+
+  {%- endif -%}
+
+</div>

+ 14 - 0
_layouts/page.html

@@ -0,0 +1,14 @@
+---
+layout: default
+---
+<article class="post">
+
+  <header class="post-header">
+    <h1 class="post-title">{{ page.title | escape }}</h1>
+  </header>
+
+  <div class="post-content">
+    {{ content }}
+  </div>
+
+</article>

+ 46 - 0
_layouts/post.html

@@ -0,0 +1,46 @@
+---
+layout: default
+---
+<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
+
+  <header class="post-header">
+    <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
+  </header>
+
+  <div class="post-content e-content" itemprop="articleBody">
+    {{ content }}
+  </div>
+
+  <p class="post-meta">
+    {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
+    {%- if page.modified_date -%}
+      {%- assign mdate = page.modified_date | date_to_xmlschema -%}
+      <time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
+        Last Updated on {{ mdate | date: date_format }}
+      </time>
+    {%- else -%}
+      <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
+        {{ page.date | date: date_format }}
+      </time>
+    {%- endif -%} 
+    {%- if page.author -%}
+      • {% for author in page.author %}
+        <span itemprop="author" itemscope itemtype="http://schema.org/Person">
+          <span class="p-author h-card" itemprop="name">{{ author }}</span></span>
+          {%- if forloop.last == false %}, {% endif -%}
+      {% endfor %}
+    {%- endif -%}
+  </p>
+  
+
+  <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
+</article>
+
+
+{%- if site.hyvor_talk_website_id -%}
+  <div class="comments">
+    {%- include hyvor-talk-comments.html -%}
+  </div>
+{%- endif -%}
+
+

+ 113 - 0
_posts/2020-02-24-markdown.md

@@ -0,0 +1,113 @@
+---
+layout: post
+author: Supun Kavinda
+title: Styling with Markdown
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
+
+![800x600](https://i.picsum.photos/id/688/800/600.jpg)
+
+## Some great heading (h2)
+
+Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu.
+
+Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
+
+## Another great heading (h2)
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
+
+### Some great subheading (h3)
+
+Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum.
+
+Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.
+
+### Some great subheading (h3)
+
+Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
+
+> This quote will change your life. It will reveal the secrets of the universe, and all the wonders of humanity. Don't misuse it.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt.
+
+### Some great subheading (h3)
+
+Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum.
+
+```html
+<html>
+  <head>
+  </head>
+  <body>
+    <p>Hello, World!</p>
+  </body>
+</html>
+```
+
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+#### You might want a sub-subheading (h4)
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+#### But it's probably overkill (h4)
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+##### Could be a smaller sub-heading, `pacman` (h5)
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+###### Small yet significant sub-heading  (h6)
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+### Oh hai, an unordered list!!
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+- First item, yo
+- Second item, dawg
+- Third item, what what?!
+- Fourth item, fo sheezy my neezy
+
+### Oh hai, an ordered list!!
+
+In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
+
+1. First item, yo
+2. Second item, dawg
+3. Third item, what what?!
+4. Fourth item, fo sheezy my neezy
+
+
+
+## Headings are cool! (h2)
+
+Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
+
+Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
+
+Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.
+
+### Tables
+
+Title 1               | Title 2               | Title 3               | Title 4
+--------------------- | --------------------- | --------------------- | ---------------------
+lorem                 | lorem ipsum           | lorem ipsum dolor     | lorem ipsum dolor sit
+lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
+lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
+lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
+
+
+Title 1 | Title 2 | Title 3 | Title 4
+--- | --- | --- | ---
+lorem | lorem ipsum | lorem ipsum dolor | lorem ipsum dolor sit
+lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur | lorem ipsum dolor sit amet | lorem ipsum dolor sit
+lorem ipsum dolor | lorem ipsum | lorem | lorem ipsum
+lorem ipsum dolor | lorem ipsum dolor sit | lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur

+ 24 - 0
_posts/2020-02-25-welcome-to-jekyll.md

@@ -0,0 +1,24 @@
+---
+layout: post
+author: Supun Kavinda
+---
+You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
+
+To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
+
+Jekyll also offers powerful support for code snippets:
+
+{% highlight ruby %}
+def print_hi(name)
+  puts "Hi, #{name}"
+end
+print_hi('Tom')
+#=> prints 'Hi, Tom' to STDOUT.
+{% endhighlight %}
+
+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]: http://jekyllrb.com/docs/home
+[jekyll-gh]:   https://github.com/jekyll/jekyll
+[jekyll-talk]: https://talk.jekyllrb.com/

File diff suppressed because it is too large
+ 18 - 0
_sass/_base.scss


+ 133 - 0
_sass/_highlight-dark.scss

@@ -0,0 +1,133 @@
+@charset "utf-8";
+
+// Solarized skin
+// ==============
+// Created by Sander Voerman <mailto:sander@savoerman.nl> using the Solarized
+// color scheme by Ethan Schoonover <https://ethanschoonover.com/solarized>.
+
+// This style sheet implements two options for the minima.skin setting:
+// "solarized" for light mode and "solarized-dark" for dark mode.
+$sol-is-dark: true !default;
+
+
+// Color scheme
+// ------------
+// The inline comments show the canonical L*a*b values for each color.
+
+$sol-base03:   #002b36;  // 15 -12 -12
+$sol-base02:   #073642;  // 20 -12 -12
+$sol-base01:   #586e75;  // 45 -07 -07
+$sol-base00:   #657b83;  // 50 -07 -07
+$sol-base0:    #839496;  // 60 -06 -03
+$sol-base1:    #93a1a1;  // 65 -05 -02
+$sol-base2:    #eee8d5;  // 92 -00  10
+$sol-base3:    #fdf6e3;  // 97  00  10
+$sol-yellow:   #b58900;  // 60  10  65
+$sol-orange:   #cb4b16;  // 50  50  55
+$sol-red:      #dc322f;  // 50  65  45
+$sol-magenta:  #d33682;  // 50  65 -05
+$sol-violet:   #6c71c4;  // 50  15 -45
+$sol-blue:     #268bd2;  // 55 -10 -45
+$sol-cyan:     #2aa198;  // 60 -35 -05
+$sol-green:    #859900;  // 60 -20  65
+
+$sol-mono3:    $sol-base3;
+$sol-mono2:    $sol-base2;
+$sol-mono1:    $sol-base1;
+$sol-mono00:   $sol-base00;
+$sol-mono01:   $sol-base01;
+
+@if $sol-is-dark {
+  $sol-mono3:  $sol-base03;
+  $sol-mono2:  $sol-base02;
+  $sol-mono1:  $sol-base01;
+  $sol-mono00: $sol-base0;
+  $sol-mono01: $sol-base1;
+}
+
+
+// Minima color variables
+// ----------------------
+
+$brand-color:           $sol-mono1 !default;
+$brand-color-light:     mix($sol-mono1, $sol-mono3) !default;
+$brand-color-dark:      $sol-mono00 !default;
+
+$text-color:            $sol-mono01 !default;
+$background-color:      $sol-mono3 !default;
+$code-background-color: $sol-mono2 !default;
+
+$link-base-color:       $sol-blue !default;
+$link-visited-color:    mix($sol-blue, $sol-mono00) !default;
+
+$table-text-color:      $sol-mono00 !default;
+$table-zebra-color:     mix($sol-mono2, $sol-mono3) !default;
+$table-header-bg-color: $sol-mono2 !default;
+$table-header-border:   $sol-mono1 !default;
+$table-border-color:    $sol-mono1 !default;
+
+
+// Syntax highlighting styles
+// --------------------------
+
+.highlight {
+  .c     { color: $sol-mono1; font-style: italic } // Comment
+  .err   { color: $sol-red } // Error
+  .k     { color: $sol-mono01; font-weight: bold } // Keyword
+  .o     { color: $sol-mono01; font-weight: bold } // Operator
+  .cm    { color: $sol-mono1; font-style: italic } // Comment.Multiline
+  .cp    { color: $sol-mono1; font-weight: bold } // Comment.Preproc
+  .c1    { color: $sol-mono1; font-style: italic } // Comment.Single
+  .cs    { color: $sol-mono1; font-weight: bold; font-style: italic } // Comment.Special
+  .gd    { color: $sol-red } // Generic.Deleted
+  .gd .x { color: $sol-red } // Generic.Deleted.Specific
+  .ge    { color: $sol-mono00; font-style: italic } // Generic.Emph
+  .gr    { color: $sol-red } // Generic.Error
+  .gh    { color: $sol-mono1 } // Generic.Heading
+  .gi    { color: $sol-green } // Generic.Inserted
+  .gi .x { color: $sol-green } // Generic.Inserted.Specific
+  .go    { color: $sol-mono00 } // Generic.Output
+  .gp    { color: $sol-mono00 } // Generic.Prompt
+  .gs    { color: $sol-mono01; font-weight: bold } // Generic.Strong
+  .gu    { color: $sol-mono1 } // Generic.Subheading
+  .gt    { color: $sol-red } // Generic.Traceback
+  .kc    { color: $sol-mono01; font-weight: bold } // Keyword.Constant
+  .kd    { color: $sol-mono01; font-weight: bold } // Keyword.Declaration
+  .kp    { color: $sol-mono01; font-weight: bold } // Keyword.Pseudo
+  .kr    { color: $sol-mono01; font-weight: bold } // Keyword.Reserved
+  .kt    { color: $sol-violet; font-weight: bold } // Keyword.Type
+  .m     { color: $sol-cyan } // Literal.Number
+  .s     { color: $sol-magenta } // Literal.String
+  .na    { color: $sol-cyan } // Name.Attribute
+  .nb    { color: $sol-blue } // Name.Builtin
+  .nc    { color: $sol-violet; font-weight: bold } // Name.Class
+  .no    { color: $sol-cyan } // Name.Constant
+  .ni    { color: $sol-violet } // Name.Entity
+  .ne    { color: $sol-violet; font-weight: bold } // Name.Exception
+  .nf    { color: $sol-blue; font-weight: bold } // Name.Function
+  .nn    { color: $sol-mono00 } // Name.Namespace
+  .nt    { color: $sol-blue } // Name.Tag
+  .nv    { color: $sol-cyan } // Name.Variable
+  .ow    { color: $sol-mono01; font-weight: bold } // Operator.Word
+  .w     { color: $sol-mono1 } // Text.Whitespace
+  .mf    { color: $sol-cyan } // Literal.Number.Float
+  .mh    { color: $sol-cyan } // Literal.Number.Hex
+  .mi    { color: $sol-cyan } // Literal.Number.Integer
+  .mo    { color: $sol-cyan } // Literal.Number.Oct
+  .sb    { color: $sol-magenta } // Literal.String.Backtick
+  .sc    { color: $sol-magenta } // Literal.String.Char
+  .sd    { color: $sol-magenta } // Literal.String.Doc
+  .s2    { color: $sol-magenta } // Literal.String.Double
+  .se    { color: $sol-magenta } // Literal.String.Escape
+  .sh    { color: $sol-magenta } // Literal.String.Heredoc
+  .si    { color: $sol-magenta } // Literal.String.Interpol
+  .sx    { color: $sol-magenta } // Literal.String.Other
+  .sr    { color: $sol-green } // Literal.String.Regex
+  .s1    { color: $sol-magenta } // Literal.String.Single
+  .ss    { color: $sol-magenta } // Literal.String.Symbol
+  .bp    { color: $sol-mono1 } // Name.Builtin.Pseudo
+  .vc    { color: $sol-cyan } // Name.Variable.Class
+  .vg    { color: $sol-cyan } // Name.Variable.Global
+  .vi    { color: $sol-cyan } // Name.Variable.Instance
+  .il    { color: $sol-cyan } // Literal.Number.Integer.Long
+}

+ 25 - 0
_sass/_layout-footer.scss

@@ -0,0 +1,25 @@
+.site-footer {
+    .footer {
+        display:flex;
+        padding:15px;
+        padding-bottom:40px;
+    }
+}
+
+.footer-title {
+    flex:1;           
+}
+
+.footer-social-links {
+    svg {
+        width:20px;
+        height:20px;
+        fill: $theme-color;
+    }
+    a {
+        &:not(:first-child) {
+            margin-left:6px;
+        }
+    }
+}
+  

+ 138 - 0
_sass/_layout-header.scss

@@ -0,0 +1,138 @@
+.site-header {
+    position: fixed;
+    top:0;
+    left:0;
+    width:100%;
+    height:60px;
+    display: flex;
+    align-items: center;
+    background-color:$header-color;
+    border-bottom:2px solid $theme-color;
+    padding-left:20px;
+    font-weight: 600;
+}
+
+.site-title {
+    @include relative-font-size(1.625);
+    letter-spacing: -1px;
+    margin-bottom: 0;
+    float: left;
+
+    &:hover {
+      text-decoration: none;
+    }
+  
+    @include media-query($on-mobile) {
+      padding-right: 45px;
+    }
+}
+
+.site-icon {
+    position: absolute;
+    left: 50%;
+    top: 100%;
+    margin-top: -47px;
+    width: 70px;
+    height: 70px;
+    padding: 14px;
+    background: $content-color;
+    border-radius: 50%;
+    @include media-query($on-mobile) {
+      width: 50px;
+      height: 50px;
+      margin-top: -25px;
+    }
+}
+
+.site-nav {
+    position: absolute;
+    top: 9px;
+    right: $spacing-unit / 2;
+    border-radius: 5px;
+    text-align: right;
+  
+    .nav-trigger {
+        display: none;
+    }
+  
+    .menu-icon {
+      float: right;
+      width: 36px;
+      height: 26px;
+      line-height: 0;
+      padding-top: 10px;
+      text-align: center;
+  
+      > svg path {
+        fill: $theme-color;
+      }
+    }
+  
+    label[for="nav-trigger"] {
+      display: block;
+      float: right;
+      width: 36px;
+      height: 36px;
+      z-index: 2;
+      cursor: pointer;
+    }
+  
+    input ~ .trigger {
+      clear: both;
+      display: none;
+    }
+  
+    input:checked ~ .trigger {
+      display: block;
+      background:$header-color;
+      border-radius:20px;
+      padding:10px;
+    }
+  
+    .page-link {
+      display: block;
+      padding: 5px 10px;
+  
+      // Gaps between nav items, but not on the last one
+      &:not(:last-child) {
+        margin-right: 0;
+      }
+
+      &:hover {
+        text-decoration: none;
+      }
+
+    }
+  
+    @media screen and (min-width: $on-laptop) { 
+        flex:1;
+        position: static;
+        float: right;
+        border: none;
+        background-color: inherit;
+        height:100%;
+  
+        label[for="nav-trigger"] {
+            display: none;
+        }
+
+        .menu-icon {
+            display: none;
+        }
+
+        input ~ .trigger {
+            display: block;
+            height:100%;
+        }
+
+        .page-link {
+            display: inline-flex;
+            align-items:center;
+            height:100%;
+            &.active {
+              background-color:$theme-color;
+              color:$header-color;
+            }
+        }
+    }
+  }

+ 20 - 0
_sass/_layout-home.scss

@@ -0,0 +1,20 @@
+.home-box {
+    padding:0;
+    overflow:hidden;
+    .post-link {
+        color: inherit;
+        display:block;
+        padding: $spacing-unit;
+        transition: .3s background-color;
+        &:not(:last-child) {
+            border-bottom:1px solid $header-color;
+        }
+        &:hover {
+            text-decoration: none;
+            background-color: $header-color;
+        }
+        h3 {
+            margin:0;
+        }
+    }
+}

+ 72 - 0
_sass/_layout-post.scss

@@ -0,0 +1,72 @@
+/**
+ * Posts
+ */
+ .post-header {
+    margin-bottom: $spacing-unit;
+}
+  
+.post-title,
+.post-content h1 {
+    @include relative-font-size(2.625);
+    letter-spacing: -1px;
+    line-height: 1.15;
+
+    @media screen and (min-width: $on-laptop) {
+        @include relative-font-size(2.625);
+    }
+}
+
+.post-content {
+    h1, h2, h3 { margin-top: $spacing-unit }
+    h4, h5, h6 { margin-top: $spacing-unit }
+
+    h2 {
+        @include relative-font-size(1.75);
+
+        @media screen and (min-width: $on-laptop) {
+            @include relative-font-size(2);
+        }
+    }
+
+    h3 {
+        @include relative-font-size(1.375);
+
+        @media screen and (min-width: $on-laptop) {
+            @include relative-font-size(1.625);
+        }
+    }
+
+    h4 {
+        @include relative-font-size(1.25);
+    }
+
+    h5 {
+        @include relative-font-size(1.125);
+    }
+    h6 {
+        @include relative-font-size(1.0625);
+    }
+}
+
+
+article, .comments, .box {
+    padding: $spacing-unit;
+    background: $content-color;
+    border-radius: 20px;
+    box-shadow: 0 0 40px rgba(0,0,0,0.5);
+    margin: 25px 0;
+    @include media-query($on-mobile) {
+        padding: 0;
+        background: transparent;
+        box-shadow: none;
+    }
+}
+.comments {
+    @media screen and (min-width: $on-mobile) {
+        padding:15px $spacing-unit;
+    }
+}
+
+.page-content {
+    margin-top: 80px;
+}

+ 4 - 0
_sass/_layout.scss

@@ -0,0 +1,4 @@
+@import 'layout-post';
+@import 'layout-header';
+@import 'layout-home';
+@import 'layout-footer';

+ 33 - 0
_sass/leaf.scss

@@ -0,0 +1,33 @@
+$base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Symbol", "Segoe UI Emoji", "Apple Color Emoji", Roboto, Helvetica, Arial, sans-serif !default;
+$code-font-family: "Menlo", "Inconsolata", "Consolas", "Roboto Mono", "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;
+$base-font-size:   16px !default;
+$base-font-weight: 400 !default;
+$base-font-color: #e0e0e0;
+$small-font-size:  $base-font-size * 0.875 !default;
+$base-line-height: 1.5 !default;
+
+$theme-color: #86bb48;
+$header-color: #0f0f0f;
+
+$spacing-unit:     30px !default;
+
+$content-width:    850px !default;
+$content-color: #272726;
+
+// devices
+$on-mobile:        600px !default;
+$on-laptop:        800px !default;
+
+// mixins
+@mixin relative-font-size($ratio) {
+	font-size: #{$ratio}rem;
+}
+@mixin media-query($device) {
+	@media screen and (max-width: $device) {
+	  @content;
+	}
+}  
+
+@import 'base';
+@import 'layout';
+@import 'highlight-dark';

+ 10 - 0
about.md

@@ -0,0 +1,10 @@
+---
+title: About
+layout: page
+---
+
+Hey! This is the "Leaf" Jekyll theme created by <a rel="me" target="_blank" href="https://twitter.com/_SupunKavinda">Supun Kavinda</a>.
+
+You can find the source code of this theme at <a href="https://github.com/SupunKavinda/jekyll-theme-leaf">Github</a>
+
+(Change this by editing `about.md` file)

+ 4 - 0
assets/css/style.scss

@@ -0,0 +1,4 @@
+---
+---
+
+@import "leaf";

BIN
assets/default-icon.png


+ 10 - 0
contact.md

@@ -0,0 +1,10 @@
+---
+title: Contact
+layout: page
+---
+
+You can always contact the creator of this theme via [Twitter](https://twitter.com/_SupunKavinda).
+
+If you need help with Jekyll, ask questions on [Jekyll Talk](https://talk.jekyllrb.com/).
+
+(Change this by editing `contact.md` file)

+ 3 - 0
index.md

@@ -0,0 +1,3 @@
+---
+layout: home
+---

+ 21 - 0
jekyll-theme-leaf.gemspec

@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+Gem::Specification.new do |spec|
+  spec.name          = "jekyll-theme-leaf"
+  spec.version       = "0.1.0"
+  spec.authors       = ["Supun Kavinda"]
+  spec.email         = ["supunkavinda1125@gmail.com"]
+
+  spec.summary       = "Minimal yet beautiful Jekyll theme for dark background lovers."
+  spec.homepage      = "https://github.com/SupunKavinda/jekyll-theme-leaf"
+  spec.license       = "MIT"
+
+  spec.files         = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_layouts|_includes|_sass|LICENSE|README)!i) }
+
+  spec.add_runtime_dependency "jekyll", "~> 3.8"
+  spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
+  spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"
+
+  spec.add_development_dependency "bundler", "~> 2.1.4"
+  spec.add_development_dependency "rake", "~> 12.0"
+end

BIN
screenshot.png


Some files were not shown because too many files changed in this diff