Compare commits
2 commits
7f1951e384
...
23a39c4e40
| Author | SHA1 | Date | |
|---|---|---|---|
| 23a39c4e40 | |||
| 2aa4f44439 |
4 changed files with 2732 additions and 64 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
<title>trove-web-ui</title>
|
<title>trove-web-ui</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="editor"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
2725
package-lock.json
generated
2725
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -11,5 +11,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vite": "^8.0.0"
|
"vite": "^8.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@milkdown/crepe": "^7.19.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
66
src/main.ts
66
src/main.ts
|
|
@ -1,60 +1,10 @@
|
||||||
import './style.css'
|
import '@milkdown/crepe/theme/common/style.css'
|
||||||
import typescriptLogo from './assets/typescript.svg'
|
import '@milkdown/crepe/theme/frame.css'
|
||||||
import viteLogo from './assets/vite.svg'
|
import { Crepe } from '@milkdown/crepe'
|
||||||
import heroImg from './assets/hero.png'
|
|
||||||
import { setupCounter } from './counter.ts'
|
|
||||||
|
|
||||||
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
|
const crepe = new Crepe({
|
||||||
<section id="center">
|
root: document.getElementById('editor'),
|
||||||
<div class="hero">
|
defaultValue: '# Hello Trove\n\nStart writing...',
|
||||||
<img src="${heroImg}" class="base" width="170" height="179">
|
})
|
||||||
<img src="${typescriptLogo}" class="framework" alt="TypeScript logo"/>
|
|
||||||
<img src=${viteLogo} class="vite" alt="Vite logo" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h1>Get started</h1>
|
|
||||||
<p>Edit <code>src/main.ts</code> and save to test <code>HMR</code></p>
|
|
||||||
</div>
|
|
||||||
<button id="counter" type="button" class="counter"></button>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="ticks"></div>
|
crepe.create()
|
||||||
|
|
||||||
<section id="next-steps">
|
|
||||||
<div id="docs">
|
|
||||||
<svg class="icon" role="presentation" aria-hidden="true"><use href="/icons.svg#documentation-icon"></use></svg>
|
|
||||||
<h2>Documentation</h2>
|
|
||||||
<p>Your questions, answered</p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="https://vite.dev/" target="_blank">
|
|
||||||
<img class="logo" src=${viteLogo} alt="" />
|
|
||||||
Explore Vite
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://www.typescriptlang.org" target="_blank">
|
|
||||||
<img class="button-icon" src="${typescriptLogo}" alt="">
|
|
||||||
Learn more
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="social">
|
|
||||||
<svg class="icon" role="presentation" aria-hidden="true"><use href="/icons.svg#social-icon"></use></svg>
|
|
||||||
<h2>Connect with us</h2>
|
|
||||||
<p>Join the Vite community</p>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/vitejs/vite" target="_blank"><svg class="button-icon" role="presentation" aria-hidden="true"><use href="/icons.svg#github-icon"></use></svg>GitHub</a></li>
|
|
||||||
<li><a href="https://chat.vite.dev/" target="_blank"><svg class="button-icon" role="presentation" aria-hidden="true"><use href="/icons.svg#discord-icon"></use></svg>Discord</a></li>
|
|
||||||
<li><a href="https://x.com/vite_js" target="_blank"><svg class="button-icon" role="presentation" aria-hidden="true"><use href="/icons.svg#x-icon"></use></svg>X.com</a></li>
|
|
||||||
<li><a href="https://bsky.app/profile/vite.dev" target="_blank"><svg class="button-icon" role="presentation" aria-hidden="true"><use href="/icons.svg#bluesky-icon"></use></svg>Bluesky</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="ticks"></div>
|
|
||||||
<section id="spacer"></section>
|
|
||||||
`
|
|
||||||
|
|
||||||
setupCounter(document.querySelector<HTMLButtonElement>('#counter')!)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue