A Telegram Bot for collecting the photos of your children
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

147 lines
2.5 KiB

/* CSS inspired by https://css-tricks.com/adaptive-photo-layout-with-flexbox/ */
/* Common */
body {
font-family: sans-serif;
}
a {
color: inherit; /* blue colors for links too */
text-decoration: inherit; /* no underline */
}
html {
height: 100%;
width: 100%;
}
li img, li video {
max-height: 100%;
min-width: 100%;
object-fit: cover;
vertical-align: bottom;
}
/* Album */
body.album {
margin: 3vh;
}
body.album ul {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
padding: 0;
margin: 0;
}
body.album li {
/*
* Line height is expressed as a factor of the viewport width since
* we want to fit roughly the same amount of photos per line,
* independently of the user's device
*/
height: 13vw;
flex-grow: 0.5;
list-style-type: none;
padding: 1px;
}
body.album li:last-child {
flex-grow: 10;
}
/* Media */
body.media {
height: 100%;
width: 100%;
margin: 0;
display: flex;
flex-direction: column-reverse;
justify-content: space-between;
}
body.media h1 {
background-color: #888888AA;
padding: 1vh;
margin-left: 3vh;
margin-right: 3vh;
}
body.media img, body.media video {
object-fit: contain;
max-height: 80%;
margin-top: 3vh;
margin-left: 3vh;
margin-right: 3vh;
}
/* Index */
body.index {
margin: 3vw;
}
body.index h2 {
margin-top: 2em;
}
body.index h1 {
text-align: center;
}
body.index ul.media {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
padding: 0;
margin: 0;
}
body.index ul.media li {
/*
* Line height is expressed as a factor of the viewport width since
* we want to fit roughly the same amount of photos per line,
* independently of the user's device
*/
height: 13vw;
flex-grow: 0.5;
list-style-type: none;
padding-right: 1vw;
}
body.index ul.media li:last-child {
flex-grow: 10;
}
body.index ul.album {
display: grid;
grid-gap: 3vw;
grid-auto-flow: row;
grid-template-columns: 15vw 15vw 15vw 15vw 15vw;
/*
* Line height is expressed as a factor of the viewport width since
* we want to fit roughly the same amount of photos per line,
* independently of the user's device
*/
grid-auto-rows: 13vw;
padding: 0;
margin: 0;
}
body.index ul.album div {
margin-top: 1vh;
font-size: large;
}
body.index ul.album li {
list-style-type: none;
text-align: center;
}
body.index .no-cover {
font-size: 4em;
}