Skip to content

Commit

Permalink
Merge pull request #52 from LeNPaul/gem-theme
Browse files Browse the repository at this point in the history
Gem theme
  • Loading branch information
LeNPaul committed May 29, 2021
2 parents 9f235c2 + a86e699 commit 10fcba2
Show file tree
Hide file tree
Showing 57 changed files with 269 additions and 337 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ Gemfile.lock
.sass-cache
.jekyll-metadata
.DS_Store
.jekyll-cache
*.gem
9 changes: 0 additions & 9 deletions 404.html

This file was deleted.

7 changes: 7 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: page
title: "404: Page not found"
permalink: 404.html
---

<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.baseurl }}/">Head back home</a> to try finding it again.</p>
29 changes: 1 addition & 28 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,2 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.6.2"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'jekyll-paginate'
gem 'jekyll-sitemap'
gem 'jekyll-seo-tag'
gemspec
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright (c) 2017 Paul Le
Copyright (c) 2021 Paul Le

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 2 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ paginate: 5
# Build settings
markdown: kramdown
highlighter: rouge
permalink: none
permalink: /:title
plugins: [jekyll-paginate, jekyll-sitemap, jekyll-feed, jekyll-seo-tag]

sass:
sass_dir: assets/css
style: :nested

# Customise atom feed settings (this is where Jekyll-Feed gets configuration information)
title: "Millennial"
description: "a Jekyll theme for running a blog or publication"
description: "a minimalist Jekyll theme for running a blog or publication"
author: "Paul Le"

# RSS 2.0 can be used instead of Atom by uncommenting following two lines
Expand Down
20 changes: 10 additions & 10 deletions _data/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ disqus:
google-ID: 'UA-112060364-2'

menu:
- {name: 'Interesting Facts', folder: 'pages', file: 'facts.html'}
- {name: 'Learning Resources', folder: 'pages', file: 'resources.html'}
- {name: 'Sample Posts', folder: 'pages', file: 'sample-posts.html'}
- {name: 'Documentation', folder: 'pages', file: 'documentation.html'}
- {name: 'About', folder: 'pages', file: 'about.html'}
- {name: 'Contact', folder: 'pages', file: 'contact.html'}
- {name: 'Interesting Facts', url: 'facts'}
- {name: 'Learning Resources', url: 'resources'}
- {name: 'Sample Posts', url: 'sample-posts'}
- {name: 'Documentation', url: 'documentation'}
- {name: 'About', url: 'about'}
- {name: 'Contact', url: 'contact'}

# Available social icons are powered by Font Awesome, so you can use any icon that they offer
social:
- {icon: 'twitter', link: 'https://twitter.com/paululele'}
- {icon: 'facebook', link: 'https://www.facebook.com/Le.Paul.94'}
- {icon: 'instagram', link: 'https://instagram.com/paululele'}
- {icon: 'envelope', link: 'mailto:[email protected]'}
- {icon: 'twitter', link: 'https://twitter.com/paululele'}
- {icon: 'facebook', link: 'https://www.facebook.com/paululele'}
- {icon: 'instagram', link: 'https://instagram.com/paululele'}
- {icon: 'envelope', link: 'mailto:[email protected]'}
- {icon: 'rss-square', link: 'feed.xml'}
# - {icon: 'rss-square', link: 'rss-feed.xml'}

Expand Down
7 changes: 7 additions & 0 deletions _includes/featured-post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<article>
<a href="{{ site.github.url }}{{ post.url }}">
<div class="featured-post" {% if post.image %}style="background-image:url({{ site.github.url }}/assets/img/{{ post.image }})"{% endif %}>
<h2><span>{{ post.title }}</span></h2>
</div>
</a>
</article>
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
{% for item in site.data.settings.social %}
<a href="{{ item.link }}" class="menu-link" target="_blank"><i class="fa fa-{{ item.icon }}" aria-hidden="true"></i></a>
{% endfor %}
<div class="post-date"><a href="{{ site.github.url }}/">{{ site.title }} | {{ site.description }} by {{ site.author }}</a></div>
<div class="footer-description"><a href="{{ site.github.url }}/">{{ site.title }} | {{ site.description }} by {{ site.author }}</a></div>
</footer>
1 change: 0 additions & 1 deletion _includes/google-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.data.settings.google-ID }}', 'auto');
ga('send', 'pageview');
</script>
9 changes: 0 additions & 9 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,27 @@
<head>

<title>
{% if page.title == "Home" %}
{{ site.title }} | {{ site.description }}
{% else %}
{{ page.title }} | {{ site.title }}
{% endif %}
</title>

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">

<link rel="stylesheet" href="{{ site.github.url }}/assets/css/main.css">
<link rel="stylesheet" href="{{ site.github.url }}/assets/css/syntax.css">
<!-- Use Atom -->
{% feed_meta %}
<!-- RSS-v2.0
<link href="{{ site.github.url }}/rss-feed.xml" type="application/rss+xml" rel="alternate" title="{{ site.title }} | {{ site.description }}"/>
//-->


<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Source+Code+Pro">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">

<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

<!-- Google Analytics -->
{% include google-analytics.html %}

<!-- Use Jekyll SEO plugin -->
{% seo %}

</head>
6 changes: 2 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ <h3 class="site-title">
</h3>
<nav class="menu-list">
{% for item in site.data.settings.menu %}
<a href="{{ site.github.url }}/{{ item.folder }}/{{ item.file }}" class="menu-link">{{ item.name }}</a>
<a href="{{ site.github.url }}/{{ item.url }}" class="menu-link">{{ item.name }}</a>
{% endfor %}

{% for item in site.data.settings.social %}
<a href="{{ item.link }}" class="menu-link" target="_blank"><i class="fa fa-{{ item.icon }}" aria-hidden="true"></i></a>
{% endfor %}
Expand All @@ -15,9 +14,8 @@ <h3 class="site-title">
<button class="dropbtn"><i class="fa fa-bars" aria-hidden="true"></i></button>
<div class="dropdown-content">
{% for item in site.data.settings.menu %}
<a href="{{ site.github.url }}/pages/{{ item.file }}" class="menu-link">{{ item.name }}</a>
<a href="{{ site.github.url }}/{{ item.url }}" class="menu-link">{{ item.name }}</a>
{% endfor %}

{% for item in site.data.settings.social %}
<a href="{{ item.link }}" class="menu-link" target="_blank"><i class="fa fa-{{ item.icon }}" aria-hidden="true"></i></a>
{% endfor %}
Expand Down
17 changes: 17 additions & 0 deletions _includes/post-date.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<span class="post-date">
{{ site.data.settings.post_date_prefix }}
{% assign d = page.date | date: "%-d" %}
{{ page.date | date: "%B" }}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st
{% when '2' or '22' %}{{ d }}nd
{% when '3' or '23' %}{{ d }}rd
{% else %}{{ d }}th{% endcase %},
{{ page.date | date: "%Y" }}
by
{% if page.author %}
{{ page.author }}
{% else %}
{{ site.author }}
{% endif %}
</span>
7 changes: 7 additions & 0 deletions _includes/post-share.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="post-share">
<div class="post-date">{{ site.data.settings.sharing_button_prompt }}</div>
<div class="sharing-icons">
<a href="https://twitter.com/intent/tweet?text={{ page.title }}&amp;url={{ site.github.url }}{{ page.url }}" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.github.url }}{{ page.url }}&amp;title={{ page.title }}" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>
</div>
</div>
29 changes: 29 additions & 0 deletions _includes/related-posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="related">
<h2>{{ site.data.settings.related_posts }}</h2>
{% assign listed_posts_urls = page.url | split: ' ' %}
<ul class="related-posts">
{% for tag in page.tags %}
{% for mypost in site.tags[tag] limit:2 %}
{% if listed_posts_urls contains mypost.url %}
{% else %}
<li>
<h3>
<a href="{{ site.github.url }}{{ mypost.url }}">
<div class="related-thumbnail">
{% if mypost.image %}
<img src="{{ site.url }}{{ site.baseurl }}/assets/img/{{ mypost.image }}">
{% endif %}
</div>
<div class="related-title">
{{ mypost.title }}
</div>
<!--<small>{{ mypost.date | date: "%B %-d, %Y" }}</small>-->
</a>
</h3>
</li>
{% assign listed_posts_urls = listed_posts_urls | push: mypost.url %}
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</div>
9 changes: 9 additions & 0 deletions _layouts/category.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: default
---

{% for post in site.posts %}
{% if post.categories contains page.category %}
{% include featured-post.html %}
{% endif %}
{% endfor %}
24 changes: 10 additions & 14 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<!doctype html>
<html>

{% include head.html %}

<body>

<div class="container">
{% include header.html %}
<div class="posts-wrapper">
{{ content }}
</div>
{% include footer.html %}
</div>

</body>
{% include head.html %}
<body>
<div class="container">
{% include header.html %}
<div class="content-wrapper">
{{ content }}
</div>
{% include footer.html %}
</div>
</body>
</html>
15 changes: 3 additions & 12 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
---

{% for post in paginator.posts %}

<article>
<a href="{{ site.github.url }}{{ post.url }}">
<div class="featured-posts" {% if post.image %}style="background-image:url({{ site.github.url }}/assets/img/{{ post.image }})"{% endif %}>
<h2><span>{{ post.title }}</span></h2>
</div>
</a>
</article>

{% include featured-post.html %}
{% endfor %}

<!-- Pagination links -->
Expand All @@ -22,10 +14,9 @@ <h2><span>{{ post.title }}</span></h2>
{% else %}
<span class="pagination-button">{{ site.data.settings.pagination.previous_page }}</span>
{% endif %}

{% if paginator.previous_page %}
<a class="pagination-button pagination-active" href="{{ site.baseurl }}{{ paginator.previous_page_path }}">{{ site.data.settings.pagination.next_page }}</a>
{% else %}
<span class="pagination-button">{{ site.data.settings.pagination.next_page }}</span>
{% else %}
<span class="pagination-button">{{ site.data.settings.pagination.next_page }}</span>
{% endif %}
</div>
14 changes: 0 additions & 14 deletions _layouts/misc.html

This file was deleted.

9 changes: 4 additions & 5 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
layout: default
---

<div class="page-title">
<div class="page-content">
<h1>
{{ page.title }}
</h1>
<article>
{{ content }}
</article>
</div>

<article>
{{ content }}
</article>
Loading

0 comments on commit 10fcba2

Please sign in to comment.