Skip to content

Commit 8f3a345

Browse files
author
Alexander Haarer
committed
buttons same size
1 parent be25227 commit 8f3a345

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

src/_includes/viewpoint.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,24 @@
2525
## Example
2626
{% assign examples = md_examples |concat: rhy_examples |concat: ea_examples %}
2727
{% assign tools = examples | map: "Tool" | uniq | sort %}
28-
<div>
28+
<div id="gallery-controls">
29+
30+
2931
<label for="tool-filter">Filter by tool:</label>
3032
<select id="tool-filter" onchange="onToolFilterChange()">
31-
<option value="All">All</option>
32-
{% for t in tools %}
33-
<option value="{{ t }}">{{ t }}</option>
34-
{% endfor %}
33+
<option value="All">All</option>
34+
{% for t in tools %}
35+
<option value="{{ t }}">{{ t }}</option>
36+
{% endfor %}
3537
</select>
36-
{% if examples.size > 1 %}
37-
<button id="prev-btn" onclick="prevImage()"><span >&#x1F81C;</span> </button>
38-
<button id="next-btn" onclick="nextImage()"><span >&#x1F81E;</span> </button>
39-
{% else %}
40-
<button id="prev-btn" style="display:none" onclick="prevImage()"><span >&#x1F81C;</span></button>
41-
<button id="next-btn" style="display:none" onclick="nextImage()"><span >&#x1F81E;</span></button>
42-
{% endif %}
38+
39+
{% if examples.size > 1 %}
40+
<button id="prev-btn" onclick="prevImage()"><span>&#x1F81C;</span></button>
41+
<button id="next-btn" onclick="nextImage()"><span>&#x1F81E;</span></button>
42+
{% else %}
43+
<button id="prev-btn" style="display:none" onclick="prevImage()"><span>&#x1F81C;</span></button>
44+
<button id="next-btn" style="display:none" onclick="nextImage()"><span>&#x1F81E;</span></button>
45+
{% endif %}
4346

4447
</div>
4548
{% if examples.size > 0 %}

src/_sass/custom/custom.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,20 @@
183183
}
184184

185185

186+
:root { --control-height: 36px; --control-padding: 6px 10px; --gap: 8px; }
187+
#gallery-controls { display: inline-flex; gap: var(--gap); align-items: center; }
188+
#gallery-controls button, #gallery-controls select {
189+
height: var(--control-height);
190+
padding: var(--control-padding);
191+
line-height: 1;
192+
box-sizing: border-box;
193+
font: inherit;
194+
}
195+
#gallery-controls button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
196+
#gallery-controls select { min-width: 120px; }
197+
#gallery-container img { max-width: 100%; height: auto; display: block; }
198+
199+
186200
#gallery-container {
187201
position: relative;
188202
max-width: 100%;

0 commit comments

Comments
 (0)