-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
178 lines (159 loc) · 4.58 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>ENT 6th Class Routine</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<style>
#invoice table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
margin-bottom: 20px;
}
#invoice td,
#invoice th {
border: 1px solid rgb(153, 153, 153);
padding: 8px;
text-align: center;
}
#invoice tr:nth-child(even) {
background-color: #f2f2f2;
}
#invoice tr:hover {
background-color: #ddd;
}
#invoice th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #04aa6d;
color: white;
}
.downParent {
width: fit-content;
margin: 0 auto;
}
.download {
margin: 10px auto;
background-color: #04aa6d;
border: none;
text-transform: uppercase;
cursor: pointer;
color: #fff;
font-weight: bold;
border-radius: 5px;
width: 200px;
transition: all 0.5s;
padding: 10px;
}
@media screen and (max-width: 600px) {
.download{
margin: 20px auto;
}
}
.download:hover {
transition: all 0.5s;
transform: scale(1.1);
color: black;
contain: "Download PDF";
}
</style>
<body>
<div id="invoice">
<table>
<caption>
<h1>Electronics 6th Class Routine</h1>
</caption>
<thead>
<tr>
<th>Day</th>
<th>08:00 AM - 08:45 AM</th>
<th>08:45 AM - 09:30 AM</th>
<th>09:30 AM - 10:15 AM</th>
<th>10:15 AM - 11:00 AM</th>
<th>11:00 AM - 11:45 AM</th>
<th>11:45 AM - 12:30 PM</th>
<th>12:30 PM - 01:15 PM</th>
</tr>
</thead>
<tbody>
<!-- <tr>
<td>Saturday</td>
<td >X</td>
<td >X</td>
<td >66852 AK 303</td>
<td>66854 AQK 303</td>
<td colspan="3">66853 MH ENT LAB</td>
</tr> -->
<tr>
<td>Sunday</td>
<td colspan="3">66862 SK TV LAB</td>
<td>66863 MB 305</td>
<td colspan="2">66865 MB ENT LAB</td>
<td>66862 SK 305</td>
</tr>
<tr>
<td>Monday</td>
<td colspan="3">66863 MB ET LAB</td>
<td>66862 SK 305</td>
<td>66662 MH 305</td>
<td>66861 AK 305</td>
<td>X</td>
</tr>
<tr>
<td>Tuesday</td>
<td colspan="3">66865 MB ENT LAB</td>
<td>66864 SK 305</td>
<td>66662 MH 305</td>
<td>66863 MB 305</td>
<td>665852 AR 305</td>
</tr>
<tr>
<td>Wednesday</td>
<td>X</td>
<td colspan="3">66861 AK ET LAB</td>
<td colspan="2">66662 MH HARD WORK</td>
<td>66864 SK 305</td>
</tr>
<tr>
<td>Thursday</td>
<td>X</td>
<td colspan="3">68664 MB ENT LAB</td>
<td>66861 AK 305</td>
<td>X</td>
<td>65852 AR 305</td>
</tr>
<tfoot>
<td style="background-color: #04aa6d;color: #000000;font-weight: bold;" colspan="8">Created By <a target="__blank" href="https://www.facebook.com/alhasib.dev/">Hasib</a></td>
</tfoot>
</tbody>
</table>
<div class="downParent">
<button class="download PDF">Download PDF</button>
<br>
<button class="download PNG">Download PNG</button>
</div>
</div>
<script>
function download(fileUrl, fileName) {
var a = document.createElement("a");
a.href = fileUrl;
a.setAttribute("download", fileName);
a.click();
}
const pdf ='./file/electronics_6th_class_routine.pdf';
const png ='./file/electronics_6th_class_routine.png';
const pdfDown = document.querySelector(".PDF");
const pngDown = document.querySelector('.PNG')
pngDown.addEventListener("click", () => {
download(png, "ENT_6th_Class_Routine.png");
});
pdfDown.addEventListener("click", () => {
download(pdf, "ENT_6th_Class_Routine.pdf");
});
</script>
</body>
</html>