Skip to content

Commit cf4872d

Browse files
committed
Rewrite website with Vitepress
1 parent 5c64610 commit cf4872d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3104
-8664
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ jobs:
7171
cache-dependency-path: website/package-lock.json
7272
- run: npm ci
7373
- run: npm run fmt:check
74-
- run: npm run lint

.github/workflows/website-deploy.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ jobs:
3434
- uses: actions/configure-pages@v3
3535
- run: npm ci
3636
- run: npm run build
37-
- run: npm run export
3837
- name: Upload GitHub Pages artifact
3938
uses: actions/upload-pages-artifact@v2
4039
with:
41-
path: website/out
40+
path: website/.vitepress/dist
4241

4342
deploy:
4443
environment:

MAINTAINING.md

-6
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ This version of Scarb comes with Cairo [`vX.Y.Z`](https://github.com/starkware-l
9191
**Full Changelog**: https://github.com/software-mansion/scarb/compare/...
9292
```
9393

94-
#### Banner on Scarb website
95-
96-
If this is a significant release, you might consider showing a banner on the website.
97-
To do this, take a look at the [`theme.config.tsx`](./website/theme.config.tsx) file, do necessary changes,
98-
commit and trigger manually the [Website Deploy] workflow.
99-
10094
### Announce release on social media
10195

10296
#### Twitter

website/.eslintrc.json

-3
This file was deleted.

website/.gitignore

+57-33
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,60 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# next.js
12-
/.next/
13-
/out/
14-
15-
# production
16-
/build
17-
18-
# misc
19-
.DS_Store
20-
*.pem
21-
22-
# debug
1+
*.lcov
2+
*.log
3+
*.pid
4+
*.pid.lock
5+
*.seed
6+
*.tgz
7+
*.tsbuildinfo
8+
.cache
9+
.cache/
10+
.docusaurus
11+
.dynamodb/
12+
.env
13+
.env.development.local
14+
.env.local
15+
.env.production.local
16+
.env.test.local
17+
.eslintcache
18+
.fusebox/
19+
.grunt
20+
.lock-wscript
21+
.next
22+
.node_repl_history
23+
.npm
24+
.nuxt
25+
.nyc_output
26+
.parcel-cache
27+
.pnp.*
28+
.pnpm-debug.log*
29+
.rpt2_cache/
30+
.rts2_cache_cjs/
31+
.rts2_cache_es/
32+
.rts2_cache_umd/
33+
.serverless/
34+
.stylelintcache
35+
.temp
36+
.tern-port
37+
.vitepress/cache
38+
.vscode-test
39+
.vuepress/dist
40+
.yarn-integrity
41+
.yarn/build-state.yml
42+
.yarn/cache
43+
.yarn/install-state.gz
44+
.yarn/unplugged
45+
bower_components
46+
build/Release
47+
coverage
48+
dist
49+
jspm_packages/
50+
lerna-debug.log*
51+
lib-cov
52+
logs
53+
node_modules/
2354
npm-debug.log*
55+
out
56+
pids
57+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
58+
web_modules/
2459
yarn-debug.log*
2560
yarn-error.log*
26-
.pnpm-debug.log*
27-
28-
# local env files
29-
.env*.local
30-
31-
# vercel
32-
.vercel
33-
34-
# typescript
35-
*.tsbuildinfo
36-
next-env.d.ts

website/.prettierignore

-2
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<script setup>
2+
defineProps(["release"]);
3+
</script>
4+
5+
<template>
6+
<table>
7+
<thead>
8+
<tr>
9+
<th>File name</th>
10+
<th>Kind</th>
11+
<th>OS</th>
12+
<th>Arch</th>
13+
</tr>
14+
</thead>
15+
<tbody>
16+
<tr v-for="asset in release.assets" :key="asset.name">
17+
<td>
18+
<a :href="asset.downloadUrl" target="_blank" rel="noreferrer">
19+
{{ asset.name }}
20+
</a>
21+
</td>
22+
<td>{{ asset.kind }}</td>
23+
<td>{{ asset.os }}</td>
24+
<td>{{ asset.arch }}</td>
25+
</tr>
26+
</tbody>
27+
</table>
28+
</template>
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup>
2+
defineProps(["href"]);
3+
</script>
4+
5+
<template>
6+
<p :class="$style.p">
7+
<a :href="$props.href" target="_blank" rel="noreferrer">
8+
<slot />
9+
10+
</a>
11+
</p>
12+
</template>
13+
14+
<style module>
15+
.p {
16+
font-size: 1.1em;
17+
line-height: 2.5em !important;
18+
text-align: center;
19+
}
20+
</style>
+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<script setup>
2+
import Terminal from "./home/Terminal.vue";
3+
import Features from "./home/Features.vue";
4+
import { defineClientComponent } from "vitepress";
5+
6+
const Download = defineClientComponent(() => import("./home/Download.vue"));
7+
</script>
8+
9+
<template>
10+
<div class="container hero">
11+
<h1 class="tagline">
12+
The build toolchain and package manager for Cairo and Starknet ecosystems
13+
</h1>
14+
<Download />
15+
</div>
16+
17+
<div class="features-bg">
18+
<div class="container features-container">
19+
<Terminal class="terminal" />
20+
<Features />
21+
</div>
22+
</div>
23+
24+
<div class="container vp-doc">
25+
<h2 id="community" tabindex="-1">Community</h2>
26+
<p>
27+
Scarb is created by the same team at
28+
<a href="https://swmansion.com" rel="noreferrer" target="_blank"
29+
>Software Mansion</a
30+
>
31+
that is behind
32+
<a
33+
href="https://foundry-rs.github.io/starknet-foundry"
34+
rel="noreferrer"
35+
target="_blank"
36+
>Starknet Foundry</a
37+
>, the Cairo and Starknet testing framework. We partnered with
38+
<a href="https://starkware.co" rel="noreferrer" target="_blank"
39+
>Starkware</a
40+
>, the creators of
41+
<a href="https://www.cairo-lang.org" rel="noreferrer" target="_blank"
42+
>Cairo</a
43+
>
44+
and
45+
<a href="https://www.starknet.io" rel="noreferrer" target="_blank"
46+
>Starknet</a
47+
>, while designing this tool.
48+
</p>
49+
<p>
50+
Feel free to join
51+
<a
52+
href="https://github.com/software-mansion/scarb/discussions"
53+
rel="noreferrer"
54+
target="_blank"
55+
>discussions on GitHub</a
56+
>
57+
or chat with us on our channel on Starknet's
58+
<a href="https://discord.gg/KZWaFtPZJf" rel="noreferrer" target="_blank"
59+
>Discord</a
60+
>!
61+
</p>
62+
</div>
63+
</template>
64+
65+
<style scoped>
66+
.container {
67+
margin: 0 auto;
68+
padding: 32px 24px;
69+
width: 100%;
70+
}
71+
72+
@media (min-width: 640px) {
73+
.container {
74+
max-width: 640px;
75+
}
76+
}
77+
78+
@media (min-width: 768px) {
79+
.container {
80+
max-width: 768px;
81+
}
82+
}
83+
84+
@media (min-width: 1024px) {
85+
.container {
86+
max-width: 1024px;
87+
}
88+
}
89+
90+
/*
91+
@media (min-width: 1280px) {
92+
.container {
93+
max-width: 1280px;
94+
}
95+
}
96+
97+
@media (min-width: 1440px) {
98+
.container {
99+
max-width: 1440px;
100+
}
101+
}
102+
*/
103+
104+
.hero {
105+
display: flex;
106+
flex-direction: column;
107+
gap: 40px;
108+
}
109+
110+
.features-bg {
111+
background: linear-gradient(
112+
to bottom,
113+
transparent 4.5rem,
114+
var(--vp-c-bg-alt) 4.5rem
115+
);
116+
}
117+
118+
.features-container {
119+
display: flex;
120+
flex-direction: column;
121+
gap: 40px;
122+
}
123+
124+
.tagline {
125+
color: var(--vp-c-text-2);
126+
font-family: var(--swm-font-family-geometric-humanist);
127+
font-size: 2.5em;
128+
font-weight: 400;
129+
line-height: 1.2;
130+
margin: 0 auto;
131+
max-width: 48rem;
132+
text-align: center;
133+
}
134+
135+
.vp-doc {
136+
padding: 32px 24px 96px;
137+
}
138+
139+
.vp-doc > h2 {
140+
border: none;
141+
}
142+
143+
.vp-doc > :first-child {
144+
margin-top: 0;
145+
}
146+
</style>
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script setup>
2+
defineProps({
3+
lang: String,
4+
src: String,
5+
});
6+
</script>
7+
8+
<template>
9+
<div :class="`language-${$props.lang}`">
10+
<button class="copy" title="Copy Code"></button>
11+
<span class="lang">{{ $props.lang }}</span>
12+
<!-- NOTE: Whitespace is important here. -->
13+
<pre
14+
class="shiki"
15+
><code v-for="line in $props.src.split('\n')"><span class="line">{{ line }}</span></code></pre>
16+
</div>
17+
</template>
18+
19+
<style module></style>

0 commit comments

Comments
 (0)