diff --git a/public/Logo_FAIRiCUBE_RGB 1.svg b/public/Logo_FAIRiCUBE_RGB 1.svg
new file mode 100644
index 0000000..da8257f
--- /dev/null
+++ b/public/Logo_FAIRiCUBE_RGB 1.svg
@@ -0,0 +1,331 @@
+
+
+
diff --git a/public/fairicubelogo2_108520563.jpeg b/public/fairicubelogo2_108520563.jpeg
deleted file mode 100644
index 28fae35..0000000
Binary files a/public/fairicubelogo2_108520563.jpeg and /dev/null differ
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..f157bd1
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/components/Colorbar.astro b/src/components/Colorbar.astro
index c98ac77..8f92d6a 100644
--- a/src/components/Colorbar.astro
+++ b/src/components/Colorbar.astro
@@ -23,9 +23,16 @@ function updateColorbar() {
for (const value of stops){
const div = document.createElement('div');
// Creat a label that shows three significant digits
+ try {
const label = value.toPrecision(3);
div.innerHTML = label;
colorbar.appendChild(div);
+ } catch (e) {
+ console.log(`Error in updateColorbar. E=`,e);
+ console.log(`Error in updateColorbar. value`,value);
+ console.log(`Error in updateColorbar. stops`,stops);
+ }
+
}
colorbar.style.background = getPaletteAsGradient();
return;
diff --git a/src/components/Map.astro b/src/components/Map.astro
index 7625093..88b1d7d 100644
--- a/src/components/Map.astro
+++ b/src/components/Map.astro
@@ -18,7 +18,7 @@ import { getInterpolateBand1AsColor } from '../scripts/palette.js';
import { transformExtent, Projection, get as getProjection, fromLonLat } from 'ol/proj';
import {register,fromEPSGCode} from 'ol/proj/proj4';
import proj4 from 'proj4'
-import {getQGISColorfile} from '../scripts/parseQGISColorfile.js';
+import {getQGISColorfile, getPalettenameFile} from '../scripts/parseQGISColorfile.js';
let source : any = null;
@@ -117,6 +117,11 @@ async function buildMapForGeotiff() {
}
});
+ // Launch an async function to try and get a .palettename.txt for this URL
+ // This will trigger a "newpalette" event if found
+ getPalettenameFile();
+
+
// Launch an async function to try and get a QGIS colorfile for the palette
// This will trigger a "newpalette" event if a QGIS colorfile is found
getQGISColorfile();
diff --git a/src/scripts/parseQGISColorfile.js b/src/scripts/parseQGISColorfile.js
index af7aff0..809698d 100644
--- a/src/scripts/parseQGISColorfile.js
+++ b/src/scripts/parseQGISColorfile.js
@@ -45,6 +45,27 @@ export async function getQGISColorfile(){
}
}
+
+/**
+ * Try and get the .palettename.txt file for the URL
+ * This will trigger a "newpalette" event if found
+ * @returns
+ */
+export async function getPalettenameFile(){
+ const url = localStorage.getItem('url');
+ if (!url) return null;
+ try {
+ const palettenameurl = url.replace('.tif', '.palettename.txt');
+ const response = await fetch(palettenameurl);
+ if (!response.ok) return null;
+ const text = await response.text();
+ localStorage.setItem('palettename', text);
+ document.dispatchEvent(new Event('newpalette'));
+ } catch (e) {
+ }
+}
+
+
/**
* Returns a function which accepts a value in the domain
* of the QGISColorfile and returns a color.
diff --git a/src/style.css b/src/style.css
index c96d71b..0bfb58f 100644
--- a/src/style.css
+++ b/src/style.css
@@ -15,7 +15,7 @@ html {
@keyframes shift-right {
0% { transform: translateX(0); }
- 50% { transform: translateX(1rem); }
+ 50% { transform: translateX(0.7rem); }
100% { transform: translateX(0); }
}
@@ -49,11 +49,12 @@ details.stactreeview {
cursor: pointer;
display: inline-block;
background-image: url('/fairicube_logo_400x297.jpg');
+ background-image: url('/Logo_FAIRiCUBE_RGB 1.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
vertical-align: middle;
- mix-blend-mode: multiply; /* Set white as transparent */
+ /*mix-blend-mode: multiply; /* Set white as transparent */
position: relative;
transition: transform 0.4s ease-in-out;
transform: translateX(0);