Skip to content

Commit

Permalink
Tierlist - Start
Browse files Browse the repository at this point in the history
luger
  • Loading branch information
MoutonDemocrate committed Mar 7, 2025
1 parent a11a850 commit ad54768
Show file tree
Hide file tree
Showing 20 changed files with 370 additions and 235 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@
// Run tasks in macOS
"terminal.integrated.profiles.osx": {
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
},
"[liquid]": {
"editor.defaultFormatter": "sissel.shopify-liquid"
}
}
12 changes: 12 additions & 0 deletions _data/tier_list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
S:
- name: "Outer Wilds"
image: "/assets/img/covers/outer_wilds.jpg"
link: "./posts/Outer_Wilds"

A:

B:

C:

D:
File renamed without changes.
21 changes: 21 additions & 0 deletions _includes/tierlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="tier-list">
{% assign tiers = "S,A,B,C,D" | split: "," %}
{% assign tier_colors = "S|#ff4d00,A|#ff9900,B|#ffee00,C|#3399ff,D|#888888" | split: "," %}
{% assign tier_list = site.data.tier_list %}
{% for tier in tiers %}
{% assign color = tier_colors | where_exp: "item", "item contains tier" | first | split: "|" | last %}
<div class="tier {{ tier }}" style="display: flex; align-items: center; padding: 10px; font-size: 24px; font-weight: bold; text-transform: uppercase; border-radius: 5px; background-color: {{ color }};">
<div class="tier-label" style="width: 50px; text-align: center; padding: 10px; margin-right: 10px; color: white;">
{{ tier }}
</div>
<div class="tier-items" style="display: flex; flex-wrap: wrap; align-items: center; gap: 5px;">
{% for item in tier_list[tier] %}
<a href="{{ item.link }}" style="display: flex; align-items: center;">
<img src="{{ item.image }}" alt="{{ item.name }}"
style="max-height: 150px !important; width: auto !important; height: auto !important; display: block !important; object-fit: contain !important; border-radius: 5px !important; border: 2px solid white !important; margin: 0 !important; padding: 0 !important; vertical-align: middle !important;" />
</a>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
161 changes: 66 additions & 95 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,120 +3,91 @@
refactor: true
---

{% include lang.html %}

{% assign all_pinned = site.posts | where: 'pin', 'true' %}
{% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}

{% assign posts = '' | split: '' %}
{% include lang.html %} {% assign all_pinned = site.posts | where: 'pin', 'true'
%} {% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and
item.hidden != true' %} {% assign posts = '' | split: '' %}

<!-- Get pinned posts on current page -->

{% assign visible_start = paginator.page | minus: 1 | times: paginator.per_page %}
{% assign visible_end = visible_start | plus: paginator.per_page %}

{% if all_pinned.size > visible_start %}
{% if all_pinned.size > visible_end %}
{% assign pinned_size = paginator.per_page %}
{% else %}
{% assign pinned_size = all_pinned.size | minus: visible_start %}
{% endif %}

{% for i in (visible_start..all_pinned.size) limit: pinned_size %}
{% assign posts = posts | push: all_pinned[i] %}
{% endfor %}
{% else %}
{% assign pinned_size = 0 %}
{% endif %}
{% assign visible_start = paginator.page | minus: 1 | times: paginator.per_page
%} {% assign visible_end = visible_start | plus: paginator.per_page %} {% if
all_pinned.size > visible_start %} {% if all_pinned.size > visible_end %} {%
assign pinned_size = paginator.per_page %} {% else %} {% assign pinned_size =
all_pinned.size | minus: visible_start %} {% endif %} {% for i in
(visible_start..all_pinned.size) limit: pinned_size %} {% assign posts = posts |
push: all_pinned[i] %} {% endfor %} {% else %} {% assign pinned_size = 0 %} {%
endif %}

<!-- Get normal posts on current page -->

{% assign normal_size = paginator.posts | size | minus: pinned_size %}

{% if normal_size > 0 %}
{% if pinned_size > 0 %}
{% assign normal_start = 0 %}
{% else %}
{% assign normal_start = visible_start | minus: all_pinned.size %}
{% endif %}
{% assign normal_size = paginator.posts | size | minus: pinned_size %} {% if
normal_size > 0 %} {% if pinned_size > 0 %} {% assign normal_start = 0 %} {%
else %} {% assign normal_start = visible_start | minus: all_pinned.size %} {%
endif %} {% assign normal_end = normal_start | plus: normal_size | minus: 1 %}
{% for i in (normal_start..normal_end) %} {% assign posts = posts | push:
all_normal[i] %} {% endfor %} {% endif %}

{% assign normal_end = normal_start | plus: normal_size | minus: 1 %}
<br>

{% for i in (normal_start..normal_end) %}
{% assign posts = posts | push: all_normal[i] %}
{% endfor %}
{% endif %}
{% include tierlist.html %}

<div id="post-list" class="flex-grow-1 px-xl-1">
{% for post in posts %}
<article class="card-wrapper card">
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
{% assign card_body_col = '12' %}

{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}

{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}

{% assign lqip = null %}

{% if post.image.lqip %}
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
{% endif %}

<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
<article class="card-wrapper card">
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
{% assign card_body_col = '12' %} {% if post.image %} {% assign src =
post.image.path | default: post.image %} {% unless src contains '//' %} {%
assign src = post.media_subpath | append: '/' | append: src | replace:
'//', '/' %} {% endunless %} {% assign alt = post.image.alt | xml_escape |
default: 'Preview Image' %} {% assign lqip = null %} {% if post.image.lqip
%} {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %} {% endif
%}

<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }} />
</div>

{% assign card_body_col = '7' %} {% endif %}

<div class="col-md-{{ card_body_col }}">
<div class="card-body d-flex flex-column">
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>

<div class="card-text content mt-0 mb-3">
<p>{% include post-description.html %}</p>
</div>

{% assign card_body_col = '7' %}
{% endif %}

<div class="col-md-{{ card_body_col }}">
<div class="card-body d-flex flex-column">
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>

<div class="card-text content mt-0 mb-3">
<p>{% include post-description.html %}</p>
<div class="post-meta flex-grow-1 d-flex align-items-end">
<div class="me-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw me-1"></i>
{% include datetime.html date=post.date lang=lang %}

<!-- categories -->
{% if post.categories.size > 0 %}
<i class="far fa-folder-open fa-fw me-1"></i>
<span class="categories">
{% for category in post.categories %} {{ category }} {%- unless
forloop.last -%},{%- endunless -%} {% endfor %}
</span>
{% endif %}
</div>

<div class="post-meta flex-grow-1 d-flex align-items-end">
<div class="me-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw me-1"></i>
{% include datetime.html date=post.date lang=lang %}

<!-- categories -->
{% if post.categories.size > 0 %}
<i class="far fa-folder-open fa-fw me-1"></i>
<span class="categories">
{% for category in post.categories %}
{{ category }}
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</span>
{% endif %}
</div>

{% if post.pin %}
<div class="pin ms-1">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
{% endif %}
{% if post.pin %}
<div class="pin ms-1">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
<!-- .post-meta -->
{% endif %}
</div>
<!-- .card-body -->
<!-- .post-meta -->
</div>
</a>
</article>
<!-- .card-body -->
</div>
</a>
</article>
{% endfor %}
</div>
<!-- #post-list -->

{% if paginator.total_pages > 1 %}
{% include post-paginator.html %}
{% endif %}
{% if paginator.total_pages > 1 %} {% include post-paginator.html %} {% endif %}
43 changes: 21 additions & 22 deletions _sass/colors/typography-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
--black: #000000;
--white: #ffffff;
--accent: #00ff88;
--purple-lightest: #f3dbff;
--purple-lighter: #d786ff;
--purple-lighter-grey: #a477bb;
--purple-light: #bd3aff;
--purple-full: #9c01ec;
--purple-full-grey: #9451b6;
--purple-dark-mid: #6e02a4;
--purple-dark: #360151;
--purple-darker: #230035;
Expand All @@ -19,12 +24,12 @@

/* Common color */
--text-color: rgb(238, 206, 255);
--text-muted-color: #868686;
--text-muted-highlight-color: #aeaeae;
--text-muted-color: var(--purple-lightest);
--text-muted-highlight-color: var(--purple-lighter-grey);
--heading-color: var(--accent);
--label-color: #a7a7a7;
--blockquote-border-color: var(--purple-dark);
--blockquote-text-color: #868686;
--label-color: var(--purple-lighter-grey);
--blockquote-border-color: var(--accent);
--blockquote-text-color: var(--purple-full-grey);
--link-color: rgb(138, 180, 248);
--link-underline-color: rgb(82, 108, 150);
--button-bg: var(--purple-darkest);
Expand All @@ -39,23 +44,17 @@
var(--black) 0%,
var(--purple-darkest) 100%
);
--shimmer-bg: linear-gradient(
90deg,
var(--purple-darkest) 0%,
var(--accent) 50%,
var(--purple-darkest) 100%
);

--shimmer-bg: #00000000;
/* Sidebar */
--site-title-color: var(--accent);
--site-subtitle-color: #868686;
--btn-backtotop-color: var(--text-color);
--sidebar-bg: var(--main-border-color);
--sidebar-border-color: #292929;
--sidebar-muted-color: #868686;
--sidebar-border-color: var(--purple-dark-mid);
--sidebar-muted-color: var(--text-color);
--sidebar-active-color: rgb(255, 255, 255, 0.95);
--sidebar-hover-bg: #262626;
--sidebar-btn-bg: #232328;
--sidebar-btn-color: #787878;
--sidebar-hover-bg: var(--purple-dark-mid);
--sidebar-btn-bg: var(--purple-dark);
--sidebar-btn-color: var(--purple-dark);
--avatar-border-color: rgb(206, 206, 206, 0.9);
--avatar-bg-color: var(--black);

Expand All @@ -67,9 +66,9 @@
--input-focus-border-color: var(--accent);

/* Home page */
--post-list-text-color: rgb(175, 176, 177);
--post-list-text-color: var(--purple-dark);
--btn-patinator-text-color: var(--text-color);
--btn-paginator-hover-color: #2e2e2e;
--btn-paginator-hover-color: var(--purple-dark);

/* Posts */
--toc-highlight: rgb(116, 178, 243);
Expand All @@ -81,8 +80,8 @@
--footnote-target-bg: rgb(63, 81, 181);
--btn-share-color: #6c757d;
--btn-share-hover-color: #bfc1ca;
--card-bg: #1e1e1e;
--card-hovor-bg: #464d51;
--card-bg: var(--purple-darker);
--card-hovor-bg: var(--accent);
--card-shadow: rgb(21, 21, 21, 0.72) 0 6px 18px 0,
rgb(137, 135, 135, 0.24) 0 0 0 1px;
--kbd-wrap-color: #6a6a6a;
Expand Down
4 changes: 2 additions & 2 deletions _site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ <h2 class="panel-heading">Recently Updated</h2>


<li class="text-truncate lh-lg">
<a href="/posts/hyper-light-drifter/">Hyper Light Drifter :: Moribundity :: Death without a Meaning</a>
<a href="/posts/Hyper_Light_Drifter/">Hyper Light Drifter :: Moribundity :: Death without a Meaning</a>
</li>


Expand Down Expand Up @@ -679,7 +679,7 @@ <h2 class="panel-heading">Trending Tags</h2>
"
>
<p>©
<time>2024</time>
<time>2025</time>


<a href="https://twitter.com/MoutonDemocrate">MoutonDemocrate</a>.
Expand Down
8 changes: 4 additions & 4 deletions _site/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
<meta property="og:url" content="http://localhost:4000/about/" />
<meta property="og:site_name" content="Mouton’s Mind Palace" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2024-11-16T16:27:19+01:00" />
<meta property="article:published_time" content="2025-03-07T02:35:13+01:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="About" />
<meta name="twitter:site" content="@MoutonDemocrate" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","dateModified":"2024-11-16T16:27:19+01:00","datePublished":"2024-11-16T16:27:19+01:00","description":"Add Markdown syntax content to file _tabs/about.md and it will show up on this page.","headline":"About","name":"MoutonDemocrate","sameAs":["https://twitter.com/MoutonDemocrate","https://github.com/MoutonDemocrate"],"url":"http://localhost:4000/about/"}</script>
{"@context":"https://schema.org","@type":"WebSite","dateModified":"2025-03-07T02:35:13+01:00","datePublished":"2025-03-07T02:35:13+01:00","description":"Add Markdown syntax content to file _tabs/about.md and it will show up on this page.","headline":"About","name":"MoutonDemocrate","sameAs":["https://twitter.com/MoutonDemocrate","https://github.com/MoutonDemocrate"],"url":"http://localhost:4000/about/"}</script>
<!-- End Jekyll SEO tag -->


Expand Down Expand Up @@ -1674,7 +1674,7 @@ <h2 class="panel-heading">Recently Updated</h2>


<li class="text-truncate lh-lg">
<a href="/posts/hyper-light-drifter/">Hyper Light Drifter :: Moribundity :: Death without a Meaning</a>
<a href="/posts/Hyper_Light_Drifter/">Hyper Light Drifter :: Moribundity :: Death without a Meaning</a>
</li>


Expand Down Expand Up @@ -1764,7 +1764,7 @@ <h2 class="panel-heading">Trending Tags</h2>
"
>
<p>©
<time>2024</time>
<time>2025</time>


<a href="https://twitter.com/MoutonDemocrate">MoutonDemocrate</a>.
Expand Down
Loading

0 comments on commit ad54768

Please sign in to comment.