fix padding
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Michael Zhang 2023-09-01 19:25:56 -05:00
parent 3bf0200e7e
commit 424c056a09
4 changed files with 22 additions and 4 deletions

6
package-lock.json generated
View file

@ -15,6 +15,7 @@
"astro-diagram": "^0.7.0", "astro-diagram": "^0.7.0",
"astro-imagetools": "^0.9.0", "astro-imagetools": "^0.9.0",
"astro-remark-description": "^1.0.1", "astro-remark-description": "^1.0.1",
"classnames": "^2.3.2",
"fork-awesome": "^1.2.0", "fork-awesome": "^1.2.0",
"katex": "^0.16.8", "katex": "^0.16.8",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
@ -2387,6 +2388,11 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/classnames": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
"integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
},
"node_modules/cli-boxes": { "node_modules/cli-boxes": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",

View file

@ -17,6 +17,7 @@
"astro-diagram": "^0.7.0", "astro-diagram": "^0.7.0",
"astro-imagetools": "^0.9.0", "astro-imagetools": "^0.9.0",
"astro-remark-description": "^1.0.1", "astro-remark-description": "^1.0.1",
"classnames": "^2.3.2",
"fork-awesome": "^1.2.0", "fork-awesome": "^1.2.0",
"katex": "^0.16.8", "katex": "^0.16.8",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",

View file

@ -1,8 +1,16 @@
--- ---
import Footer from "../components/Footer.astro"; import Footer from "../components/Footer.astro";
import LeftNav from "../components/LeftNav.astro"; import LeftNav from "../components/LeftNav.astro";
import classNames from "classnames";
import "../styles/global.scss"; import "../styles/global.scss";
import "katex/dist/katex.min.css"; import "katex/dist/katex.min.css";
interface Props {
pad?: boolean;
}
const { pad } = Astro.props;
const shouldPad = pad === undefined ? true : pad;
--- ---
<!doctype html> <!doctype html>
@ -20,7 +28,7 @@ import "katex/dist/katex.min.css";
<div class="sep"></div> <div class="sep"></div>
<main> <main class={classNames(shouldPad && "pad")}>
<slot /> <slot />
</main> </main>
</div> </div>

View file

@ -99,7 +99,10 @@ pre > code {
.flex-wrapper > main { .flex-wrapper > main {
min-width: 0; min-width: 0;
box-sizing: border-box; box-sizing: border-box;
// padding: 20px;
&.pad {
padding: 20px;
}
} }
@media screen and (max-width: variables.$breakpoint) { @media screen and (max-width: variables.$breakpoint) {
@ -119,7 +122,7 @@ pre > code {
} }
} }
.flex-wrapper > main { .flex-wrapper > main.pad {
// padding-left: 30px; padding-left: 30px;
} }
} }