Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const env = loadEnv('', process.cwd());
// https://vitepress.dev/reference/site-config
export default withMermaid(
defineConfig({
title: 'iExec documentation',
title: 'PoCo Documentation',
description:
'Build decentralized applications that combine ownership, privacy, and monetization.',
cleanUrls: true,
Expand Down
26 changes: 23 additions & 3 deletions src/components/HomePage.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { useRouter } from 'vitepress';
import heroImage from '@/assets/images/doc-landing.png';
import noxIcon from '@/assets/icons/nox.svg';
import pocoIcon from '@/assets/icons/poco.svg';
Expand All @@ -8,6 +9,20 @@ import helloWorldIcon from '@/assets/icons/hello-world.svg';
import teeIcon from '@/assets/icons/tee.svg';
import govIcon from '@/assets/icons/gov.svg';

const router = useRouter();

function isNoxLink(link: string) {
return link.startsWith('/nox-protocol');
}

function handleCardClick(link: string) {
if (isNoxLink(link)) {
window.location.href = link;
} else {
router.go(link);
}
}

const protocolCards = [
{
icon: noxIcon,
Expand Down Expand Up @@ -108,8 +123,9 @@ const dappFeatures = [
<a
v-for="card in protocolCards"
:key="card.title"
:href="card.link"
:href="isNoxLink(card.link) ? undefined : card.link"
class="protocol-card"
@click.stop.prevent="handleCardClick(card.link)"
>
<div class="protocol-card-header">
<div class="icon-box">
Expand All @@ -133,8 +149,9 @@ const dappFeatures = [
<a
v-for="feature in financialFeatures"
:key="feature.title"
:href="feature.link"
:href="isNoxLink(feature.link) ? undefined : feature.link"
class="feature-card"
@click.stop.prevent="handleCardClick(feature.link)"
>
<div class="feature-card-header">
<div class="icon-box">
Expand All @@ -158,8 +175,9 @@ const dappFeatures = [
<a
v-for="feature in dappFeatures"
:key="feature.title"
:href="feature.link"
:href="isNoxLink(feature.link) ? undefined : feature.link"
class="feature-card"
@click.stop.prevent="handleCardClick(feature.link)"
>
<div class="feature-card-header">
<div class="icon-box">
Expand Down Expand Up @@ -396,6 +414,7 @@ const dappFeatures = [
overflow: hidden;
text-decoration: none;
color: inherit;
cursor: pointer;
transition:
box-shadow 0.3s,
border-color 0.3s;
Expand Down Expand Up @@ -514,6 +533,7 @@ const dappFeatures = [
overflow: hidden;
text-decoration: none;
color: inherit;
cursor: pointer;
transition:
box-shadow 0.3s,
border-color 0.3s;
Expand Down
11 changes: 9 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"framework": null,
"buildCommand": "npm run build",
"outputDirectory": ".vitepress/dist",
"cleanUrls": true,
"rewrites": [
{
"source": "/nox-protocol/:path*",
"destination": "https://documentation-yi1w.vercel.app/nox-protocol/:path*"
"source": "/nox-protocol",
"destination": "https://documentation-yi1w.vercel.app/nox-protocol/"
},
{
"source": "/nox-protocol/:path+",
"destination": "https://documentation-yi1w.vercel.app/nox-protocol/:path+"
}
],
"redirects": [
Expand Down
Loading