feat(forgejo.liquid): add forgejo repo banner block
This commit is contained in:
parent
835e49a89e
commit
d5c31a87d3
8 changed files with 28 additions and 7 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "1.0.2",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "1.0.2",
|
"version": "1.1.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minisearch": "^7.1.2",
|
"minisearch": "^7.1.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "1.0.2",
|
"version": "1.1.2",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -26,6 +26,8 @@ SELECT
|
||||||
json_agg(
|
json_agg(
|
||||||
CASE WHEN pb.collection = 'youtube_player' THEN
|
CASE WHEN pb.collection = 'youtube_player' THEN
|
||||||
json_build_object('type', pb.collection, 'url', yp.url)
|
json_build_object('type', pb.collection, 'url', yp.url)
|
||||||
|
WHEN pb.collection = 'forgejo_banner' THEN
|
||||||
|
json_build_object('type', pb.collection, 'url', fb.url)
|
||||||
WHEN pb.collection = 'github_banner' THEN
|
WHEN pb.collection = 'github_banner' THEN
|
||||||
json_build_object('type', pb.collection, 'url', gb.url)
|
json_build_object('type', pb.collection, 'url', gb.url)
|
||||||
WHEN pb.collection = 'npm_banner' THEN
|
WHEN pb.collection = 'npm_banner' THEN
|
||||||
|
@ -45,6 +47,8 @@ SELECT
|
||||||
posts_blocks pb
|
posts_blocks pb
|
||||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||||
AND yp.id = pb.item::integer
|
AND yp.id = pb.item::integer
|
||||||
|
LEFT JOIN forgejo_banner fb ON pb.collection = 'forgejo_banner'
|
||||||
|
AND fb.id = pb.item::integer
|
||||||
LEFT JOIN github_banner gb ON pb.collection = 'github_banner'
|
LEFT JOIN github_banner gb ON pb.collection = 'github_banner'
|
||||||
AND gb.id = pb.item::integer
|
AND gb.id = pb.item::integer
|
||||||
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
||||||
|
|
|
@ -11,6 +11,8 @@ SELECT
|
||||||
json_agg(
|
json_agg(
|
||||||
CASE WHEN pb.collection = 'youtube_player' THEN
|
CASE WHEN pb.collection = 'youtube_player' THEN
|
||||||
json_build_object('type', pb.collection, 'url', yp.url)
|
json_build_object('type', pb.collection, 'url', yp.url)
|
||||||
|
WHEN pb.collection = 'forgejo_banner' THEN
|
||||||
|
json_build_object('type', pb.collection, 'url', fb.url)
|
||||||
WHEN pb.collection = 'github_banner' THEN
|
WHEN pb.collection = 'github_banner' THEN
|
||||||
json_build_object('type', pb.collection, 'url', gb.url)
|
json_build_object('type', pb.collection, 'url', gb.url)
|
||||||
WHEN pb.collection = 'npm_banner' THEN
|
WHEN pb.collection = 'npm_banner' THEN
|
||||||
|
@ -30,6 +32,8 @@ SELECT
|
||||||
pages_blocks pb
|
pages_blocks pb
|
||||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||||
AND yp.id = pb.item::integer
|
AND yp.id = pb.item::integer
|
||||||
|
LEFT JOIN forgejo_banner fb ON pb.collection = 'forgejo_banner'
|
||||||
|
AND fb.id = pb.item::integer
|
||||||
LEFT JOIN github_banner gb ON pb.collection = 'github_banner'
|
LEFT JOIN github_banner gb ON pb.collection = 'github_banner'
|
||||||
AND gb.id = pb.item::integer
|
AND gb.id = pb.item::integer
|
||||||
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
||||||
|
|
|
@ -117,6 +117,7 @@ ol {
|
||||||
.device-watch,
|
.device-watch,
|
||||||
.error,
|
.error,
|
||||||
.favorite,
|
.favorite,
|
||||||
|
.forgejo,
|
||||||
.github,
|
.github,
|
||||||
.headphones,
|
.headphones,
|
||||||
.heart-handshake,
|
.heart-handshake,
|
||||||
|
@ -175,6 +176,10 @@ ol {
|
||||||
&.favorite {
|
&.favorite {
|
||||||
--section-color: var(--favorite);
|
--section-color: var(--favorite);
|
||||||
}
|
}
|
||||||
|
&.git-merge,
|
||||||
|
&.forgejo {
|
||||||
|
--section-color: var(--brand-forgejo);
|
||||||
|
}
|
||||||
&.headphones {
|
&.headphones {
|
||||||
--section-color: var(--music);
|
--section-color: var(--music);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
--background-color-inverted: light-dark(var(--color-darkest), var(--color-lightest));
|
--background-color-inverted: light-dark(var(--color-darkest), var(--color-lightest));
|
||||||
|
|
||||||
--brand-buy-me-a-coffee: light-dark(#9500ff, #ffdd00);
|
--brand-buy-me-a-coffee: light-dark(#9500ff, #ffdd00);
|
||||||
|
--brand-forgejo: light-dark(#d40000, #ff6600);
|
||||||
--brand-github: light-dark(#333, #f5f5f5);
|
--brand-github: light-dark(#333, #f5f5f5);
|
||||||
--brand-mastodon: light-dark(#563acc, #858afa);
|
--brand-mastodon: light-dark(#563acc, #858afa);
|
||||||
--brand-npm: #cb3837;
|
--brand-npm: #cb3837;
|
||||||
|
|
3
src/includes/blocks/banners/forgejo.liquid
Normal file
3
src/includes/blocks/banners/forgejo.liquid
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="banner forgejo">
|
||||||
|
<p>{% tablericon "git-merge" %} Take a look at <a href="{{ url }}">the repository for this project</a> on my <a href="https://forgejo.org">Forgejo</a> instance.</p>
|
||||||
|
</div>
|
|
@ -4,6 +4,10 @@
|
||||||
{% render "blocks/youtube-player.liquid",
|
{% render "blocks/youtube-player.liquid",
|
||||||
url:block.url
|
url:block.url
|
||||||
%}
|
%}
|
||||||
|
{%- when "forgejo_banner" -%}
|
||||||
|
{% render "blocks/banners/forgejo.liquid",
|
||||||
|
url:block.url
|
||||||
|
%}
|
||||||
{%- when "github_banner" -%}
|
{%- when "github_banner" -%}
|
||||||
{% render "blocks/banners/github.liquid",
|
{% render "blocks/banners/github.liquid",
|
||||||
url:block.url
|
url:block.url
|
||||||
|
|
Loading…
Reference in a new issue