-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrint.py
executable file
·39 lines (36 loc) · 887 Bytes
/
Print.py
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
# Prints the HTML with the authorized content
def Print(content):
print("Content-type: text/html\n\n")
print('''
<!DOCTYPE html>
<html>
<head>
<title>
Sharing page
</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header">
Sharing Page
</div>
<div class="content">
''')
for item in content:
print('''
<a href="''' + item[1] + '''" target="_blanc">
<div class="card">
<div class="card_image" style='background-image: url("''' + item[3] + '''")'></div>
<div class="card_footer">
<a class="card_link" href="''' + item[1] + '''">''' + item[0] + '''</a>
</div>
</div>
</a>
''')
print('''
</div>
<div class="footer"></div>
</body>
</html>
''')
return