-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
194 lines (194 loc) · 10.2 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Link Generator</title>
<link rel="icon" href="./images/prism_60.gif">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
[v-cloak] {display: none;}
.product-image {text-align: center;}
.product-image > img {margin: auto; max-width: 100%; display: flex; background: #eee url("./images/photo.png") no-repeat center; height: 200px;}
.links-wrapper {position: relative;}
.links-wrapper > textarea {width: 100%; height: 150px; resize: vertical;}
.links-wrapper > .btn {position: absolute; top: 0; right: 0;}
.filter .form-group {display: block;}
.filter .form-control {display: inline-block; width: auto;}
.link-image > a {height: 50px; font-size: 12px;}
.link-image > .thumb-a, .filter-colorways option[value="A"] {background: #E57373;}
.link-image > .thumb-b, .filter-colorways option[value="B"] {background: #F06292;}
.link-image > .thumb-c, .filter-colorways option[value="C"] {background: #BA68C8;}
.link-image > .thumb-d, .filter-colorways option[value="D"] {background: #7986CB;}
.link-image > .thumb-e, .filter-colorways option[value="E"] {background: #64B5F6;}
.link-image > .thumb-f, .filter-colorways option[value="F"] {background: #4DB6AC;}
.link-image > .thumb-g, .filter-colorways option[value="G"] {background: #81C784;}
.link-image > .thumb-h, .filter-colorways option[value="H"] {background: #DCE775;}
.link-image > a > img {max-height: 100%;}
.filter-colorways option {color: #fff;}
</style>
</head>
<body>
<div id="app" v-cloak>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
<strong>Warning!</strong> This is not an official site used by RipeConcepts. Please use with caution. The developer is not responsible for any damages occur when using the site.
</div>
<div class="alert alert-info">
<strong>Tips!</strong>
<ul>
<li>This tool is better when using the Chrome Extension - <a href="https://chrome.google.com/webstore/detail/cache-killer/jpfbieopdmepaolggioebjmedmclkbap" target="_blank">Cache Killer</a>.</li>
<li>When using this tool, do not open the PDP before and after running compit. You can check the PDP after all links are invalidated.</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3 product-image">
<img :src="'https://cdn3.minted.com/files/mintedProductsImages/MIN/' + prodkind + '/' + code + '/' + normalize_sku + '-007B_A_PD.jpg'">
</div>
<div class="col-sm-9">
<form @submit.prevent>
<div class="form-group">
<label for="sku">SKU</label>
<input type="text" class="form-control" name="sku" v-model="sku" placeholder="MIN-XXX-ZZZ">
</div>
<div class="form-group">
<div class="checkbox">
<label class="checkbox-inline">
<input type="checkbox" name="prepend_parameter" value="HOLIDAY" v-model="prepend_parameter"> Append parameter <span class="text-muted">(for old PDP)</span>
</label>
</div>
</div>
<div class="form-group">
<label for="colorway">Colorways</label>
<div class="radio">
<label class="radio-inline">
<input type="radio" name="colorway" value="A" v-model="colorway"> A
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="B" v-model="colorway"> B
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="C" v-model="colorway"> C
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="D" v-model="colorway"> D
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="E" v-model="colorway"> E
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="F" v-model="colorway"> F
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="G" v-model="colorway"> G
</label>
<label class="radio-inline">
<input type="radio" name="colorway" value="H" v-model="colorway"> H
</label>
</div>
</div>
<div class="form-group">
<label for="greetings">Greetings <small class="text-muted">(select if applicable)</small></label>
<div class="checkbox">
<label class="checkbox-inline">
<input type="checkbox" name="greetings" value="HOLIDAY" v-model="greetings"> Holiday
</label>
<label class="checkbox-inline">
<input type="checkbox" name="greetings" value="CHRISTMAS" v-model="greetings"> Christmas
</label>
<label class="checkbox-inline">
<input type="checkbox" name="greetings" value="NEWYEAR" v-model="greetings"> New Year
</label>
<label class="checkbox-inline">
<input type="checkbox" name="greetings" value="RELIGIOUS" v-model="greetings"> Religious
</label>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary" @click="generate_links">Generate</button>
<button class="btn btn-default" @click="clear">Clear</button>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Links <span class="label label-danger" v-if="links.array.length > 100">Cache invalidator has maximum of 100 entry. {{ links.array.length }} links generated.</span></label>
<div class="links-wrapper">
<textarea id="links" class="form-control" v-model="links.string" placeholder="Generated links"></textarea>
<button class="btn btn-default btn-xs" @click="copy_to_clipboard">Copy</button>
</div>
</div>
</form>
</div>
</div>
<div class="row" v-if="links.array.length">
<div class="col-sm-12">
<h3>Image Links <span class="badge">{{ links.array.length }}</span></h3>
</div>
<div class="col-sm-12">
<form class="filter" @submit.prevent>
<div class="form-group">
<label>Filter</label>
<div>
<select name="colorways" class="form-control filter-colorways" v-model="filter.colorway">
<option value="" disabled hidden selected="">Select colorway</option>
<option :value="colorway" v-for="colorway in colorways">{{ colorway }}</option>
</select>
<select name="layouts" class="form-control" v-model="filter.layout">
<option value="" disabled hidden selected="">Select layout</option>
<option :value="layout" v-for="layout in layouts">{{ layout }}</option>
</select>
<select name="formats" class="form-control" v-model="filter.format">
<option value="" disabled hidden selected="">Select format</option>
<option :value="format" v-for="format in formats">{{ format }}</option>
</select>
<select name="greetings" class="form-control" v-if="greetings.length > 1" v-model="filter.greeting">
<option value="" disabled hidden selected="">Select greeting</option>
<option :value="greeting" v-for="greeting in greetings">{{ normalize_greeting(greeting) }}</option>
</select>
<button class="btn btn-primary" v-if="filter.colorway || filter.layout || filter.format || filter.greeting" @click="filter_images">Filter</button>
<button class="btn btn-default" v-if="filter.colorway || filter.layout || filter.format || filter.greeting" @click="reset_filter">Reset</button>
</div>
</div>
</form>
</div>
<div class="col-sm-1 link-image" v-for="image of filter.images">
<a class="thumbnail" :class="{'thumb-a': image.colorway == 'A', 'thumb-b': image.colorway == 'B', 'thumb-c': image.colorway == 'C', 'thumb-d': image.colorway == 'D', 'thumb-e': image.colorway == 'E', 'thumb-f': image.colorway == 'F', 'thumb-g': image.colorway == 'G', 'thumb-h': image.colorway == 'H'}" :href="image.link" target="_blank"><img :src="image.link" alt="No Image Generated"></a>
</div>
<div class="col-sm-12" v-if="filter.images.length == 0">
<p>No results.</p>
</div>
</div>
<div class="row ">
<div class="col-sm-12">
<div class="alert alert-info">
<strong>Supported Product Kinds:</strong>
<ul>
<li>AIO</li>
<li>BLB</li>
<li>FHB</li>
<li>FPC</li>
<li>HCP</li>
<li>HFM</li>
<li>HFS</li>
<li>HLW</li>
<li>HMC</li>
<li>HNP</li>
<li>HNY</li>
<li>HPC</li>
<li>HSM</li>
<li>HYC</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<script src="https://unpkg.com/vue"></script>
<script type="text/javascript" src="./js/prodkind.js"></script>
<script type="text/javascript" src="./js/layout.js"></script>
<script type="text/javascript" src="./js/app.js"></script>
</body>
</html>