1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 06:18:07 +09:00

docs: add initial documentation (#842)

This commit is contained in:
Daniel Roe 2023-01-08 21:42:59 +00:00 committed by GitHub
parent 1125bd1970
commit e621c93b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 2649 additions and 737 deletions

3
docs/.env.example Executable file
View File

@ -0,0 +1,3 @@
# Create one with no scope selected on https://github.com/settings/tokens/new
# This token is used for fetching the repository releases.
GITHUB_TOKEN=

12
docs/.gitignore vendored Executable file
View File

@ -0,0 +1,12 @@
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
sw.*
.env
.output

32
docs/app.config.ts Normal file
View File

@ -0,0 +1,32 @@
export default defineAppConfig({
docus: {
title: 'Elk',
description: 'A nimble Mastodon web client.',
image: 'https://docs.elk.zone/elk-screenshot.png',
socials: {
twitter: 'elk-zone',
github: 'elk-zone/elk',
},
aside: {
level: 0,
exclude: [],
},
header: {
logo: true,
showLinkIcon: true,
exclude: [],
},
footer: {
iconLinks: [
{
href: 'https://nuxt.com',
icon: 'IconNuxtLabs',
},
{
href: 'https://m.webtoo.ls/@elk',
icon: 'IconMastodon',
},
],
},
},
})

15
docs/app.vue Normal file
View File

@ -0,0 +1,15 @@
<template>
<AppLayout>
<NuxtPage />
</AppLayout>
</template>
<style>
@font-face {
font-display: swap;
font-family: 'DM Sans';
font-style: normal;
font-weight: 400;
src: url(/fonts/DM-sans-v11.ttf) format('truetype');
}
</style>

View File

@ -0,0 +1,9 @@
<script>
export default {
name: 'IconMastodon',
}
</script>
<template>
<svg width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M21.258 13.99c-.274 1.41-2.456 2.955-4.962 3.254c-1.306.156-2.593.3-3.965.236c-2.243-.103-4.014-.535-4.014-.535c0 .218.014.426.04.62c.292 2.215 2.196 2.347 4 2.41c1.82.062 3.44-.45 3.44-.45l.076 1.646s-1.274.684-3.542.81c-1.25.068-2.803-.032-4.612-.51c-3.923-1.039-4.598-5.22-4.701-9.464c-.031-1.26-.012-2.447-.012-3.44c0-4.34 2.843-5.611 2.843-5.611c1.433-.658 3.892-.935 6.45-.956h.062c2.557.02 5.018.298 6.451.956c0 0 2.843 1.272 2.843 5.61c0 0 .036 3.201-.397 5.424zm-2.956-5.087c0-1.074-.273-1.927-.822-2.558c-.567-.631-1.308-.955-2.229-.955c-1.065 0-1.871.41-2.405 1.228l-.518.87l-.519-.87C11.276 5.8 10.47 5.39 9.405 5.39c-.921 0-1.663.324-2.229.955c-.549.631-.822 1.484-.822 2.558v5.253h2.081V9.057c0-1.075.452-1.62 1.357-1.62c1 0 1.501.647 1.501 1.927v2.79h2.07v-2.79c0-1.28.5-1.927 1.5-1.927c.905 0 1.358.545 1.358 1.62v5.1h2.08V8.902z" /></svg>
</template>

View File

@ -0,0 +1,23 @@
<template>
<div class="logo">
<img alt="Elk" src="/logo.svg">
Elk
</div>
</template>
<style lang="ts" scoped>
css({
'.logo': {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
gap: '0.5rem',
fontSize: '1.5rem',
},
img: {
flexShrink: 0,
aspectRatio: '1/1',
height: '2.5rem'
}
})
</style>

36
docs/content/0.index.md Executable file
View File

@ -0,0 +1,36 @@
---
title: Elk
navigation: false
layout: page
---
::block-hero
---
cta:
- Read more
- /guide
secondary:
- Try it out →
- https://elk.zone
---
#title
Elk
#description
An in-progress, nimble Mastodon web client
#support
![Screenshot of Elk](/docs/screenshot.png)
#extra
::list
- markdown support
- code blocks
- reordering and connecting posts in timelines
- multi account
- GitHub HTML cards
- and more...
::
::

View File

@ -0,0 +1,33 @@
# Introduction
## What is Elk?
::alert{type=warning}
🚧 This section is a work in progress. 🚧
::
## What is Mastodon?
<!-- -> external links -->
::alert{type=warning}
🚧 This section is a work in progress. 🚧
::
## What is a Mastodon Client?
<!-- -> other examples -->
::alert{type=warning}
🚧 This section is a work in progress. 🚧
::
## Sponsors
We want to thank the generous sponsoring and help of:
[![NuxtLabs](/docs/images/nuxtlabs.svg)](https://nuxtlabs.com/)
[![StackBlitz](/docs/images/stackblitz.svg)](https://stackblitz.com/)
And all the companies and individuals sponsoring Elk Team members.
[Find out more about sponsoring Elk](/guide/sponsoring).

View File

@ -0,0 +1,14 @@
# Features
::alert{type=warning}
🚧 This section is a work in progress. 🚧
::
<!-- once the UI is more stable, we can add screenshots -->
<!-- - markdown support
- code blocks
- reordering and connecting posts in timelines
- multi account
- GitHub HTML cards
- and so on... -->

View File

@ -0,0 +1,49 @@
# Contributing
We're really excited that you're interested in contributing to Elk! Before submitting your contribution, please read through the following guide.
## Online
You can use [StackBlitz CodeFlow](https://stackblitz.com/codeflow) to fix bugs or implement features. You'll also see a CodeFlow button on PRs to review them without a local setup. Once the elk repo has been cloned in CodeFlow, the dev server will start automatically and print the URL to open the App. You should receive a prompt in the bottom-right suggesting to open it in the Editor or in another Tab. To learn more, check out the [CodeFlow docs](https://developer.stackblitz.com/codeflow/what-is-codeflow).
[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https://pr.new/elk-zone/elk)
## Local Setup
Clone the repository and run on the root folder:
```bash
pnpm i
pnpm run dev
```
`Warning`: you will need `corepack` enabled, check out the [Elk Contributing Guide](./CONTRIBUTING.md) for a detailed guide on how to set up the project locally.
We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run:
```bash
ni
nr dev
```
## Testing
Elk uses [Vitest](https://vitest.dev). You can run the test suite with:
```bash
nr test
```
# Stack
- [Vite](https://vitejs.dev/) - Next Generation Frontend Tooling
- [Nuxt](https://nuxt.com/) - The Intuitive Web Framework
- [Vue](https://vuejs.org/) - The Progressive JavaScript Framework
- [VueUse](https://vueuse.org/) - Collection of Vue Composition Utilities
- [Pinia](https://pinia.vuejs.org/) - The Vue Store that you will enjoy using
- [Vue Macros](https://vue-macros.sxzz.moe/) - More macros and syntax sugar for Vue
- [UnoCSS](https://uno.antfu.me/) - The instant on-demand atomic CSS engine
- [Iconify](https://github.com/iconify/icon-sets#iconify-icon-sets-in-json-format) - Iconify icon sets in JSON format
- [Masto.js](https://neet.github.io/masto.js) - Mastodon API client in TypeScript
- [shiki](https://shiki.matsu.io/) - A beautiful Syntax Highlighter
- [vite-plugin-pwa](https://github.com/vite-pwa/vite-plugin-pwa) - Prompt for update and push notifications

View File

@ -0,0 +1,10 @@
# Sponsoring
If you're enjoying the app, consider sponsoring our team:
- [Anthony Fu](https://github.com/sponsors/antfu)
- [Daniel Roe](https://github.com/sponsors/danielroe)
- [三咲智子 Kevin Deng](https://github.com/sponsors/sxzz)
- [Patak](https://github.com/sponsors/patak-dev)
We would also appreciate sponsoring other contributors to the Elk project. If someone helps you solve an issue or implement a feature you wanted, supporting them would help make this project and OS more sustainable.

10
docs/netlify.toml Executable file
View File

@ -0,0 +1,10 @@
[build]
publish = "dist"
command = "pnpm generate"
# Allow previewing docs
[[redirects]]
from = "/docs/*"
to = "/:splat"
status = 200
force = true

6
docs/nuxt.config.ts Executable file
View File

@ -0,0 +1,6 @@
export default defineNuxtConfig({
app: {
baseURL: '/docs',
},
extends: '@nuxt-themes/docus',
})

15
docs/package.json Executable file
View File

@ -0,0 +1,15 @@
{
"name": "elk-docs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview"
},
"devDependencies": {
"@nuxt-themes/docus": "^1.4.4",
"nuxt": "^3.0.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
docs/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -0,0 +1,16 @@
<svg width="400" height="100" viewBox="0 0 400 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect fill="#111" x="0" width="400" height="100" rx="15" />
<g transform="translate(50 15) scale(0.55)">
<path d="M137.5 98.7C130.9 98.7 125.2 97.2 120.6 94.2C116.1 91.3 112.7 86.9 111 81.8L120.7 76.1C123.5 83.8 129.2 87.7 137.8 87.7C142.1 87.7 145.2 86.9 147.3 85.2C149.4 83.7 150.6 81.2 150.6 78.6C150.7 76 149.4 73.5 147.2 72.2C144.9 70.7 140.8 69.1 135 67.3C132.3 66.5 129.6 65.6 127 64.5C124.7 63.5 122.6 62.3 120.5 61C118.4 59.5 116.6 57.5 115.5 55.2C114.3 52.7 113.8 49.9 113.8 47.1C113.8 41 116 36.2 120.3 32.6C124.7 29 130.2 27.1 135.9 27.2C141 27.1 146 28.5 150.4 31.2C154.6 33.9 157.9 37.8 159.9 42.3L150.4 47.8C147.5 41.4 142.7 38.2 135.9 38.2C132.6 38.2 130 39 128 40.6C126.1 42.1 125 44.4 125 46.8C124.9 49.2 126 51.5 128 52.9C130 54.3 133.7 55.9 138.9 57.5C141.5 58.4 143.4 59 144.6 59.5C145.8 59.9 147.6 60.5 149.7 61.5C151.5 62.2 153.2 63.1 154.7 64.3C156 65.4 157.2 66.5 158.3 67.8C159.6 69.1 160.5 70.7 161.1 72.5C161.6 74.5 161.9 76.5 161.9 78.5C161.9 84.7 159.6 89.7 155.1 93.4C150.6 97.1 144.7 98.8 137.5 98.7Z" fill="white"/>
<path d="M194.5 58.5H182.3V82.1C182.3 84.1 182.8 85.6 183.7 86.5C184.8 87.4 186.3 88 187.7 88C189.5 88.1 191.8 88 194.5 87.9V97.4C186.4 98.4 180.5 97.7 177 95.3C173.5 92.9 171.7 88.5 171.7 82V58.4H162.6V48.2H171.7V37.6L182.3 34.5V48.3H194.5V58.5Z" fill="white"/>
<path d="M238.6 48.3H249.2V97.5H238.6V90.4C234.6 96 228.9 98.8 221.4 98.8C214.8 98.9 208.5 96.2 204.1 91.3C199.4 86.4 196.8 79.7 196.9 72.9C196.9 65.6 199.3 59.5 204.1 54.5C208.5 49.7 214.8 46.9 221.4 47C228.9 47 234.6 49.7 238.6 55.2V48.3ZM211.9 84.2C218.1 90.1 227.9 90.1 234.1 84.2C237.1 81.2 238.6 77.1 238.5 72.9C238.6 68.7 237 64.6 234.1 61.7C227.9 55.7 218 55.7 211.9 61.7C208.9 64.7 207.3 68.7 207.5 72.9C207.4 77.1 209 81.2 211.9 84.2Z" fill="white"/>
<path d="M282.4 98.7C275 98.7 268.8 96.2 263.8 91.2C258.9 86.3 256.3 79.7 256.4 72.8C256.4 65.5 258.9 59.3 263.8 54.4C268.7 49.5 274.9 47 282.4 46.9C287 46.8 291.5 48 295.5 50.3C299.3 52.4 302.4 55.7 304.4 59.5L295.3 64.8C294.2 62.5 292.4 60.5 290.2 59.3C287.9 57.9 285.2 57.2 282.4 57.2C278.3 57.1 274.4 58.7 271.5 61.6C265.7 67.8 265.7 77.4 271.5 83.6C276.5 88.5 284.1 89.4 290.2 86C292.5 84.7 294.3 82.8 295.5 80.5L304.6 85.7C302.5 89.6 299.4 92.9 295.5 95C291.5 97.6 287 98.8 282.4 98.7Z" fill="white"/>
<path d="M353.2 97.5H340.5L320.3 74.8V97.5H309.7V28.6H320.3V70L339.4 48.3H352.4L330.8 72.4L353.2 97.5Z" fill="white"/>
<path d="M399.2 61.8C405.3 64.8 409 71.1 408.9 77.8C409 83.1 406.8 88.3 402.9 91.9C398.9 95.6 393.7 97.6 388.2 97.5H358.7V28.6H386C391.3 28.5 396.4 30.5 400.2 34.1C404.1 37.5 406.2 42.5 406.1 47.7C406.1 53.6 403.8 58.3 399.2 61.8ZM386 39.2H370V57.3H386C388.4 57.4 390.6 56.4 392.3 54.7C394 53 394.9 50.6 394.9 48.2C395 45.8 394 43.5 392.3 41.8C390.7 40.1 388.4 39.2 386 39.2ZM388.1 86.8C390.6 86.9 393 85.9 394.7 84C396.5 82.2 397.5 79.7 397.5 77.1C397.6 74.6 396.6 72.1 394.7 70.3C393 68.4 390.6 67.4 388.1 67.4H369.9V86.7H388.1V86.8Z" fill="white"/>
<path d="M415.5 97.5V25.7H426.1V97.5H415.5Z" fill="white"/>
<path d="M446.1 38.9C444.9 40.2 443.2 40.9 441.4 40.9C437.7 40.9 434.6 37.9 434.6 34.2V34.1C434.7 30.4 437.7 27.4 441.4 27.3C445.1 27.4 448.1 30.4 448.2 34.1C448.2 35.9 447.4 37.6 446.1 38.9ZM436 97.5V48.3H446.6V97.5H436Z" fill="white"/>
<path d="M484 58.5H471.8V82.1C471.8 84.1 472.3 85.6 473.2 86.5C474.3 87.4 475.8 88 477.2 88C479 88.1 481.3 88 484 87.9V97.4C475.9 98.4 470 97.7 466.5 95.3C463 92.9 461.2 88.5 461.2 82V58.4H452.1V48.2H461.2V37.6L471.8 34.5V48.3H484V58.5Z" fill="white"/>
<path d="M503.4 87.4H527.3V97.4H488.9V90.3L511.9 58.2H489.9V48.2H526.3V55.3L503.4 87.4Z" fill="white"/>
<path d="M0.700012 75H38.1L16.3 127.8L87.8 52.6H50.2L71.8 0.199997L0.700012 75Z" fill="#1389FD"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

8
docs/public/logo.svg Normal file
View File

@ -0,0 +1,8 @@
<svg width="180" height="180" viewBox="0 0 250 250" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M131.676 48.2479C122.848 49.273 118.156 46.9152 115.331 55.3212C115.331 55.3212 124.815 69.6216 150.09 69.2628C148.677 75.106 149.333 79.4115 149.333 84.5884C149.333 101.81 135.712 116.828 105.695 116.828C90.4593 116.828 71.9446 119.596 57.8189 127.336C47.7796 132.82 39.9247 140.765 36.4488 151.785L40.3888 157.372L47.931 157.474V189.099L38.7291 203.605L41.3726 245.635H50.1003L50.857 211.806C55.1956 209.243 65.134 202.58 73.6094 192.329C85.1118 178.541 93.9403 158.5 83.5478 133.692L91.317 130.36C99.8428 150.709 96.8663 168.341 89.3999 182.539C103.677 182.077 115.936 181.155 126.328 179.412L123.957 150.555L132.332 149.837L140.303 245.635H148.98L150.443 183.256C157.355 180.283 173.095 169.366 180.46 131.436C181.368 126.823 181.873 122.928 182.125 119.596C183.285 111.139 183.941 101.605 184.143 90.7391L171.783 86.7924H209.771L213.454 78.3352C209.872 78.4889 205.584 76.5925 205.584 76.5925L206.441 72.492H214.412L171.278 49.7855C166.486 51.6308 161.441 54.0398 157.909 56.9614C155.084 54.9112 145.297 48.5041 131.676 48.2479Z" fill="#EA9E44"/>
<path d="M165.174 185.512C169.714 180.591 174.961 173.671 179.855 164.394C180.006 168.238 180.258 170.545 180.46 171.724L202.809 190.893L185.959 224.107L178.392 220.519L188.935 196.173L165.174 185.512Z" fill="#A75C26"/>
<path d="M84.0523 191.15C90.5098 191.047 96.5636 190.791 102.264 190.432C94.9493 201.35 86.0703 209.192 82.3875 212.267V245.584H73.7608L69.3717 207.142C74.6184 202.734 79.6633 197.044 84.0523 191.15Z" fill="#A75C26"/>
<path d="M58.4243 6.24353L66.5466 3.93701C70.4816 18.1862 75.3751 25.9771 81.5299 29.9238C87.0793 33.2913 94.5962 33.3836 102.567 32.9479C100.246 32.1791 98.0771 31.1027 96.0592 29.6163C91.5692 26.2846 87.7351 20.749 84.8595 10.7028L92.9313 8.29378C95.1006 15.8797 97.6231 20.2364 101.003 22.748C104.383 25.2083 108.47 25.8233 113.313 26.3359C122.393 27.361 133.744 27.7711 147.921 34.4344C149.838 35.1519 151.805 36.0746 153.722 37.0997L153.722 37.0996C153.47 36.587 153.218 36.0745 152.865 35.5107C150.443 31.6665 145.701 27.6173 136.923 24.3369L139.748 16.341C154.025 21.5691 159.675 29.0012 161.945 34.8957C164.569 41.6102 162.954 46.8639 162.954 46.8639C160.936 47.5303 158.918 48.4529 156.598 49.1705C152.209 46.1464 148.072 43.8655 144.137 42.0715C129.608 36.5871 115.381 40.3288 102.769 41.5077C93.2845 42.379 84.6073 41.969 77.0904 37.1509C69.6744 32.4354 63.1665 23.4143 58.4243 6.24353Z" fill="#A75C26"/>
<path d="M113.918 19.9802C112.253 16.1872 111.244 11.5229 111.698 5.78223L120.073 6.3973C119.568 13.3681 121.99 18.0837 124.714 21.159C121.183 20.544 117.803 20.4722 113.918 19.9802Z" fill="#A75C26"/>
<path d="M166.889 19.1088L172.388 12.7018C186.665 25.3108 177.786 43.3529 177.786 43.3529L169.967 42.4816C169.715 38.3606 169.21 30.7029 165.578 26.3872C167.949 27.6019 169.967 28.9397 172.187 30.9489C172.187 27.2073 171.026 22.7992 166.889 19.1088Z" fill="#A75C26"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
docs/public/pwa-192x192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
docs/public/pwa-512x512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
docs/public/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

View File

@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/pwa-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/pwa-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

10
docs/tokens.config.ts Normal file
View File

@ -0,0 +1,10 @@
import { defineTheme, palette } from 'pinceau'
export default defineTheme({
font: {
sans: 'DM Sans',
},
color: {
primary: palette('#d98018'),
},
})

3
docs/tsconfig.json Executable file
View File

@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}

View File

@ -8,3 +8,10 @@
to = "https://discord.gg/vAZSDU9J"
status = 301
force = true
# Redirect to the docs
[[redirects]]
from = "/docs"
to = "https://docs.elk.zone/"
status = 200
force = true

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,2 @@
packages:
- docs