3v324v23 commited on
Commit
0074e17
路
1 Parent(s): a65b02c

tidying up new theme for color 2

Browse files
color2_module/colors.py CHANGED
@@ -62,8 +62,25 @@ def COU():
62
  tool_title="CHRIS - Color additives (v2)",
63
  nav_links=[
64
  ("Tool", "/color2"),
65
- ("Context of Use", "/color2_module/COU"),
66
  ("FAQ", "/color2_module/FAQ"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ("About", "/color2_module/RST"),
68
  ],
69
  footer_text="Office of Science and Engineering Laboratories 路 ",
@@ -77,8 +94,9 @@ def FAQ():
77
  tool_title="CHRIS - Color additives (v2)",
78
  nav_links=[
79
  ("Tool", "/color2"),
80
- ("Context of Use", "/color2_module/COU"),
81
  ("FAQ", "/color2_module/FAQ"),
 
82
  ("About", "/color2_module/RST"),
83
  ],
84
  footer_text="Office of Science and Engineering Laboratories 路 ",
@@ -92,8 +110,9 @@ def RST():
92
  tool_title="CHRIS - Color additives (v2)",
93
  nav_links=[
94
  ("Tool", "/color2"),
95
- ("Context of Use", "/color2_module/COU"),
96
  ("FAQ", "/color2_module/FAQ"),
 
97
  ("About", "/color2_module/RST"),
98
  ],
99
  footer_text="Office of Science and Engineering Laboratories 路 ",
@@ -106,8 +125,9 @@ def colors():
106
  tool_title="CHRIS - Color additives (v2)",
107
  nav_links=[
108
  ("Tool", "/color2"),
109
- ("Context of Use", "/color2_module/COU"),
110
  ("FAQ", "/color2_module/FAQ"),
 
111
  ("About", "/color2_module/RST"),
112
  ],
113
  footer_text="Office of Science and Engineering Laboratories 路 ",
@@ -179,7 +199,19 @@ def app_post():
179
 
180
  if error > 0:
181
  return render_template('chemError.html', chemName=chemName, IDtype=IDtype, error=error,
182
- error_message=ERROR_CODES.get(error, 'Unknown chemical identification error'))
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
  # metals/ceramics logic; only look up MP if the structural checks need it
185
  is_metal, is_ceramic, mp, mp_origin, mp_searched = ClassifyMaterial(cas, iupac, smiles)
@@ -195,8 +227,17 @@ def app_post():
195
  # if all atoms are metals -> this is a metal
196
  return render_template('metalError.html', show_properties=show_properties, chemName=chemName, MW=MW,
197
  LogP=LogP, rho=rho, mp=mp, iupac=iupac,
198
- cas=cas, smiles=smiles, molImage=molImage)
199
- #LogP_origin=LogP_origin, rho_origin=rho_origin, mp_origin=mp_origin)
 
 
 
 
 
 
 
 
 
200
  #else:
201
  if is_ceramic:
202
  MW = 1100.
 
62
  tool_title="CHRIS - Color additives (v2)",
63
  nav_links=[
64
  ("Tool", "/color2"),
65
+ ("Instructions", "/color2_module/Instructions"),
66
  ("FAQ", "/color2_module/FAQ"),
67
+ ("CoU", "/color2_module/COU"),
68
+ ("About", "/color2_module/RST"),
69
+ ],
70
+ footer_text="Office of Science and Engineering Laboratories 路 ",
71
+ contact_email="david.saylor@fda.hhs.gov",
72
+ )
73
+
74
+ @blueprint.get("/color2_module/Instructions")
75
+ def Instructions():
76
+ return render_template(
77
+ "README.html",
78
+ tool_title="CHRIS - Color additives (v2)",
79
+ nav_links=[
80
+ ("Tool", "/color2"),
81
+ ("Instructions", "/color2_module/Instructions"),
82
+ ("FAQ", "/color2_module/FAQ"),
83
+ ("CoU", "/color2_module/COU"),
84
  ("About", "/color2_module/RST"),
85
  ],
86
  footer_text="Office of Science and Engineering Laboratories 路 ",
 
94
  tool_title="CHRIS - Color additives (v2)",
95
  nav_links=[
96
  ("Tool", "/color2"),
97
+ ("Instructions", "/color2_module/Instructions"),
98
  ("FAQ", "/color2_module/FAQ"),
99
+ ("CoU", "/color2_module/COU"),
100
  ("About", "/color2_module/RST"),
101
  ],
102
  footer_text="Office of Science and Engineering Laboratories 路 ",
 
110
  tool_title="CHRIS - Color additives (v2)",
111
  nav_links=[
112
  ("Tool", "/color2"),
113
+ ("Instructions", "/color2_module/Instructions"),
114
  ("FAQ", "/color2_module/FAQ"),
115
+ ("CoU", "/color2_module/COU"),
116
  ("About", "/color2_module/RST"),
117
  ],
118
  footer_text="Office of Science and Engineering Laboratories 路 ",
 
125
  tool_title="CHRIS - Color additives (v2)",
126
  nav_links=[
127
  ("Tool", "/color2"),
128
+ ("Instructions", "/color2_module/Instructions"),
129
  ("FAQ", "/color2_module/FAQ"),
130
+ ("CoU", "/color2_module/COU"),
131
  ("About", "/color2_module/RST"),
132
  ],
133
  footer_text="Office of Science and Engineering Laboratories 路 ",
 
199
 
200
  if error > 0:
201
  return render_template('chemError.html', chemName=chemName, IDtype=IDtype, error=error,
202
+ error_message=ERROR_CODES.get(error, 'Unknown chemical identification error'),
203
+ tool_title="CHRIS - Color additives (v2)",
204
+ nav_links=[
205
+ ("Tool", "/color2"),
206
+ ("Instructions", "/color2_module/Instructions"),
207
+ ("FAQ", "/color2_module/FAQ"),
208
+ ("CoU", "/color2_module/COU"),
209
+ ("About", "/color2_module/RST"),
210
+ ],
211
+ footer_text="Office of Science and Engineering Laboratories 路 ",
212
+ contact_email="david.saylor@fda.hhs.gov",
213
+ )
214
+
215
 
216
  # metals/ceramics logic; only look up MP if the structural checks need it
217
  is_metal, is_ceramic, mp, mp_origin, mp_searched = ClassifyMaterial(cas, iupac, smiles)
 
227
  # if all atoms are metals -> this is a metal
228
  return render_template('metalError.html', show_properties=show_properties, chemName=chemName, MW=MW,
229
  LogP=LogP, rho=rho, mp=mp, iupac=iupac,
230
+ cas=cas, smiles=smiles, molImage=molImage,
231
+ nav_links=[
232
+ ("Tool", "/color2"),
233
+ ("Instructions", "/color2_module/Instructions"),
234
+ ("FAQ", "/color2_module/FAQ"),
235
+ ("CoU", "/color2_module/COU"),
236
+ ("About", "/color2_module/RST"),
237
+ ],
238
+ footer_text="Office of Science and Engineering Laboratories 路 ",
239
+ contact_email="david.saylor@fda.hhs.gov",
240
+ )
241
  #else:
242
  if is_ceramic:
243
  MW = 1100.
color2_module/templates/COU.html CHANGED
@@ -137,8 +137,8 @@ coloring.</p></li>
137
  <li id="fn2"><p>21 CFR 73, Subpart D and 21 CFR 74, Subpart D identifies
138
  all those color additives for which a color additive petition exists for
139
  use of the color in a medical device application. Not all of these color
140
- additives are included in the CHRIS calculator. Please see the <a
141
- href="README.html">instructions</a> for how to use the calculator with a
142
  color additive other than those identified in the CHRIS calculator drop
143
  down menu.<a href="#fnref2" class="footnote-back"
144
  role="doc-backlink">鈫╋笌</a></p></li>
 
137
  <li id="fn2"><p>21 CFR 73, Subpart D and 21 CFR 74, Subpart D identifies
138
  all those color additives for which a color additive petition exists for
139
  use of the color in a medical device application. Not all of these color
140
+ additives are included in the CHRIS calculator. Please see the
141
+ instructions for how to use the calculator with a
142
  color additive other than those identified in the CHRIS calculator drop
143
  down menu.<a href="#fnref2" class="footnote-back"
144
  role="doc-backlink">鈫╋笌</a></p></li>
color2_module/templates/README.html CHANGED
@@ -1,14 +1,7 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
- <head>
4
- <title>CHRIS-README</title>
5
- <link rel="stylesheet" href="styles.css">
6
- <meta charset="UTF-8">
7
- </head>
8
-
9
- <header>
10
- <h1 style="text-align:center"><font color="#0070C0">CH</font>emical <font color="#0070C0">RIS</font>k calculator (CHRIS) - Color additives</h1>
11
- </header>
12
  <h2 id="overview">Overview</h2>
13
  <p>The CHRIS - Color additives module is a tool under development within
14
  the Center for Devices and Radiological Health (CDRH) at the Food and
@@ -183,3 +176,5 @@ href="FAQ.html">here</a>. If your question is not already addressed or
183
  if you have specific issues with CHRIS, please contact Dave Saylor: <a
184
  href="mailto:david.saylor@fda.hhs.gov"
185
  class="email">david.saylor@fda.hhs.gov</a>.</p>
 
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
+ {% extends "base.html" %}
4
+ {% block content %}
 
 
 
 
 
 
 
5
  <h2 id="overview">Overview</h2>
6
  <p>The CHRIS - Color additives module is a tool under development within
7
  the Center for Devices and Radiological Health (CDRH) at the Food and
 
176
  if you have specific issues with CHRIS, please contact Dave Saylor: <a
177
  href="mailto:david.saylor@fda.hhs.gov"
178
  class="email">david.saylor@fda.hhs.gov</a>.</p>
179
+
180
+ {% endblock %}
templates/chemError.html CHANGED
@@ -6,10 +6,10 @@
6
  <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
7
  </head>
8
 
 
 
 
9
  <body>
10
- <img src="{{ url_for('static', filename='images/FDAlogo.png') }}" style="float: left;" height="100"/>
11
- <img src="{{ url_for('static', filename='images/FDAgraphic.png') }}" style="float: right;" height="100"/>
12
- <br clear="all"/>
13
 
14
  <div style="font-size:5rem;text-align:center">&#129318;</div>
15
 
@@ -36,4 +36,5 @@
36
  </div>
37
 
38
  </body>
 
39
  </html>
 
6
  <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
7
  </head>
8
 
9
+ {% extends "base.html" %}
10
+ {% block content %}
11
+
12
  <body>
 
 
 
13
 
14
  <div style="font-size:5rem;text-align:center">&#129318;</div>
15
 
 
36
  </div>
37
 
38
  </body>
39
+ {% endblock %}
40
  </html>
templates/metalError.html CHANGED
@@ -29,9 +29,8 @@
29
 
30
  </head>
31
 
32
- <img src="{{ url_for('static',filename='images/FDAlogo.png') }}" style="float: left;" height="100"/>
33
- <img src="{{ url_for('static',filename='images/FDAgraphic.png') }}" style="float: right;" height="100"/>
34
- <br clear="all" />
35
 
36
  <body>
37
 
@@ -66,3 +65,5 @@
66
 
67
 
68
  </body>
 
 
 
29
 
30
  </head>
31
 
32
+ {% extends "base.html" %}
33
+ {% block content %}
 
34
 
35
  <body>
36
 
 
65
 
66
 
67
  </body>
68
+
69
+ {% endblock %}