Add reload button
This commit is contained in:
parent
3e9525079c
commit
080150d2bc
2 changed files with 12 additions and 6 deletions
|
|
@ -46,6 +46,7 @@
|
||||||
a.button {
|
a.button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0.3rem 0.6rem;
|
padding: 0.3rem 0.6rem;
|
||||||
|
margin-right: 0.6rem;
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
color: var(--background-color);
|
color: var(--background-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
||||||
17
src/main.ts
17
src/main.ts
|
|
@ -213,10 +213,15 @@ $compile(
|
||||||
oninput: $inputNum(height),
|
oninput: $inputNum(height),
|
||||||
}),
|
}),
|
||||||
select("Unit", { oninput: $input(unit) }, ["mm", "px"]),
|
select("Unit", { oninput: $input(unit) }, ["mm", "px"]),
|
||||||
["h2", {}, "Export"],
|
["h2", {}, "Actions"],
|
||||||
["div", {}, ["a", {
|
["div", {},
|
||||||
class: "button",
|
["a", {
|
||||||
href: svg.map(svg => `data:text/svg,${encodeURIComponent(svg)}`),
|
class: "button",
|
||||||
download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`)
|
href: svg.map(svg => `data:text/svg,${encodeURIComponent(svg)}`),
|
||||||
}, "Download SVG"]]]]
|
download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`)
|
||||||
|
}, "Download SVG"],
|
||||||
|
["a", {
|
||||||
|
class: "button",
|
||||||
|
href: "./",
|
||||||
|
}, "Reload"]]]]
|
||||||
).mount(document.body)
|
).mount(document.body)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue