forked from ipfyx/signal-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CSS.py
159 lines (130 loc) · 3.21 KB
/
CSS.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
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
HEAD = """
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap/css/signal.css" rel="stylesheet">
</head>
<body>
"""
NAVBAR = """
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="index.html">INDEX</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</nav>
"""
FOOTER = """
</body>
</html>
"""
IDEA = """
<section class="row">
<div class="col-md-6 msg_{css} {offset}">
<!-- Writer and date sent -->
<div class="col-md-12 name_{css}">
{contact_name} - {date}
</div>
<!-- Quoted contact and date sent -->
<div class="col-md-12 name_{css}">
{contact_quoted} - {quote_date}
<!-- Quoted msg and file -->
<div class="col-md-12 quote_{css}">
<a href="{filename}">
<img src="{filename}">
</a>
{quote}
</div>
<!-- Msg filename -->
</div>
<a href="{filename}">
<img src="{filename}">
</a>
</div>
<!-- Msg -->
{msg}
<!-- Reaction -->
{reaction}
</div>
</section>
"""
TEMPLATE = """
<section class="row">
<div class="col-md-6 msg_{css} {offset}">
<!-- Writer and date sent -->
<div class="col-md-12 name_{css}">
{contact_name} - {date}
</div>
<!-- Quoted contact and date sent -->
{quoted_msg}
<!-- Msg filename -->
{filename_sent}
<!-- Msg -->
{msg_sent}
<!-- Reaction -->
{reactions}
</div>
</section>
"""
REACTION_CSS = """
<div class="col-md-2 react_{css} offset-md-10">
{reactions}
</div>
"""
# Msg filename
FILENAME ="""
<p>
<a href="{filename}">
<img src="{filename}">
</a>
</p>
"""
VIDEO ="""
<p>
<a href="{filename}">{filename}</a>
<video width="540" controls <source src="{filename}" type="{type}"></video>
</p>
"""
PDF ="""
<p>
<a href="{filename}">
<embed src="{filename}" width=540/>
</a>
</p>
"""
QUOTE = """
<div class="col-md-12 name_{css}">
{contact_quoted} - {quote_date}
<!-- Quoted msg and file -->
<div class="col-md-12 quote_{css}">
{quote_filename}
{quote}
</div>
</div>
"""
TOTAL = """
<section class="row">
<div class="col-md-6 msg_myself">
<p>
sent : {total_sent}
</p>
<p>
recieved : {total_recv}
</p>
</section>
"""
INDEX = """
<section class="row">
<div class="col-md-6 msg_myself">
<p>
<a href="{link}.html">{link}</a>
</p>
<p>
Sent by {sender} : {msg_sent} messages <br>
Sent by {reciever} : {msg_recv} messages
</p>
</section>
"""