diff --git a/src/pages/articles/index.astro b/src/pages/articles/index.astro index 885d204..24d75c9 100644 --- a/src/pages/articles/index.astro +++ b/src/pages/articles/index.astro @@ -13,10 +13,34 @@ const posts = (await getCollection('blog')).sort( ); // will work this out later -const book_colours = [] +const book_colours = [ + "#fc5050", // red + "#fcb250", // orange + "#fcf179", // yellow + "#ccfc79", // green + "#86fc79", // green + "#79fca9", // aqua + "#7bfce9", // light blue + "#7baffc", // darker blue + "#977bfc", // purple + "#d798f9", // magenta + "#f998e9" // pink +] const max_shelf_width = 980; + + +function hash(str) { + let hash_value = 5; + + for (let i = 0; i < str.length; i++) { + const char_val = str.charCodeAt(i); + hash_value += (hash_value << 2) - hash_value + char_val; + } + return Math.abs(hash_value); +} + --- @@ -51,7 +75,7 @@ const max_shelf_width = 980; // might change this to a compoent later
-
  • +
  • {book.data.title}

    @@ -95,11 +119,10 @@ const max_shelf_width = 980;