Skip to content

Commit

Permalink
123
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutduck committed Oct 30, 2024
1 parent 04da75c commit ea5e3b7
Show file tree
Hide file tree
Showing 33 changed files with 1,569 additions and 42 deletions.
19 changes: 9 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ theme: jekyll-theme-yat
copyright: "Copyright (c) No Arbitrage (2023-{currentYear}) by {author}."

description: >- # this means to ignore newlines until "baseurl:"
No Arbitrate is a personal blog created to share practical financial knowledge,
ranging from basics to advanced concepts, and from theory to hands-on spreadsheet techniques.
No Arbitrate is a personal blog created to share practical financial knowledge,
ranging from basics to advanced concepts, and from theory to hands-on spreadsheet techniques.
A space for exchanging ideas, making connections, and inspiring each others.
banner: "/assets/images/banners/home.jpeg"
baseurl: "" # the subpath of your site, e.g. /blog
repo_url: "https://no-arbitrage.github.io" # the base hostname & protocol for your site, e.g. https://example.com
url: "https://www.no-arbitrage.com"
Expand Down Expand Up @@ -169,11 +168,11 @@ header_pages:


# Page default value
# defaults:
# home:
# heading: "No Arbitrage"
# subheading: "Joseph Cai's Blog for Money and Growth."
# banner: "Your image url"
defaults:
home:
heading: "No Arbitrage"
subheading: "Joseph Cai's Blog for Money and Growth."
banner: "/assets/images/banners/home.jpeg"

# Banner default settings
# These banner settings are for global banner default, but you can also
Expand Down Expand Up @@ -272,5 +271,5 @@ plugins:
- jekyll-sitemap
- jekyll-paginate
- jekyll-spaceship


24 changes: 24 additions & 0 deletions _drafts/_layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>Try to check other pages through the menu. </p>
</div>
9 changes: 9 additions & 0 deletions _drafts/_layouts/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: post
hidden:
- header
- navigator
- related_posts
---

{{ content }}
18 changes: 18 additions & 0 deletions _drafts/_layouts/archives.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: framework
sidebar: archive-list
---

{%- if site.posts.size > 0 -%}

{% include functions.html func='log' level='debug' msg='Get datetimes value' %}

{% assign filter = '%Y' %}
{% include functions.html func='get_datetimes' %}
{% assign datetimes = return %}

{% assign keys = datetimes | reverse %}
{% assign field = 'date' %}
{% include views/segments.html %}

{%- endif -%}
14 changes: 14 additions & 0 deletions _drafts/_layouts/articles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: framework
sidebar: category-list
---

<div class="articles">
{% if page.banner == nil %}
{% assign banner = page.title %}
{% endif %}

{{ content }}

{% include views/pagination.html %}
</div>
16 changes: 16 additions & 0 deletions _drafts/_layouts/categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: framework
sidebar: category-list
---

{%- if site.posts.size > 0 -%}

{%- include functions.html func='log' level='debug' msg='Get value' -%}
{%- include functions.html func='get_categories' -%}
{% assign categories = return %}

{% assign keys = categories %}
{% assign field = 'categories' %}
{%- include views/segments.html -%}

{%- endif -%}
27 changes: 27 additions & 0 deletions _drafts/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{%- include head.html -%}

<body>

{%- include views/header.html -%}

{%- include views/banner.html -%}

{%- include extensions/hashlocate.html -%}

{%- include extensions/theme-toggle.html -%}

{%- include extensions/click-to-top.html -%}

<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>

{%- include views/footer.html -%}

</body>
</html>
35 changes: 35 additions & 0 deletions _drafts/_layouts/framework.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: default
---

<div class="framework">
<section class="main">

{{ content }}

</section>
<section class="sidebar" style="margin-left: 15px;">
<!-- Get sidebar items -->
{%- if page.sidebar -%}
{%- assign sidebar = page.sidebar -%}
{%- elsif site.defaults[page.layout].sidebar -%}
{%- assign sidebar = site.defaults[page.layout].sidebar -%}
{%- elsif layout.sidebar -%}
{%- assign sidebar = layout.sidebar -%}
{%- endif -%}

{%- for item in sidebar -%}

{%- assign file = item -%}
{%- assign array = file | split: '.' -%}
{%- if array.size == 1 -%}
{%- assign file = file | append: '.html' -%}
{%- endif -%}

{%- assign file = 'sidebar/' | append: file -%}

{%- include {{ file }} %}

{%- endfor -%}
</section>
</div>
17 changes: 17 additions & 0 deletions _drafts/_layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: articles
heading: {{site.heading}}
subheading: {{site.subheading}}
banner: 'default'

---

{{ content }}

{% comment %}
heading: {{site.heading}}
subheading: {{site.subheading}}

heading: "No Arbitrage"
subheading: "Joseph Cai's Personal Blog about Money and Growth."
{% endcomment %}
93 changes: 93 additions & 0 deletions _drafts/_layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
layout: framework
banner:
banner_html: post-header.html
comments: true
hidden: []
sidebar:
- article-menu
---

<div class="post">
<section>

{%- assign name = 'banner' -%}
{%- include functions.html func='get_value' -%}
{%- assign banner = return -%}

{%- assign name = 'hidden' -%}
{%- include functions.html func='get_value' -%}
{%- assign hidden = return -%}

{%- assign result = hidden | where_exp: "item", "item == 'header'" -%}
{%- if banner == nil and result.size == 0 -%}
{%- include views/post-header.html -%}
{%- endif -%}

{%- include views/article.html -%}

{%- assign result = hidden | where_exp: "item", "item == 'navigator'" -%}
{%- if result.size == 0 -%}
<div class="post-nav">
{%- if page.previous -%}
<a class="previous" href="{{ page.previous.url | relative_url }}" title="{{
page.previous.title | escape }}">{{ page.previous.title | escape | truncatewords: 6 }}</a>
{%- else -%}
<span></span>
{%- endif -%}

{%- if page.next -%}
<a class="next" href="{{ page.next.url | relative_url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a>
{%- else -%}
<span></span>
{%- endif -%}
</div>
{%- endif -%}

{%- assign result = hidden | where_exp: "item", "item == 'related_posts'" -%}
{%- if result.size == 0 -%}
<div class="post-related">
<div>Related Articles</div>
<ul>
{% assign posts = site[page.collection] | sample:4 %}
{%- for post in posts -%}
{%- assign post_item_class = "" -%}
{%- if post.top -%}
{%- assign post_item_class = "top-post" -%}
{%- endif -%}
<li class="{{ post_item_class }}">
<a class="post-link"
href="{{ post.url | relative_url }}"
title="{{ post.title | escape }}">
{{ post.title | escape | truncatewords: 12 }}
{%- include views/post-badges.html -%}
</a>
</li>
{%- endfor -%}
</ul>
</div>
{%- endif -%}

{%- assign result = hidden | where_exp: "item", "item == 'comments'" -%}
{%- if result.size == 0 -%}
<div class="post-comments">
{%- if page.comments != false -%}

{%- if site.disqus.shortname -%}
{%- include extensions/comments/disqus.html -%}
{%- endif -%}

{%- if site.gitment.username -%}
{%- include extensions/comments/gitment.html -%}
{%- endif -%}

{%- if site.utterances.repo -%}
{%- include extensions/comments/utterances.html -%}
{%- endif -%}

{%- endif -%}
</div>
{%- endif -%}

</section>
</div>
16 changes: 16 additions & 0 deletions _drafts/_layouts/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: framework
sidebar: tag-list
---

{%- if site.posts.size > 0 -%}

{%- include functions.html func='log' level='debug' msg='Get tags value' -%}
{%- include functions.html func='get_tags' -%}
{% assign tags = return %}

{% assign keys = tags %}
{% assign field = 'tags' %}
{%- include views/segments.html -%}

{%- endif -%}
Binary file added _includes.zip
Binary file not shown.
34 changes: 17 additions & 17 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-noto-sans@0.0.72/index.min.css">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
<script src="{{ "/assets/js/main.js" | relative_url }}"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">

<!-- <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet"> -->

<!-- <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script> -->

{% if site.posts.first.style %}
<!-- {% if site.posts.first.style %}
<link rel="stylesheet" href="/css/art-direction/{{ site.posts.first.style }}">
{% elsif page.style %}
<link rel="stylesheet" href="/css/art-direction/{{ page.style }}">
{% endif %}
{% elsif page.style %}
<link rel="stylesheet" href="/css/art-direction/{{ page.style }}">
{% endif %} -->

{% if site.posts.first.googlewebfonts %}
<link href='http://fonts.googleapis.com/css?family={{ site.posts.first.googlewebfonts }}'>
{% elsif page.googlewebfonts %}
<link href='http://fonts.googleapis.com/css?family={{ page.googlewebfonts }}'>
{% endif %}
<!-- {% if site.posts.first.googlewebfonts %}
<link href='http://fonts.googleapis.com/css?family={{ site.posts.first.googlewebfonts }}'>
{% elsif page.googlewebfonts %}
<link href='http://fonts.googleapis.com/css?family={{ page.googlewebfonts }}'>
{% endif %} -->


{%- feed_meta -%}
Expand All @@ -41,9 +41,9 @@



{% if page.style %}
<!-- {% if page.style %}
<style type="text/css">
{{ page.style }}
</style>
{% endif %}
{% endif %} -->
</head>
13 changes: 2 additions & 11 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
---
layout: articles
heading: {{site.heading}}
subheading: {{site.subheading}}
heading: 'Your awesome heading'
subheading: 'Your awesome subheading'
banner: 'default'

---

{{ content }}

{% comment %}
heading: {{site.heading}}
subheading: {{site.subheading}}

heading: "No Arbitrage"
subheading: "Joseph Cai's Personal Blog about Money and Growth."
{% endcomment %}
Loading

0 comments on commit ea5e3b7

Please sign in to comment.