Fix popup medias
This commit is contained in:
@@ -87,7 +87,9 @@ module.exports = {
|
|||||||
from: path.resolve(LIB, 'index.php'),
|
from: path.resolve(LIB, 'index.php'),
|
||||||
to: 'index.php'
|
to: 'index.php'
|
||||||
},
|
},
|
||||||
{ from: 'src/images/footprint_mapbox.png', to: 'images' }
|
{ from: 'src/images/footprint_mapbox.png', to: 'images' },
|
||||||
|
{ from: 'src/images/logo_black.png', to: 'images' },
|
||||||
|
{ from: 'src/images/spot-logo-only.svg', to: 'images' }
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
new SymlinkWebpackPlugin([
|
new SymlinkWebpackPlugin([
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ language = Language
|
|||||||
clearance = Clearance
|
clearance = Clearance
|
||||||
toolbox = Toolbox
|
toolbox = Toolbox
|
||||||
|
|
||||||
|
unit_d = D
|
||||||
unit_day = day
|
unit_day = day
|
||||||
unit_days = days
|
unit_days = days
|
||||||
unit_hour = h
|
unit_hour = h
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ language = Idioma
|
|||||||
clearance = Nivel de autorización
|
clearance = Nivel de autorización
|
||||||
toolbox = Herramientas
|
toolbox = Herramientas
|
||||||
|
|
||||||
|
unit_d = D
|
||||||
unit_day = Día
|
unit_day = Día
|
||||||
unit_days = Días
|
unit_days = Días
|
||||||
unit_hour = h
|
unit_hour = h
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ language = Langue
|
|||||||
clearance = Niveau d'autorisation
|
clearance = Niveau d'autorisation
|
||||||
toolbox = Boite à outils
|
toolbox = Boite à outils
|
||||||
|
|
||||||
|
unit_d = J
|
||||||
unit_day = jour
|
unit_day = jour
|
||||||
unit_days = jours
|
unit_days = jours
|
||||||
unit_hour = h
|
unit_hour = h
|
||||||
|
|||||||
@@ -401,8 +401,10 @@ class Spot extends Main
|
|||||||
$iTimeStampPostedOn = strtotime($asMedia['posted_on']);
|
$iTimeStampPostedOn = strtotime($asMedia['posted_on']);
|
||||||
$asMedia['taken_on_formatted'] = $this->getTimeFormat($iTimeStampTakenOn);
|
$asMedia['taken_on_formatted'] = $this->getTimeFormat($iTimeStampTakenOn);
|
||||||
$asMedia['taken_on_formatted_local'] = $this->getTimeFormat($iTimeStampTakenOn, $asMedia['timezone']);
|
$asMedia['taken_on_formatted_local'] = $this->getTimeFormat($iTimeStampTakenOn, $asMedia['timezone']);
|
||||||
|
$asMedia['taken_on_formatted_day_offset'] = self::getTimeZoneDayOffset($iTimeStampTakenOn, $asMedia['timezone']);
|
||||||
$asMedia['posted_on_formatted'] = $this->getTimeFormat($iTimeStampPostedOn);
|
$asMedia['posted_on_formatted'] = $this->getTimeFormat($iTimeStampPostedOn);
|
||||||
$asMedia['posted_on_formatted_local'] = $this->getTimeFormat($iTimeStampPostedOn, $asMedia['timezone']);
|
$asMedia['posted_on_formatted_local'] = $this->getTimeFormat($iTimeStampPostedOn, $asMedia['timezone']);
|
||||||
|
$asMedia['posted_on_formatted_day_offset'] = self::getTimeZoneDayOffset($iTimeStampPostedOn, $asMedia['timezone']);
|
||||||
$asMedia['displayed_id'] = $asMedia[Db::getId(Media::MEDIA_TABLE)];
|
$asMedia['displayed_id'] = $asMedia[Db::getId(Media::MEDIA_TABLE)];
|
||||||
|
|
||||||
$this->addTimeStamp($asMedia, strtotime($asMedia[$sTimeRefField]), $asMedia['timezone']);
|
$this->addTimeStamp($asMedia, strtotime($asMedia[$sTimeRefField]), $asMedia['timezone']);
|
||||||
@@ -842,7 +844,7 @@ class Spot extends Main
|
|||||||
$iLocalDate = (int) (new \DateTime('@'.$iTime))->setTimezone(new \DateTimeZone($sLocalTimeZone))->format('Ymd');
|
$iLocalDate = (int) (new \DateTime('@'.$iTime))->setTimezone(new \DateTimeZone($sLocalTimeZone))->format('Ymd');
|
||||||
$iSiteDate = (int) (new \DateTime('@'.$iTime))->setTimezone(new \DateTimeZone($sSiteTimeZone ))->format('Ymd');
|
$iSiteDate = (int) (new \DateTime('@'.$iTime))->setTimezone(new \DateTimeZone($sSiteTimeZone ))->format('Ymd');
|
||||||
|
|
||||||
return ($iLocalDate == $iSiteDate)?'0':(($iLocalDate > $iSiteDate)?'+1':'-1');
|
return ($iLocalDate == $iSiteDate)?'0':(($iLocalDate < $iSiteDate)?'+1':'-1');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTimeZoneFromDate($sDate) {
|
public static function getTimeZoneFromDate($sDate) {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import spotIcon from './spotIcon.vue';
|
import spotIcon from './spotIcon.vue';
|
||||||
|
import projectRelTime from './projectRelTime.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
spotIcon
|
spotIcon,
|
||||||
|
projectRelTime
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
options: Object,
|
options: Object,
|
||||||
@@ -46,15 +48,14 @@ export default {
|
|||||||
<span v-if="options.comment && type == 'post'" class="comment">{{ options.comment }}</span>
|
<span v-if="options.comment && type == 'post'" class="comment">{{ options.comment }}</span>
|
||||||
</a>
|
</a>
|
||||||
<div style="display:none">
|
<div style="display:none">
|
||||||
<span v-if="options.comment" ref="comment" class="lb-caption-line comment desktop" :title="options.comment">
|
<span v-if="options.comment" ref="comment" class="lb-caption-line comment desktop">
|
||||||
<spotIcon :icon="'post'" :classes="'fa-lg fa-fw push'" />
|
<spotIcon :icon="'post'" :classes="'fa-lg fa-fw push'" :text-classes="'comment-text'" :text="options.comment" />
|
||||||
<span class="comment-text">{{ options.comment }}</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span ref="postedon" class="lb-caption-line" :title="$parent.timeDiff?spot.lang('local_time', options.posted_on_formatted_local):''">
|
<span ref="postedon" class="lb-caption-line">
|
||||||
<spotIcon :icon="'upload'" :classes="'fa-lg fa-fw'" :text="options.posted_on_formatted" />
|
<projectRelTime :icon="'upload'" :localTime="options.posted_on_formatted_local" :siteTime="options.posted_on_formatted" :offset="options.posted_on_formatted_day_offset" />
|
||||||
</span>
|
</span>
|
||||||
<span ref="takenon" class="lb-caption-line" :title="$parent.timeDiff?spot.lang('local_time', options.taken_on_formatted_local):''">
|
<span ref="takenon" class="lb-caption-line">
|
||||||
<spotIcon :icon="options.subtype+'-shot'" :classes="'fa-lg fa-fw'" :text="options.taken_on_formatted" />
|
<projectRelTime :icon="options.subtype+'-shot'" :localTime="options.taken_on_formatted_local" :siteTime="options.taken_on_formatted" :offset="options.taken_on_formatted_day_offset" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -3,6 +3,7 @@ import projectMapLink from './projectMapLink.vue';
|
|||||||
import spotIcon from './spotIcon.vue';
|
import spotIcon from './spotIcon.vue';
|
||||||
import projectRelTime from './projectRelTime.vue';
|
import projectRelTime from './projectRelTime.vue';
|
||||||
import projectMediaLink from './projectMediaLink.vue';
|
import projectMediaLink from './projectMediaLink.vue';
|
||||||
|
import { options } from '../scripts/lightbox';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -37,18 +38,15 @@ export default {
|
|||||||
<projectMapLink :options="options" />
|
<projectMapLink :options="options" />
|
||||||
</p>
|
</p>
|
||||||
<p class="time">
|
<p class="time">
|
||||||
<spotIcon :icon="'time'" :classes="'fa-fw fa-lg'" :text="options.formatted_time" />
|
<projectRelTime :icon="'time'" :localTime="options.formatted_time_local" :siteTime="options.formatted_time" :offset="options.day_offset" />
|
||||||
<span v-if="project.mode==spot.consts.modes.blog"> ({{ options.relative_time }})</span>
|
<span v-if="project.mode==spot.consts.modes.blog"> ({{ options.relative_time }})</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="timezone" v-if="options.day_offset != '0'">
|
|
||||||
<spotIcon :icon="'timezone'" :classes="'fa-fw fa-lg'" :margin="true" />
|
|
||||||
<projectRelTime :localTime="options.formatted_time_local" :offset="options.day_offset" />
|
|
||||||
</p>
|
|
||||||
<p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':spot.lang(options.weather_cond)">
|
<p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':spot.lang(options.weather_cond)">
|
||||||
<spotIcon :icon="options.weather_icon" :classes="'fa-fw fa-lg'" :text="options.weather_temp+'°C'" />
|
<spotIcon :icon="options.weather_icon" :classes="'fa-fw fa-lg'" :text="options.weather_temp+'°C'" />
|
||||||
</p>
|
</p>
|
||||||
<p class="medias">
|
<div v-if="medias" class="separator"></div>
|
||||||
|
<div v-if="medias" class="medias">
|
||||||
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
|
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -127,13 +127,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div v-if="options.type == 'message'" class="body-box" @mouseenter="openMarkerPopup" @mouseleave="closeMarkerPopup">
|
<div v-if="options.type == 'message'" class="body-box" @mouseenter="openMarkerPopup" @mouseleave="closeMarkerPopup">
|
||||||
<p><spotIcon :icon="'coords'" :classes="'push'" /><projectMapLink :options="options" /></p>
|
<p>
|
||||||
<p><spotIcon :icon="'time'" :text="absTime" /></p>
|
<spotIcon :icon="'coords'" :classes="'push'" />
|
||||||
<p v-if="timeDiff"><spotIcon :icon="'timezone'" :classes="'push'" /><projectRelTime :localTime="absTimeLocal" :offset="options.day_offset" /></p>
|
<projectMapLink :options="options" />
|
||||||
|
</p>
|
||||||
|
<p v-if="timeDiff">
|
||||||
|
<projectRelTime :icon="'time'" :iconClasses="'push'" :localTime="absTimeLocal" :siteTime="options.formatted_time" :offset="options.day_offset" />
|
||||||
|
</p>
|
||||||
<a class="drill" @click.prevent="panMapToMessage">
|
<a class="drill" @click.prevent="panMapToMessage">
|
||||||
<span v-if="options.weather_icon && options.weather_icon!='unknown'" class="weather clickable" :title="spot.lang(options.weather_cond)">
|
<span v-if="options.weather_icon && options.weather_icon!='unknown'" class="weather clickable" :title="spot.lang(options.weather_cond)">
|
||||||
<spotIcon :icon="options.weather_icon" />
|
<spotIcon :icon="options.weather_icon" />
|
||||||
<span>{{ options.weather_temp+'°C' }}</span>
|
<span class="temperature">{{ options.weather_temp+'°C' }}</span>
|
||||||
</span>
|
</span>
|
||||||
<img class="staticmap clickable" :title="spot.lang('click_zoom')" :src="options.static_img_url" />
|
<img class="staticmap clickable" :title="spot.lang('click_zoom')" :src="options.static_img_url" />
|
||||||
<span class="drill-icon fa-stack clickable">
|
<span class="drill-icon fa-stack clickable">
|
||||||
|
|||||||
@@ -1,17 +1,31 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import spotIcon from './spotIcon.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
spotIcon
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
localTime: String,
|
localTime: String,
|
||||||
offset: String
|
siteTime: String,
|
||||||
|
offset: String,
|
||||||
|
classes: String,
|
||||||
|
icon: String,
|
||||||
|
iconClasses: String
|
||||||
},
|
},
|
||||||
inject: ['spot']
|
inject: ['spot'],
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
if(this.localTime != this.siteTime) return this.spot.lang('your_time', this.siteTime.slice(-5)) + ((this.offset != '0')?' ('+this.spot.lang('unit_d')+this.offset+')':'');
|
||||||
|
},
|
||||||
|
spotIconClasses() {
|
||||||
|
return this.iconClasses || 'fa-fw fa-lg';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span>
|
<spotIcon v-if="icon" :icon="icon" :classes="spotIconClasses" :title="title" :text="localTime" />
|
||||||
<span>{{ localTime.substring(-5) }}</span>
|
<span v-else :class="classes" :title="title">{{ localTime }}</span>
|
||||||
<sup v-if="offset != '0'" :title="offset+' '+spot.lang('unit_day')+' ('+localTime.substring(0, 5)+')'">{{ ' '+offset }}</sup>
|
|
||||||
<span> {{ spot.lang('local_time', ' ').trim() }}</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
@@ -2,9 +2,11 @@
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
icon: String,
|
icon: String,
|
||||||
|
title: String,
|
||||||
text: String,
|
text: String,
|
||||||
margin: Boolean,
|
margin: Boolean,
|
||||||
classes: String
|
classes: String,
|
||||||
|
textClasses: String
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
classNames() {
|
classNames() {
|
||||||
@@ -15,5 +17,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<i :class="classNames"></i>{{ text }}
|
<span :title="title"><i :class="classNames"></i><span :class="textClasses">{{ text }}</span></span>
|
||||||
</template>
|
</template>
|
||||||
@@ -11,8 +11,6 @@ window.copyTextToClipboard = common.copyTextToClipboard;
|
|||||||
window.getOuterWidth = common.getOuterWidth;
|
window.getOuterWidth = common.getOuterWidth;
|
||||||
|
|
||||||
import Css from './../styles/spot.scss';
|
import Css from './../styles/spot.scss';
|
||||||
import LogoText from '../images/logo_black.png';
|
|
||||||
import Logo from '../images/spot-logo-only.svg';
|
|
||||||
|
|
||||||
//Masks
|
//Masks
|
||||||
import Spot from './spot.js';
|
import Spot from './spot.js';
|
||||||
|
|||||||
@@ -115,9 +115,8 @@ export default class Spot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lang(sKey, asParams) {
|
lang(sKey, asParams = []) {
|
||||||
asParams = asParams || [];
|
if(typeof asParams !== 'object') asParams = [asParams];
|
||||||
if(typeof asParams != 'object') asParams = [asParams];
|
|
||||||
|
|
||||||
var sLang = '';
|
var sLang = '';
|
||||||
if(sKey in this.consts.lang) {
|
if(sKey in this.consts.lang) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
[title]:not(a):not(.clickable) {
|
[title]:not(a):not(.clickable) {
|
||||||
cursor: inherit;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickable {
|
.clickable {
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
padding: var.$elem-spacing;
|
padding: var.$elem-spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
.temperature {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: var.$elem-spacing;
|
padding: var.$elem-spacing;
|
||||||
background: color.$message-bg;
|
background: color.$message-bg;
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
@use "var";
|
@use "var";
|
||||||
@use "color";
|
@use "color";
|
||||||
|
|
||||||
|
$thumbnail-max-size: 60px;
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -9,8 +11,13 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
/* Leaflet Popup */
|
/* Popup */
|
||||||
|
.maplibregl-popup {
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
.maplibregl-popup-content {
|
.maplibregl-popup-content {
|
||||||
|
padding: var.$block-spacing;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
@@ -20,7 +27,7 @@
|
|||||||
|
|
||||||
.separator {
|
.separator {
|
||||||
border-top: 1px solid #CCC;
|
border-top: 1px solid #CCC;
|
||||||
margin: var.$elem-spacing 0 var.$block-spacing 0;
|
margin: var.$elem-spacing 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Marker Popup */
|
/* Marker Popup */
|
||||||
@@ -44,11 +51,12 @@
|
|||||||
|
|
||||||
.medias {
|
.medias {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
|
display: grid;
|
||||||
|
gap: var.$elem-spacing;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax($thumbnail-max-size, 1fr));
|
||||||
|
place-items: center;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
margin: var.$block-spacing var.$block-spacing 0 0;
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
@@ -73,8 +81,8 @@
|
|||||||
img {
|
img {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 200px;
|
max-width: $thumbnail-max-size;
|
||||||
max-height: 100px;
|
max-height: calc($thumbnail-max-size * 2/3);
|
||||||
border-radius: var.$block-radius;
|
border-radius: var.$block-radius;
|
||||||
image-orientation: from-image;
|
image-orientation: from-image;
|
||||||
transition: All 0.2s;
|
transition: All 0.2s;
|
||||||
|
|||||||
Reference in New Issue
Block a user