From b3134c249e3d277723a576c839d700eb381d3393 Mon Sep 17 00:00:00 2001 From: Michal Vanko Date: Fri, 12 Jul 2024 23:26:16 +0200 Subject: [PATCH] Socials tiktok and twitch --- axum_server/styles/output.css | 121 +++++++++++++----- .../templates/components/social_card.html | 16 +++ axum_server/templates/index.html | 60 +++++++-- 3 files changed, 152 insertions(+), 45 deletions(-) create mode 100644 axum_server/templates/components/social_card.html diff --git a/axum_server/styles/output.css b/axum_server/styles/output.css index 8a585a0..b822712 100644 --- a/axum_server/styles/output.css +++ b/axum_server/styles/output.css @@ -570,6 +570,10 @@ video { margin: 1.25rem; } +.m-0 { + margin: 0px; +} + .mx-0 { margin-left: 0px; margin-right: 0px; @@ -610,16 +614,16 @@ video { margin-bottom: 0.75rem; } -.my-6 { - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} - .my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; } +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + .mb-1 { margin-bottom: 0.25rem; } @@ -636,6 +640,10 @@ video { margin-top: 0.75rem; } +.mb-2 { + margin-bottom: 0.5rem; +} + .block { display: block; } @@ -672,10 +680,34 @@ video { height: 1.5rem; } +.h-4 { + height: 1rem; +} + +.h-8 { + height: 2rem; +} + +.h-7 { + height: 1.75rem; +} + +.h-64 { + height: 16rem; +} + .min-h-full { min-height: 100%; } +.min-h-8 { + min-height: 2rem; +} + +.min-h-80 { + min-height: 20rem; +} + .w-12 { width: 3rem; } @@ -684,42 +716,30 @@ video { width: 1.5rem; } -.flex-grow { - flex-grow: 1; +.w-4 { + width: 1rem; } -.auto-cols-auto { - grid-auto-columns: auto; +.w-8 { + width: 2rem; +} + +.w-7 { + width: 1.75rem; +} + +.flex-grow { + flex-grow: 1; } .grid-flow-col { grid-auto-flow: column; } -.grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.grid-cols-\[minmax\(0\2c 1fr\)_auto\] { - grid-template-columns: minmax(0,1fr) auto; -} - -.grid-cols-\[1fr\2c 2fx\] { - grid-template-columns: 1fr 2fx; -} - -.grid-cols-\[1fr_2fx\] { - grid-template-columns: 1fr 2fx; -} - .grid-cols-\[1fr_2fr\] { grid-template-columns: 1fr 2fr; } -.grid-rows-3 { - grid-template-rows: repeat(3, minmax(0, 1fr)); -} - .flex-row { flex-direction: row; } @@ -752,6 +772,14 @@ video { gap: 1rem; } +.gap-2 { + gap: 0.5rem; +} + +.overflow-hidden { + overflow: hidden; +} + .rounded { border-radius: 0.25rem; } @@ -760,6 +788,10 @@ video { border-radius: 9999px; } +.rounded-md { + border-radius: 0.375rem; +} + .border { border-width: 1px; } @@ -793,11 +825,26 @@ video { background-color: rgb(30 64 175 / var(--tw-bg-opacity)); } +.bg-pink-400 { + --tw-bg-opacity: 1; + background-color: rgb(244 114 182 / var(--tw-bg-opacity)); +} + .bg-white { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } +.bg-pink-200 { + --tw-bg-opacity: 1; + background-color: rgb(251 207 232 / var(--tw-bg-opacity)); +} + +.bg-pink-100 { + --tw-bg-opacity: 1; + background-color: rgb(252 231 243 / var(--tw-bg-opacity)); +} + .fill-blue-950 { fill: #172554; } @@ -814,6 +861,10 @@ video { padding: 0.75rem; } +.p-4 { + padding: 1rem; +} + .px-4 { padding-left: 1rem; padding-right: 1rem; @@ -833,6 +884,10 @@ video { padding-right: 0.75rem; } +.text-center { + text-align: center; +} + .text-right { text-align: right; } @@ -867,6 +922,10 @@ video { line-height: 1.25rem; } +.font-bold { + font-weight: 700; +} + .font-extrabold { font-weight: 800; } @@ -879,10 +938,6 @@ video { font-weight: 600; } -.font-bold { - font-weight: 700; -} - .capitalize { text-transform: capitalize; } diff --git a/axum_server/templates/components/social_card.html b/axum_server/templates/components/social_card.html new file mode 100644 index 0000000..4b2d524 --- /dev/null +++ b/axum_server/templates/components/social_card.html @@ -0,0 +1,16 @@ +{% macro social_card_start(svg, heading) %} + +
+
+ +

{{heading|safe}}

+
+ +{% endmacro %} + +{% macro social_card_end() %} +
+ +{% endmacro %} diff --git a/axum_server/templates/index.html b/axum_server/templates/index.html index 119014c..cf87b1f 100644 --- a/axum_server/templates/index.html +++ b/axum_server/templates/index.html @@ -1,4 +1,5 @@ {%- import "components/talent_card.html" as tc -%} +{%- import "components/social_card.html" as sc -%} {% extends "base.html" %} {% block title %}Introduction{% endblock %} @@ -39,7 +40,7 @@

Blog

-
+
    {% for tag in blog_tags %}
  • @@ -60,21 +61,56 @@
+
+

Socials

+ {% call sc::social_card_start("twitch", "I stream (almost) regularly on twitch.tv") %} + +
+ + {% call sc::social_card_end() %} + + {% call sc::social_card_start("tiktok", "Highlight can be found on TikTok") %} + +
+
+ @michalvankodev +
+
+ + {% call sc::social_card_end() %} +
+

Follow my twitch stream

-