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",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coryd.dev",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minisearch": "^7.1.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.2",
|
||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
|
|
|
@ -26,6 +26,8 @@ SELECT
|
|||
json_agg(
|
||||
CASE WHEN pb.collection = 'youtube_player' THEN
|
||||
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
|
||||
json_build_object('type', pb.collection, 'url', gb.url)
|
||||
WHEN pb.collection = 'npm_banner' THEN
|
||||
|
@ -43,8 +45,10 @@ SELECT
|
|||
END)
|
||||
FROM
|
||||
posts_blocks pb
|
||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||
AND yp.id = pb.item::integer
|
||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||
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'
|
||||
AND gb.id = pb.item::integer
|
||||
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
||||
|
|
|
@ -11,6 +11,8 @@ SELECT
|
|||
json_agg(
|
||||
CASE WHEN pb.collection = 'youtube_player' THEN
|
||||
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
|
||||
json_build_object('type', pb.collection, 'url', gb.url)
|
||||
WHEN pb.collection = 'npm_banner' THEN
|
||||
|
@ -28,8 +30,10 @@ SELECT
|
|||
END ORDER BY pb.sort)
|
||||
FROM
|
||||
pages_blocks pb
|
||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||
AND yp.id = pb.item::integer
|
||||
LEFT JOIN youtube_player yp ON pb.collection = 'youtube_player'
|
||||
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'
|
||||
AND gb.id = pb.item::integer
|
||||
LEFT JOIN npm_banner nb ON pb.collection = 'npm_banner'
|
||||
|
|
|
@ -117,6 +117,7 @@ ol {
|
|||
.device-watch,
|
||||
.error,
|
||||
.favorite,
|
||||
.forgejo,
|
||||
.github,
|
||||
.headphones,
|
||||
.heart-handshake,
|
||||
|
@ -175,6 +176,10 @@ ol {
|
|||
&.favorite {
|
||||
--section-color: var(--favorite);
|
||||
}
|
||||
&.git-merge,
|
||||
&.forgejo {
|
||||
--section-color: var(--brand-forgejo);
|
||||
}
|
||||
&.headphones {
|
||||
--section-color: var(--music);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
--background-color-inverted: light-dark(var(--color-darkest), var(--color-lightest));
|
||||
|
||||
--brand-buy-me-a-coffee: light-dark(#9500ff, #ffdd00);
|
||||
--brand-forgejo: light-dark(#d40000, #ff6600);
|
||||
--brand-github: light-dark(#333, #f5f5f5);
|
||||
--brand-mastodon: light-dark(#563acc, #858afa);
|
||||
--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",
|
||||
url:block.url
|
||||
%}
|
||||
{%- when "forgejo_banner" -%}
|
||||
{% render "blocks/banners/forgejo.liquid",
|
||||
url:block.url
|
||||
%}
|
||||
{%- when "github_banner" -%}
|
||||
{% render "blocks/banners/github.liquid",
|
||||
url:block.url
|
||||
|
|
Loading…
Reference in a new issue