Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve vertical and horizontal article layout #4

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/content/layouts/article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="lg:flex lg:flex-row-reverse">
<aside
class="
hidden lg:block lg:sticky lg:self-start lg:flex-auto ml-20 mt-1 top-[114px]
hidden lg:block lg:sticky lg:self-start lg:flex-1 ml-16 mt-1 top-[114px]
"
>
<h2 class="font-semibold mb-4 text-sm leading-6 uppercase tracking-widest">Table of Contents</h2>
Expand All @@ -40,9 +40,7 @@
</nav>
</aside>
<article
class="
max-w-screen-md prose dark:prose-invert sm:prose-lg lg:prose-xl
"
class="prose dark:prose-invert sm:prose-lg lg:prose-xl"
>
<h2
id="introduction"
Expand Down
10 changes: 5 additions & 5 deletions app/javascript/css/themes/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
.dark[data-joy-theme='dracula'] {
--theme-title: var(--dracula-cyan);
--theme-base: var(--dracula-black);
--theme-bg-subtle: var(--violet-2);
--theme-bg: var(--violet-3);
--theme-bg-hover: var(--violet-4);
--theme-bg-active: var(--violet-5);
--theme-text: var(--violet-11);
--theme-bg-subtle: var(--dracula-black-secondary);
--theme-bg: var(--dracula-black-secondary);
--theme-bg-hover: var(--dracula-purple-200);
--theme-bg-active: var(--dracula-purple);
--theme-text: var(--dracula-purple);
--theme-text-contrast: var(--violet-12);
--theme-link: var(--dracula-pink);
--theme-link-hover: var(--dracula-pink-secondary);
Expand Down
3 changes: 3 additions & 0 deletions app/javascript/css/themes/typography.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* Typography overrides */
.prose {
max-width: min(100%, 712px);
}
.prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
font-weight: 500;
text-decoration: none;
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<main
class="
w-full flex flex-col flex-grow
mx-auto mb-96
mx-auto mb-16 min-h-[32vh]
"
>
<%= yield %>
Expand Down
Loading