album/res/photos.scss

462 lines
8.8 KiB
SCSS
Raw Normal View History

2017-02-03 22:44:13 +04:00
$border: 1px solid #333;
2017-02-11 15:20:48 +04:00
html {
height: 100%;
&, body {
margin: 0;
padding: 0;
2017-02-11 15:20:48 +04:00
}
}
2015-11-27 01:20:36 +03:00
body {
2016-06-05 22:55:44 +03:00
background: #eee;
2017-02-03 22:44:13 +04:00
line-height: 1.6;
2017-02-11 15:20:48 +04:00
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100%;
// FIXME? Only on details?
max-height: 100vh;
2017-02-03 22:44:13 +04:00
}
h1 {
margin: .3em 0;
}
2017-02-03 22:44:13 +04:00
p {
margin: 0;
}
p + p {
margin-top: 1ex;
2015-11-27 01:20:36 +03:00
}
2015-11-30 23:00:07 +03:00
header {
2016-06-05 22:55:44 +03:00
background-color: #eee;
box-shadow: 0 0 1ex #444;
2017-02-11 15:20:48 +04:00
position: sticky;
2016-06-05 22:55:44 +03:00
top: 0;
z-index: 9999;
2017-02-11 15:20:48 +04:00
}
footer {
background: #999;
color: white;
:link, :visited {
color: #edf;
2017-02-11 15:20:48 +04:00
}
p { margin: 0; }
}
header, footer {
display: flex;
2016-05-04 19:45:50 +03:00
& > span {
flex-grow: 1;
2019-07-20 00:46:26 +04:00
margin-right: 1em;
}
2017-02-11 15:20:48 +04:00
& > :last-child {
flex-grow: 5;
padding-left: 1em;
text-align: right;
}
2017-11-25 04:22:01 +04:00
a {
text-decoration: none;
&:focus, &:hover {
text-decoration: underline;
}
2017-11-25 04:22:01 +04:00
}
2015-11-30 23:00:07 +03:00
}
2015-11-27 01:20:36 +03:00
2019-07-20 00:46:26 +04:00
header {
.user {
flex-grow: 5;
text-align: right;
}
form.search {
flex-grow: 3;
&.hidden {
flex-grow: 0;
.refs { display: none; }
}
}
}
form.search {
border: 0;
display: flex;
flex-flow: row wrap;
padding: 0;
text-align: left;
position: relative;
label {
padding: 0 .3em 0 0;
}
.list {
left: 1.5em;
position: absolute;
top: 1.9em;
z-index: 10;
a.hit {
background: white;
border: solid 1px #666;
color: black;
display: block;
padding: 0 1ex;
text-align: left;
text-decoration: none;
&:focus {
background: #bbf;
}
&:nth-child(n + 2) {
border-top: 0;
}
}
}
.refs {
display: inline-flex;
flex-flow: row wrap;
background: white;
border: solid 1px #baa;
border-radius: .2em;
margin: 2px 0;
padding: 0;
flex-grow: 1;
label {
background: #bbf;
border-radius: 1ex;
line-height: 1.4;
margin: .1em;
padding: 0 1ex;
&.not {
background: #fbb;
text-decoration: line-through;
}
2019-07-20 00:46:26 +04:00
}
input {
background: transparent;
border: 0;
flex-basis: 2em;
flex-grow: 1;
margin: 2px;
}
}
.l:before {
content: '';
margin-left: .4em;
}
.p:before {
content: '';
margin-left: .3em;
}
.t:before {
content: '🏷 ';
margin-left: .1em;
}
.time {
margin-left: 1em;
}
}
2017-02-11 15:20:48 +04:00
main {
flex-grow: 1;
margin-bottom: 1em;
2019-07-20 00:46:26 +04:00
form.search {
width: -moz-available;
}
2017-02-11 15:20:48 +04:00
}
header, footer, main {
flex-wrap: wrap;
padding: 0 1ex;
2019-07-20 00:46:26 +04:00
align-items: center;
2017-02-11 15:20:48 +04:00
}
2017-02-03 22:44:13 +04:00
.item {
box-shadow: 0 .2em 1em -.2em #000;
2017-02-03 22:44:13 +04:00
background: #ccc;
border: solid 1px white;
2017-02-03 22:44:13 +04:00
}
div.group {
display: flex;
2016-11-20 17:52:38 +03:00
flex-flow: row-reverse wrap;
2017-12-12 21:22:32 +04:00
justify-content: space-between;
2019-05-12 19:27:01 +04:00
margin: 0 -.1em;
.item {
position: relative;
margin: .4em .1em;
2019-05-12 19:27:01 +04:00
flex-grow: .1;
&.portrait {
flex-grow: .3;
}
2016-04-23 17:43:55 +03:00
img {
display: block;
height: calc(5em + 10vw);
2019-05-12 19:27:01 +04:00
object-fit: cover;
object-position: 50% 33%;
width: -moz-available;
width: -webkit-fill-available;
width: available;
}
// TODO: Set first-line class by js.
&.first-line img {
height: calc(6em + 11vw);
}
h2, .lable {
text-shadow: 0 0 .1em white, 0 0 .4em white;
padding: 0 .2em;
}
h2 {
position: absolute;
margin: 0;
line-height: 1.2;
}
.lable {
position: absolute;
bottom: 0;
right: 0;
font-size: 80%;
background: rgba(white,0.2);
padding-left: 1em;
border-top-left-radius: 1.5em 100%;
}
&:hover {
h2 {
background: rgba(white,0.5);
width: -moz-available;
2019-05-12 19:27:01 +04:00
width: -webkit-fill-available;
width: available;
}
.lable {
background: rgba(white,0.8);
}
2016-04-23 17:43:55 +03:00
}
}
2017-02-12 19:03:36 +04:00
p.item {
justify-content: space-around;
}
2015-11-27 01:20:36 +03:00
}
2017-02-03 22:44:13 +04:00
main.details {
margin: 0;
padding: 1ex;
img.item {
height: auto;
width: -moz-available;
width: -webkit-fill-available;
width: available;
&.zoom {
position: fixed;
top: 0;
left: 0;
width: -moz-available;
height: -moz-available;
z-index: 10000;
object-fit: contain;
}
}
}
@media screen and (min-width: 50em) {
main.details {
align-items: start;
display: grid;
flex: content 1 1;
grid-gap: 1ex;
grid-template-columns: 1fr fit-content(29%);
grid-template-rows: min-content 1fr min-content 1fr;
max-height: -moz-available;
overflow: hidden;
h1 {
grid-column: 2;
margin: 0;
}
img.item {
display: block;
grid-row: 1 / -1;
margin: 0 auto auto;
max-width: -moz-available;
max-height: -moz-available;
max-height: calc(100% - 2px);
max-width: calc(100% - 2px);
object-fit: scale-down;
width: auto;
height: auto;
.zoom {
grid-column: 1 / 3;
}
}
.places a:nth-child(n+2) {
font-size: 80%;
}
.meta {
overflow: auto;
height: -moz-available;
height: 100%;
}
#map {
margin: 0;
height: calc(100% - 2px) !important;
width: -moz-available;
}
.admbuttons {
flex-flow: row wrap;
margin: 0;
button {
margin: 0;
}
}
}
2017-02-03 22:44:13 +04:00
}
2015-11-27 02:02:18 +03:00
ul.alltags, ul.allpeople, ul.allplaces {
2015-11-27 02:02:18 +03:00
-moz-column-width: 13em;
column-width: 13em;
}
2016-07-09 22:25:34 +03:00
#map {
2017-02-03 22:44:13 +04:00
border: $border;
2018-02-11 18:32:15 +04:00
height: 10rem;
2017-02-03 22:44:13 +04:00
margin: 1ex auto;
max-height: 60vh;
2016-07-09 22:25:34 +03:00
}
2017-02-11 15:20:48 +04:00
div.admbuttons {
2019-05-29 20:14:08 +04:00
display: flex;
flex-flow: row wrap;
justify-content: space-between;
margin: 1ex -.1em 0;
button {
flex: min-content .1 1;
2019-05-29 20:14:08 +04:00
margin: .1em;
padding: 0;
}
}
2017-02-11 15:20:48 +04:00
form {
border: $border;
margin: auto;
padding: 1em;
width: -moz-fit-content;
2017-02-12 16:03:55 +04:00
width: fit-content;
2017-02-11 15:20:48 +04:00
p {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
2017-02-11 15:20:48 +04:00
}
label {
padding: .2em .6em .2em 0;
2017-02-11 15:20:48 +04:00
}
}
2017-11-06 02:03:55 +04:00
#help {
background: #fafafa;
2017-12-25 19:43:06 +04:00
border: solid 1px black;
bottom: 2em;
box-shadow: .3em .2em 1em;
display: none;
2017-12-25 19:43:06 +04:00
left: 2em;
padding: 1ex 1em;
position: fixed;
z-index: 1111;
&:target {
display: block;
}
h2 { margin: 0; }
2020-07-07 02:43:36 +04:00
a.close {
line-height: .8em;
padding: .1em;
position: absolute;
right: 0;
text-decoration: none;
top: 0;
}
}
2017-11-12 01:02:01 +04:00
// Relevant for admin forms only. Move to separate file?
form.admin {
display: flex;
margin: .3em .1em 0;
padding: 1.6em 1ex 1.2em;
position: relative;
2017-11-12 01:02:01 +04:00
width: -moz-available;
2017-11-25 03:04:17 +04:00
width: -webkit-fill-available;
2017-11-12 01:02:01 +04:00
width: available;
2017-11-25 03:04:17 +04:00
input[type="text"], input[type="range"] {
flex: min-content 1 1;
margin-right: 1ex;
2017-11-12 01:02:01 +04:00
}
button.close {
font-size: 50%;
margin: 0;
padding: 0;
position: absolute;
right: -1ex;
top: -1ex;
2017-11-12 01:02:01 +04:00
}
&.locate {
2018-07-15 23:52:44 +04:00
background: #eee;
box-shadow: .2em .4em 1em rgba(0,0,0,.7);
display: flex;
flex-flow: column;
height: calc(95vh - 6em);
2018-07-15 23:52:44 +04:00
left: 5vw;
padding-bottom: 1em;
position: fixed;
top: 3em;
width: calc(90vw - 1ex);
2018-07-15 23:52:44 +04:00
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;
2018-07-15 23:52:44 +04:00
}
button {
flex-grow: 0;
align-self: flex-end;
}
}
2017-11-12 01:02:01 +04:00
}
2017-11-06 02:03:55 +04:00
div.completions {
border-bottom: solid 1px #888;
box-shadow: .2em .1em .5em rgba(0, 0, 0, .7);
display: block;
margin-left: .5em;
position: absolute;
2018-02-20 02:03:07 +04:00
z-index: 800;
2017-11-06 02:03:55 +04:00
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;
2017-11-06 02:03:55 +04:00
}
a:focus {
background-color: #aaaaff;
2017-11-06 02:03:55 +04:00
}
}
2018-07-19 23:17:00 +04:00
.leaflet-popup-content img {
max-width: 11em;
max-height: 11em;
}