add some styling

This commit is contained in:
Philipp Kühn 2021-02-02 23:11:52 +01:00
parent fb7c13e066
commit c223f18887
5 changed files with 142 additions and 39 deletions

View File

@ -16,7 +16,8 @@
</button>
</div>
<div class="demo__code" v-if="activeFile" :key="activeFile.path">
<prism :code="activeFile.content" :language="activeFile.highlight" :highlight="highlight" />
<!-- eslint-disable-next-line -->
<prism :language="activeFile.highlight" :highlight="highlight">{{ activeFile.content }}</prism>
</div>
</div>
<div class="demo__meta">

View File

@ -0,0 +1,22 @@
<template>
<div class="feature-item text">
<slot />
</div>
</template>
<script>
export default {
props: {
},
}
</script>
<style lang="scss" scoped>
.feature-item {
break-inside: avoid-column;
background-color: rgba($colorBlack, 0.03);
border-radius: 0.75rem;
padding: 1.5rem;
margin-bottom: 1rem;
}
</style>

View File

@ -0,0 +1,19 @@
<template>
<div class="feature-list">
<slot />
</div>
</template>
<script>
export default {
props: {
},
}
</script>
<style lang="scss" scoped>
.feature-list {
column-count: 2;
column-gap: 1rem;
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<pre :class="`language-${language}`" :data-line="highlight"><code :class="`language-${language}`">{{ code }}</code></pre>
<pre :class="`language-${language}`" :data-line="highlight"><code :class="`language-${language}`"><slot /></code></pre>
</template>
<script>
@ -14,11 +14,6 @@ export default {
type: String,
},
code: {
default: null,
type: String,
},
highlight: {
type: String,
default: null,

View File

@ -19,45 +19,101 @@
</app-section>
<app-section>
<div class="text">
<h2 class="is-h1">
Features
</h2>
<h3>
<feature-list>
<feature-item>
<h3 class="is-h2">
Headless
</h3>
<p>
We dont tell you what a menu should look like or where it should be rendered in the DOM. Thats why tiptap is headless and comes without any CSS. You are in full control over markup, styling and behaviour.
</p>
<p>
<g-link to="/guide/styling">
Styling
</g-link>
</p>
</feature-item>
<h3>
<feature-item>
<h3 class="is-h2">
Framework-agnostic
</h3>
<p>
No matter what framework you use, youll enjoy tiptap. Out of the box, it works with plain JavaScript and Vue.js, but its also possible to use it in [React](/guide/getting-started/react), Svelte and others.
No matter what framework you use, youll enjoy tiptap. Out of the box, it works with plain JavaScript and Vue.js, but its also possible to use it in <g-link to="/guide/getting-started/react">
React
</g-link>, Svelte and others.
</p>
<p>
<g-link to="/overview/installation">
Installation
</g-link>
</p>
</feature-item>
<h3>
<feature-item>
<h3 class="is-h2">
TypeScript
</h3>
<p>
tiptap 2 is written in TypeScript. That helps us to find bugs early and gives you a nice autocomplete for the API (if your IDE supports that) on top of the extensive human written documentation.
</p>
<p>
<g-link to="/guide/typescript">
TypeScript
</g-link>
</p>
</feature-item>
<h3>
<feature-item>
<h3 class="is-h2">
Collaborative
</h3>
<p>
Real-time collaboration, syncing between different devices and working offline used to be hard. We provide everything you need to keep everything in sync, conflict-free with the power of [Y.js](https://github.com/yjs/yjs). Our production-grade setup requires less than 20 lines of code.
Real-time collaboration, syncing between different devices and working offline used to be hard. We provide everything you need to keep everything in sync, conflict-free with the power of <g-link to="https://github.com/yjs/yjs">
Y.js
</g-link>. Our production-grade setup requires less than 20 lines of code.
</p>
<p>
<g-link to="/guide/collaborative-editing">
Collaborative editing
</g-link>
</p>
</feature-item>
<h3>
<feature-item>
<h3 class="is-h2">
Community
</h3>
<p>
Over the years, a lovely community has grown around tiptap. Theres so much content shared, so many people helping out in issues and a ton of community extensions, youll be surprised how much that can help.
</p>
</feature-item>
</feature-list>
</app-section>
<app-section>
<div class="text">
<h2 class="is-h1">
Quickstart
</h2>
<p>
To pull in tiptap for quick demos or giving it just a spin, grab the latest build via CDN. We use two different provides:
</p>
<!-- eslint-disable -->
<prism>import { Editor } from '@tiptap/core'
import { defaultExtensions } from '@tiptap/starter-kit'
new Editor({
element: document.querySelector('.element'),
extensions: defaultExtensions(),
content: '&lt;p&gt;Your content.&lt;/p&gt;',
})</prism>
<!-- eslint-enable -->
<p>
<g-link to="/overview/installation">
Learn more
</g-link>
</p>
</div>
</app-section>
@ -87,7 +143,11 @@
License
</h2>
<p>
tiptap is licensed under [MIT](https://github.com/ueberdosis/tiptap-next/blob/main/LICENSE.md), so youre free to do whatever you want. If youre using it in production, do the right thing and [become one of our wonderful sponsors](/sponsor) to fund the development, maintenance and support of tiptap and the whole ecosystem.
tiptap is licensed under <g-link to="https://github.com/ueberdosis/tiptap-next/blob/main/LICENSE.md">
MIT
</g-link>, so youre free to do whatever you want. If youre using it in production, do the right thing and <g-link to="/sponsor">
become one of our wonderful sponsors
</g-link>(/sponsor) to fund the development, maintenance and support of tiptap and the whole ecosystem.
</p>
</div>
</app-section>
@ -96,10 +156,16 @@
<script>
import AppSection from '@/components/AppSection'
import FeatureList from '@/components/FeatureList'
import FeatureItem from '@/components/FeatureItem'
import Prism from '~/components/Prism'
export default {
components: {
AppSection,
FeatureList,
FeatureItem,
Prism,
},
}
</script>