Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
angelorc committed Oct 3, 2024
0 parents commit 45395c7
Show file tree
Hide file tree
Showing 37 changed files with 13,174 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
NUXT_UI_PRO_LICENSE=

# Public URL, used for OG Image when running nuxt generate
NUXT_PUBLIC_SITE_URL=
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example

# VSC
.history
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# BitSong Delegation DAO

This is the official website for the BitSong Delegation DAO

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```
68 changes: 68 additions & 0 deletions app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export default defineAppConfig({
ui: {
primary: 'red',
gray: 'zinc',
footer: {
bottom: {
left: 'text-sm text-gray-500 dark:text-gray-400',
wrapper: 'border-t border-gray-200 dark:border-gray-800'
}
}
},
seo: {
siteName: 'BitSong Delegation DAO'
},
header: {
logo: {
alt: '',
light: '',
dark: ''
},
search: true,
colorMode: true,
links: [{
'icon': 'i-simple-icons-github',
'to': 'https://github.com/bitsongofficial',
'target': '_blank',
'aria-label': 'BitSong on GitHub'
}]
},
footer: {
credits: 'Copyright © 2024',
colorMode: false,
links: [{
'icon': 'i-heroicons-globe-alt',
'to': 'https://bitsong.io',
'target': '_blank',
'aria-label': 'BitSong Website'
}, {
'icon': 'i-simple-icons-discord',
'to': 'https://discord.bitsong.io',
'target': '_blank',
'aria-label': 'BitSong on Discord'
}, {
'icon': 'i-simple-icons-x',
'to': 'https://x.com/bitsongofficial',
'target': '_blank',
'aria-label': 'BitSong on X'
}, {
'icon': 'i-simple-icons-github',
'to': 'https://github.com/bitsongofficial',
'target': '_blank',
'aria-label': 'BitSong on GitHub'
}]
},
toc: {
title: 'Table of Contents',
bottom: {
title: 'Community',
edit: 'https://github.com/bitsongofficial/delegation-dao/edit/main/content',
links: [{
icon: 'i-heroicons-star',
label: 'Star on GitHub',
to: 'https://github.com/bitsongofficial/delegation-dao',
target: '_blank'
}]
}
}
})
55 changes: 55 additions & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content'
const { seo } = useAppConfig()
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
})
useHead({
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', href: '/favicon.ico' }
],
htmlAttrs: {
lang: 'en'
}
})
useSeoMeta({
titleTemplate: `%s - ${seo?.siteName}`,
ogSiteName: seo?.siteName
// ogImage: 'https://docs-template.nuxt.dev/social-card.png',
// twitterImage: 'https://docs-template.nuxt.dev/social-card.png',
// twitterCard: 'summary_large_image'
})
provide('navigation', navigation)
</script>

<template>
<div>
<NuxtLoadingIndicator />

<AppHeader />

<UMain class="min-h-[calc(90vh-var(--header-height))]">
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UMain>

<AppFooter />

<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>

<UNotifications />
</div>
</template>
23 changes: 23 additions & 0 deletions app/components/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
const { footer } = useAppConfig()
</script>

<template>
<UFooter>
<template #left>
{{ footer.credits }}
</template>

<template #right>
<UColorModeButton v-if="footer?.colorMode" />

<template v-if="footer?.links">
<UButton
v-for="(link, index) of footer?.links"
:key="index"
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
/>
</template>
</template>
</UFooter>
</template>
39 changes: 39 additions & 0 deletions app/components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script setup lang="ts">
import type { NavItem } from '@nuxt/content'
const navigation = inject<NavItem[]>('navigation', [])
const { header } = useAppConfig()
</script>

<template>
<UHeader>
<template #logo>
<template v-if="header?.logo?.dark || header?.logo?.light">
<UColorModeImage v-bind="{ class: 'h-6 w-auto', ...header?.logo }" />
</template>
<template v-else>
Delegation DAO
</template>
</template>

<template v-if="header?.search" #center>
<UContentSearchButton class="hidden lg:flex" />
</template>

<template #right>
<UContentSearchButton v-if="header?.search" :label="null" class="lg:hidden" />

<UColorModeButton v-if="header?.colorMode" />

<template v-if="header?.links">
<UButton v-for="(link, index) of header.links" :key="index"
v-bind="{ color: 'gray', variant: 'ghost', ...link }" />
</template>
</template>

<template #panel>
<UNavigationTree :links="mapContentNavigation(navigation)" />
</template>
</UHeader>
</template>
29 changes: 29 additions & 0 deletions app/components/OgImage/OgImageDocs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script setup lang="ts">
defineOptions({
inheritAttrs: false
})
defineProps({
title: {
type: String,
required: true
},
description: {
type: String,
required: true
}
})
</script>

<template>
<div class="w-full h-full flex flex-col justify-center text-center bg-slate-900 p-8">
<div class="relative">
<h1 class="text-8xl mb-4 text-white">
{{ title }}
</h1>
<p class="text-5xl text-gray-200 leading-tight">
{{ description }}
</p>
</div>
</div>
</template>
55 changes: 55 additions & 0 deletions app/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content'
import type { NuxtError } from '#app'
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.'
})
defineProps({
error: {
type: Object as PropType<NuxtError>,
required: true
}
})
useHead({
htmlAttrs: {
lang: 'en'
}
})
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
})
provide('navigation', navigation)
</script>

<template>
<div>
<AppHeader />

<UMain>
<UContainer>
<UPage>
<UPageError :error="error" />
</UPage>
</UContainer>
</UMain>

<AppFooter />

<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation"
/>
</ClientOnly>

<UNotifications />
</div>
</template>
Loading

0 comments on commit 45395c7

Please sign in to comment.