Make current code library + add docs

This commit is contained in:
Jai A
2023-02-18 11:43:12 -07:00
parent 0faa24d5d3
commit 4434796aab
124 changed files with 1282 additions and 4984 deletions

54
docs/.vitepress/config.js Normal file
View File

@@ -0,0 +1,54 @@
import { resolve } from 'path'
import svgLoader from 'vite-svg-loader'
export default {
title: 'Omorphia',
description: 'A components library used for Modrinth.',
themeConfig: {
sidebar: [
{
items: [
{ text: 'Introduction', link: '/' },
{ text: 'Setup', link: '/setup' },
]
},
{
text: 'Components',
items: [
{ text: 'Icons', link: '/components/icons' },
{ text: 'Button', link: '/components/button' },
{ text: 'Card', link: '/components/card' },
]
}
],
footer: {
message: 'Released under the <a href="https://github.com/modrinth/omoprhia/blob/main/LICENSE">GPLv3 License</a>.',
copyright: 'Copyright © 2023-present <a href="https://modrinth.com">Rinth, Inc.</a>'
},
},
vite: {
plugins: [
svgLoader({
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
],
}, }
),
],
resolve: {
alias: {
'@': resolve(__dirname, '../../lib'),
'omorphia': resolve(__dirname, '../../lib'),
},
dedupe: ['vue'],
}
}
}

View File

@@ -0,0 +1,13 @@
<template>
<div class="demo bg-raised radius-lg padding-md"><slot /></div>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.demo {
border: 1px solid var(--color-button-bg);
}
</style>

View File

@@ -0,0 +1,17 @@
body {
color: var(--vp-c-text-1);
background-color: var(--vp-c-bg);
}
.VPLink, .title, .pager-link, .link, .header-anchor {
color: inherit;
transition: none;
&:hover {
text-decoration: none;
}
&:active:not(&:disabled) {
scale: 1;
}
}

View File

@@ -0,0 +1,14 @@
import DefaultTheme from 'vitepress/theme'
import Omorphia from 'omorphia'
import DemoContainer from './DemoContainer.vue'
import './compat.scss'
export default {
...DefaultTheme,
enhanceApp(ctx) {
ctx.app.use(Omorphia)
ctx.app.component('DemoContainer', DemoContainer)
}
}