added bundle attribute
This commit is contained in:
@@ -170,7 +170,11 @@ async function createServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderSVGToBase64(element: string) {
|
function renderSVGToBase64(element: string) {
|
||||||
let srcName = element.split('src')[1]?.split(' ')[0]?.slice(2);
|
const fixedElm = element.split('>')[0];
|
||||||
|
if (!fixedElm) return false;
|
||||||
|
if (fixedElm.split(' ').length < 2) return false;
|
||||||
|
if (!fixedElm.includes('svg:bundle')) return false;
|
||||||
|
let srcName = fixedElm.split('src')[1]?.split(' ')[0]?.slice(2);
|
||||||
if (!srcName) return;
|
if (!srcName) return;
|
||||||
srcName = srcName.slice(0, srcName.length - 2);
|
srcName = srcName.slice(0, srcName.length - 2);
|
||||||
if (!srcName.includes('.svg')) return srcName;
|
if (!srcName.includes('.svg')) return srcName;
|
||||||
|
|||||||
@@ -5,18 +5,21 @@
|
|||||||
<button d-on:click="appState.contents.count--"
|
<button d-on:click="appState.contents.count--"
|
||||||
class="transition-colors p-3 duration-300 active:bg-red-700 hover:bg-red-600 hover:text-zinc-100 mr-1">
|
class="transition-colors p-3 duration-300 active:bg-red-700 hover:bg-red-600 hover:text-zinc-100 mr-1">
|
||||||
<img src='/minus.svg'
|
<img src='/minus.svg'
|
||||||
|
svg:bundle
|
||||||
width="24px"
|
width="24px"
|
||||||
alt="minus" />
|
alt="minus" />
|
||||||
</button>
|
</button>
|
||||||
<button d-on:click="appState.contents.count = 0"
|
<button d-on:click="appState.contents.count = 0"
|
||||||
class="transition-colors p-3 duration-300 active:bg-zinc-700 hover:bg-zinc-800 hover:text-red-100 mr-1">
|
class="transition-colors p-3 duration-300 active:bg-zinc-700 hover:bg-zinc-800 hover:text-red-100 mr-1">
|
||||||
<img src='/refresh.svg'
|
<img src='/refresh.svg'
|
||||||
|
svg:bundle
|
||||||
width="24px"
|
width="24px"
|
||||||
alt="reset">
|
alt="reset">
|
||||||
</button>
|
</button>
|
||||||
<button d-on:click="appState.contents.count++"
|
<button d-on:click="appState.contents.count++"
|
||||||
class="transition-colors p-3 duration-300 active:bg-green-700 hover:bg-green-600 hover:text-green-100">
|
class="transition-colors p-3 duration-300 active:bg-green-700 hover:bg-green-600 hover:text-green-100">
|
||||||
<img src='/plus.svg'
|
<img src='/plus.svg'
|
||||||
|
svg:bundle
|
||||||
width="24px"
|
width="24px"
|
||||||
alt="plus" />
|
alt="plus" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user