Skip to content

Commit

Permalink
Adjust some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
janka102 committed Nov 16, 2024
1 parent 6f504b5 commit 4382abf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
}
}
5 changes: 1 addition & 4 deletions src/components/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function Calendar({ current, className }: CalendarProps) {
"flex flex-col items-start w-full h-full px-3 py-2 relative focus:z-10 !text-yeti-dark !no-underline break-words",
current <= day && "bg-white hover:bg-yeti-light-1",
current > day &&
"bg-yeti-dark-1 hover:bg-yeti-dark-3 !text-white",
"bg-yeti-dark-1 hover:bg-yeti-dark-3 !text-white after:absolute after:inset-0 after:bg-strike-out",
i === dates.length - 7 && "rounded-bl-lg",
i === dates.length - 1 && "rounded-br-lg"
)}
Expand All @@ -116,9 +116,6 @@ export function Calendar({ current, className }: CalendarProps) {
{titles[day]}
</div>
)}
{current > day && (
<span className="absolute w-full h-px bg-yeti-dark top-1/2 left-0 right-0 -rotate-45"></span>
)}
</Link>
);
})}
Expand Down
11 changes: 8 additions & 3 deletions src/layouts/LayoutNavbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ const { title, day } = Astro.props;
[&_a]:text-yeti-light-9 [&_a:hover]:underline
[&_pre:has(code)]:p-4 [&_pre]:rounded-lg [&_pre]:!bg-yeti-dark-7 [&_pre]:!text-white
[&_:not(pre)>code]:bg-yeti-dark-7 [&_:not(pre)>code]:text-white [&_:not(pre)>code]:rounded [&_:not(pre)>code]:px-1
[&_ul]:list-disc [&_ul]:list-inside
[&_ol]:list-decimal [&_ol]:list-inside
[&_ul_ul]:ml-4 [&_ul_ol]:ml-4 [&_ol_ol]:ml-4 [&_ol_ul]:ml-4"
[&_ul]:list-disc [&_ul]:pl-5
[&_ol]:list-decimal [&_ol]:pl-5
[&_table]:border [&_table]:border-yeti-dark-1
[&_table]:divide-y-2 [&_table]:divide-yeti-dark-1 [&_table_tbody]:divide-y [&_table_tbody]:divide-yeti-dark-1
[&_table_tr]:divide-x [&_table_tr]:divide-yeti-dark-1
[&_table_tr:nth-child(odd)]:bg-yeti-light-3
[&_table_th]:py-2 [&_table_th]:px-3
[&_table_td]:py-2 [&_table_td]:px-3"
>
<slot />
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/day/[day]/solution/[username].astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getCollection } from "astro:content";
import LayoutNavbarLayout from "../../../../layouts/LayoutNavbar.astro";
import QuestionLayout from "../../../../components/Question.astro";
import Question from "../../../../components/Question.astro";
import { Link } from "../../../../components/Link";
export async function getStaticPaths() {
Expand Down Expand Up @@ -42,7 +42,7 @@ const { Content } = await entry.render();
<Content />
</div>
</div>
<QuestionLayout day={day} title={title}>
<Question day={day} title={title}>
<QuestionContent />
</QuestionLayout>
</Question>
</LayoutNavbarLayout>
3 changes: 3 additions & 0 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export default {
fontFamily: {
poppins: ["Poppins", ...defaultTheme.fontFamily.sans],
},
backgroundImage: ({ theme }) => ({
"strike-out": `linear-gradient(to top left, transparent calc(50% - 1px), ${theme("colors.yeti.dark.7")}, transparent calc(50% + 1px))`,
}),
},
},
plugins: [],
Expand Down

0 comments on commit 4382abf

Please sign in to comment.