theme reorx: enhance location display
This commit is contained in:
parent
9bf4c10a92
commit
4e2c1f0eca
|
|
@ -4,6 +4,13 @@ function linkInDiv(url) {
|
||||||
return `<div class="url row"><a href="${url}" target="_blank">${fn.noSchemaURL(url)}</a></div>`
|
return `<div class="url row"><a href="${url}" target="_blank">${fn.noSchemaURL(url)}</a></div>`
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
<%
|
||||||
|
function formatLocation(loc) {
|
||||||
|
const cityToCountry = ['city', 'postalCode', 'region', 'countryCode'].map(key => loc[key]).filter(v => v).join(', ')
|
||||||
|
if (!loc.address) return cityToCountry
|
||||||
|
return `${loc.address}. ${cityToCountry}`
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
<!-- Basics -->
|
<!-- Basics -->
|
||||||
<section class="basics-section">
|
<section class="basics-section">
|
||||||
|
|
@ -36,7 +43,7 @@ function linkInDiv(url) {
|
||||||
<% if (cv.basics.location) { %>
|
<% if (cv.basics.location) { %>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<%- fn.getIconSVG('mdi:location') %>
|
<%- fn.getIconSVG('mdi:location') %>
|
||||||
<span><%= cv.basics.location.city %>, <%= cv.basics.location.countryCode %></span>
|
<span><%= formatLocation(cv.basics.location) %></span>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -165,14 +165,14 @@ section {
|
||||||
.contact {
|
.contact {
|
||||||
color: $color-text-dim;
|
color: $color-text-dim;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: .4em 1em;
|
||||||
|
|
||||||
@media screen and (max-width: 500px) {
|
@media screen and (max-width: 500px) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: .4em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
margin-right: 1em;
|
|
||||||
a {
|
a {
|
||||||
color: $color-text-dim;
|
color: $color-text-dim;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue