-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.jinja2
More file actions
158 lines (124 loc) · 3.6 KB
/
index.jinja2
File metadata and controls
158 lines (124 loc) · 3.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Python Microformats Parser</title>
<style>
body {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media screen and (min-width: 35em) {
body {
margin-left: 10%;
margin-right: 10%;
}
}
h1,
h2 {
font-weight: 500;
}
h1 {
font-size: 2.5rem;
}
section {
border-bottom: 1px solid #9d9da9;
padding-bottom: 2em;
}
form > p {
margin-bottom: 1.5em;
}
label {
font-weight: bold;
}
label[for] {
display: block;
width: fit-content;
margin-bottom: 0.5em;
}
textarea,
input[type=url] {
box-sizing: border-box;
font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1.25rem;
padding: 0.75rem 1.5rem;
width: 100%;
}
button {
color: rgb(255, 255, 255);
background-color: rgb(92, 184, 92);
font-size: 1.25rem;
padding: 0.75rem 1.5rem;
border-radius: 0.3rem;
}
li {
margin-bottom: 0.5em;
}
</style>
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<h1>Microformats Parser (Python) {{ mf2py_version }}</h1>
<main>
<section>
<form action="/" accept-charset="UTF-8">
<p>
<label for="url">Enter a URL</label>
<input required id="url" type="url" name="url" placeholder="https://example.com/person.html">
</p>
<p>
<label for="parser">Parser</label>
<select id="parser" name="parser">
<option>html5lib</option>
<option>lxml</option>
<option>html.parser</option>
</select>
</p>
<p>
<label title="mf2util interprets certain post types (currently h-entry and h-event) and returns a normalized result">
<input name="util" class="form-check-input" type="checkbox" value="true">
Process with mf2util
</label>
</p>
<button type="submit">Parse</button>
</form>
</section>
<section>
<h2>OR parse just a snippet of HTML</h2>
<form method="post" action="/">
<p>
<label for="doc">HTML</label>
<textarea required id="doc" name="doc" rows="6"></textarea>
</p>
<p>
<label for="url">Base URL</label>
<input id="url" name="url" type="url">
</p>
<p>
<label for="parser">Parser</label>
<select id="parser" name="parser">
<option>html5lib</option>
<option>lxml</option>
<option>html.parser</option>
</select>
</p>
<button type="submit">Parse</button>
</form>
</section>
</main>
<footer>
<ul>
<li><a href="https://microformats.io">About Microformats</a></li>
<li><a href="https://github.com/microformats/microformats-parser-website-python">Source code for this site</a></li>
<li><a href="https://github.com/microformats/mf2py">Source code for the Microformats mf2py Parser</a></li>
<li>
Other Microformats Parser websites:
<a href="https://go.microformats.io">Go</a>,
<a href="https://node.microformats.io">Node</a>,
<a href="https://php.microformats.io">PHP</a>, and
<a href="https://ruby.microformats.io">Ruby</a>.
</li>
</ul>
</footer>
</body>
</html>