-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (96 loc) · 5.18 KB
/
index.html
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Logo Generator</title>
<meta name="description" content="Konstanint Naumov's Logo Generator">
<meta name="viewport" content="width=580; initial-scale=1; shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="css/bulma.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<nav class="navbar has-background-white-ter with-box-shadow" role="navigation" aria-label="main navigation">
<div class="container">
<img src="img/logo.png" class="navbar-logo" alt="KN">
<span class="navbar-item has-text-weight-semibold">Handy Custom Icon Maker</span>
</div>
</nav>
<div class="container" id="logo-generator-app" v-cloak>
<section class="app-container-block columns">
<div class="settings-block column is-4">
<div class="tile is-child box">
<form id="color-settings">
<text-input placeholder="ABC"></text-input>
<color-input v-for="(char, i) in text" :number="i" :title="`${char.toUpperCase()}`"></color-input>
<color-input title="Outline" :number="3"></color-input>
<range-input title="Spacing" v-show="text.length > 1" param="spacing" min="-1" max="21"></range-input>
<range-input title="Scale" v-show="text.length > 0" param="scale" min="65" max="135"></range-input>
<div class="field check-field is-clearfix">
<label class="checkbox is-pulled-left">
<input v-model="isFilled" type="checkbox" hidden>
<span>Filled</span>
<div class="visual-checkbox">
<svg style="width: 20px; height: 20px;" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#DBDBDB" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"></path></svg>
</div>
</label>
</div>
</form>
</div>
<download-button @download="download" hide-for="mobile"></download-button>
</div>
<div class="preview-block column is-8">
<div class="tile is-child box result-container has-background-white-ter">
<div class="result-container-title">Preview</div>
<div class="constructor-wrapper">
<div id="logo-constructor" class="logo-constructor">
<!-- Logo background -->
<svg height="500px" width="500px" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0;" x="0px" y="0px" viewBox="0 0 426 426" style="enable-background:new 0 0 426 426;" xml:space="preserve">
<circle fill="#FFFFFF" cx="213" cy="213" r="213"/>
<circle :fill="isFilled ? background : '#FFFFFF'" cx="213" cy="213" r="183"/>
<path :fill="background" d="M213,40c46.2,0,89.7,18,122.3,50.7S386,166.8,386,213c0,46.2-18,89.7-50.7,122.3S259.2,386,213,386
s-89.7-18-122.3-50.7S40,259.2,40,213s18-89.7,50.7-122.3S166.8,40,213,40 M213,20C106.4,20,20,106.4,20,213s86.4,193,193,193
s193-86.4,193-193S319.6,20,213,20L213,20z"/>
</svg>
<!-- Logo Letters -->
<div class="logo-constructor-letters" :class="{'full-width': isFilled}">
<div class="logo-constructor-letters-wrapper">
<div v-for="(char, i) in text" class="logo-constructor-letter-wrapper" :style="{
margin: `0 ${spacing}px`,
width: `${Math.floor(getLetter(i).width * scale)}px`,
height: `${Math.floor(122 * scale)}px`}">
<svg
:width="`${Math.floor(getLetter(i).width * scale)}px`" :height="`${Math.floor(122 * scale)}px`"
:view-box.camel="`0 0 ${getLetter(i).width} 122`" xmlns="http://www.w3.org/2000/svg">
<path :fill="colors[i]" :d="getLetter(i).d"/>
</svg>
</div>
</div>
</div>
</div>
<!-- Result Canvas -->
<div class="canvas-container" id="canvas" style="opacity: 0;">
</div>
</div>
</div>
<download-button @download="download" hide-for="tablet"></download-button>
</div>
</section>
</div>
<script src="js/html2canvas.min.js"></script>
<script src="js/canvastoblob.min.js"></script>
<script src="js/filesaver.min.js"></script>
<script src="js/vuex.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>