Skip to content

Commit 04f88d8

Browse files
committed
add Iconify icons and update favicon; fix default map zoom level
1 parent 6ff829b commit 04f88d8

File tree

8 files changed

+58
-20
lines changed

8 files changed

+58
-20
lines changed

pcd-website/package-lock.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pcd-website/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
},
1111
"dependencies": {
1212
"@astrojs/vue": "^5.1.4",
13+
"@iconify-json/bi": "^1.2.7",
14+
"@iconify/vue": "^5.0.0",
1315
"@luomus/leaflet-smooth-wheel-zoom": "^1.0.0",
1416
"astro": "^5.17.1",
1517
"focus-trap": "^8.0.0",

pcd-website/public/favicon.ico

43.7 KB
Binary file not shown.

pcd-website/public/favicon.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

pcd-website/src/components/MapView.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ onMounted(async () => {
7979
scrollWheelZoom: false,
8080
smoothWheelZoom: true,
8181
smoothSensitivity: 1,
82+
minZoom: 2.5,
8283
});
8384
mapInstance = map;
8485
85-
map.fitWorld();
86+
map.setView([20, 10], 3);
8687
8788
// CartoDB light-no-labels tile layer (monochrome, no POI)
8889
const tileLayer = L.tileLayer(

pcd-website/src/components/NodePanel.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { ref, watch, onMounted, onUnmounted } from 'vue';
33
import { createFocusTrap, type FocusTrap } from 'focus-trap';
4+
import { Icon } from '@iconify/vue';
45
import type { Node } from '../lib/nodes';
56
import { formatDate, calendarLinks } from '../lib/format';
67
@@ -104,7 +105,7 @@ function getParagraphs(text: string): string[] {
104105
<p class="panel-meta">{{ formatDate(node.date) }}</p>
105106

106107
<p class="panel-venue">
107-
<svg class="panel-icon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 1a5 5 0 0 0-5 5c0 3.5 5 9 5 9s5-5.5 5-9a5 5 0 0 0-5-5zm0 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/></svg>
108+
<Icon icon="bi:geo-alt-fill" class="panel-icon" width="14" height="14" aria-hidden="true" />
108109
<a :href="getOsmUrl(node)" target="_blank" rel="noopener noreferrer">{{ getVenueText(node) }}</a>
109110
</p>
110111

@@ -117,25 +118,25 @@ function getParagraphs(text: string): string[] {
117118

118119
<div class="panel-links">
119120
<div class="panel-link-row">
120-
<svg class="panel-icon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm4.93 6H11.5c-.1-1.4-.45-2.66-.97-3.65A5.51 5.51 0 0 1 12.93 7zM8 2.1c.7.9 1.22 2.24 1.46 3.9H6.54C6.78 4.34 7.3 3 8 2.1zM2.5 9h1.43c.1 1.4.45 2.66.97 3.65A5.51 5.51 0 0 1 2.5 9zm1.57-2h-1.5a5.51 5.51 0 0 1 2.46-3.65C4.51 4.34 4.16 5.6 4.07 7zm1.47 0c.24-1.56.76-2.9 1.46-3.9C7.7 4.1 8.22 5.44 8.46 7H5.54zm0 2h2.92c-.24 1.56-.76 2.9-1.46 3.9-.7-1-1.22-2.34-1.46-3.9zm3.46 3.65c.52-.99.87-2.25.97-3.65h1.43a5.51 5.51 0 0 1-2.4 3.65zm1-5.65c-.1-1.4-.45-2.66-.97-3.65A5.51 5.51 0 0 1 11.93 7h-1.43z"/></svg>
121+
<Icon icon="bi:globe" class="panel-icon" width="14" height="14" aria-hidden="true" />
121122
<a :href="node.website" target="_blank" rel="noopener noreferrer" class="panel-link">Visit event website</a>
122123
</div>
123124

124125
<div class="panel-link-row panel-link-row--cal">
125-
<svg class="panel-icon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M11 1v1H5V1H4v1H2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1h-2V1h-1zm2 4H3V3h1v1h1V3h6v1h1V3h1v2zm0 2v7H3V7h10z"/></svg>
126+
<Icon icon="bi:calendar" class="panel-icon" width="14" height="14" aria-hidden="true" />
126127
<a
127128
:href="calendarLinks(node).googleCalUrl"
128129
target="_blank"
129130
rel="noopener noreferrer"
130131
class="panel-link"
131132
>Google Calendar</a>
132133
<span class="panel-link-sep" aria-hidden="true">&middot;</span>
133-
<svg class="panel-icon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M11 1v1H5V1H4v1H2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1h-2V1h-1zm2 4H3V3h1v1h1V3h6v1h1V3h1v2zm0 2v7H3V7h10z"/></svg>
134+
<Icon icon="bi:calendar" class="panel-icon" width="14" height="14" aria-hidden="true" />
134135
<button class="panel-link panel-link--btn" @click="downloadIcs(node)">Download .ics</button>
135136
</div>
136137

137138
<div class="panel-link-row">
138-
<svg class="panel-icon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M1 3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3zm1 .5V4l6 3.75L14 4v-.5H2zm0 2.06V13h12V5.56L8 9.25 2 5.56z"/></svg>
139+
<Icon icon="bi:envelope-fill" class="panel-icon" width="14" height="14" aria-hidden="true" />
139140
<a :href="`mailto:${node.organizer_email}`" class="panel-link">{{ node.organizer_email }}</a>
140141
</div>
141142
</div>

pcd-website/src/lib/popup.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
import { getIcon, addCollection } from '@iconify/vue';
2+
import biIcons from '@iconify-json/bi/icons.json' assert { type: 'json' };
13
import type { Node } from './nodes';
24
import { formatDate, calendarLinks } from './format';
35

6+
addCollection(biIcons as Parameters<typeof addCollection>[0]);
7+
48
export function escapeHtml(str: string): string {
59
return str
610
.replace(/&/g, '&amp;')
@@ -10,10 +14,17 @@ export function escapeHtml(str: string): string {
1014
.replace(/'/g, '&#39;');
1115
}
1216

13-
const ICON_PIN = `<svg class="popup-icon" width="13" height="13" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 1a5 5 0 0 0-5 5c0 3.5 5 9 5 9s5-5.5 5-9a5 5 0 0 0-5-5zm0 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/></svg>`;
14-
const ICON_GLOBE = `<svg class="popup-icon" width="13" height="13" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm4.93 6H11.5c-.1-1.4-.45-2.66-.97-3.65A5.51 5.51 0 0 1 12.93 7zM8 2.1c.7.9 1.22 2.24 1.46 3.9H6.54C6.78 4.34 7.3 3 8 2.1zM2.5 9h1.43c.1 1.4.45 2.66.97 3.65A5.51 5.51 0 0 1 2.5 9zm1.57-2h-1.5a5.51 5.51 0 0 1 2.46-3.65C4.51 4.34 4.16 5.6 4.07 7zm1.47 0c.24-1.56.76-2.9 1.46-3.9C7.7 4.1 8.22 5.44 8.46 7H5.54zm0 2h2.92c-.24 1.56-.76 2.9-1.46 3.9-.7-1-1.22-2.34-1.46-3.9zm3.46 3.65c.52-.99.87-2.25.97-3.65h1.43a5.51 5.51 0 0 1-2.4 3.65zm1-5.65c-.1-1.4-.45-2.66-.97-3.65A5.51 5.51 0 0 1 11.93 7h-1.43z"/></svg>`;
15-
const ICON_CALENDAR = `<svg class="popup-icon" width="13" height="13" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M11 1v1H5V1H4v1H2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1h-2V1h-1zm2 4H3V3h1v1h1V3h6v1h1V3h1v2zm0 2v7H3V7h10z"/></svg>`;
16-
const ICON_EMAIL = `<svg class="popup-icon" width="13" height="13" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M1 3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3zm1 .5V4l6 3.75L14 4v-.5H2zm0 2.06V13h12V5.56L8 9.25 2 5.56z"/></svg>`;
17+
function iconSvg(name: string, cssClass: string): string {
18+
const data = getIcon(name);
19+
if (!data) return '';
20+
const { body, width = 16, height = 16 } = data;
21+
return `<svg class="${cssClass}" width="13" height="13" viewBox="0 0 ${width} ${height}" fill="currentColor" aria-hidden="true">${body}</svg>`;
22+
}
23+
24+
const ICON_PIN = iconSvg('bi:geo-alt-fill', 'popup-icon');
25+
const ICON_GLOBE = iconSvg('bi:globe', 'popup-icon');
26+
const ICON_CALENDAR = iconSvg('bi:calendar', 'popup-icon');
27+
const ICON_EMAIL = iconSvg('bi:envelope-fill', 'popup-icon');
1728

1829
export function makePopupContent(node: Node): string {
1930
const { googleCalUrl, icsContent } = calendarLinks(node);

pcd-website/src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const nodes = loadNodes();
1313
<meta name="viewport" content="width=device-width, initial-scale=1" />
1414
<title>Processing Community Day 2026</title>
1515
<meta name="description" content="Explore Processing Community Day 2026 nodes around the world. Find your local event on the interactive map." />
16-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
16+
<link rel="icon" type="image/x-icon" href={`${import.meta.env.BASE_URL}/favicon.ico`} />
1717
<link
1818
rel="stylesheet"
1919
href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"

0 commit comments

Comments
 (0)