Skip to content

Commit 1e9f9ee

Browse files
committed
Refactor updates to optional blocks used in indra_db template
1 parent 1aa1229 commit 1e9f9ee

File tree

1 file changed

+45
-101
lines changed

1 file changed

+45
-101
lines changed

indra/assemblers/html/templates/indra/template.html

Lines changed: 45 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,27 @@
8585
margin-bottom: 0;
8686
}
8787

88+
/* Footer links */
89+
.il-nav-link {
90+
display: block;
91+
margin: 5px 0;
92+
color: #256DC5; /* Blue color */
93+
text-decoration: none;
94+
}
8895

96+
.il-nav-link:hover {
97+
text-decoration: underline;
98+
color: #007bff;
99+
}
89100

90101
#about-this-project p, #about-this-project a {
91102
font-size: 9pt;
92103
margin-bottom: 0;
93104
}
94105

95-
.mid-right {
96-
position: fixed;
97-
top: 0;
98-
bottom: 0;
99-
width: 20em;
100-
background: #fff;
101-
padding-top: 85px;
102-
overflow-y: auto;
103-
}
106+
{% block mid_right_styles %}
107+
{% endblock %}
108+
104109
.right {
105110
width: 20em; /* Sidebar width */
106111
right: 0;
@@ -110,18 +115,17 @@
110115
background-color: #fff; /* White background */
111116
overflow-y: auto; /* Allow scrolling if content overflows */
112117
}
113-
.mid-right { box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); }
114-
.right { box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); }
115118

116119
/* The navigation menu links */
117-
.side-info{
120+
.side-info .il-nav-link {
118121
font-size: 12pt;
119122
target-new: tab;
120123
display: block;
121124
}
122125

123126
.side-info h4 {
124127
font-size: 10pt;
128+
display: block;
125129
text-decoration: none;
126130
margin-bottom: 0;
127131
}
@@ -155,30 +159,44 @@
155159

156160
{% if not simple %}
157161
.content {
158-
margin-right: calc(15% + 20%);
159162
padding-top:85px;
160163
padding-bottom: 65px
161164
}
162165

163-
@media (min-width: 1500px) {
164-
.right { width: 15%; }
165-
.mid-right { width: 20%; right: 15%; }
166-
.content { margin-right: calc(15% + 20%); }
167-
.footer { right: calc(15% + 20%); }
166+
{% block layout_media_queries %}
167+
@media (max-width: 1800px) {
168+
.right {
169+
width: 15%;
170+
}
171+
.container {
172+
float: left;
173+
}
174+
.footer {
175+
right: 15%;
176+
}
168177
}
169178

170179
@media (max-width: 1500px) {
171-
.right { width: 15%; }
172-
.mid-right { width: 20%; right: 15%; }
173-
.content { margin-right: calc(15% + 20%); }
174-
.footer { right: calc(15% + 20%); }
180+
.container {
181+
max-width: 960px;
182+
}
183+
.right {
184+
width: 15%;
185+
}
186+
.footer {
187+
right: 15%;
188+
}
175189
}
176190

177191
@media (max-width: 1100px) {
178-
.right, .mid-right { display: none; }
179-
.content { margin-right: 0; }
180-
.footer { right: 0; }
192+
.right {
193+
display: none;
194+
}
195+
.footer {
196+
right: 0em;
197+
}
181198
}
199+
{% endblock %}
182200
{% endif %}
183201
</style>
184202

@@ -247,82 +265,8 @@ <h2>{{ title }}</h2>
247265
</div>
248266
</footer>
249267

250-
<div class="side-info mid-right" id="mid-right-panel">
251-
<h3 class="bg-white">Summary</h3>
252-
<p>On this page, you can search for statements from the INDRA Database by applying different filters such as agents, relation types, MeSH terms, or papers.</p>
253-
<h4>Examples</h4>
254-
<!-- Examples -->
255-
<span style="color:#888;"></span>
256-
<span style="cursor:pointer; color:#256DC5; text-decoration:underline;"
257-
data-agent1="DUSP1"
258-
data-agent2="MAPK1"
259-
data-preset="s-o"
260-
onclick="window.dispatchEvent(new CustomEvent('indra:example', { detail: {
261-
agent1: this.dataset.agent1,
262-
agent2: this.dataset.agent2,
263-
preset: this.dataset.preset
264-
}}))">
265-
How does DUSP1 affect MAPK1?
266-
</span>
267-
268-
<br/>
269-
270-
<span style="color:#888;"></span>
271-
<span style="cursor:pointer; color:#256DC5; text-decoration:underline;"
272-
data-agent1="CDK12"
273-
data-stmt-type="Phosphorylation"
274-
data-preset="s-o"
275-
onclick="window.dispatchEvent(new CustomEvent('indra:example', { detail: {
276-
agent1: this.dataset.agent1,
277-
stmtType: this.dataset.stmtType,
278-
preset: this.dataset.preset
279-
}}))">
280-
What does CDK12 phosphorylate?
281-
</span>
282-
283-
<br/>
284-
285-
<span style="color:#888;"></span>
286-
<span style="cursor:pointer; color:#256DC5; text-decoration:underline;"
287-
data-agent1="MTOR"
288-
data-stmt-type="Inhibition"
289-
data-preset="o-s"
290-
onclick="window.dispatchEvent(new CustomEvent('indra:example', { detail: {
291-
agent1: this.dataset.agent1,
292-
stmtType: this.dataset.stmtType,
293-
preset: this.dataset.preset
294-
}}))">
295-
What is known to inhibit mTOR?
296-
</span>
297-
298-
<br/>
299-
300-
<span style="color:#888;"></span>
301-
<span style="cursor:pointer; color:#256DC5; text-decoration:underline;"
302-
data-agent1="PIK3CA"
303-
data-preset="any-any"
304-
onclick="window.dispatchEvent(new CustomEvent('indra:example', { detail: {
305-
agent1: this.dataset.agent1,
306-
preset: this.dataset.preset
307-
}}))">
308-
Show all interactions involving PIK3CA.
309-
</span>
310-
311-
<br/>
312-
313-
<span style="color:#888;"></span>
314-
<span style="cursor:pointer; color:#256DC5; text-decoration:underline;"
315-
data-agent1="Seliciclib"
316-
data-stmt-type="Inhibition"
317-
data-preset="s-o"
318-
onclick="window.dispatchEvent(new CustomEvent('indra:example', { detail: {
319-
agent1: this.dataset.agent1,
320-
stmtType: this.dataset.stmtType,
321-
preset: this.dataset.preset
322-
}}))">
323-
What does Seliciclib inhibit?
324-
</span>
325-
</div>
268+
{% block mid_right_panel %}
269+
{% endblock %}
326270

327271
<!-- THE RIGHT SIDEBAR -->
328272
<div class="side-info right bg-white" id="right-side-panel">

0 commit comments

Comments
 (0)