Skip to content

Commit 7799dc6

Browse files
authored
Merge pull request #199 from kernvalley/patch/icons
Misc. updates for change in icons
2 parents 64ef551 + 6b807dc commit 7799dc6

File tree

7 files changed

+44
-49
lines changed

7 files changed

+44
-49
lines changed

_includes/ad.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<ad-block id="{{ include.id }}" class="ad custom-element if-defined {{ include.classList | join: ' ' }}" title="{{ include.label | escape }}" url="{{ include.url }}" theme="{{ include.theme | default: 'auto' }}" layout="{{ include.layout | default: 'card' }}" imagefit="{{ include.imageFit | default: 'fill' }}" imagePosition="{{ include.imagePosition | default: 'center' }}" source="{{ include.source | default: site.data.ads.source | escape }}" medium="{{ include.medium | default: site.data.ads.medium | escape }}" campaign="{{ include.campaign | default: site.data.ads.campaign | escape }}" term="{{ include.term | escape }}" content="{{ include.content | escape }}" dir="{{ include.dir | default: 'auto' }}" lang="{{ include.lang | default: 'en' }}" itemtype="https://schema.org/WPAdBlock" media="{{ include.media | default: 'all' }}" loading="{{ include.loading | default: 'eager' }}" itemscope="">
1+
{% unless ad.disabled %}<ad-block id="{{ include.id }}" class="ad custom-element if-defined {{ include.classList | join: ' ' }}" title="{{ include.label | escape }}" url="{{ include.url }}" theme="{{ include.theme | default: 'auto' }}" layout="{{ include.layout | default: 'card' }}" imagefit="{{ include.imageFit | default: 'cover' }}" imagePosition="{{ include.imagePosition | default: 'center' }}" source="{{ include.source | default: site.data.ads.source | escape }}" medium="{{ include.medium | default: site.data.ads.medium | escape }}" campaign="{{ include.campaign | default: site.data.ads.campaign | escape }}" term="{{ include.term | escape }}" content="{{ include.content | escape }}" dir="{{ include.dir | default: 'auto' }}" lang="{{ include.lang | default: 'en' }}" itemtype="https://schema.org/WPAdBlock" media="{{ include.media | default: 'all' }}" loading="{{ include.loading | default: 'eager' }}" itemscope="">
22
{% if include.image %}<img src="{{ include.image }}" decoding="async" loading="lazy" referrerpolicy="no-referrer" crossorigin="anonymous" alt="{{ include.label | escape }} image" slot="image" />{% endif %}
3-
<b slot="label">{{ include.label }}</b>
4-
<p slot="description">{{ include.description }}</p>
5-
<span slot="calltoaction">{{ include.callToAction }}</span>
6-
</ad-block>
3+
{% if include.label %}<b slot="label">{{ include.label }}</b>{% endif %}
4+
{% if include.description %}<span slot="description">{{ include.description }}</span>{% endif %}
5+
{% if include.callToAction %}<span slot="calltoaction">{{ include.callToAction }}</span>{% endif %}
6+
</ad-block>{% endunless %}

_includes/address.html

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
<address class="clearfix" itemprop="{{ include.itemprop | default: 'address' }}" itemtype="http://schema.org/PostalAddress" itemscope="">
2-
{% if include.address.url %}
3-
<a href="{{ include.address.url }}" target="_blank" class="block clearfix" itemprop="url">
4-
{% endif %}
5-
<div class="float-left">{% include icon.html icon='location' %}</div>
6-
<div class="float-left">
7-
{% if include.address.name %}
8-
<div itemprop="name">{{ include.address.name }}</div>
9-
{% endif %}
10-
{% if include.address.streetAddress %}
11-
<div itemprop="streetAddress">{{ include.address.streetAddress }}</div>
12-
{% endif %}
13-
<div>
14-
<span itemprop="addressLocality">{{ include.address.addressLocality }}</span>,
15-
<span itemprop="addressRegion">{{ include.address.addressRegion }}</span>
16-
{% if include.address.postalCode %}
17-
<span itemprop="postalCode">{{ include.address.postalCode }}</span>
18-
{% endif %}
19-
<meta itemprop="addressCountry" content="{{ include.address.addressCountry | default: 'US' }}" />
20-
</div>
1+
<address itemprop="{{ include.itemprop | default: 'address' }}" itemtype="https://schema.org/PostalAddress" itemscope=""{% if include.hidden %} hidden=""{% endif %}>
2+
{% if include.address.name %}<div itemprop="name">{{ include.name }}</div>{% endif %}
3+
{% if include.address.streetAddress %}<div itemprop="streetAddress">{{ include.address.streetAddress }}</div>{% endif %}
4+
{% if include.address.postOfficeBoxNumber %}<div itemprop="postOfficeBoxNumber">PO Box {{ include.address.postOfficeBoxNumber | replace: 'PO BOx', '' }}</div>{% endif %}
5+
<div>
6+
<span itemprop="addressLocality">{{ include.address.addressLocality }}</span>,
7+
<span itemprop="addressRegion">{{ include.address.addressRegion | default: 'CA' }}</span>
8+
<span itemprop="postalCode">{{ include.address.postalCode }}</span>
9+
<meta itemprop="addressCountry" content="{{ include.address.addressCountry | default: 'US' }}"/>
2110
</div>
22-
{% if include.address.url %}</a>{% endif %}
2311
</address>

_includes/map-icon.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<img slot="icon" src="https://cdn.kernvalley.us/img/markers/{{ include.icon | default: 'business' }}.svg" width="{{ include.iconSize | default: '27' }}" height="{{ include.iconSize | default: '27' }}" crossorigin="{{ include.crossOrigin | default: 'anonymous' }}" referrerpolicy="{{ include.referrerPolicy | default: 'no-referrer' }}" loading="{{ include.loading | default: 'lazy' }}" decoding="{{ include.decoding | default: 'async' }}" alt="{{ include.alt }}" />
1+
<img slot="icon" src="{{ site.markers | default: 'https://cdn.kernvalley.us/img/markers.svg' }}#{{ include.icon | default: 'business' }}" width="{{ include.iconSize | default: '30' }}" height="{{ include.iconSize | default: '30' }}" crossorigin="{{ include.crossOrigin | default: 'anonymous' }}" referrerpolicy="{{ include.referrerPolicy | default: 'no-referrer' }}" loading="{{ include.loading | default: 'lazy' }}" decoding="{{ include.decoding | default: 'async' }}" alt="{{ include.alt }}" />
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div>
2+
<h4>{{ include.label | default: 'Hours' }}</h4>
3+
<ul>{% for spec in include.hours %}{% if spec.opens and spec.closes %}
4+
<li itemprop="openingHoursSpecification" itemtype="https://schema.org/OpeningHoursSpecification" itemscope="">
5+
<b itemprop="dayOfWeek">{{ spec.dayOfWeek | replace: 'https://schema.org', '' }}</b>
6+
<time itemprop="opens">{{ spec.opens }}</time>
7+
<span>&mdash;</span>
8+
<time itemprop="closes">{{ spec.closes }}</time>
9+
</li>
10+
{% endif %}{% endfor %}</ul>
11+
</div>

_includes/schema-icon.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
{% include map-icon.html icon='radio-tower' %}
5656
{% when 'EventVenue' %}
5757
{% include map-icon.html icon='event' %}
58+
{% when 'EducationalOrganization' or 'School' or 'Preschool' or 'ElementarySchool' or 'MidddleSchool' or 'HighSchool' or 'CollegeOrUniversity' %}
59+
{% include map-icon.html icon='school' %}
5860
{% else %}
5961
{% include map-icon.html icon='business' %}
6062
{% endcase %}

map.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@
3636
- href: "https://maps.wikimedia.org"
3737
referrerPolicy: no-referrer
3838
crossOrigin: anonymous
39+
preload:
40+
- href: https://cdn.kernvalley.us/img/markers.svg
41+
as: image
42+
type: image/svg+xml
43+
crossOrigin: anonymous
44+
referrerPolicy: no-referrer
45+
importance: high
46+
- href: https://unpkg.com/leaflet@1.7.1/dist/leaflet.css
47+
as: style
48+
type: text/css
49+
crossOrigin: anonymous
50+
referrerPolicy: anonymous
51+
integrity: sha384-VzLXTJGPSyTLX6d96AxgkKvE/LRb7ECGyTxuwtpjHnVWVZs2gp5RDjeM/tgBnVdM
52+
importance: high
3953
scripts:
4054
- src: https://cdn.kernvalley.us/components/leaflet/map.min.js
4155
async: true
@@ -151,7 +165,7 @@
151165
{% endfor %}
152166
{% for marker in site.data.poi %}
153167
<leaflet-marker class="poi-marker content-visibility-hidden" id="{{ marker.uuid }}" longitude="{{ marker.location.geo.longitude }}" latitude="{{ marker.location.geo.latitude }}" slot="markers" title="{{ marker.title | escape_once }}"{% if marker.category %} data-category="{{ marker.category }}"{% endif %}>
154-
<img src="{{ marker.icon | default: '/img/adwaita-icons/actions/mark-location.svg' }}" slot="icon" width="32" height="32" loading="lazy" decoding="async" />
168+
<img src="{{ marker.icon | default: 'https://cdn.kernvalley.us/img/markers.svg#event' }}" slot="icon" width="32" height="32" loading="lazy" decoding="async" crossorigin="anonymous" referrerpolicy="no-referrer" />
155169
<div slot="popup">
156170
<h4>{{ marker.popup | default: marker.title | escape_once }}</h4>
157171
{% if marker.description %}<div>{{ marker.description }}</div>{% endif %}

sw-config.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config = {
1818
'/css/index.min.css',
1919
'/js/index.min.js',
2020
'/img/icons.svg',
21-
'https://cdn.polyfill.io/v3/polyfill.min.js',
21+
'https://cdn.kernvalley.us/img/markers.svg',
2222
/* Other HTML */
2323

2424
/* JS, `customElements`, etc. */
@@ -46,26 +46,6 @@ const config = {
4646
'https://cdn.kernvalley.us/img/logos/chrome.svg',
4747
'https://cdn.kernvalley.us/img/keep-kern-clean.svg',
4848
/* Map Icons */
49-
'/img/markers/activity.svg',
50-
'/img/markers/atm.svg',
51-
'/img/markers/bar.svg',
52-
'/img/markers/bus.svg',
53-
'/img/markers/business.svg',
54-
'/img/markers/cafe.svg',
55-
'/img/markers/event.svg',
56-
'/img/markers/hotel.svg',
57-
'/img/markers/parking.svg',
58-
'/img/markers/restaurant.svg',
59-
'/img/markers/shopping.svg',
60-
'/img/markers/store.svg',
61-
'/img/markers/train.svg',
62-
'/img/markers/gas.svg',
63-
'/img/markers/hospital.svg',
64-
'/img/markers/pizza.svg',
65-
'/img/markers/music.svg',
66-
'/img/markers/outhouse.svg',
67-
'/img/markers/florist.svg',
68-
'/img/markers/museum.svg',
6949
'/img/octicons/info.svg',
7050
'/img/adwaita-icons/status/avatar-default.svg',
7151

0 commit comments

Comments
 (0)