Add button icons on all drill downs

This commit is contained in:
2019-07-01 21:22:37 +02:00
parent 9c5dc5fa4d
commit 7c0f3feed7
5 changed files with 56 additions and 36 deletions

View File

@@ -481,14 +481,14 @@ function getPost(asPost) {
.data('id', asPost.id_message) .data('id', asPost.id_message)
.append($('<p>').addIcon('fa-coords', true).append(asPost.lat_dms+' '+asPost.lon_dms)) .append($('<p>').addIcon('fa-coords', true).append(asPost.lat_dms+' '+asPost.lon_dms))
.append($('<p>').addIcon('fa-time', true).append(sAbsTime+self.tmp('site_tz_notice'))) .append($('<p>').addIcon('fa-time', true).append(sAbsTime+self.tmp('site_tz_notice')))
.append( .append($('<a>', {'class':'drill'})
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getWmtsApiUrl('static', asPost.latitude, asPost.longitude, 13)}) .append($('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getWmtsApiUrl('static', asPost.latitude, asPost.longitude, 13)}))
.click(function(){ .click(function(){
var oMarker = oSpot.tmp(['markers', $(this).parent().data('id')]); var oMarker = oSpot.tmp(['markers', $(this).parent().data('id')]);
self.tmp('map').setOffsetView(self.tmp('map_offset'), oMarker.getLatLng(), 13); self.tmp('map').setOffsetView(self.tmp('map_offset'), oMarker.getLatLng(), 13);
if(!oMarker.isPopupOpen()) oMarker.openPopup(); if(!oMarker.isPopupOpen()) oMarker.openPopup();
if(self.tmp('mobile')) toggleFeedPanel(false); if(self.tmp('mobile')) toggleFeedPanel(false);
}) })
) )
.hover( .hover(
function(){ function(){
@@ -505,9 +505,8 @@ function getPost(asPost) {
var bVideo = (asPost.subtype == 'video'); var bVideo = (asPost.subtype == 'video');
var sTakenOn = (asPost.taken_on == '0000-00-00 00:00:00')?'':' et prise le '+asPost.taken_on_formatted+self.tmp('site_tz_notice'); var sTakenOn = (asPost.taken_on == '0000-00-00 00:00:00')?'':' et prise le '+asPost.taken_on_formatted+self.tmp('site_tz_notice');
var $Image = $('<img>', {'src': asPost.thumb_path, title: bVideo?'Click pour voir la vidéo':'Click pour zoomer'}); var $Image = $('<img>', {'src': asPost.thumb_path, title: bVideo?'Click pour voir la vidéo':'Click pour zoomer'});
$Body = $('<a>', { $Body = $('<a>', {
'class': (bVideo?'video':'picture'), 'class': 'drill '+(bVideo?'video':'picture'),
href: asPost.pic_path, href: asPost.pic_path,
'data-video': (bVideo?'true':'false'), 'data-video': (bVideo?'true':'false'),
'data-lightbox': 'post-pictures', 'data-lightbox': 'post-pictures',

View File

@@ -48,7 +48,9 @@ $fa-css-prefix: fa;
.#{$fa-css-prefix}-message:before { content: fa-content($fa-var-map-marker); } .#{$fa-css-prefix}-message:before { content: fa-content($fa-var-map-marker); }
.#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); } .#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); }
.#{$fa-css-prefix}-coords:before { content: fa-content($fa-var-compass); } .#{$fa-css-prefix}-coords:before { content: fa-content($fa-var-compass); }
.#{$fa-css-prefix}-play:before { content: fa-content($fa-var-play-circle); } .#{$fa-css-prefix}-drill-video:before { content: fa-content($fa-var-play-circle); }
.#{$fa-css-prefix}-drill-picture:before { content: fa-content($fa-var-search); }
.#{$fa-css-prefix}-drill-message:before { content: fa-content($fa-var-search-location); }
/* Feed - Poster */ /* Feed - Poster */
.#{$fa-css-prefix}-poster:before { content: fa-content($fa-var-comment-edit); } .#{$fa-css-prefix}-poster:before { content: fa-content($fa-var-comment-edit); }

View File

@@ -293,6 +293,28 @@ $legend-color: #222;
.body { .body {
clear: both; clear: both;
padding: 0em 1em 0.5em; padding: 0em 1em 0.5em;
a.drill {
display: inline-block;
width: 100%;
line-height: 0;
margin: 0;
position: relative;
@extend .fa;
overflow: hidden;
text-decoration: none;
&:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
font-size: 3em;
color: transparent;
transition: all 0.3s;
cursor: pointer;
}
}
} }
&.headerless { &.headerless {
.header { .header {
@@ -306,31 +328,21 @@ $legend-color: #222;
background: $media-bg; background: $media-bg;
color: $media-color; color: $media-color;
a { a.drill {
display: inline-block;
width: 100%;
line-height: 0;
margin: 0;
position: relative;
&.video { &.video {
@extend .fa; @extend .fa-drill-video;
@extend .fa-play; &:hover:before {
overflow: hidden; color: rgba($media-bg, 0.75);
&:hover::before {
color: white;
} }
&:before {
&::before { color: rgba(255, 255, 255, 0.5);
position: absolute; }
top: 50%; }
transform: translate(-50%,-50%);
color: #CCC; &.picture {
left: 50%; @extend .fa-drill-picture;
text-shadow: 0px 1px 1px rgba(0,0,0,0.8); &:hover:before {
font-size: 3em; color: rgba($media-bg, 0.75);
text-decoration: none;
} }
} }
} }
@@ -350,6 +362,13 @@ $legend-color: #222;
font-size: 0.9em; font-size: 0.9em;
margin: 0.5em 0; margin: 0.5em 0;
} }
a.drill {
@extend .fa-drill-message;
&:hover:before {
color: rgba($message-bg, 0.75);
}
}
.staticmap { .staticmap {
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long