album/res/photos.scss

261 lines
4.3 KiB
SCSS

$border: 1px solid #333;
html {
height: 100%;
&, body {
margin: 0;
padding: 0;
}
}
body {
background: #eee;
line-height: 1.6;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100%;
}
p {
margin: 0;
}
p + p {
margin-top: 1ex;
}
header {
background-color: #eee;
box-shadow: 0 0 1ex #444;
position: sticky;
top: 0;
z-index: 9999;
}
footer {
background: #999;
color: white;
:link, :visited {
color: #edf;
}
p { margin: 0; }
}
header, footer {
display: flex;
& > span {
flex-grow: 1;
}
& > :last-child {
flex-grow: 5;
padding-left: 1em;
text-align: right;
}
a {
text-decoration: none;
&:focus, &:hover {
text-decoration: underline;
}
}
}
main {
flex-grow: 1;
margin-bottom: 1em;
}
header, footer, main {
flex-wrap: wrap;
padding: 0 1ex;
}
.item {
background: #ccc;
border: $border;
img {
box-shadow: 0 .2em 1em -.2em #000;
vertical-align: middle;
max-width: 100%;
height: auto;
}
.lable {
font-size: 80%;
}
}
div.group {
display: flex;
flex-flow: row-reverse wrap;
justify-content: space-between;
.item {
display: flex;
flex-flow: column;
flex-grow: 1;
justify-content: space-between;
margin: .2em;
padding: .2em;
text-align: center;
// The unquote is a hack to avoid collapsing space around the minus.
// May not be needed with a future nicer version of rsass?
max-width: calc(50vw unquote('-') 1.6em);
h2, p {
margin: .2em;
}
}
p.item {
justify-content: space-around;
}
}
div.details {
display: flex;
flex-flow: row wrap;
.item, .meta {
padding: 1em;
}
.item {
align-self: flex-start;
flex-grow: 4;
flex-basis: 30em;
text-align: center;
&.zoom {
flex-basis: auto;
}
}
.meta {
flex-grow: 1;
flex-basis: 20em;
padding-top: 0;
}
.places a:nth-child(n+2) {
font-size: 80%;
}
}
ul.alltags, ul.allpeople, ul.allplaces {
-moz-column-width: 13em;
column-width: 13em;
}
#map {
border: $border;
height: 10rem;
margin: 1ex auto;
max-height: 60vh;
}
form {
border: $border;
margin: auto;
padding: 1em;
width: -moz-fit-content;
width: fit-content;
p {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
}
label {
padding: .2em 1em .2em 0;
}
}
#help {
background: #fafafa;
border: solid 1px black;
bottom: 2em;
box-shadow: .3em .2em 1em;
display: none;
left: 2em;
padding: 1ex 1em;
position: fixed;
z-index: 1111;
&:target {
display: block;
}
h2 { margin: 0; }
}
// Relevant for admin forms only. Move to separate file?
form.admin {
position: relative;
padding: 1.8em 1ex;
display: flex;
width: -moz-available;
width: -webkit-fill-available;
width: available;
input[type="text"], input[type="range"] {
flex-grow: 1;
margin-right: 1ex;
}
button.close {
font-size: 50%;
margin: 0;
padding: 0;
position: absolute;
right: -1ex;
top: -1ex;
}
&.location {
background: #eee;
box-shadow: .2em .4em 1em rgba(0,0,0,.7);
display: flex;
flex-flow: column;
height: calc(95vh unquote('-') 6em);
left: 5vw;
padding-bottom: 1em;
position: fixed;
top: 3em;
width: calc(90vw unquote('-') 1ex);
z-index: 10000;
#amap {
border: $border;
flex-grow: 1;
margin: 0 auto 1ex;
max-height: 95vh;
width: -moz-available;
width: -webkit-fill-available;
width: available;
}
button {
flex-grow: 0;
align-self: flex-end;
}
}
}
div.completions {
border-bottom: solid 1px #888;
box-shadow: .2em .1em .5em rgba(0, 0, 0, .7);
display: block;
margin-left: .5em;
position: absolute;
z-index: 800;
a {
background: rgba(255,255,255,0.95);
border-color: #888;
border-style: solid;
border-width: 1px 1px 0;
display: block;
padding: .2em .5em; // .2em 2.2em;
color: black;
text-decoration: none;
}
a:focus {
background-color: #aaaaff;
}
}
.leaflet-popup-content img {
max-width: 11em;
max-height: 11em;
}