Skip to content

Commit

Permalink
Merge pull request #646 from kernvalley/feature/mayor-event-images
Browse files Browse the repository at this point in the history
Add images to Mayor Events
  • Loading branch information
shgysk8zer0 authored Jan 30, 2024
2 parents fba55b1 + ce108b1 commit f214531
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v3.0.7] - 2024-01-29

### Added
- Add image to Whiskey Flat Mayor Events

### Changed
- Update `@kernvalley/components` to 1.1.4

## [v3.0.6] - 2024-01-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ author: Chris Zuber
title: Whiskey Flat Days
url: 'https://whiskeyflatdays.com'
markdown: kramdown
version: 3.0.6
version: 3.0.7
timezone: America/Los_Angeles
lang: en
dir: ltr
Expand Down
2 changes: 1 addition & 1 deletion _data/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Whiskey Flat Days
shortName: WFD App
id: WhiskeyFlatDays
version: 3.0.6
version: 3.0.7
start_url: /?utm_source=homescreen&utm_medium=pwa
display: standalone
description: "Map, events, store, and news app for Whiskey Flat Days"
Expand Down
2 changes: 1 addition & 1 deletion _data/importmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ imports:
'@shgysk8zer0/jswaggersheets/': https://unpkg.com/@shgysk8zer0/[email protected]/
'@shgysk8zer0/http-status': https://unpkg.com/@shgysk8zer0/[email protected]/http-status.js
'@shgysk8zer0/components/': https://unpkg.com/@shgysk8zer0/[email protected]/
'@kernvalley/components/': https://unpkg.com/@kernvalley/[email protected].3/
'@kernvalley/components/': https://unpkg.com/@kernvalley/[email protected].4/
'@webcomponents/custom-elements': >-
https://unpkg.com/@webcomponents/[email protected]/custom-elements.min.js
leaflet: https://unpkg.com/[email protected]/dist/leaflet-src.esm.js
Expand Down
4 changes: 3 additions & 1 deletion _layouts/mayor.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ <h3 class="clearfix">
{% else %}
<strong class="mayor-event-name underline" itemprop="name">{{ event.name }}</strong>
{% endif %}
<br /><br />
</div>
<figure itemprop="image" itemtype="https://schema.org/ImageObject" itemscope="">
<img src="{{ event.image | default: page.image }}" class="mayor-event-image" width="640" alt="{{ event.name | xml_escape }} Event Image" loading="lazy" itemprop="url" decoding="async" referrerpolicy="no-referrer" crossorigin="anonymous" />
</figure>
<div class="mayor-event-datetime">
{% include common/icon.html icon="calendar" height="16" width="16" fill="currentColor" %}
<time itemprop="startDate" datetime="{{ event.startDate | date_to_xmlschema }}">
Expand Down
11 changes: 11 additions & 0 deletions css/mayors.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
gap: 1.2rem;
}

.mayor-event-image {
aspect-ratio: 4 / 3;
object-fit: cover;
object-position: center;
display: block;
width: 640px;
max-width: 95%;
height: auto;
margin: 2em auto;
}

.btn.event-share-btn {
margin-top: 0.8em;
font-size: 1.1rem;
Expand Down
4 changes: 4 additions & 0 deletions js/mayor-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ customElements.whenDefined('wfd-mayor-events').then(HTMLWFDMayorEventsElement =>
events.showDescription = true;
}

if (params.has('image')) {
events.showImage = true;
}

document.body.appendChild(events);
});
2 changes: 1 addition & 1 deletion mayors/embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>Whiskey Flat Mayor Race Embed</title>
<script type="application/javascript" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-h2kgNESJV1KN7BmHtXZv1j5WMcwFojESsbaNydwul3t6bqHOmzVMDaDXAEe6XLC+" src="https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js" fetchpriority="high" defer=""></script>
<script type="application/javascript" defer="" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k" src="https://unpkg.com/@shgysk8zer0/[email protected]/harden.js" fetchpriority="auto"></script>
<script type="application/javascript" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-4bvWx90pvspl1OvEHvBxVbktXn9+rfwtUdP3TFfGQllBZhCceb211St4jr5Qr0nF" src="https://unpkg.com/@kernvalley/[email protected].3/wfd/mayor-events.min.js" fetchpriority="auto" defer=""></script>
<script type="application/javascript" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-+BYeso/TV8BKMvLTBhzlz57DM/k1dsohx3ZuETlVvJawmJgvf9HWT0cQJnFEdvBs" src="https://unpkg.com/@kernvalley/[email protected].4/wfd/mayor-events.min.js" fetchpriority="auto" defer=""></script>
<script type="application/javascript" referrerpolicy="no-referrer" src="/js/mayor-events.js" defer=""></script>
<link rel="icon" href="/img/favicon.svg" type="image/svg+xml" sizes="150x150" />
<link rel="shortcut icon" href="/favicon.ico" />
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whiskey-flat-days",
"version": "3.0.6",
"version": "3.0.7",
"private": true,
"type": "module",
"description": "Map, events, store, and news app for Whiskey Flat Days",
Expand Down

0 comments on commit f214531

Please sign in to comment.