Skip to content

Commit

Permalink
fix: make headers semantically correct
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrosman committed May 24, 2024
1 parent 7bb37fe commit 42e6b8a
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 25 deletions.
11 changes: 9 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>vue-paint</title>
</head>
<body>
<div id="app"></div>
<div class="layout">
<h1>vue-paint</h1>
vue-paint is a simple and lightweight paint component for vue projects. It can be used to add annotations to images, videos, or just draw some simple shapes to a canvas-like area.

Please check out the <a href="https://www.npmjs.com/package/vue-paint">npm package readme</a> for more details on how to get up and running.

<div id="app"></div>
</div>
<script type="module" src="/src/demo.ts"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function save({ svg, tools, history }: SaveParameters) {
<canvas ref="canvasRef"></canvas>
</section>
</div>
<h1>Barebones example</h1>
<h2>Barebones example</h2>
<vp-editor @save="save" :tools></vp-editor>

<WithBackground @save="save" />
Expand Down
8 changes: 8 additions & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@import './base.css';
@import '../../public/lib/themes/default.css';

#app {
margin-top: 10em;
}

a, a:hover, a:active, a:visited {
color: #c82d2d;
}

.layout {
max-width: 1280px;
margin: 0 auto;
Expand Down
9 changes: 2 additions & 7 deletions src/examples/InteractiveHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,12 @@ function addRandomLine() {
</script>

<template>
<h1>Interactive history</h1>
<h2>Interactive history</h2>
<p>
You can inspect and modify the history and settings objects down below to see it update
automatically. This can of course be done programmatically as well.
</p>
<vp-editor
@save="$emit('save', $event)"
v-model:settings="settings"
v-model:history="history"
:tools
/>
<vp-editor @save="$emit('save', $event)" v-model:settings="settings" v-model:history="history" :tools />
<button @click="addRandomLine">Add random line</button>
<textarea v-model="historyJson"></textarea>
<textarea v-model="settingsJson"></textarea>
Expand Down
2 changes: 1 addition & 1 deletion src/examples/LessTools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defineEmits(['save'])
</script>

<template>
<h1>With less tools</h1>
<h2>With less tools</h2>
<p>The editor will only support the tools you provide it</p>
<vp-editor @save="$emit('save', $event)" :tools></vp-editor>
</template>
8 changes: 2 additions & 6 deletions src/examples/PersistHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ defineEmits(['save'])
</script>

<template>
<h1>Persist history</h1>
<h2>Persist history</h2>
<p>
Using <code>v-model:history</code> you can set initial state, modify the state programmatically,
add shapes, save current state (like in localStorage or on a server). Try to draw something and
reload the page to see localStorage in action.
</p>
<vp-editor
v-model:history="history"
@save="$emit('save', $event)"
:tools
></vp-editor>
<vp-editor v-model:history="history" @save="$emit('save', $event)" :tools></vp-editor>
</template>
9 changes: 2 additions & 7 deletions src/examples/UsingEvents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ function logEvent(event: DrawEvent) {
</script>

<template>
<h1>Using events</h1>
<h2>Using events</h2>
<p>
You can hook into events that are emitted from the component. Watch the console while drawing to
see it in action.
</p>
<vp-editor
@save="$emit('save', $event)"
:tools
@draw-start="logEvent"
@draw-end="logEvent"
></vp-editor>
<vp-editor @save="$emit('save', $event)" :tools @draw-start="logEvent" @draw-end="logEvent"></vp-editor>
</template>
2 changes: 1 addition & 1 deletion src/examples/WithBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defineEmits(['save'])
</script>

<template>
<h1>With background</h1>
<h2>With background</h2>
<p>
You can set a custom background with useBackground(), or pass a background to useAllTools().
</p>
Expand Down

0 comments on commit 42e6b8a

Please sign in to comment.