Files
spot/style/_mask_project.scss
2019-02-25 21:20:40 +01:00

347 lines
5.8 KiB
SCSS

//Feed width
$feed-width: "30% - 1rem";
$feed-width-max: "400px + 3rem";
//Feed colors
$post-input-bg: #d9deff;
$post-color: #323268;
$post-bg: #B4BDFF;
$message-color: #326526;
$message-bg: #6DFF58;
$picture-color: #635C28;
$picture-bg: #F3EC9F;
//Legend colors
$track-main-color: #00ff78;
$track-off-track-color: #0000ff;
$track-hitchhiking-color: #FF7814;
$legend-color: #222;
#messages {
#submap {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 100%;
&.with_feed {
width: calc(100% - #{$feed-width});
min-width: calc(100% - #{$feed-width-max});
}
.loader {
position: absolute;
font-size: 3em;
top: calc(50% - 0.5em);
left: calc(50% - 0.66666em);
color: #CCC;
}
}
#map {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 100%;
.track_tooltip {
p {
margin: 0;
&.name {
font-weight: bold;
font-size: 1.2em;
}
&.description {
font-style: italic;
}
}
}
.leaflet-marker-icon {
.fa-message {
font-size: 32px;
text-shadow: rgba(0, 0, 0, 0.5) 3px 3px 3px;
color: $message-bg;
}
.fa-message-in {
font-size: 13px;
color: $message-color;
top: 3px;
}
}
}
/* Leaflet patches */
.leaflet-control {
background-color: rgba(255, 255, 255, 0.6);
font-family: Roboto, Arial, sans-serif;
border-radius: 3px;
border: none;
margin: 1em;
&+ .leaflet-control {
margin-top: 0;
}
&.leaflet-control-layers-expanded {
color: $legend-color;
width: calc(100% - 2em - 16px);
}
&.leaflet-control-scale {
padding: 0.5em;
.leaflet-control-scale-line {
background: none;
}
}
}
/* Pull right controls by $feed-width % */
.leaflet-right {
width: calc(#{$feed-width});
max-width: calc(#{$feed-width-max});
.leaflet-control {
left: -100%;
}
}
/* Replace Layers image with font awesome icon */
.leaflet-control-layers-toggle {
@extend .control-icon;
@extend .fa-layers;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.8);
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
#legend {
.line {
display: block;
border-left: 2em solid;
line-height: 4px;
padding-left: 0.5em;
margin: 1em 1em 0.5em;
font-size: 1em;
color: $legend-color;
&:first-child {
margin-top: 0.5em;
}
&.main {
border-color: $track-main-color;
}
&.off-track {
border-color: $track-off-track-color;
}
&.hitchhiking {
border-color: $track-hitchhiking-color;
}
}
}
#feed {
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: calc(#{$feed-width});
max-width: calc(#{$feed-width-max});
z-index: 999;
#posts {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
#poster {
input, textarea, button {
border: none;
padding: 0.5em 1em;
border-radius: 3px;
background-color: $post-input-bg;
color: $post-color;
}
#post {
margin-bottom: 1em;
width: calc(100% - 2em);
}
#name {
width: calc(100% - 6em);
}
#submit {
margin-left: 1em;
background-color: $post-color;
color: $post-bg;
margin-bottom: 0.5em;
&:hover {
background-color: $post-input-bg;
color: $post-color;
}
}
}
.post {
margin-bottom: 1em;
background: $post-bg;
color: $post-color;
border-radius: 3px;
width: calc(100% - 1em);
box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.5);
&:first-child {
margin-top: 1em;
}
.message {
margin: 0.3em 0 0 0;
}
.signature {
margin: 0.5em 0 0 0;
text-align: right;
font-style: italic;
}
.header {
font-style: italic;
font-size: 0.8em;
span {
padding: 0.5em 1em;
display: inline-block;
width: calc(50% - 2em);
cursor: default;
&.index {
float: left;
font-style: normal;
}
&.time {
text-align: right;
}
}
}
.body {
clear: both;
padding: 0em 1em 0.5em;
}
&.headerless {
.header {
display: none;
}
.body {
padding-top: 0.5em;
}
}
&.picture {
background: $picture-bg;
color: $picture-color;
a {
display: inline-block;
width: 100%;
line-height: 0;
margin: 0;
}
img {
width: 100%;
image-orientation: from-image;
outline: none;
border-radius: 3px;
}
}
&.message {
background: $message-bg;
color: $message-color;
p {
font-size: 0.9em;
margin: 0.5em 0;
}
p: first-child {
margin-top: 1em;
}
.staticmap {
width: 100%;
border-radius: 3px;
cursor: pointer;
}
}
&.loading {
.body {
text-align: center;
p {
display: inline-block;
font-size: 2em;
color: $post-color;
}
}
}
}
}
}
}
#elems {
display: none;
}
/* Info Window */
.info-window {
h1 {
font-size: 1.2em;
margin: 1em 0;
}
p {
font-size: 1.0em;
margin: 0.5em 0 0 0;
}
i {
padding-right: 0.5em;
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.pics {
margin-top: 0.5em;
a {
display: inline-block;
margin-right: 15px;
img {
max-width: 200px;
max-height: 100px;
border-radius: 3px;
transition: All 0.2s;
&:hover {
box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.5);
}
}
}
}
}