-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerator-pl.php
More file actions
242 lines (229 loc) · 9.75 KB
/
Copy pathgenerator-pl.php
File metadata and controls
242 lines (229 loc) · 9.75 KB
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<html lang="pl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Mistrzowie wyzwania 222</title>
<link href="assets/css/all.min.css" rel="stylesheet">
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/mdb.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/image-picker.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/steppers.min.css">
<style>
img {
width: 100%;
height: 100%;
}
.template_bg {
width: 300px;
height: 390px;
}
body {
background-color: #1bb4de;
}
.class2 {
margin-left: auto;
margin-right: auto;
text-align: center;
width: 70%;
margin-top: 50px;
}
.photoI{
width: 217px;position: absolute;left: 41px;top: 119px;height: 193px;background-size: cover;background-position: center;
}
.photoD{
width: 150px;position: absolute;left: 76px;top: 136px;height: 150px;background-size: cover;background-position: center;
}
</style>
</head>
<body class="design6 design7">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.stepper').mdbStepper();
})
function someFunction22() {
setTimeout(function () {
$('#horizontal-stepper-fix').nextStep();
}, 1000);
}
</script>
<script type="application/javascript">
window.onload = function () {
var photo, urlString;
photo = sessionStorage.getItem('photo');
urlString = 'url(upload/' + photo + ')';
document.getElementById('photoC').style.backgroundImage = urlString;
}
function saveBG() {
var savebg;
savebg = document.getElementById("tempBG").src;
sessionStorage.setItem("tempBG", savebg);
}
function getBG() {
var getBG, BGi, BGd;
getBG = sessionStorage.getItem("tempBG");
BGi = "https://itdevweb.pl/generator/template-insta2.jpg";
BGd = "https://itdevweb.pl/generator/template-dyplom2.jpg";
document.getElementById('setBG').src = getBG;
if (getBG === BGd) {
document.getElementById('photoC').setAttribute('class','rounded-circle photoD');
document.getElementById('setName').setAttribute('class','tempNameD');
} else if (getBG === BGi) {
document.getElementById('photoC').setAttribute('class','photoI');
document.getElementById('setName').setAttribute('class','tempNameI');
} else {
alert("Błąd");
}
}
</script>
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-dark scrolling-navbar">
<div class="container">
<div id="navbarSupportedContent-7">
<a class="navbar-brand" href="#">
<img src="assets/images/logo.png">
</a>
</div>
<div class="collapse navbar-collapse">
<h4>Mistrzowie wyzwania 222</h4>
</div>
</div>
</nav>
</header>
<!--Intro Section-->
<main>
<div class="container">
<div class="card card-cascade narrower">
<!-- Grid column -->
<div class="row d-flex justify-content-center">
<div class="col-md-8 mr-0 pb-5">
<div class="view view-cascade gradient-card-header custom-gradient">
<h2 class="h2-responsive mb-0 font-weight-500">NAGRODA</h2>
<h4 class="h4-responsive mb-0 font-weight-500">Indywidualne wyróżnienie cyfrowe</h4>
</div>
</div>
<div class="col-md-6">
<ul class="stepper horizontal horizontal-fix" id="horizontal-stepper-fix">
<li class="step active">
<div class="step-title waves-effect waves-dark"></div>
<div class="step-new-content">
<!-- Card content -->
<div class="card-body">
<div class="card-header">
<h4 class="text-center">Wybierz grafikę </h4>
</div>
<select class="image-picker" id="templatepicker">
<option value="assets/images/template-dyplom2.jpg"
data-img-src="template-dyplom2.jpg"
>
</option>
<option value="assets/images/template-insta2.jpg"
data-img-src="template-insta2.jpg">
</option>
</select>
<div class="text-center">
<button class="btn btn-sm btn-success m-0 mt-4 next-step"
data-feedback="someFunction22" onclick="saveBG();">"DALEJ"
</button>
</div>
</div>
</div>
</li>
<li class="step">
<div class="step-title waves-effect waves-dark"></div>
<div class="step-new-content">
<div class="card-body">
<div class="card-header">
<h4 class="text-center">Wpisz swoje imię (opcjonalne) </h4>
</div>
<div class="md-form md-outline">
<input type="text" id="inputPassword6MD" class="form-control" value=""
placeholder="..."
style="width: auto;">
</div>
</div>
<div class="text-center">
<button class="btn btn-sm btn-grey m-1 back-step">WSTECZ
</button>
<button class="btn btn-sm btn-success m-1 next-step" onclick="getBG();"
data-feedback="someFunction22">DALEJ
</button>
</div>
</div>
</li>
<li class="step">
<div class="step-title waves-effect waves-dark"></div>
<div class="step-new-content">
<div class="card-body">
<div class="card-header">
<h4 class="text-center">Zobacz podgląd </h4>
</div>
<div class="class2">
<div class="template_bg" id="template_bg" style="position: relative;">
<img class="template_bgs" id="setBG" src="">
<div id="photoC"></div>
<div id="setName"></div>
</div>
</div>
<div class="text-center">
<button class="btn btn-danger m-0 " type="button" onclick="generate()">
Generuj PDF
<i class="far fa-magic ml-1"></i>
</button>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
<script>
function generate() {
// Get the element
var element = document.getElementById('template_bg');
//var sessionElement = sessionStorage.getItem("tempBG");
// Generate the PDF.
html2pdf().from(element).set({
margin: 3,
filename: 'generator.pdf',
html2canvas: {
scale: 2,
width: 300
},
jsPDF: {
orientation: 'portrait',
unit: 'mm',
format: 'letter'
}
}).save();
}
</script>
<script type="text/javascript" src="assets/js/pdfmake.js"></script>
<script type="text/javascript" src="assets/js/popper.min.js"></script>
<script type="text/javascript" src="assets/js/image-picker.js"></script>
<script type="text/javascript" src="assets/js/steppers.min.js"></script>
<script>
$("input")
.keyup(function () {
var value = $(this).val();
$("#setName").text(value);
})
.keyup();
jQuery("select.image-picker").imagepicker({
hide_select: true,
})
</script>
<script type="text/javascript" src="assets/js/material-select.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/mdb.min.js"></script>
<script>
new WOW().init();
</script>
</body>
</html>