Reposition medias in popup

This commit is contained in:
2026-04-29 23:44:55 +02:00
parent 15c044ac52
commit fe2a3d91c0
2 changed files with 40 additions and 36 deletions

View File

@@ -31,27 +31,27 @@ export default {
<div :class="'info-window '+type">
<div class="header" v-if="type=='message'">
<h1>
<spotIcon :icon="'message'" size="lg" :text="lang.get('feed.counter', options.displayed_id)" />
<spotIcon :icon="'message'" size="lg" :text="lang.get('feed.counter', options.displayed_id)" width="auto" />
<span class="message-type">({{ options.type }})</span>
</h1>
<div class="separator"></div>
</div>
<p class="coordinates">
<div class="info coordinates">
<spotIcon :icon="'coords'" fixed-width size="lg" margin="right" />
<projectMapLink :options="options" />
</p>
<p class="altitude" v-if="options.altitude">
</div>
<div class="info altitude" v-if="options.altitude">
<spotIcon :icon="'altitude'" fixed-width size="lg" :text="options.altitude+'m'" />
</p>
<p class="time">
</div>
<div class="info time">
<projectRelTime :icon="timeIcon" :localTime="options.formatted_time_local" :siteTime="options.formatted_time" :offset="options.day_offset" />
<span v-if="project.mode==consts.modes.blog"> ({{ options.relative_time }})</span>
</p>
<p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':lang.get('weather.'+options.weather_icon)">
</div>
<div class="info weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':lang.get('weather.'+options.weather_icon)">
<spotIcon :icon="options.weather_icon" fixed-width size="lg" :text="options.weather_temp+'°C'" />
</p>
<div v-if="medias.length > 0">
<div class="separator"></div>
</div>
<div v-if="medias.length > 0" class="info">
<spotIcon icon="media" fixed-width size="lg" :text="lang.get('media.nearby')" />
<div class="medias">
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
</div>

View File

@@ -20,28 +20,29 @@ $thumbnail-max-size: 60px;
padding: var.$block-spacing;
background-color: color.$default-bg-light;
h1 {
font-size: 1.4em;
margin: 0;
font-weight: bold;
}
.separator {
border-top: 1px solid color.$default-bg;
margin: var.$elem-spacing 0;
}
/* Marker Popup */
.info-window {
h1 .message-type {
color: color.$default;
font-weight: normal;
font-size: calc(1em / 1.4);
margin-left: 0.5em;
vertical-align: middle;
h1 {
font-size: 1.4em;
margin: 0;
font-weight: bold;
text-align: center;
.message-type {
color: color.$default;
font-weight: normal;
font-size: calc(1em / 1.4);
margin-left: 0.5em;
vertical-align: center;
}
}
p {
.separator {
border-top: 1px solid color.$default-bg;
margin: var.$elem-spacing 0;
}
.info {
font-size: 1.0em;
margin: var.$elem-spacing 0 0 0;
@@ -78,20 +79,23 @@ $thumbnail-max-size: 60px;
&.message {
.medias {
line-height: 0;
display: grid;
display: flex;
flex-wrap: wrap;
gap: var.$elem-spacing;
grid-template-columns: repeat(auto-fill, minmax($thumbnail-max-size, 1fr));
place-items: center;
align-items: center;
margin-top: var.$elem-spacing;
a.media-link {
&:last-child {
margin-right: 0;
}
flex: 0 0 auto;
img {
max-width: $thumbnail-max-size;
max-height: calc($thumbnail-max-size * 2/3);
}
&.drill .drill-icon {
font-size: 1.5em;
}
}
}
}
@@ -137,4 +141,4 @@ $thumbnail-max-size: 60px;
}
}
}
}
}