Skip to content

Commit a6550e0

Browse files
committed
revise: various changes to front page
1 parent b55145c commit a6550e0

File tree

7 files changed

+71
-34
lines changed

7 files changed

+71
-34
lines changed

.github/workflows/deploy-preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
node-version: "latest"
1616
- run: npm install -g pnpm
1717
- run: pnpm install
18-
- run: sed -i "s|/docs|/docs/branches/${GITHUB_HEAD_REF}|g" nuxt.config.ts; cat nuxt.config.ts
18+
- run: sed -i "s|baseURL: \"/\"|baseURL: \"/docs/branches/${GITHUB_HEAD_REF}\"|g" nuxt.config.ts
1919
- run: pnpm nuxt build --preset github_pages
2020
- run: |
2121
mkdir -p dist/branches/${{ github.head_ref }}

components/ContextMenu.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<nav>
3-
<div id="links">
3+
<div class="links">
44
<NuxtLink
55
class="flex flex-col space-y-1.5 items-center justify-center"
66
to="/"
@@ -17,17 +17,19 @@
1717
</NuxtLink>
1818
</div>
1919

20-
<ColorMode />
20+
<div class="links">
21+
<ColorMode />
22+
<a href="https://github.com/rust-seq/docs">
23+
<Icon class="mx-auto w-6 h-6" name="mdi:github"></Icon>
24+
</a>
25+
</div>
2126
</nav>
2227
</template>
2328

2429
<style scoped lang="postcss">
2530
nav {
26-
#links {
27-
@apply flex;
28-
@apply flex-col;
29-
@apply justify-start;
30-
@apply items-center;
31+
.links {
32+
@apply flex flex-col justify-start items-center space-y-4;
3133
}
3234
3335
@apply flex;
@@ -53,8 +55,6 @@ nav {
5355
@apply dark:border-slate-900;
5456
5557
a {
56-
margin-bottom: 20px;
57-
5858
.label {
5959
@apply text-xs;
6060
@apply font-bold;

components/FrontPageCard.vue

+29-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div
33
class="front-page-card relative group"
44
:class="checked ? 'checked' : ''"
5-
@click="checked = !checked"
5+
@click="cardClicked"
66
>
77
<div class="relative checkbox">
88
<span
@@ -34,10 +34,13 @@
3434
</p>
3535
</div>
3636
<div v-if="!checked" class="overlay opacity-0 group-hover:opacity-100">
37-
<span>Learn how we do it</span>
37+
<div class="overlay-content not-prose">
38+
<h3>{{ overlay.title }}</h3>
39+
<p>{{ overlay.description }}</p>
40+
</div>
3841
<Icon
39-
class="w-7 h-7 bg-white transition-opacity duration-300 ease-out"
40-
name="heroicons:check-20-solid"
42+
class="w-8 h-8 bg-white transition-opacity duration-300 ease-out"
43+
name="icon-park-outline:double-right"
4144
></Icon>
4245
</div>
4346
</div>
@@ -46,14 +49,29 @@
4649
<script setup lang="ts">
4750
const checked = ref(false);
4851
52+
interface Overlay {
53+
title: string;
54+
description: string;
55+
}
56+
4957
interface Props {
5058
title: string;
5159
description: string;
5260
step: number;
61+
url: string;
62+
overlay: Overlay;
5363
}
5464
5565
// Define props with TypeScript
5666
const props = defineProps<Props>();
67+
68+
let cardClicked = () => {
69+
checked.value = !checked.value;
70+
71+
if (checked.value) {
72+
window.open(props.url, "_blank", "noopener,noreferrer");
73+
}
74+
};
5775
</script>
5876

5977
<style scoped lang="postcss">
@@ -80,15 +98,18 @@ const props = defineProps<Props>();
8098
@apply text-pretty;
8199
82100
.overlay {
83-
@apply flex items-center justify-center space-x-2 absolute inset-0;
101+
@apply flex items-center justify-between space-x-2 absolute inset-0 px-10;
84102
@apply bg-gradient-to-r from-cyan-500 to-blue-500;
85103
@apply h-full w-full;
86104
@apply rounded-md;
87105
@apply transition-opacity duration-300 ease-in-out;
88-
@apply text-white text-2xl font-bold;
89106
90-
* {
91-
@apply text-inherit;
107+
h3 {
108+
@apply text-white text-2xl font-bold;
109+
}
110+
111+
p {
112+
@apply text-white text-lg;
92113
}
93114
}
94115

components/molecules/docs/CrateCard.vue

+20-14
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,40 @@
1010
<div class="ml-1 font-normal text-xs font-mono">
1111
<div
1212
class="px-1 py-0.5 rounded-md text-green-900 dark:text-green-300 bg-green-300 dark:bg-green-900 border border-green-500"
13-
v-if="kind === Kind.Library">
13+
v-if="kind === Kind.Library"
14+
>
1415
lib
1516
</div>
1617
<div
1718
class="px-1 py-0.5 rounded-md text-purple-900 dark:text-purple-300 bg-purple-300 dark:bg-purple-900 border border-purple-500"
18-
v-else-if="kind === Kind.Binary">
19+
v-else-if="kind === Kind.Binary"
20+
>
1921
bin
2022
</div>
2123
</div>
2224
</div>
2325
<div class="flex gap-x-1.5">
24-
<a v-if="socials && socials.github"
26+
<a
27+
v-if="socials && socials.github"
2528
class="flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
26-
:href="socials.github">
29+
:href="socials.github"
30+
>
2731
<Icon class="w-4 h-4" name="octicon:mark-github-16"></Icon>
2832
</a>
29-
<a v-if="socials && socials.docs"
33+
<a
34+
v-if="socials && socials.docs"
3035
class="flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
31-
:href="socials.docs" :title="`Chat about ${name} in the rust-seq Zulip`">
36+
:href="socials.docs"
37+
:title="`Chat about ${name} in the rust-seq Zulip`"
38+
>
3239
<Icon class="w-4 h-4" name="heroicons-outline:book-open"></Icon>
3340
</a>
34-
<a v-if="socials && socials.zulip"
41+
<a
42+
v-if="socials && socials.zulip"
3543
class="flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
36-
href="https://rustseq.zulipchat.com" :title="`Chat about ${name} in the rust-seq Zulip`">
44+
href="https://rustseq.zulipchat.com/join/coxb7c7b3bbahlfx7poeqqrd/"
45+
:title="`Chat about ${name} in the rust-seq Zulip`"
46+
>
3747
<Icon class="w-4 h-4" name="tabler:brand-zulip"></Icon>
3848
</a>
3949
</div>
@@ -48,12 +58,8 @@
4858
<div class="terminal">
4959
<div class="command">
5060
<span class="prompt">$</span>
51-
<span v-if="kind === Kind.Library">
52-
cargo add {{ name }}
53-
</span>
54-
<span v-if="kind === Kind.Binary">
55-
cargo install {{ name }}
56-
</span>
61+
<span v-if="kind === Kind.Library"> cargo add {{ name }} </span>
62+
<span v-if="kind === Kind.Binary"> cargo install {{ name }} </span>
5763
</div>
5864
<Icon class="copy" name="heroicons-outline:clipboard-copy"></Icon>
5965
</div>

content/docs/get-started/1.overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ the `rust-seq` [GitHub][github-organization] while others may be available under
2626
different organizations. Officially ratified crates are indexed on [this
2727
page](/docs).
2828

29-
[zulip-chat]: https://rustseq.zulipchat.com/
29+
[zulip-chat]: https://rustseq.zulipchat.com/join/coxb7c7b3bbahlfx7poeqqrd/
3030
[github-discussions]: https://github.com/orgs/rust-seq/discussions
3131
[github-organization]: https://github.com/rust-seq

nuxt.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineNuxtConfig({
66
css: ["~/assets/css/main.postcss"],
77
devtools: { enabled: true },
88
app: {
9-
baseURL: "/docs",
9+
baseURL: "/",
1010
},
1111
modules: [
1212
"nuxt-lucide-icons",

pages/index.vue

+10
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,22 @@
1414
title="Organizing the community around what needs built."
1515
description="Though our RFC process, we outline crates that need to be created
1616
along with who will create them."
17+
url="https://example.com"
18+
:overlay="{
19+
title: 'Learn how we do it!',
20+
description: 'Click here to learn about our RFC process.',
21+
}"
1722
>
1823
</FrontPageCard>
1924
<FrontPageCard
2025
step="2"
2126
title="Bringing the community together on Zulip."
2227
description="Foo bar baz quux qil."
28+
url="https://rustseq.zulipchat.com/join/coxb7c7b3bbahlfx7poeqqrd"
29+
:overlay="{
30+
title: 'Join us!',
31+
description: 'Click here to join the Zulip server.',
32+
}"
2333
></FrontPageCard>
2434
</div>
2535
</main>

0 commit comments

Comments
 (0)