Skip to content

Commit

Permalink
Merge pull request #32 from byanko55/rbss
Browse files Browse the repository at this point in the history
v1.1.2 (v1.2.0 >= won't be archived)
  • Loading branch information
byanko55 authored Feb 5, 2024
2 parents c6d8251 + 2f52a38 commit 3421c0b
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 54 deletions.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.2"
gem "jekyll", ">= 3.9", "< 5.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`.
Expand All @@ -19,6 +19,8 @@ end

gem "jekyll-sitemap", "~> 1.3"
gem "jekyll-seo-tag", "~> 2.6"
gem "kramdown-parser-gfm", "~> 1.1.0"
gem "webrick", "~> 1.7.0"

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
Expand Down
22 changes: 12 additions & 10 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<nav id="navigation">
{%- assign nav_pages = site.pages
| where_exp: "item", "item.bookmark == true or item.name == 'index.md'"
| sort: 'url'
-%}

{% assign first_level_pages = "" | split, "" %}
{% assign second_level_pages = "" | split, "" %}
{% assign third_level_pages = "" | split, "" %}

{% for p in nav_pages %}
{% for p in site.pages %}
{%- assign p_tree = p.url | remove_first: "/" | split: "/" -%}
{%- assign p_name = p_tree | last -%}
{%- assign p_level = p_tree | size -%}

{% if p.bookmark == nil and p_name != 'index.html' %}
{% continue %}
{% endif %}

{% if p.bookmark %}
{% if p_level == 1 %}
{% assign first_level_pages = first_level_pages | push:p %}
Expand All @@ -31,13 +31,16 @@
{% endif %}
{% endfor %}

{% assign first_level_pages = first_level_pages | sort: 'url' %}
{% assign second_level_pages = second_level_pages | sort: 'url' %}
{% assign third_level_pages = third_level_pages | sort: 'url' %}

<ul class="nav-list">
{%- for node in first_level_pages -%}
{%- assign node_url = node.url | remove: 'index.html' -%}
{%- assign node_title = node.path | remove: 'index.md' | split: "/" | last | remove: '.md' | replace: "_pages", "Home" -%}
{%- assign children_list = second_level_pages
| where_exp: "item", "item.url contains node_url"
| sort: 'url' -%}
| where_exp: "item", "item.url contains node_url" -%}
{%- assign num_children = children_list | size -%}
<li id="nav-first" aria-label="{{ node_title }}">
<div class="nav-item">
Expand All @@ -57,8 +60,7 @@
{%- assign child_url = child.url | remove: 'index.html' -%}
{%- assign child_title = child.path | remove: 'index.md' | split: "/" | last | remove: '.md' -%}
{%- assign grand_children_list = third_level_pages
| where_exp: "item", "item.url contains child_url"
| sort: 'url' -%}
| where_exp: "item", "item.url contains child_url" -%}
{%- assign num_grand_children = grand_children_list | size -%}
<li id="nav-second" aria-label="{{ child_title }}">
<div class="nav-item">
Expand Down
2 changes: 1 addition & 1 deletion _includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 class="category-header">
{% if page_level == 1 %}
All Posts
{% else %}
{{ page.title }}
{{ page.path | remove: 'index.md' | split: "/" | last }}
{% endif %}
</h1>
<div id="category-list">
Expand Down
4 changes: 2 additions & 2 deletions _includes/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
</div>
</div>
</div>
<div class="tags">
<div class="tag-box">
{%- for page_tag in page.tags -%}
<span class="tag-box theme-{{ forloop.index0 | modulo: 3 }}" contentID="{{ page_tag }}">
<span class="tag theme-{{ forloop.index0 | modulo: 3 }}" contentID="{{ page_tag }}">
{{ page_tag }}
</span>
{%- endfor -%}
Expand Down
7 changes: 0 additions & 7 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{%- assign page_tree = page.path | remove_first: "_pages/" | split: "/" -%}
{%- assign page_level = page_tree.size -%}
{% if page_tree.last == "index.md" %}
{%- assign page_type = "category" -%}
{% else %}
{%- assign page_type = "post" -%}
{% endif %}
<div class="sidebar sidebar-left">
<div class="side-banner">
<h1 class="site-name">
Expand Down
4 changes: 1 addition & 3 deletions _pages/visitor counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ Create new account in [here](https://www.goatcounter.com/signup)

You will access your blog statistics at `https://[my-code].goatcounter.com`.

## Add your code to site configuration

In `_config.yml`,
## Add your code to `_config.yml`

```
goatcounter_code: [my-code]
Expand Down
4 changes: 2 additions & 2 deletions _sass/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
padding-left: 1.125rem;
background: #eee;

transition: max-height .5s, opacity .2s;
transition: max-height .5s ease-in-out, opacity .3s;
opacity: 0;
max-height: 0;

Expand All @@ -32,7 +32,7 @@

> .nav-list {
opacity: 1;
max-height: 256px;
max-height: 768px;
}
}
}
Expand Down
53 changes: 31 additions & 22 deletions _sass/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,16 @@
svg { margin-right: 4px; }
}

.tags { margin: 1rem; }

.tag-box {
.tag-box {
margin: 1rem;
display: inline-block;
}

.tag {
float: left;
position: relative;
margin: 0.75rem;
padding: 0 0.75rem;
margin-left: 24px;
padding:0 10px 0 12px;
line-height: 1.5rem;
color: #fff !important;
font-size: 1rem;
Expand Down Expand Up @@ -189,8 +192,8 @@ main {
* { margin: auto; }

h1, h2, h3 {
margin-bottom: -1.5rem;
padding-top: 2rem;
margin-top: 3rem;
margin-bottom: 1rem;
}

h1, .sh1 { font-size: 1.75rem; }
Expand Down Expand Up @@ -229,11 +232,19 @@ main {
}
}

p, ul, hr, table { margin-top: 2rem; }
p, ul, table, div { margin-bottom: 3rem; }

p + div,
p + pre,
p + blockquote,
div + div,
div + blockquote {
margin-top: -2rem;
}

ul { padding-left: 2rem; }

li > ul { margin-top: 0; }
li > ul { margin: 0; }

code {
margin: 0 2px;
Expand Down Expand Up @@ -377,7 +388,7 @@ main {
hr {
border: 0;
height: 2px;
margin-bottom: -1.5rem;
margin: 1rem 0;
background: burlywood;
}

Expand Down Expand Up @@ -550,16 +561,19 @@ main {
svg { margin-right: 8px; }
}

.tags { margin: 1rem 3rem; }

.tag-box {
margin: 1rem;
padding: 0 1rem;
margin: 3rem;
margin-top: 1rem;
}

.tag {
margin-left: 32px;
padding:0 14px 0 16px;
line-height: 2rem;
font-size: 1.125rem;

&:before {
left: -1rem;
left: -16px;
border-width: 16px 16px 16px 0;
}

Expand All @@ -574,25 +588,20 @@ main {
padding-top: 0;
font-size: 1.125rem;

h1, h2, h3, hr { margin-bottom: -2.25rem; }

h1, .sh1 {
font-size: 2.25rem;
padding-top: 5rem;
margin-top: 5rem;
}

h2, .sh2 {
font-size: 1.75rem;
padding-top: 4rem;
margin-top: 4rem;
}

h3, .sh3 {
font-size: 1.375rem;
padding-top: 3rem;
}

p, ul, hr, table { margin-top: 3rem; }

table {
tbody td, thead th { padding: 1rem; }
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ document.addEventListener('DOMContentLoaded', function(){
// Tag EventListener
const searchPage = document.querySelector("#search");

document.querySelectorAll('.tag-box').forEach(function(tagButton){
document.querySelectorAll('.tag-box .tag').forEach(function(tagButton){
tagButton.addEventListener('click', function() {
const contentID = tagButton.getAttribute('contentID');
searchPage.classList.add('active');
Expand Down
4 changes: 1 addition & 3 deletions docs/Visitor Counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ Create new account in [here](https://www.goatcounter.com/signup)

You will access your blog statistics at `https://[my-code].goatcounter.com`.

### Add your code to site configuration

In `_config.yml`,
### Add your code to `_config.yml`

```
goatcounter_code: [my-code]
Expand Down
6 changes: 4 additions & 2 deletions jekyll-theme-satellite.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-satellite"
spec.version = "1.2.1"
spec.version = "1.1.2"
spec.authors = ["Yankos"]
spec.email = ["[email protected]"]

Expand All @@ -15,7 +15,9 @@ Gem::Specification.new do |spec|
}
spec.files += []

spec.add_runtime_dependency "jekyll", "~> 4.3"
spec.add_runtime_dependency "jekyll", ">= 3.9", "< 5.0"
spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1.0"
spec.add_runtime_dependency "webrick", "~> 1.7.0"
spec.add_runtime_dependency "jekyll-feed", "~> 0.12"
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.3"
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.6"
Expand Down

0 comments on commit 3421c0b

Please sign in to comment.