Skip to content

Commit

Permalink
Major UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bamr87 committed May 15, 2024
1 parent d81c164 commit 4243ec8
Show file tree
Hide file tree
Showing 37 changed files with 842 additions and 154 deletions.
45 changes: 28 additions & 17 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ subtitle_icon : "code"
title_separator : "|" # Appears in the web browser tab name
domain : &domain "it-journey.dev"
baseurl : "" # the subpath of your site, e.g. /blog - Use this if you want this whole repo to be a domain branch
url : ['https://', *domain] # the base hostname & protocol for your site, e.g. http://example.com
url : &url ['https://', *domain] # the base hostname & protocol for your site, e.g. http://example.com
public_folder : &public "/assets/"
port : 4002 # Jekyll Serve Dev port
dg_port : 4001 # TODO: Doppelganger site. Use this if you want to switch between parallel deployments

Expand Down Expand Up @@ -83,13 +84,13 @@ jekyll_admin:

locale : "en-US"
home_dir_pc : &home-win 'C:\Users\amrab\'
home_dir_mac : &home-mac '/Users/amr/'
home_dir_mac : &home-mac '/Users/bamr87/'
local_git_pc : [ *home-win, 'github' ]
local_git_mac : [ *home-mac, 'github' ]
logo : /assets/images/gravatar-small.png # path of logo image to display in the masthead, e.g. "/assets/images/88x88.png"
logo : /images/gravatar-small.png # path of logo image to display in the masthead, e.g. "/assets/images/88x88.png"
logo_link : &logo_link "https://www.it-journey.dev"

teaser : /assets/images/teaser_default-500x300.png # path of fallback teaser image, e.g. "/assets/images/500x300.png"
teaser : /images/favicon_gpt_computer_retro.png # path of fallback teaser image, e.g. "/assets/images/500x300.png"
breadcrumbs : true # true, false (default)
words_per_minute : 200
_posts_file_structure : "year-month-day-title.md"
Expand All @@ -98,7 +99,7 @@ _posts_file_structure : "year-month-day-title.md"

author:
name : *name # *name is a YAML reference pointing to the &anchor earlier
avatar : "/assets/images/gravatar-small.png"
avatar : "/images/gravatar-small.png"
email_hash : '71d7a4fc9712df49e13d606e620f89c7' # https://en.gravatar.com/site/check/{ site.email }
gravatar : [ 'https://s.gravatar.com/avatar/', *email_hash, '?s=80' ]
bio : "IT nerd trying to be an IT hero"
Expand Down Expand Up @@ -224,19 +225,19 @@ collections:
permalink: /:collection/:categories/:name/
quests:
output: true
permalink: /:collection/:name/
permalink: /:collection/:categories/:name/
hobbies:
output: true
permalink: /:collection/:name/
permalink: /:collection/:categories/:name/
notes:
output: true
permalink: /:collection/:name/
permalink: /:collection/:path/:name/
quickstart:
output: true
permalink: /:collection/:categories/
permalink: /:collection/:categories/:name/
about:
output: true
permalink: /:collection/:name/
permalink: /:collection/:categories/:name/

permalink: pretty

Expand All @@ -258,8 +259,8 @@ defaults:
share: true
related: true
toc: true
sidebar:
nav: main
# sidebar:
# nav: main
permalink: /:collection/:name/

# pages
Expand All @@ -276,8 +277,8 @@ defaults:
related: true
toc: true
toc_sticky: true
sidebar:
nav: main
# sidebar:
# nav: main
permalink: /:path/:name/

# pages/_about
Expand All @@ -298,6 +299,7 @@ defaults:
scope:
path: pages/_quickstart
values:
layout: default
collection: quickstart
share: true
related: true
Expand Down Expand Up @@ -380,8 +382,8 @@ defaults:
share: false
toc: true
author_profile: false
sidebar:
nav: notes
# sidebar:
# nav: notes

# Exclude from processing.
# The following items will not be processed, by default.
Expand All @@ -394,6 +396,7 @@ defaults:
exclude:
- .sass-cache/
- .jekyll-cache/
- .obsidian
- Gemfile.lock
- gemfiles/
- Gemfile
Expand Down Expand Up @@ -461,4 +464,12 @@ theme_color:

cr_year: 2024
cr_entity: "Amr"
cr_lisense: "MIT"
cr_lisense: "MIT"

## Sitemap Settings --------------------------------------------------------------

# sitemap_include: A list of file extensions that should be included in the sitemap. By default, HTML files and any files with sitemap: true in their front matter are included.
# sitemap_exclude: A list of files or directories that should be excluded from the sitemap.

sitemap_include: ["html", "xml"]
sitemap_exclude: ["secret.html", "private"]
9 changes: 7 additions & 2 deletions _includes/dev-shortcuts.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
<i class="{{site.default_icon}} {{site.default_icon}}-map"></i>
</a>

<a class="btn bg-primary" href="vscode://file/{{ site.local_git_pc}}/{{ site.repository_name }}/{{ page_dir }}{{ page.path }}">
<a class="btn bg-primary" href="vscode://file/{{ site.local_git_pc}}/{{ site.repository_name }}/{{ page_dir }}/{{ page.path }}">
<i class="{{site.default_icon}} {{site.default_icon}}-windows"></i>
</a>

<a class="btn bg-primary" href="vscode://file/{{ site.local_git_mac}}/{{ site.repository_name }}/{{ page_dir }}{{ page.path }}">
<a class="btn bg-primary" href="vscode://file/{{ site.local_git_mac}}/{{ site.repository_name }}/{{ page_dir }}/{{ page.path }}">
<i class="{{site.default_icon}} {{site.default_icon}}-apple"></i>
</a>
<!-- https://icons.getbootstrap.com/icons/apple/ -->
Expand All @@ -67,5 +67,10 @@
<i class="{{site.default_icon}} {{site.default_icon}}-filetype-html"></i>
</a>
<!-- https://icons.getbootstrap.com/icons/filetype-html/ -->

<!-- go to collection index button -->
<a class="btn bg-primary" href="#index-collection">
<i class="{{site.default_icon}} {{site.default_icon}}-card-list"></i>
</a>

</div>
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<script src="/assets/js/auto-hide-nav.js"></script>
<script src="/assets/js/back-to-top.js"></script>
<script src="/assets/js/halfmoon.js"></script>
<script src="/assets/js/side-bar-folders.js"></script>


<!-- third party scripts -->
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<!-- set the URL for the logo image in the _config file -->
{% capture logo_path %}{{ site.logo }}{% endcapture %}
<a class="navbar-brand" href="/">
<img src="{{ logo_path | relative_url }}" alt="Logo" width="30" height="30">
<img src="{{ site.public_folder }}/{{ logo_path | relative_url }}" alt="Logo" width="30" height="30">
</a>
</div>
<!-- include branding.html -->
Expand Down
2 changes: 1 addition & 1 deletion _includes/js-cdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- Jquery -->
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> -->
<!-- <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>


<!-- bootstrap js -->
Expand Down
107 changes: 107 additions & 0 deletions _includes/sidebar-folders.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<!--
file: sidebar-folders.html
title: Folder Structured Sidebar
-->

{% assign root_folder = site.collections | where: "label", page.collection | first %}
<h2>{{ root_folder.label }}</h2>
{% assign docs = root_folder.docs | sort: 'path' %}
{% assign prev_path = "" %}
<ul class="list-group list-group-flush">
{% for doc in docs %}
{% assign current_path = doc.path | split: '/' | pop %}
{% if current_path != prev_path %}
{% for folder in current_path %}
{% if forloop.index != 1 %}
<li class="folder ">{{ folder }}</li>
{% endif %}
{% endfor %}
{% assign prev_path = current_path %}
{% endif %}
<li class="file list-group-item list-group-item-action"><a href="{{ doc.url }}">{{ doc.title }}</a></li>
{% endfor %}
</ul>

<!-- {% assign collection = site.collections | where: "label", page.collection | first %}
<div class="d-flex">
<ul class="list-group list-group-flush ">
{% assign folders = "" | split: '/' %}
{% for doc in collection.docs %}
{% assign doc_folders = doc.path | split: '/' %}
{% for doc_folder in doc_folders %}
{% unless folders contains doc_folder %}
{% assign folders = folders | push: doc_folder %}
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0" data-bs-toggle="collapse" data-bs-target="#{{ doc_folder }}-collapse" aria-expanded="true">
{{ doc_folder }}
</button>
<div class="collapse show" id="{{ doc_folder }}-collapse" style="">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
{% for doc in collection.docs %}
{% if doc.path contains doc_folder %}
<li><a href="{{ doc.url }}" class="link-body-emphasis d-inline-flex text-decoration-none rounded">{{ doc.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endunless %}
{% endfor %}
{% endfor %}
</ul>
</div> -->


<!-- <ul class="list-unstyled ps-0">
<li class="mb-1">
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="true">
Home
</button>
<div class="collapse show" id="home-collapse" style="">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Overview</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Updates</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Reports</a></li>
</ul>
</div>
</li>
<li class="mb-1">
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#dashboard-collapse" aria-expanded="false">
Dashboard
</button>
<div class="collapse" id="dashboard-collapse" style="">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Overview</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Weekly</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Monthly</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Annually</a></li>
</ul>
</div>
</li>
<li class="mb-1">
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#orders-collapse" aria-expanded="false">
Orders
</button>
<div class="collapse" id="orders-collapse" style="">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">New</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Processed</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Shipped</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Returned</a></li>
</ul>
</div>
</li>
<li class="border-top my-3"></li>
<li class="mb-1">
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#account-collapse" aria-expanded="false">
Account
</button>
<div class="collapse" id="account-collapse">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">New...</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Profile</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Settings</a></li>
<li><a href="#" class="link-body-emphasis d-inline-flex text-decoration-none rounded">Sign out</a></li>
</ul>
</div>
</li>
</ul> -->
27 changes: 7 additions & 20 deletions _includes/sidebar-left.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,17 @@ <h5 class="offcanvas-title" id="bdSidebarOffcanvasLabel">Browse docs</h5>

<!-- Dynamic listing of notes in side bar -->
{% if page.collection == "notes" %}
{% assign collection = site.collections | where: "label", page.collection | first %}
<div class="d-flex">
<div class="border-end bg-white" id="sidebar-wrapper">
<div class="list-group list-group-flush">
<div class="list-group list-group-flush">
{% for doc in collection.docs %}
{% assign folder = doc.path | split: '/' | first %}
{% unless folders contains folder %}
<!-- Output the folder name if you want -->
{% assign folders = folders | push: folder %}
{% endunless %}
<a href="{{ doc.url }}" class="list-group-item list-group-item-action ">{{ doc.title }}</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
<div class="list-group" id="sidebar-content">
{% assign folders = site.notes | where_exp: "item", "item.path contains 'index.md'" | sort: 'path' %}
{% include sidebar-folders.html folders=folders %}
</div>
{% endif %}

<!-- Include nav_list.html -->
{% if page.sidebar.nav %}
<nav class="w-100">
{% if page.sidebar.nav %}
{% include nav_list.html nav=page.sidebar.nav %}
{% endif %}
</nav>
{% endif %}
</div>
</div>
23 changes: 23 additions & 0 deletions _includes/sitemap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<h2>Sitemap of current collection</h2>

<ul>
{% for item in page.collections %}
<li>
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>


<h1>Sitemap</h1>

{% for collection in site.collections %}
<h2>{{ collection.label }}</h2>
<ul>
{% for item in collection.docs %}
<li>
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
Loading

0 comments on commit 4243ec8

Please sign in to comment.