mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
feat: Новый кросс платформенный вьювер
This commit is contained in:
@@ -3,6 +3,10 @@ import fs from 'node:fs'
|
||||
fs.rmSync(new URL('./dist/', import.meta.url), { recursive: true, force: true })
|
||||
fs.mkdirSync(new URL('./dist/app-icons/', import.meta.url), { recursive: true })
|
||||
fs.copyFileSync(new URL('./index.html', import.meta.url), new URL('./dist/index.html', import.meta.url))
|
||||
fs.copyFileSync(
|
||||
new URL('../../../dist/viewer-element.js', import.meta.url),
|
||||
new URL('./dist/viewer-element.js', import.meta.url),
|
||||
)
|
||||
fs.copyFileSync(
|
||||
new URL('./src/sprite/.svg-sprite/sprite.svg', import.meta.url),
|
||||
new URL('./dist/app-icons/sprite.svg', import.meta.url),
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<style>
|
||||
body { margin: 0; padding: 40px; font-family: system-ui, sans-serif; }
|
||||
[data-testid="icon"] { width: 64px; height: 64px; color: #16a34a; --icon-color-1: #16a34a; }
|
||||
gromlab-sprite-viewer { margin-top: 32px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -15,6 +16,12 @@
|
||||
<svg data-testid="icon" data-app="standalone" viewBox="0 0 24 24" aria-label="Check icon">
|
||||
<use href="/app-icons/sprite.svg#check"></use>
|
||||
</svg>
|
||||
<gromlab-sprite-viewer
|
||||
viewer-title="Standalone Viewer"
|
||||
manifest-url="/app-icons/manifest.json"
|
||||
sprite-url="/app-icons/sprite.svg"
|
||||
></gromlab-sprite-viewer>
|
||||
</main>
|
||||
<script type="module" src="/viewer-element.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user