Skip to content

Commit 5e2a142

Browse files
committed
Make legends responsive
1 parent de91d51 commit 5e2a142

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

cytoscape-styles.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ html, body {
161161
border-radius: 2px;
162162
}
163163

164-
/* Hide "Click any node to explore" text on smaller screens */
164+
165165
@media (max-width: 600px) {
166166
.hide-on-small {
167167
display: none;
@@ -178,6 +178,16 @@ html, body {
178178
#header .footer {
179179
font-size: 0.9em;
180180
}
181+
182+
/* Hide button text, keep icons only */
183+
.btn-text {
184+
display: none;
185+
}
186+
187+
/* Center buttons and legend when they wrap */
188+
#controls {
189+
justify-content: center;
190+
}
181191
}
182192

183193
#header a {

index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ function gtag(){dataLayer.push(arguments);}
106106
<div id="controls">
107107
<div class="btn-group">
108108
<button class="control-btn" onclick="centerOnStart(window.firstVideoId, window.cy)">
109-
<i class="bi bi-house"></i> Go to Start
109+
<i class="bi bi-house"></i><span class="btn-text"> Go to Start</span>
110110
</button>
111111
<button class="control-btn" onclick="changeLayout('breadthfirst', window.cy, window.firstVideoId)">
112-
<i class="bi bi-diagram-2"></i> Tree Layout
112+
<i class="bi bi-diagram-2"></i><span class="btn-text"> Tree Layout</span>
113113
</button>
114114
<button class="control-btn" onclick="changeLayout('cose', window.cy, window.firstVideoId)">
115-
<i class="bi bi-node-plus"></i> Bubble Layout
115+
<i class="bi bi-node-plus"></i><span class="btn-text"> Bubble Layout</span>
116116
</button>
117117
<a href="download.php"><button class="control-btn">
118-
<i class="bi bi-download"></i> Download</button>
118+
<i class="bi bi-download"></i><span class="btn-text"> Download</span></button>
119119
</a>
120120
<!-- <button class="control-btn" onclick="changeLayout('circle', window.cy, window.firstVideoId)">Circle Layout</button> -->
121121
<!-- <button class="control-btn" onclick="resetView(window.cy, window.firstVideoId)"><i class="bi bi-arrows-angle-contract"></i> Reset View</button> -->

0 commit comments

Comments
 (0)