Skip to content

Commit 5ce6dc5

Browse files
Merge pull request #59 from RomanHauksson/demo-139-full-bleed-layout
Demo-139-full-bleed-layout
2 parents e76c825 + 76a4d50 commit 5ce6dc5

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

src/components/HighlightedSection.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
33
---
44

5-
<section
6-
class="relative right-1/2 left-1/2 -mx-6 -mr-[50vw] -ml-[50vw] w-screen max-w-none bg-zinc-200 py-8 dark:bg-zinc-800"
7-
>
5+
<section class="full-width bg-zinc-200 py-8 dark:bg-zinc-800">
86
<div
97
class="mx-auto max-w-[50rem] px-6 [&>:first-child]:mt-0 [&>:last-child]:mb-0"
108
>

src/components/Table.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div class="overflow-auto">
2-
<table class="w-full">
1+
<div class="full-width overflow-auto">
2+
<table class="mx-auto w-auto">
33
<slot />
44
</table>
55
</div>

src/pages/index.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ const prefix = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
6161
<title>{title}</title>
6262
</head>
6363
<body
64-
class="prose prose-lg prose-zinc dark:prose-invert prose-a:text-blue-500 prose-a:dark:text-blue-300 prose-a:no-underline prose-a:hover:underline prose-a:font-normal prose-code:bg-zinc-200 prose-code:dark:bg-zinc-800 prose-code:text-zinc-800 prose-code:dark:text-zinc-200 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:font-medium prose-code:before:content-none prose-code:after:content-none mx-auto max-w-[50rem] bg-white px-6 pt-16 pb-6 font-(family-name:--font-noto-sans) dark:bg-zinc-900"
64+
class="prose prose-lg prose-zinc dark:prose-invert prose-a:text-blue-500 prose-a:dark:text-blue-300 prose-a:no-underline prose-a:hover:underline prose-a:font-normal prose-code:bg-zinc-200 prose-code:dark:bg-zinc-800 prose-code:text-zinc-800 prose-code:dark:text-zinc-200 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:font-medium prose-code:before:content-none prose-code:after:content-none max-w-none bg-white pt-16 pb-6 font-(family-name:--font-noto-sans) dark:bg-zinc-900"
6565
>
66-
<header class="mb-12">
67-
<h1 class="text-center text-5xl font-medium">{title}</h1>
66+
<header class="mx-auto mb-12 max-w-[50rem] px-6 text-center">
67+
<h1 class="text-5xl font-medium">{title}</h1>
6868
<div class="flex flex-col items-center gap-6">
6969
<Authors authors={authors} />
7070
{conference && <div>{conference}</div>}
@@ -75,7 +75,7 @@ const prefix = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
7575
<main>
7676
<Content components={{ table: Table }} />
7777
</main>
78-
<footer class="flex w-full justify-center">
78+
<footer class="mx-auto max-w-[50rem] px-6 text-center">
7979
<p class="prose-sm text-center">
8080
This page was built using <a
8181
href="https://github.com/RomanHauksson/academic-project-astro-template"

src/paper.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ Use the two columns component to display two columns of content. In this example
107107
</Figure>
108108
</TwoColumns>
109109

110-
## LaTeX
110+
## $\LaTeX$
111111

112-
You can also add LaTeX formulas, rendered during the build process using [KaTeX](https://katex.org/) so they're quick to load for visitors of your project page. You can write them inline, like this: $a^2 + b^2 = c^2$. Or, you can write them as a block:
112+
You can also add $\LaTeX$ formulas, rendered during the build process using [$\KaTeX$](https://katex.org/) so they're quick to load for visitors of your project page. You can write them inline, like this: $a^2 + b^2 = c^2$. Or, you can write them as a block:
113113

114114
$$
115115
\int_a^b f(x) dx

src/styles/global.css

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,31 @@
1414

1515
.expressive-code {
1616
width: 100%;
17-
}
17+
}
18+
19+
body > main > * {
20+
max-width: 50rem;
21+
padding-inline: 1.5rem;
22+
margin-inline: auto;
23+
}
24+
25+
.full-width {
26+
max-width: none;
27+
}
28+
29+
.katex-display {
30+
overflow: auto hidden;
31+
padding-inline: 0;
32+
}
33+
34+
.katex-display,
35+
.katex-display > .katex,
36+
.katex-display > .katex > .katex-html {
37+
max-width: none;
38+
}
39+
40+
.katex-display > .katex > .katex-html {
41+
padding-inline: 1.5rem;
42+
width: max-content;
43+
margin-inline: auto;
44+
}

0 commit comments

Comments
 (0)