Compare commits

...

2 commits

Author SHA1 Message Date
Adam
ee4b2c0ced shadows for articles 2024-01-19 22:36:03 -05:00
Adam
2119658560 make code block behave on mobile 2024-01-19 22:32:59 -05:00
2 changed files with 9 additions and 3 deletions

View file

@ -12,7 +12,8 @@ pub struct ArticleData {
#[component]
pub fn Article(data: ArticleData) -> impl IntoView {
view! {
<article class="p-7 my-5 mx-auto w-11/12 max-w-screen-xl bg-opacity-10 rounded-md bg-zinc-700 shadow-1g">
// Shadow styling is in main .css file
<article class="p-7 my-5 mx-auto w-11/12 max-w-screen-xl bg-opacity-10 rounded-md bg-zinc-700">
<h1 class="text-3xl font-light text-orange-600 capitalize max-6-xs">{&data.title}</h1>
<hr class="opacity-50"/>
<span class="pt-0 pb-3.5 text-xs opacity-50 m-t">{&data.date}</span>

View file

@ -19,6 +19,11 @@ nav li:has(> a[aria-current="page"]) {
@apply border-b-orange-700 border-b-2;
}
/* Shadows don't work inline for some reason */
article {
@apply shadow-lg shadow-black;
}
/* for innerHTML articles */
article p {
@apply mt-5 indent-4;
@ -76,9 +81,9 @@ article ol {
}
.code-block {
@apply bg-black bg-opacity-40 p-3 rounded-lg shadow-lg shadow-black;
@apply bg-black bg-opacity-50 p-3 rounded-lg shadow-lg shadow-black max-w-fit m-auto;
}
.code-block-inner {
@apply p-2;
@apply p-2 mt-2 text-sm border-t-gray-500 overflow-x-scroll border-t-2;
}