Skip to content

Commit 9fe2354

Browse files
CheariXh2o64
authored andcommitted
Fix bib preview mobile (#2359)
[Reference](alshedivat/al-folio#2352 (comment)) I'm not sure if the removal of `max-width: 90vw;` for all images causes any side issues. I could at least not find any. But having this properties will produce unaligned preview sizes. Help/testing is more than welcome. # Before <img width="364" alt="Bildschirmfoto 2024-04-21 um 14 17 51" src="https://github.com/alshedivat/al-folio/assets/1998723/5ad1a4d7-dfe6-43f8-98ec-eae19dd991c2"> # After <img width="364" alt="Bildschirmfoto 2024-04-21 um 14 21 53" src="https://github.com/alshedivat/al-folio/assets/1998723/fb942403-a01f-42ec-95c6-697378ed0d92"> ... <img width="364" alt="Bildschirmfoto 2024-04-21 um 14 22 03" src="https://github.com/alshedivat/al-folio/assets/1998723/1ddf43d8-98a8-421d-9f64-3352190c4bb8">
1 parent 18d8696 commit 9fe2354

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

_layouts/bib.liquid

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
---
33
<div class="row">
44
{% if site.enable_publication_thumbnails %}
5-
<div class="col-sm-2 abbr">
5+
<div class="col col-sm-2 abbr">
66
{%- if entry.abbr -%}
77
{%- if site.data.venues[entry.abbr] -%}
88
{% assign venue_style = null %}
99
{% if site.data.venues[entry.abbr].color != blank %}
1010
{% assign venue_style = site.data.venues[entry.abbr].color | prepend: 'style="background-color:' | append: '"' %}
1111
{%- endif -%}
1212
<abbr
13-
class="badge rounded"
13+
class="badge rounded w-100"
1414
{% if venue_style %}
1515
{{ venue_style }}
1616
{% endif -%}
@@ -22,7 +22,7 @@
2222
{% endif %}
2323
</abbr>
2424
{% else %}
25-
<abbr class="badge rounded">{{ entry.abbr }}</abbr>
25+
<abbr class="badge rounded w-100">{{ entry.abbr }}</abbr>
2626
{% endif %}
2727
{% endif %}
2828
{% if entry.preview %}

_sass/_base.scss

-11
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ table.table a {
5555
}
5656
}
5757

58-
figure,
59-
img {
60-
max-width: 90vw;
61-
}
62-
6358
blockquote {
6459
background: var(--global-bg-color);
6560
border-left: 5px solid var(--global-theme-color);
@@ -665,7 +660,6 @@ footer.sticky-bottom {
665660
border-top: 1px solid var(--global-divider-color);
666661
padding-top: 1rem;
667662
margin-top: 2rem;
668-
margin-bottom: -2rem;
669663
text-align: right;
670664
}
671665

@@ -678,20 +672,15 @@ footer.sticky-bottom {
678672
margin-bottom: 1rem;
679673

680674
.preview {
681-
width: 100%;
682-
min-width: 80px;
683-
max-width: 200px;
684675
}
685676

686677
.abbr {
687-
height: 2rem;
688678
margin-bottom: 0.5rem;
689679

690680
abbr {
691681
display: inline-block;
692682
background-color: var(--global-theme-color);
693683
margin-bottom: 0.5rem;
694-
width: 100%;
695684

696685
a {
697686
color: white;

0 commit comments

Comments
 (0)