Skip to content

Commit 78338cc

Browse files
authored
Make sponsors section responsive (#157)
1 parent df59ee4 commit 78338cc

File tree

4 files changed

+14
-142
lines changed

4 files changed

+14
-142
lines changed

.vitepress/config/shared.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { dirname, resolve } from "node:path";
22
import { fileURLToPath } from "node:url";
33
import { HeadConfig, defineConfig } from "vitepress";
4-
import svgLoader from "vite-svg-loader";
54

65
const head: HeadConfig[] = [
76
[
@@ -93,6 +92,5 @@ export const sharedConfig = defineConfig({
9392
},
9493
],
9594
},
96-
plugins: [svgLoader()],
9795
},
9896
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"textlint-rule-terminology": "^5.0.11",
3333
"tsx": "^4.15.1",
3434
"typescript": "~5.4.5",
35-
"vite-svg-loader": "^5.1.0",
3635
"vitepress": "1.2.3",
3736
"vue": "^3.4.27"
3837
},

pnpm-lock.yaml

Lines changed: 0 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,27 @@ features:
4141
---
4242

4343
<script setup>
44-
import Sponsors from '../public/sponsors.svg?component'
44+
import SponsorsSVG from '../public/sponsors.svg?raw'
4545
</script>
4646

47-
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
47+
<div class="Sponsors">
4848
<h2>Sponsored by</h2>
49-
<Sponsors />
49+
<div v-html="SponsorsSVG"></div>
5050
</div>
5151

5252
<style>
5353
.VPHero .VPImage.image-src {
5454
max-width: 90%;
5555
}
56+
57+
.Sponsors {
58+
display: grid;
59+
justify-items: center;
60+
61+
/* Support narrow viewport */
62+
svg {
63+
width: 100%;
64+
height: auto;
65+
}
66+
}
5667
</style>

0 commit comments

Comments
 (0)