-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
259 lines (246 loc) · 11.9 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
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
<link href="/site.webmanifest" rel="manifest">
<meta content="Molecular Entity Generator (MEgen) is convenient online form to generate structured data about molecules in structured data formats like JSON-LD, RDFa and Microdata."
name="description">
<title>Molecular Entity Generator (MEgen)</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
rel="stylesheet"/>
</head>
<body>
<a href="./"><img alt="Molecular Entity Generator" id="logo" src="logo/megen.svg"></a>
<div class="card container bg-info text-center text-lg-start text-light">
<div class="container p-4">
<div class="row">
<div class="col-lg-6 col-md-12 mb-4 mb-md-0">
<h1 class="text-uppercase h5">About MEgen</h1>
<p>
Molecular Entity Generator (MEgen) is a convenient online form to generate structured data about
molecules. It supports all common structured data formats - <a class="text-white-50"
href="https://json-ld.org/"
target="_blank">JSON-LD</a>, <a
class="text-white-50"
href="http://rdfa.info/"
target="_blank">RDFa</a>, and <a
class="text-white-50"
href="https://www.w3.org/TR/microdata/"
target="_blank">Microdata</a>.
</p>
</div>
<div class="col-lg-6 col-md-12 mb-4 mb-md-0">
<h1 class="text-uppercase h5">What is structured data</h1>
<p>
<a class="text-white-50"
href="https://developers.google.com/search/docs/guides/intro-structured-data"
target="_blank">Structured data</a> is additional data placed on websites. It is not visible
to ordinary internet users but can be easily processed by machines. MEgen uses the <a
class="text-white-50"
href="https://bioschemas.org/profiles/MolecularEntity/0.5-RELEASE"
target="_blank">MolecularEntity
profile</a>.
</p>
</div>
</div>
</div>
</div>
<form action="create.php" method="post">
<input id="count" name="count" type="hidden" value="1">
<div class="card container" id="m1">
<div class="card-body molecular-entity">
<div class="form-group row">
<label class="col-sm-3 col-form-label">Identify things</label>
<div class="col-sm-9">
<select class="form-control form-control-sm thing1" name="name-thing-1">
<option id="iri-1" selected="selected" value="iri">IRI</option>
<option id="bnode-1" value="bnode">Blank node</option>
<option id="uuid-1" value="uuid">URN UUID</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Subject IRI</label>
<div class="col-sm-9">
<input class="form-control iri-thing1" name="iri-1" placeholder="IRI here... (required)" required type="url">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">identifier</label>
<div class="col-sm-9">
<input class="form-control" name="identifier-1" placeholder="identifier here... (required)" required
type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">name</label>
<div class="col-sm-9">
<input class="form-control" name="name-1" placeholder="name here... (required)" required type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">inChIKey</label>
<div class="col-sm-9">
<input class="form-control" maxlength="27" minlength="27" name="inchikey-1"
placeholder="inChIKey here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">inChI</label>
<div class="col-sm-9">
<input class="form-control" minlength="6" name="inchi-1" placeholder="inChI here..."
type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">SMILES</label>
<div class="col-sm-9">
<input class="form-control" name="smiles-1" placeholder="SMILES here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">url</label>
<div class="col-sm-9">
<input class="form-control" name="url-1" placeholder="URL here... (required)" required type="url">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">iupacName</label>
<div class="col-sm-9">
<input class="form-control" name="iupac-name-1" placeholder="iupac name here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">molecularFormula</label>
<div class="col-sm-9">
<input class="form-control" name="molecular-formula-1" pattern="[a-zA-Z0-9]+"
placeholder="molecularFormula here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">molecularWeight</label>
<div class="col-sm-9">
<input class="form-control" name="molecular-weight-1"
placeholder="molecularWeight here (e.g. 0.01 mg)..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">monoisotopicMolecularWeight</label>
<div class="col-sm-9">
<input class="form-control" name="monoisotopic-molecular-weight-1"
placeholder="monoisotopicMolecularWeight here (e.g. 0.01 mg)..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">description</label>
<div class="col-sm-9">
<input class="form-control" minlength="10" name="description-1"
placeholder="description here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">disambiguatingDescription</label>
<div class="col-sm-9">
<input class="form-control" name="disambiguating-description-1"
placeholder="disambiguatingDescription here..." type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">image</label>
<div class="col-sm-9">
<input class="form-control" name="image-1" placeholder="image URL here..." type="url">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">alternateName</label>
<div class="col-sm-9">
<input class="form-control" name="alternate-name-1" placeholder="alternateName here..."
type="text">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">sameAs</label>
<div class="col-sm-9">
<input class="form-control" name="same-as-1" placeholder="sameAs URL here..." type="url">
</div>
</div>
</div>
</div>
<div id="next-1"></div>
<div class="container">
<br>
<button class="btn btn-secondary btn-lg btn-block" id="add" type="button">Add another molecular
entity
</button>
</div>
<div class="container">
<br>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Output</label>
<div class="col-sm-9">
<select class="form-control form-control-sm" name="output-format" readonly="readonly">
<option>JSON-LD with HTML</option>
<option>JSON-LD</option>
<option>RDFa</option>
<option>Microdata</option>
</select>
</div>
</div>
<button class="btn btn-primary btn-lg btn-block" type="submit">Generate</button>
</div>
</form>
<footer class=" text-center text-lg-start">
<div class="text-center p-3">
<div>© 2019-2021 Copyright by Łukasz Szeremeta, Dominik Tomaszuk</div>
<section class="mb-3">
<a class="btn btn-primary btn-floating m-1" href="https://github.com/lszeremeta/MEgen" role="button"
style="background-color: #333333" target="_blank"><i
class="fab fa-github"></i></a>
<a class="btn btn-primary btn-floating m-1" href="https://hub.docker.com/r/lszeremeta/megen" role="button"
style="background-color: #55acee" target="_blank"><i
class="fab fa-docker"></i></a>
</section>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
var i = 2;
$(document).ready(function () {
$("#add").click(function () {
$("#count").val(i);
$.ajax({
method: "GET",
url: "next.php?count=" + i
})
.done(function (msg) {
var j = i - 1;
$("#m" + j).after(msg);
i = i + 1;
console.log("new molecules");
});
})
});
$(document).ready(function () {
$(".thing1").change(function () {
$(".thing1 option:selected").each(function () {
if ($(this).val() === 'bnode' || $(this).val() === 'uuid') {
$('.iri-thing1').attr('disabled', 'disabled');
console.log("disable option");
} else {
$('.iri-thing1').removeAttr('disabled');
console.log("enable option");
}
});
});
});
</script>
</body>
</html>