casjaysdev-jekyll-theme 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +8 -0
- data/.gitignore +72 -0
- data/.travis.dnu +28 -0
- data/CNAME +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +175 -0
- data/LICENSE.md +675 -0
- data/README.md +7 -0
- data/_config.yml +247 -0
- data/_data/nav/external.yml +6 -0
- data/_data/nav/internal.yml +3 -0
- data/_drafts/.keep +0 -0
- data/_includes/casjays-footer.html +71 -0
- data/_includes/casjays-header.html +5 -0
- data/_includes/casjaysdev/ads.html +1 -0
- data/_includes/casjaysdev/eucookie.html +28 -0
- data/_includes/casjaysdev/google.html +18 -0
- data/_includes/casjaysdev/legal.html +25 -0
- data/_includes/casjaysdev/piwik.html +17 -0
- data/_includes/casjaysdev/rocketchat.html +12 -0
- data/_includes/casjaysdev/sharethis.html +26 -0
- data/_includes/casjaysdev/socialfooter.html +38 -0
- data/_includes/casjaysdev/sociallinks.html +39 -0
- data/_includes/casjaysdev/statcounter.html +20 -0
- data/_includes/casjaysdev/theme.html +13 -0
- data/_includes/casjaysdev/widgetbot.html +17 -0
- data/_includes/disqus.html +20 -0
- data/_includes/github.html +3 -0
- data/_includes/image-gallery.html +53 -0
- data/_includes/nav/external.html +9 -0
- data/_includes/nav/internal.html +12 -0
- data/_includes/nav/sidebars/blank.html +0 -0
- data/_includes/nav/sidebars/left.html +1 -0
- data/_includes/nav/sidebars/right.html +2 -0
- data/_includes/nav/top.html +21 -0
- data/_includes/paginator.liquid +14 -0
- data/_includes/read_time.html +3 -0
- data/_includes/themes/blank/layouts/default.html +22 -0
- data/_includes/themes/blank/meta.html +0 -0
- data/_includes/themes/blank/navigation.html +21 -0
- data/_includes/themes/hacker/layouts/default.html +73 -0
- data/_includes/themes/hacker/meta.html +50 -0
- data/_layouts/default.html +41 -0
- data/_layouts/errors.html +33 -0
- data/_layouts/page.html +13 -0
- data/_layouts/post.html +43 -0
- data/_pages/about.html +8 -0
- data/_pages/contact.html +32 -0
- data/_pages/gallery.html +9 -0
- data/_pages/index.html +10 -0
- data/_plugins/hook-add-last-modified-date.rb +9 -0
- data/_plugins/jekyll-remote-include.rb +24 -0
- data/_posts/2020-07-31-Updated-Theming-Engine.md +12 -0
- data/_posts/2020-07-31-new-deploy.md +12 -0
- data/assets/css/base.css +0 -0
- data/assets/css/hacker.css +978 -0
- data/assets/images/bkg.png +0 -0
- data/assets/images/blacktocat.png +0 -0
- data/assets/images/bullet.png +0 -0
- data/assets/images/loader.gif +0 -0
- data/assets/images/logo.png +0 -0
- data/assets/images/oops.gif +0 -0
- data/assets/js/fetch-url.js +7 -0
- data/assets/js/gh-blog.js +50 -0
- data/assets/js/posts.js +82 -0
- data/blog/catergories/catergories.html +13 -0
- data/blog/index.html +49 -0
- data/blog/tags/tags.html +13 -0
- data/casjaysdev-jekyll-theme.gemspec +43 -0
- data/error/404.html +32 -0
- data/error/500.html +31 -0
- data/feed.xml +37 -0
- data/images/.keep +1 -0
- data/images/powered_by_jekyll.jpg +0 -0
- data/sitemap.xml +27 -0
- data/templates/year-month-day-name.blank.md +12 -0
- data/templates/year-month-day-name.image.md +12 -0
- data/templates/year-month-day-name.link.md +12 -0
- data/templates/year-month-day-name.video.md +12 -0
- data/templates/year-month-day-name.yt.html +16 -0
- data/version.txt +1 -0
- metadata +453 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class GHBlog {
|
2
|
+
constructor(user, repo) {
|
3
|
+
this.API_URL = 'https://api.github.com';
|
4
|
+
this.POSTS_URL = `${this.API_URL}/repos/${user}/${repo}/contents/posts`;
|
5
|
+
this.COMMITS_URL = `${this.API_URL}/repos/${user}/${repo}/commits?path=`;
|
6
|
+
}
|
7
|
+
|
8
|
+
getPosts() {
|
9
|
+
return fetch(this.POSTS_URL)
|
10
|
+
.then(result => result.json())
|
11
|
+
.then(infos => Promise.all(infos.map(this.loadPost.bind(this))));
|
12
|
+
}
|
13
|
+
|
14
|
+
loadPost(info) {
|
15
|
+
const loadedSha = localStorage[`${info.path}-sha`];
|
16
|
+
if(loadedSha && loadedSha == info.sha) {
|
17
|
+
return Promise.resolve({path: info.path, sha: info.sha});
|
18
|
+
} else {
|
19
|
+
return Promise.all([
|
20
|
+
this.fetchPost(info.url),
|
21
|
+
this.fetchCommits(info.path)
|
22
|
+
]).then(results => {
|
23
|
+
const [html, commits] = results;
|
24
|
+
localStorage[`${info.path}-sha`] = info.sha;
|
25
|
+
return {html, commits, path: info.path, sha: info.sha, updated: true};
|
26
|
+
});
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
fetchPost(url) {
|
31
|
+
return fetch(url, {
|
32
|
+
headers: {
|
33
|
+
accept: 'application/vnd.github.v3.html+json'
|
34
|
+
}
|
35
|
+
}).then(result => result.text());
|
36
|
+
}
|
37
|
+
|
38
|
+
fetchCommits(path) {
|
39
|
+
return fetch(`${this.COMMITS_URL}${path}`)
|
40
|
+
.then(result => result.json())
|
41
|
+
.then(commits => {
|
42
|
+
const created = commits[commits.length - 1].commit.author.date;
|
43
|
+
const updated = commits[0].commit.author.date;
|
44
|
+
return {
|
45
|
+
created: new Date(created).toLocaleString(),
|
46
|
+
updated: new Date(updated).toLocaleString()
|
47
|
+
};
|
48
|
+
});
|
49
|
+
}
|
50
|
+
}
|
data/assets/js/posts.js
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
const VERSION = '1.0.0';
|
2
|
+
|
3
|
+
setVersion(VERSION);
|
4
|
+
|
5
|
+
const postsElement = document.querySelector('#posts');
|
6
|
+
const postLinksElement = document.querySelector('.post-links');
|
7
|
+
|
8
|
+
loadBlog();
|
9
|
+
|
10
|
+
function loadBlog() {
|
11
|
+
if(localStorage.postsHTML) {
|
12
|
+
postsElement.innerHTML = localStorage.postsHTML;
|
13
|
+
}
|
14
|
+
|
15
|
+
const ghBlog = new GHBlog('w3cj', 'null.computer');
|
16
|
+
|
17
|
+
ghBlog
|
18
|
+
.getPosts()
|
19
|
+
.then(addPosts)
|
20
|
+
.then(() => {
|
21
|
+
localStorage.postsHTML = postsElement.innerHTML
|
22
|
+
}).then(navigateToHash)
|
23
|
+
.then(() => {
|
24
|
+
document.querySelector('.loading').style.display = 'none';
|
25
|
+
});
|
26
|
+
}
|
27
|
+
|
28
|
+
function addPosts(posts) {
|
29
|
+
posts.forEach(post => {
|
30
|
+
addPostLink(post);
|
31
|
+
|
32
|
+
const postElement = document.getElementById(post.path);
|
33
|
+
if(postElement) {
|
34
|
+
if(post.updated) {
|
35
|
+
postElement.innerHTML = getPostHTML(post);
|
36
|
+
}
|
37
|
+
} else {
|
38
|
+
addPostElement(post);
|
39
|
+
}
|
40
|
+
});
|
41
|
+
}
|
42
|
+
|
43
|
+
function addPostElement(post) {
|
44
|
+
let postElement = document.createElement('section');
|
45
|
+
postElement.setAttribute('id', post.path);
|
46
|
+
postElement.innerHTML = getPostHTML(post);
|
47
|
+
postsElement.insertBefore(postElement, postsElement.firstChild);
|
48
|
+
addHR();
|
49
|
+
}
|
50
|
+
|
51
|
+
function getPostHTML(post) {
|
52
|
+
return `
|
53
|
+
<small><strong>Path:</strong> ${post.path}</small><br>
|
54
|
+
<small><strong>Logged:</strong> ${post.commits.created}</small>
|
55
|
+
${ post.commits.updated == post.commits.created ? '' :
|
56
|
+
`<br><small><strong>Updated:</strong> ${post.commits.updated}</small>` }
|
57
|
+
${post.html}`;
|
58
|
+
}
|
59
|
+
|
60
|
+
function addHR() {
|
61
|
+
const hr = document.createElement('hr');
|
62
|
+
postsElement.insertBefore(hr, postsElement.firstChild);
|
63
|
+
}
|
64
|
+
|
65
|
+
function addPostLink(post) {
|
66
|
+
const link = document.createElement('li');
|
67
|
+
link.innerHTML = `<a href="#${post.path}">${post.path}</a>`;
|
68
|
+
postLinksElement.insertBefore(link, postLinksElement.firstChild);
|
69
|
+
}
|
70
|
+
|
71
|
+
function navigateToHash() {
|
72
|
+
const currentHash = window.location.hash;
|
73
|
+
window.location.hash = '';
|
74
|
+
window.location.hash = currentHash;
|
75
|
+
}
|
76
|
+
|
77
|
+
function setVersion() {
|
78
|
+
if(localStorage.version != VERSION) {
|
79
|
+
localStorage.clear();
|
80
|
+
localStorage.version = VERSION;
|
81
|
+
}
|
82
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
permalink: /blog/categories/
|
4
|
+
---
|
5
|
+
|
6
|
+
{% for category in site.categories %}
|
7
|
+
<h3>{{ category[0] }}</h3>
|
8
|
+
<ul>
|
9
|
+
{% for post in tag[1] %}
|
10
|
+
<li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
|
11
|
+
{% endfor %}
|
12
|
+
</ul>
|
13
|
+
{% endfor %}
|
data/blog/index.html
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
title: Blog
|
4
|
+
permalink: /blog/
|
5
|
+
description: Blog Posts
|
6
|
+
weight: 1
|
7
|
+
---
|
8
|
+
|
9
|
+
<div class="posts">
|
10
|
+
{% for post in site.posts %}
|
11
|
+
<br />
|
12
|
+
<div class="post">
|
13
|
+
<div class="post-title">
|
14
|
+
<a href="{{ post.url | prepend: site.baseurl }}" class="post-title"
|
15
|
+
style="font-size: 30px;">{{ post.title | upcase }}</a><br>
|
16
|
+
</div>
|
17
|
+
<p>
|
18
|
+
<br />
|
19
|
+
<br />
|
20
|
+
<article style="font-size: 18px;">
|
21
|
+
{{ post.excerpt | markdownify }}
|
22
|
+
</article>
|
23
|
+
<br />
|
24
|
+
<br />
|
25
|
+
</p>
|
26
|
+
<br />
|
27
|
+
<span class="post-date">({% include read_time.html content=page.content %})</span>
|
28
|
+
<br />
|
29
|
+
<br />
|
30
|
+
<span class="post-date">
|
31
|
+
Posted by <a
|
32
|
+
href="{{ post.url | prepend: site.baseurl }}">{% if page.author %}{{ page.author }}{% else %}{{ site.author.name }}{% endif %}</a>
|
33
|
+
<br>on {{ post.date | date: '%B %d, %Y @ %H:%M' }}
|
34
|
+
<br />
|
35
|
+
<br />
|
36
|
+
<div class="post-more"><br>
|
37
|
+
{% if site.disqus %}
|
38
|
+
<a href="{{ post.url | prepend: site.baseurl }}#disqus_thread"> <i class="fa fa-comments"
|
39
|
+
aria-hidden="true"></i>Comment</a>
|
40
|
+
{% endif %}
|
41
|
+
<a href="{{ post.url | prepend: site.baseurl }}"><i class="fa fa-plus-circle" aria-hidden="true"></i>Read
|
42
|
+
more</a>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<br />
|
46
|
+
<br />
|
47
|
+
<hr />
|
48
|
+
{% endfor %}
|
49
|
+
</div>
|
data/blog/tags/tags.html
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
permalink: /blog/tags/
|
4
|
+
---
|
5
|
+
|
6
|
+
{% for tag in site.tags %}
|
7
|
+
<h2>{{ tag[0] }}</h2>
|
8
|
+
<ul>
|
9
|
+
{% for post in tag[1] %}
|
10
|
+
<li><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></li>
|
11
|
+
{% endfor %}
|
12
|
+
</ul>
|
13
|
+
{% endfor %}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = "casjaysdev-jekyll-theme"
|
6
|
+
spec.version = "0.1.4"
|
7
|
+
spec.authors = ["CasjaysDev"]
|
8
|
+
spec.email = ["gem-admin@casjaysdev.com"]
|
9
|
+
|
10
|
+
spec.summary = "CasjaysDev jekyll theme"
|
11
|
+
spec.homepage = "https://github.com/casjay-templates/jekyll-site"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.metadata = { "source_code_uri" => "https://github.com/casjay-templates/jekyll-site" }
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
|
17
|
+
spec.add_runtime_dependency 'jekyll', '~> 3.8', '>= 3.8.6'
|
18
|
+
spec.add_runtime_dependency 'jemoji'
|
19
|
+
spec.add_runtime_dependency 'kramdown'
|
20
|
+
spec.add_runtime_dependency 'jekyll-avatar'
|
21
|
+
spec.add_runtime_dependency 'jekyll-feed'
|
22
|
+
spec.add_runtime_dependency 'jekyll-mentions'
|
23
|
+
spec.add_runtime_dependency 'jekyll-redirect-from'
|
24
|
+
spec.add_runtime_dependency 'jekyll-seo-tag'
|
25
|
+
spec.add_runtime_dependency 'jekyll-gist'
|
26
|
+
spec.add_runtime_dependency 'jekyll-coffeescript'
|
27
|
+
spec.add_runtime_dependency 'jekyll-assets'
|
28
|
+
spec.add_runtime_dependency 'jekyll-sitemap'
|
29
|
+
spec.add_runtime_dependency 'jekyll-analytics'
|
30
|
+
spec.add_runtime_dependency 'jekyll-remote-include'
|
31
|
+
spec.add_runtime_dependency 'jekyll-menus'
|
32
|
+
spec.add_runtime_dependency 'jekyll-remote-theme'
|
33
|
+
spec.add_runtime_dependency 'jekyll-paginate'
|
34
|
+
spec.add_runtime_dependency 'jekyll-tidy'
|
35
|
+
spec.add_runtime_dependency 'github-pages'
|
36
|
+
|
37
|
+
spec.add_development_dependency 'jekyll'
|
38
|
+
spec.add_development_dependency 'bundler'
|
39
|
+
spec.add_development_dependency 'rake'
|
40
|
+
spec.add_development_dependency 'sprockets', "~> 3.7"
|
41
|
+
|
42
|
+
spec.post_install_message = "Thanks for installing!"
|
43
|
+
end
|
data/error/404.html
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
layout: errors
|
3
|
+
permalink: /404.html
|
4
|
+
title: Ummm You did that wrong!
|
5
|
+
---
|
6
|
+
|
7
|
+
<!DOCTYPE html>
|
8
|
+
<html lang="{{ site.lang | default: "en-US" }}">
|
9
|
+
|
10
|
+
<head>
|
11
|
+
{% include casjays-header.html %}
|
12
|
+
{% if site.custom_theme.name %}
|
13
|
+
{% include themes/{{ site.custom_theme.name }}/meta.html %}
|
14
|
+
{% endif %}
|
15
|
+
</head>
|
16
|
+
|
17
|
+
<div class="container">
|
18
|
+
<h1>
|
19
|
+
<i class="fa fa-frown-o red"></i><a href="https://www.google.com/search?q=server+error+404" target="_blank">404 Not
|
20
|
+
Found
|
21
|
+
</h1>
|
22
|
+
</a><br>
|
23
|
+
<p class="lead">We apologize but we can't seem to be able to find what you're looking for!<br></p>
|
24
|
+
<h3><a href="{{ site.baseurl }}/" class="btn btn-outline-danger btn-lg btn-danger">Return Home</a>
|
25
|
+
</h3>
|
26
|
+
<div class="container">
|
27
|
+
<div class="body-content">
|
28
|
+
<img alt='error' src='https://static.casjay.net/default-icons/errors/404.gif'><br>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<a onclick=javascript:homepage(); class="btn btn-lg btn-success"><span id="display-domain"></span></a>
|
32
|
+
</div>
|
data/error/500.html
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
layout: errors
|
3
|
+
permalink: /500.html
|
4
|
+
title: OhOh Server error!
|
5
|
+
---
|
6
|
+
|
7
|
+
<!DOCTYPE html>
|
8
|
+
<html lang="{{ site.lang | default: "en-US" }}">
|
9
|
+
|
10
|
+
<head>
|
11
|
+
{% include casjays-header.html %}
|
12
|
+
{% if site.custom_theme.name %}
|
13
|
+
{% include themes/{{ site.custom_theme.name }}/meta.html %}
|
14
|
+
{% endif %}
|
15
|
+
</head>
|
16
|
+
|
17
|
+
<div class="container">
|
18
|
+
<h1>
|
19
|
+
<span class="glyphicon glyphicon-fire red"></span> <a href="https://www.google.com/search?q=server+error+500"
|
20
|
+
target="_blank"> 500 Internal Server Error
|
21
|
+
</h1>
|
22
|
+
</a><br>
|
23
|
+
<p class="lead">The web server is returning an internal error! Something is broken!!<br></p>
|
24
|
+
<h3><a href="{{ site.baseurl }}/" class="btn btn-outline-danger btn-lg btn-danger">Return Home</a></h3>
|
25
|
+
<div class="container">
|
26
|
+
<div class="body-content">
|
27
|
+
<img alt='error' src='https://static.casjay.net/default-icons/errors/404.gif'><br>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<a onclick=javascript:homepage(); class="btn btn-lg btn-success"><span id="display-domain"></span></a>
|
31
|
+
</div>
|
data/feed.xml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
search: exclude
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<rss version="2.0"
|
8
|
+
xmlns:atom="http://www.w3.org/2005/Atom"
|
9
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
10
|
+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
|
11
|
+
<channel>
|
12
|
+
<title>{{ site.name | xml_escape }}</title>
|
13
|
+
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
|
14
|
+
<sy:updatePeriod>{{ site.feed_update_period | default: "daily" | xml_escape }}</sy:updatePeriod>
|
15
|
+
<sy:updateFrequency>{{ site.feed_update_frequency | default: 1 | xml_escape }}</sy:updateFrequency>
|
16
|
+
<link>{{ site.url }}</link>
|
17
|
+
<atom:link href="{{ site.feed.path | prepend: site.baseurl }}" rel="self" type="application/rss+xml" />
|
18
|
+
<lastBuildDate>{% for post in site.posts limit:1 %}{{ post.date | date_to_rfc822 }}{% endfor %}</lastBuildDate>
|
19
|
+
{% assign feed_items = site.feed_items | default: 10 %}
|
20
|
+
{% for post in site.posts limit:feed_items %}
|
21
|
+
<item>
|
22
|
+
<title>{{ post.title | xml_escape }}</title>
|
23
|
+
{% if post.author.name %}
|
24
|
+
<dc:creator>{{ post.author.name | xml_escape }}</dc:creator>
|
25
|
+
{% endif %}
|
26
|
+
{% if post.excerpt %}
|
27
|
+
<description>{{ post.excerpt | xml_escape }}</description>
|
28
|
+
{% else %}
|
29
|
+
<description>{{ post.content | xml_escape }}</description>
|
30
|
+
{% endif %}
|
31
|
+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
32
|
+
<link>{{ site.url }}{{ post.url }}</link>
|
33
|
+
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
|
34
|
+
</item>
|
35
|
+
{% endfor %}
|
36
|
+
</channel>
|
37
|
+
</rss>
|
data/images/.keep
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
Binary file
|
data/sitemap.xml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
search: exclude
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
8
|
+
|
9
|
+
{% for page in site.html_pages %}
|
10
|
+
<url>
|
11
|
+
<loc>{{ page.url }}</loc>
|
12
|
+
<lastmod>{{ site.time | date: '%Y-%m-%d' }}</lastmod>
|
13
|
+
<changefreq>daily</changefreq>
|
14
|
+
<priority>0.5</priority>
|
15
|
+
</url>
|
16
|
+
{% endfor %}
|
17
|
+
|
18
|
+
{% for post in site.posts %}
|
19
|
+
<url>
|
20
|
+
<loc>{{ post.url }}</loc>
|
21
|
+
<lastmod>{{ site.time | date: '%Y-%m-%d' }}</lastmod>
|
22
|
+
<changefreq>daily</changefreq>
|
23
|
+
<priority>0.5</priority>
|
24
|
+
</url>
|
25
|
+
{% endfor %}
|
26
|
+
|
27
|
+
</urlset>
|