Skip to content

Commit df3eb9e

Browse files
committed
updated banner style
1 parent 02cf17f commit df3eb9e

3 files changed

Lines changed: 27 additions & 33 deletions

File tree

_pages/exchange.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nav: false
77
nav_order: 6
88
---
99

10-
<div id="banner-other" style="background-image: url('{{ "/assets/img/banner/exchange_banner.jpg" | relative_url }}');"></div>
10+
<div id="banner-exchange" style="background-image: url('{{ "/assets/img/banner/exchange_banner.jpg" | relative_url }}');"></div>
1111

1212
<!-- <h4 class="category" id="collaboration">#RAIforUkraine: Responsible AI Research for Ukrainian Scholars</h4> -->
1313

assets/css/main.scss

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ $max-content-width: {{ site.max_width }};
3131
#banner-other {
3232
display: none;
3333
}
34+
#banner-exchange {
35+
display: none;
36+
}
3437
}
3538

3639
.banner-light {
3740
background: url(Landing_Banner_V1.png) no-repeat center center;
38-
// resize background scale
3941
background-size: auto 600px;
4042
height: 600px;
41-
width: 100vw; /* Use vw (viewport width) units */
42-
position: relative; /* Added */
43-
left: 50%; /* Added */
44-
right: 50%; /* Added */
45-
margin-left: -50vw; /* Added */
46-
margin-right: -50vw; /* Added */
47-
margin-bottom: 20px; /* Added */
48-
margin-top: -10px; /* Added */
43+
width: 100vw;
44+
position: relative;
45+
left: 50%;
46+
right: 50%;
47+
margin-left: -50vw;
48+
margin-right: -50vw;
49+
margin-bottom: 20px;
50+
margin-top: -10px;
4951
}
5052

5153
.banner-dark {
@@ -65,15 +67,20 @@ $max-content-width: {{ site.max_width }};
6567

6668
#banner-other {
6769
background-size: cover;
68-
height: 500px;
69-
width: 100vw; /* Use vw (viewport width) units */
70-
position: relative; /* Added */
71-
left: 50%; /* Added */
72-
right: 50%; /* Added */
73-
margin-left: -50vw; /* Added */
74-
margin-right: -50vw; /* Added */
75-
margin-bottom: 20px; /* Added */
76-
margin-top: -10px; /* Added */
70+
background-position: center;
71+
aspect-ratio: 2600 / 866;
72+
width: 100%;
73+
margin-bottom: 20px;
74+
margin-top: -10px;
75+
}
76+
77+
#banner-exchange {
78+
background-size: cover;
79+
background-position: center;
80+
padding-top: 18.7%; /* 487/2600 — preserves natural aspect ratio */
81+
width: 100%; /* stays within content column, no full-bleed */
82+
margin-bottom: 20px;
83+
margin-top: -10px;
7784
}
7885

7986
.publications-div {

blog/index.html

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,7 @@
1515

1616
<div class="post">
1717

18-
<div id="banner" style="
19-
background: url(/assets/img/banner/News_and_Events_Banner.png) no-repeat center center;
20-
background-size: cover;
21-
height: 500px;
22-
width: 100vw;
23-
position: relative;
24-
left: 50%;
25-
right: 50%;
26-
margin-left: -50vw;
27-
margin-right: -50vw;
28-
margin-bottom: 20px;
29-
margin-top: -10px;">
30-
</div>
31-
18+
<div id="banner-other" style="background-image: url('/assets/img/banner/News_and_Events_Banner.png');"></div>
3219

3320
{% if site.display_tags %}
3421
<div class="tag-list">

0 commit comments

Comments
 (0)