Skip to content

Commit

Permalink
changed paths for gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotthall committed Dec 10, 2024
1 parent 5eeb366 commit 4fcd6d9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
8 changes: 5 additions & 3 deletions frontend/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ module.exports = function (config) {
config.addShortcode("image", async function (src, alt, sizes) {
let metadata = await Image(src, {
widths: [300, 600, "auto"],
outputDir: 'html/assets/img',
urlPath: '/assets/img',
outputDir: '../html/assets/img',

urlPath: './assets/img',
formats: ["webp", "jpeg"],
});

Expand Down Expand Up @@ -217,8 +218,9 @@ module.exports = function (config) {
(s) => stripHtml.stripHtml(s).result.substring(0, 200) + "..."
);

// pathPrefix: "/bcc-11ty/",
//
return {
pathPrefix: "/bcc-11ty/",
dir: {
output: "../html",
}
Expand Down
24 changes: 13 additions & 11 deletions frontend/src/storymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {D3intro} from "./d3intro.js";

export class StoryMap {
constructor(storyUris, L, d3) {
// todo should be empty for static deploy
this.pathPrefix = '/bcc-11ty';
this.overlay = null;
// Data parameters
this.storyUris = storyUris;
Expand Down Expand Up @@ -241,7 +243,7 @@ export class StoryMap {
lineCap: "square",
color: "#4b5d04",
//fillColor: "#4b5d04",
fill: 'url(/assets/img/stories/hatch-green.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/hatch-green.webp)',
weight: 2,
opacity: 1,
fillOpacity: 1,
Expand All @@ -252,7 +254,7 @@ export class StoryMap {
lineCap: "square",
color: "#e29e21",
//fillColor: "#e29e21",
fill: 'url(/assets/img/stories/hatch-yellow.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/hatch-yellow.webp)',
weight: 2,
opacity: 1,
fillOpacity: 1,
Expand Down Expand Up @@ -348,7 +350,7 @@ export class StoryMap {
lineJoin: "arcs",
color: "#8C8C8C",
fillColor: "#8C8C8C00",
fill: 'url(/assets/img/stories/horizontal_hatch_print_8C8C8C.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/horizontal_hatch_print_8C8C8C.webp)',
weight: 2,
opacity: 0.3,
fillOpacity: 1,
Expand All @@ -373,7 +375,7 @@ export class StoryMap {
color: "#f8600e",
fillOpacity: 0.5,
fillColor: "#f8600e00", //fill colour completely transparent
fill: 'url(/assets/img/stories/vertical_hatch_orange_f8600e.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/vertical_hatch_orange_f8600e.webp)',
weight: 3,
opacity: 1,
};
Expand All @@ -383,7 +385,7 @@ export class StoryMap {
lineJoin: "arcs",
color: "#8C8C8C",
fillColor: "#8C8C8C00",
fill: 'url(/assets/img/stories/vertical_hatch_grey_8C8C8C.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/vertical_hatch_grey_8C8C8C.webp)',
weight: 3,
opacity: 0.3,
};
Expand All @@ -394,44 +396,44 @@ export class StoryMap {
color: "#8D33CC",
fillOpacity: 0.5,
fillColor: "#8D33CC00",
fill: 'url(/assets/img/stories/vertical_hatch_purple_8D33CC.webp)',
fill: 'url('+this.pathPrefix+'/assets/img/stories/vertical_hatch_purple_8D33CC.webp)',
weight: 3,
opacity: 1,
};

this.councilFireIcon = this.L.icon({
iconUrl: '/assets/img/stories/council_fire.webp',
iconUrl: this.pathPrefix+'/assets/img/stories/council_fire.webp',
iconSize: [22, 22],
iconAnchor: [11, 21],
popupAnchor: [-3, -20]
});

this.indigenousSettlementIcon = this.L.icon({
iconUrl: '/assets/img/stories/settlement_indig.webp',
iconUrl: this.pathPrefix+'/assets/img/stories/settlement_indig.webp',
iconSize: [20, 20],
shadowSize: [20, 20],
iconAnchor: [10, 19],
shadowAnchor: [10, 19],
popupAnchor: [-3, -20]
});
this.europeanSettlementIcon = this.L.icon({
iconUrl: '/assets/img/stories/settlement_euro.webp',
iconUrl: this.pathPrefix+'/assets/img/stories/settlement_euro.webp',
iconSize: [20, 20],
shadowSize: [20, 20],
iconAnchor: [10, 19],
shadowAnchor: [10, 19],
popupAnchor: [-3, -20]
})
this.indigenousPlacenameIcon = this.L.icon({
iconUrl: '/assets/img/stories/placename_indig.webp',
iconUrl: this.pathPrefix+'/assets/img/stories/placename_indig.webp',
iconSize: [20, 20],
shadowSize: [20, 20],
iconAnchor: [10, 19],
shadowAnchor: [10, 19],
popupAnchor: [-3, -20]
});
this.europeanPlacenameIcon = this.L.icon({
iconUrl: '/assets/img/stories/placename_euro.webp',
iconUrl: this.pathPrefix+'/assets/img/stories/placename_euro.webp',
iconSize: [20, 20],
shadowSize: [20, 20],
iconAnchor: [10, 19],
Expand Down

0 comments on commit 4fcd6d9

Please sign in to comment.