move petite-vue-related shortcodes to pv directory; start input-..., display
This commit is contained in:
parent
9a0129e70a
commit
af6a4a075d
8 changed files with 55 additions and 5 deletions
|
@ -5,6 +5,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"module": "es2022",
|
"module": "es2022",
|
||||||
|
"moduleResolution": "node",
|
||||||
"lib": ["es2017", "dom"],
|
"lib": ["es2017", "dom"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@params": ["./params-tsc.ts"]
|
"@params": ["./params-tsc.ts"]
|
||||||
|
|
|
@ -25,12 +25,22 @@ taxonomies:
|
||||||
domain: domains
|
domain: domains
|
||||||
topic: topics
|
topic: topics
|
||||||
|
|
||||||
|
frontmatter:
|
||||||
|
_merge: shallow
|
||||||
|
|
||||||
|
related:
|
||||||
|
_merge: shallow
|
||||||
|
|
||||||
|
taxonomies:
|
||||||
|
domain: domains
|
||||||
|
topic: topics
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
- identifier: home
|
- identifier: home
|
||||||
name: Home
|
name: Home
|
||||||
title: Home
|
title: Home
|
||||||
url: /posts
|
url: /app
|
||||||
weight: 10
|
weight: 10
|
||||||
- identifier: topics
|
- identifier: topics
|
||||||
name: Topics
|
name: Topics
|
||||||
|
|
|
@ -14,10 +14,10 @@ jsModule: main.ts
|
||||||
|
|
||||||
cyberscopes example site - use petite-vue in Hugo-generated sites.
|
cyberscopes example site - use petite-vue in Hugo-generated sites.
|
||||||
|
|
||||||
{{< pv-count >}}
|
{{< pv/count >}}
|
||||||
|
|
||||||
{{< pv-count init="7" expr="count--" label="dec" >}}
|
{{< pv/count init="7" expr="count--" label="dec" >}}
|
||||||
|
|
||||||
{{< pv-count init="99" expr="save()" label="log" >}}
|
{{< pv/count init="99" expr="save()" label="log" >}}
|
||||||
|
|
||||||
{{< input >}}
|
{{< pv/explore >}}
|
||||||
|
|
20
exampleSite/content/app/test1.md
Normal file
20
exampleSite/content/app/test1.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: "example"
|
||||||
|
summary: ""
|
||||||
|
img:
|
||||||
|
pageid: test1
|
||||||
|
domains: []
|
||||||
|
topics: []
|
||||||
|
date: 2023-02-28
|
||||||
|
author: helmutm
|
||||||
|
draft: false
|
||||||
|
weight: 10
|
||||||
|
jsModule: main.ts
|
||||||
|
---
|
||||||
|
|
||||||
|
cyberscopes example site - use petite-vue in Hugo-generated sites.
|
||||||
|
|
||||||
|
{{< pv/input-textline name="firstname" >}}
|
||||||
|
{{< pv/input-textline name="lastname" >}}
|
||||||
|
|
||||||
|
{{< pv/display name="firstname" >}}
|
12
layouts/shortcodes/pv/display.html
Normal file
12
layouts/shortcodes/pv/display.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<div v-scope @vue:mounted="mounted('data')">
|
||||||
|
<pre v-text="data"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-scope @vue:mounted="mounted('output')">
|
||||||
|
<pre v-text="output"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-scope>
|
||||||
|
<div>id = {| conf.itemid |}</div>
|
||||||
|
</div>
|
||||||
|
|
7
layouts/shortcodes/pv/input-textline.html
Normal file
7
layouts/shortcodes/pv/input-textline.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{{- $name := default "textline" (.Get "name") }}
|
||||||
|
<div v-scope>
|
||||||
|
<input type="text" name="{{ $name }}" autofocus
|
||||||
|
v-model="data.{{ $name }}"
|
||||||
|
@vue:mounted="$el.value = ''"
|
||||||
|
@change="save($el.value)" />
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue