Fix member pictures rendering

This commit is contained in:
Vencislav Atanasov 2024-09-21 23:37:47 +03:00
parent 923daf9005
commit 6fb3d5f8ba
3 changed files with 106 additions and 2 deletions

View File

@ -97,8 +97,8 @@ export default function Schedule({
<div className="separator" /> <div className="separator" />
</section>)} </section>)}
{speakers && <> {speakers && <>
<div> <div className="grid members">
{Object.entries(speakers).map(([speakerId, speaker]) => <div key={speakerId}> {Object.entries(speakers).map(([speakerId, speaker]) => <div key={speakerId} className="col4 member">
<a href={'#'.concat(getSpeakerName(speaker))}> <a href={'#'.concat(getSpeakerName(speaker))}>
<img width="100" height="100" src={defaultSpeaker} alt={getSpeakerName(speaker)} /> <img width="100" height="100" src={defaultSpeaker} alt={getSpeakerName(speaker)} />
</a> </a>

View File

@ -90,9 +90,109 @@
text-align: right; text-align: right;
} }
.grid {
box-sizing: border-box;
width: 100%;
}
.grid::after {
content: " ";
clear: both;
display: block;
}
.grid .col2 {
width: 50%;
float: left;
box-sizing: border-box;
}
.grid .col2 + .col2, .grid .col3 + .col3, .grid .col4 + .col4 {
padding: 0 0 0 1em;
}
.grid .col3 {
float: left;
box-sizing: border-box;
}
.grid .col3:nth-child(3n + 1) {
clear: both;
padding: 0;
}
.grid .col4 {
width: 25%;
float: left;
box-sizing: border-box;
}
.grid .col4:nth-child(4n + 1) {
clear: both;
padding: 0;
}
.grid .col-left {
width: 70%;
float: left;
box-sizing: border-box;
padding: 0 1.6em 0 0;
}
.grid .col-right {
width: 30%;
float: left;
margin-bottom: 2em;
box-sizing: border-box;
}
.grid .col-right .content {
width: 100%;
}
@media all and (max-width: 600px) {
.grid .col2, .grid .col3, .grid .col4, .grid .col-left, .grid .col-right {
width: 100%;
float: none;
padding: 0 0 1em 0;
}
.grid .col2 + .col2, .grid .col3 + .col3, .grid .col4 + .col4 {
padding: 0;
}
}
.separator { .separator {
margin: 2.4em 0; margin: 2.4em 0;
height: 1px; height: 1px;
background: #DBDBDB; background: #DBDBDB;
} }
.members {
margin: 0 0 2em 0;
.member {
margin: 0 0 1em 0;
a {
display: block;
> img {
width: 100px;
max-width: 100%;
padding: 0.3em;
background: #FFF;
box-shadow: 0 0 1px 1px #999;
}
}
span {
display: block;
}
.icons a {
display: inline-block;
margin: 0 0.3em 0 0;
}
}
}
} }

View File

@ -12,3 +12,7 @@
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
a img {
border: none;
}