Skip to content

Commit

Permalink
customise theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragdata committed Jun 26, 2024
1 parent 4af1d68 commit 6c8b191
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ remote_theme: vaibhavvikas/jekyll-theme-minimalistic
color-scheme: dark
logo: assets/img/LabHackers-256.png
favicon: true
show_downloads: false
show_credits: false
show-credits: false
google_analytics:

platforms:
- name: GitHub
icon: <i class="fa-brands fa-github"></i>
link: https://github.com/labhackers

plugins:
- jekyll-remote-theme
13 changes: 13 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% unless site.hide_project_footer %}
{% if site.github.is_project_page %}
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
{% endunless %}
{% if site.show-credits %}
<p style="margin-bottom: 0px">
<small>
<a href="https://github.com/vaibhavvikas/jekyll-theme-minimalistic">Minimalistic</a> &mdash; Theme by
<a href="https://github.com/vaibhavvikas/">vaibhavvikas</a>
</small>
</p>
{% endif %}
12 changes: 12 additions & 0 deletions docs/_includes/head-custom-google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% if site.google_analytics %}
<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
});
</script>
{% endif %}
11 changes: 11 additions & 0 deletions docs/_includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">

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

<!-- You can set your favicon here -->
{% if site.favicon %}
<link rel="shortcut icon" type="image/x-icon" href="{{ '/favicon.ico' | relative_url }}">
{% endif %}
<!-- end custom head snippets -->
13 changes: 13 additions & 0 deletions docs/_includes/header-title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% if site.logo %}
<img class="logo" src="{{ site.logo | relative_url }}" alt="Logo">
{% endif %}

{% if site.blank_title %}
<h2>{{ site.title | default: site.github.repository_name }}</h2>
{% else %}
<h2>{{ site.title | default: site.github.repository_name }}</h2>
{% endif %}

{% if site.email %}
<p class="addr"><i class="fa-solid fa-envelope"></i>&nbsp;<a href="mailto:{{site.email}}">{{ site.email }}</a></p>
{% endif %}
26 changes: 26 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% if site.logo %}
<div class="header-title">
{% include header-title.html %}
</div>
<div class="header-title-mobile">
<section>
{% include header-title.html %}
</section>
</div>
{% else %}
{% include header-title.html %}
{% endif %}

<p>{{ site.description | default: site.github.project_tagline }}</p>

{% unless site.hide_project_page %}
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub<br><small>{{ site.github.repository_nwo }}</small></a></p>
{% endif %}

{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}
{% endunless %}

{% include sidebar.html %}
27 changes: 27 additions & 0 deletions docs/_includes/mobile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="link-wrapper-mobile">
{% if site.platforms %}
<ul class="link">
{%- for platform in site.platforms %}
<nobr><a href="{{ platform.link }}" rel="me">{{ platform.icon }}&nbsp;{{ platform.name }}</a>
{%- unless forloop.last %}<span style="margin-left: 6px;"></span>{% endunless %}</nobr>
{%- endfor %}
</ul>
{% endif %}

{% if site.navigation %}
<h3 class="sidebar-h3">Contents:</h3>
<ul class="content">
{%- for item in site.navigation %}
<li><a href="{{ item.link }}">{{ item.name }}</a>
{% if item.sublist %}
<ul class="sublist">
{%- for subitem in item.sublist %}
<li><a href="{{ subitem.link }}">{{ subitem.name }}</a></li>
{%- endfor %}
</ul>
{% endif %}
</li>
{%- endfor %}
</ul>
{% endif %}
</div>
26 changes: 26 additions & 0 deletions docs/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="link-wrapper">
{% if site.platforms %}
<ul class="link">
{%- for platform in site.platforms %}
<li><a href="{{ platform.link }}">{{ platform.icon }}&nbsp;{{ platform.name }}</a></li>
{%- endfor %}
</ul>
{% endif %}

{% if site.navigation %}
<h3 class="sidebar-h3">Contents:</h3>
<ul class="content">
{%- for item in site.navigation %}
<li><a href="{{ item.link }}">{{ item.name }}</a>
{% if item.sublist %}
<ul class="sublist">
{%- for subitem in item.sublist %}
<li><a href="{{ subitem.link }}">{{ subitem.name }}</a></li>
{%- endfor %}
</ul>
{% endif %}
</li>
{%- endfor %}
</ul>
{% endif %}
</div>
40 changes: 40 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% case site.color-scheme %}
{% when "", nil, false, 0, empty %}
{% assign ColorScheme = "auto" %}
{% else %}
{% assign ColorScheme = site.color-scheme %}
{% endcase %}

<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<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/colors-ColorScheme.css?v=" | replace: "ColorScheme", ColorScheme | append: site.github.build_revision | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<link rel="preload" href="{{site.logo | relative_url}}" as="image">
{% include head-custom.html %}
</head>
<body>
<div class="wrapper">
<div class="sidebar">
<header>
{%- include header.html -%}
</header>
{% include mobile.html %}
<div class="sidebar-footer">
{%- include footer.html -%}
</div>
</div>
<section>
{{ content }}
</section>
<footer>
{%- include footer.html -%}
</footer>
</div>
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions docs/_layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
---

<small>{{ page.date | date: "%-d %B %Y" }}</small>
<h1>{{ page.title }}</h1>

<p class="view">by {{ page.author | default: site.author }}</p>

{{content}}

{% if page.tags %}
<small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
{% endif %}

0 comments on commit 6c8b191

Please sign in to comment.