1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="3tgjKRYCVRWTziuUgYny5vY4eU7Vddvat0pLnoCuPBs">
<title>HTML Minifier Terser</title>
<link rel="stylesheet" href="./main.css">
<style>
[x-cloak] {
display: none !important;
}
</style>
</head>
<body>
<div class="wrapper">
<h1 class="header">HTML Minifier <span id='minifer-version'></span></h1>
<div class="main" x-data="minifier" x-cloak>
<div class="workspace">
<textarea rows="8" cols="40" class="input-content" x-model="input"></textarea>
<div class="mr-1"><button type="button" @click="minify()">Minify</button></div>
<textarea rows="8" cols="40" class="output-content" readonly x-model="output"></textarea>
<p x-text="stats.text" :class="stats.result"></p>
</div>
<div class="options">
<form class="mr-1">
<template x-for="option in options">
<div>
<template x-if="option.type === 'checkbox'">
<div class="form-group">
<input type="checkbox" :id="option.id" x-model="option.checked">
<label :for="option.id" x-text="option.label" :class="option.unsafe ? 'unsafe' : ''"></label>
<template x-if="option.helpText">
<span class="quiet short" x-html="option.helpText"></span>
</template>
</div>
</template>
<template x-if="option.type === 'text'">
<div class="form-group">
<label :for="option.id" x-text="option.label" :class="option.unsafe ? 'unsafe' : ''"></label>
<input type="text" :id="option.id" x-model="option.value">
<template x-if="option.helpText">
<span class="quiet short" x-html="option.helpText"></span>
</template>
</div>
</template>
<template x-if="option.type === 'number'">
<div class="form-group">
<label :for="option.id" x-text="option.label" :class="option.unsafe ? 'unsafe' : ''"></label>
<input type="number" :id="option.id" x-model="option.value">
<template x-if="option.helpText">
<span class="quiet short" x-html="option.helpText"></span>
</template>
</div>
</template>
</div>
</template>
</form>
<div>
<span>Select:</span>
<a href="#" @click.prevent="selectAllOptions(true)">All</a>,
<a href="#" @click.prevent="selectAllOptions(false)">None</a>,
<a href="#" @click.prevent="resetOptions()">Reset</a>
</div>
</div>
</div>
<div class="footer">
<p class="quiet">
HTMLMinifier is made by <a href="http://perfectionkills.com/">kangax</a>,
using tweaked version of HTML parser by <a href="http://ejohn.org/">John Resig</a>
(which, in its turn, is based on work of <a href="http://erik.eae.net/">Erik Arvidsson</a>).
Source and bugtracker are <a href="https://github.com/terser/html-minifier-terser">hosted on GitHub</a>.
</p>
</div>
</div>
<script src="./main.js" type="module"></script>
</body>
</html>
|