From 61116d82dd381741c91497ea2b51c2f3ad211e93 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Wed, 14 Aug 2024 15:52:52 -0400 Subject: moving stuff around --- .env | 4 + .gitignore | 4 + about.html | 42 --------- audio/western-cover.mp3 | Bin 435945 -> 0 bytes deploy.sh | 3 + dragons.js | 222 ------------------------------------------------ flake.nix | 24 ++++++ fonts/gameofthrones.ttf | Bin 28784 -> 0 bytes images/dragon-sizes.png | Bin 374143 -> 0 bytes images/hat-texas.gif | Bin 161381 -> 0 bytes images/pixel-lasso.jpeg | Bin 23529 -> 0 bytes index.html | 163 ----------------------------------- style.css | 88 ------------------- 13 files changed, 35 insertions(+), 515 deletions(-) create mode 100644 .env create mode 100644 .gitignore delete mode 100644 about.html delete mode 100644 audio/western-cover.mp3 create mode 100755 deploy.sh delete mode 100644 dragons.js create mode 100644 flake.nix delete mode 100644 fonts/gameofthrones.ttf delete mode 100644 images/dragon-sizes.png delete mode 100644 images/hat-texas.gif delete mode 100644 images/pixel-lasso.jpeg delete mode 100644 index.html delete mode 100644 style.css diff --git a/.env b/.env new file mode 100644 index 0000000..49cd89c --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +AWS_BUCKET_NAME="kumar" +AWS_ENDPOINT="https://kumar.min.kumardamani.net" +AWS_UPLOAD_DIR="namemydragon.lol" +AWS_LOCAL_DIR="public/" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b33e988 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +public/ +.direnv +.devenv +credentials diff --git a/about.html b/about.html deleted file mode 100644 index 138d1e9..0000000 --- a/about.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Name my Dragon - About - - - -
-

How it works

-
- Pixel art of a cowboy lassoing a dragon. -
-

- This site uses word similarity to score all dragon names from George R.R. Martin's - A Song of Ice and Fire - universe in terms of their "closeness" to the given name. - The dragon name that is the "closest" is the one selected as the user's dragon. -

-

- It uses three popular techniques in - NLP - to calculate similarity scores - these are the - Levenshtein Distance, - Cosine Similarity, - and Jaccard Similarity. -

-

- The final result shown to the user uses cosine similarity only, - but top ranking dragons from each of the other two techniques are - also shown as alternatives. -

-
-
- -
- - diff --git a/audio/western-cover.mp3 b/audio/western-cover.mp3 deleted file mode 100644 index c735513..0000000 Binary files a/audio/western-cover.mp3 and /dev/null differ diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..885a12c --- /dev/null +++ b/deploy.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +source .env +AWS_CONFIG_FILE=credentials aws --endpoint-url ${AWS_ENDPOINT} s3 cp ${AWS_LOCAL_DIR} s3://${AWS_BUCKET_NAME}/${AWS_UPLOAD_DIR} --recursive diff --git a/dragons.js b/dragons.js deleted file mode 100644 index 5dd3ecb..0000000 --- a/dragons.js +++ /dev/null @@ -1,222 +0,0 @@ -const dragons = [ - { - name: "Drogon", - description: "The largest and most aggressive of Daenerys' dragons. Black with red markings.", - rider: "Daenerys Targaryen", - imageId: "drogon", - size: "Very large, wingspan over 100 feet by adulthood", - primaryColor: "#000000", - secondaryColor: "#8B0000", - age: "About 7 years by end of series", - notableAbilities: ["Extremely hot flame", "Largest of Daenerys' dragons"] - }, - { - name: "Rhaegal", - description: "Green-scaled with bronze accents. Named after Daenerys' brother Rhaegar.", - rider: "Daenerys Targaryen", - imageId: "rhaegal", - size: "Large, smaller than Drogon", - primaryColor: "#008000", - secondaryColor: "#704214", - age: "About 7 years by end of series", - notableAbilities: ["Agile flyer"] - }, - { - name: "Viserion", - description: "Cream and gold colored. Named after Daenerys' brother Viserys.", - rider: "Daenerys Targaryen", - imageId: "viserion", - size: "Large, similar to Rhaegal", - primaryColor: "#FFFDD0", - secondaryColor: "#B8860B", - age: "About 7 years by end of series", - notableAbilities: ["Ice breath (after death and reanimation)"] - }, - { - name: "Balerion the Black Dread", - description: "The largest known dragon, black-scaled.", - rider: "Aegon the Conqueror", - imageId: "balerion", - size: "Immense, could swallow a mammoth whole", - primaryColor: "#000000", - secondaryColor: "#2F4F4F", - age: "Approximately 200 years at time of death", - notableAbilities: ["Extremely hot flame", "Largest known dragon"] - }, - { - name: "Vhagar", - description: "One of the three dragons used in the conquest of Westeros. Bronze with greenish-blue highlights.", - rider: "Visenya Targaryen", - imageId: "vhagar", - size: "Nearly as large as Balerion in old age", - primaryColor: "#CD7F32", - secondaryColor: "#2F4F4F", - age: "Approximately 181 years at time of death", - notableAbilities: ["One of the largest dragons", "Veteran of many battles"] - }, - { - name: "Meraxes", - description: "Silver-scaled dragon ridden by Rhaenys Targaryen during the conquest.", - rider: "Rhaenys Targaryen", - imageId: "meraxes", - size: "Large, but smaller than Balerion", - primaryColor: "#C0C0C0", - secondaryColor: "#4B0082", - age: "Unknown", - notableAbilities: ["One of the dragons of Aegon's Conquest"] - }, - { - name: "Caraxes", - description: "Known as the Blood Wyrm, red-scaled and fierce.", - rider: "Daemon Targaryen", - imageId: "caraxes", - size: "Large", - primaryColor: "#FF0000", - secondaryColor: "#8B0000", - age: "Unknown", - notableAbilities: ["Fierce in battle", "Formidable fighter"] - }, - { - name: "Syrax", - description: "Yellow-scaled dragon ridden by Rhaenyra Targaryen.", - rider: "Rhaenyra Targaryen", - imageId: "syrax", - size: "Medium to large", - primaryColor: "#FFFF00", - secondaryColor: "#8B4513", - age: "Unknown", - notableAbilities: ["Swift flyer"] - }, - { - name: "Meleys", - description: "Called the Red Queen, red-scaled with pink wings.", - rider: "Rhaenys Targaryen (the Queen Who Never Was)", - imageId: "meleys", - size: "Large", - primaryColor: "#FF0000", - secondaryColor: "#8B008B", - age: "Unknown", - notableAbilities: ["Swift and fearsome in battle"] - }, - { - name: "Sunfyre", - description: "Described as the most beautiful dragon, with golden scales and pink wing membranes.", - rider: "Aegon II Targaryen", - imageId: "sunfyre", - size: "Medium to large", - primaryColor: "#FFD700", - secondaryColor: "#8B4513", - age: "Young adult during the Dance of the Dragons", - notableAbilities: ["Exceptional beauty", "Formidable in combat"] - }, - { - name: "Vermithor", - description: "Bronze-scaled with tan wings. One of the larger dragons.", - rider: "King Jaehaerys I Targaryen", - imageId: "vermithor", - size: "Very large, third largest after Balerion and Vhagar", - primaryColor: "#CD7F32", - secondaryColor: "#8B4513", - age: "Approximately 100 years during the Dance of the Dragons", - notableAbilities: ["Extremely large and powerful"] - }, - { - name: "Silverwing", - description: "Silver-scaled dragon, often paired with Vermithor.", - rider: "Queen Alysanne Targaryen", - imageId: "silverwing", - size: "Large", - primaryColor: "#C0C0C0", - secondaryColor: "#4B0082", - age: "Approximately 80-90 years during the Dance of the Dragons", - notableAbilities: ["Gentle temperament"] - }, - { - name: "Dreamfyre", - description: "Slender, pale blue dragon with silver markings.", - rider: "Helaena Targaryen", - imageId: "dreamfyre", - size: "Medium", - primaryColor: "#ADD8E6", - secondaryColor: "#4169E1", - age: "Unknown", - notableAbilities: ["Agile flyer"] - }, - { - name: "Tessarion", - description: "Called the Blue Queen, with dark blue scales and wings.", - rider: "Prince Daeron Targaryen", - imageId: "tessarion", - size: "Medium", - primaryColor: "#00008B", - secondaryColor: "#4B0082", - age: "Young during the Dance of the Dragons", - notableAbilities: ["Beautiful appearance"] - }, - { - name: "Sheepstealer", - description: "An aggressive wild dragon with a taste for sheep, brown-scaled.", - rider: "Nettles", - imageId: "sheepstealer", - size: "Medium to large", - primaryColor: "#8B4513", - secondaryColor: "#2F4F4F", - age: "Unknown, but old", - notableAbilities: ["Wild and hard to tame", "Preference for eating sheep"] - }, - { - name: "Seasmoke", - description: "Pale silver-grey dragon ridden by Laenor Velaryon.", - rider: "Laenor Velaryon", - imageId: "seasmoke", - size: "Medium", - primaryColor: "#C0C0C0", - secondaryColor: "#4682B4", - age: "Young adult during the Dance of the Dragons", - notableAbilities: ["Swift flyer"] - }, - { - name: "Moondancer", - description: "Young, slender green dragon ridden by Baela Targaryen.", - rider: "Baela Targaryen", - imageId: "moondancer", - size: "Small to medium", - primaryColor: "#00FF00", - secondaryColor: "#006400", - age: "Very young during the Dance of the Dragons", - notableAbilities: ["Quick and nimble"] - }, - { - name: "Vermax", - description: "Young dragon ridden by Jacaerys Velaryon during the Dance of the Dragons.", - rider: "Jacaerys Velaryon", - imageId: "vermax", - size: "Small to medium", - primaryColor: "#808080", - secondaryColor: "#2F4F4F", - age: "Young during the Dance of the Dragons", - notableAbilities: ["Unknown"] - }, - { - name: "Arrax", - description: "Young dragon ridden by Lucerys Velaryon, described as swift.", - rider: "Lucerys Velaryon", - imageId: "arrax", - size: "Small", - primaryColor: "#808080", - secondaryColor: "#2F4F4F", - age: "Very young during the Dance of the Dragons", - notableAbilities: ["Swift flyer"] - }, - { - name: "Tyraxes", - description: "Young dragon ridden by Joffrey Velaryon, not much is known about its appearance.", - rider: "Joffrey Velaryon", - imageId: "tyraxes", - size: "Small", - primaryColor: "#808080", - secondaryColor: "#2F4F4F", - age: "Very young during the Dance of the Dragons", - notableAbilities: ["Unknown"] - } -]; diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0a5a069 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "My website project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + devenv.url = "github:cachix/devenv"; + }; + + outputs = inputs@{ flake-parts, nixpkgs, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.devenv.flakeModule + ]; + systems = nixpkgs.lib.systems.flakeExposed; + perSystem = { config, self', inputs', pkgs, system, ... }: { + devenv.shells.website = { + packages = [ pkgs.hugo pkgs.awscli ]; + enterShell = '' + echo this is my hugo website project shell. + ''; + }; + }; + }; +} diff --git a/fonts/gameofthrones.ttf b/fonts/gameofthrones.ttf deleted file mode 100644 index 793ddff..0000000 Binary files a/fonts/gameofthrones.ttf and /dev/null differ diff --git a/images/dragon-sizes.png b/images/dragon-sizes.png deleted file mode 100644 index 064f1ff..0000000 Binary files a/images/dragon-sizes.png and /dev/null differ diff --git a/images/hat-texas.gif b/images/hat-texas.gif deleted file mode 100644 index b97734c..0000000 Binary files a/images/hat-texas.gif and /dev/null differ diff --git a/images/pixel-lasso.jpeg b/images/pixel-lasso.jpeg deleted file mode 100644 index c842197..0000000 Binary files a/images/pixel-lasso.jpeg and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 3e445c5..0000000 --- a/index.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Name my Dragon - Home - - - -
-

Name my Dragon

- -
- Warning: The button below will play some sweet tunes! - Hit the "Stop music" button to stop it or just mute your device. - × -
-
-
- - - -
-
- -
-
-

And your Dragon is...

-
-
-
-
-
-
-
-

See a comparison of all the dragons here:

- Comparison chart for all the dragons -
- -
- - - - - diff --git a/style.css b/style.css deleted file mode 100644 index 9e664c4..0000000 --- a/style.css +++ /dev/null @@ -1,88 +0,0 @@ -@font-face { - font-family: 'GOTFont'; - src: url('fonts/gameofthrones.ttf'); -} - -html { - --s: 60px; /* control the size*/ - --c1: #b09f79; - --c2: #000000; - - --_g: #0000 83%,var(--c1) 85% 99%,#0000 101%; - background: - radial-gradient(27% 29% at right ,var(--_g)) calc(var(--s)/ 2) var(--s), - radial-gradient(27% 29% at left ,var(--_g)) calc(var(--s)/-2) var(--s), - radial-gradient(29% 27% at top ,var(--_g)) 0 calc(var(--s)/ 2), - radial-gradient(29% 27% at bottom,var(--_g)) 0 calc(var(--s)/-2) - var(--c2); - background-size: calc(2*var(--s)) calc(2*var(--s)); -} - -body { - background: #faf0e5; - opacity: 0.97; - padding: 10px; -} - -h1 { - font-family: 'GOTFont', Georgia, serif; -} - -.legible { - color: white; - text-shadow: - 0.05em 0 black, - 0 0.05em black, - -0.05em 0 black, - 0 -0.05em black, - -0.05em -0.05em black, - -0.05em 0.05em black, - 0.05em -0.05em black, - 0.05em 0.05em black; -} - -.container { - margin: 0; - padding: 0; - display: flex; - justify-content: center; - flex-wrap: wrap; -} - -.flex { - padding: 10px; - border: 3px solid #faf0e5; - color: white; - font-size: 14px; - text-align: center; - position: relative; - margin-bottom: 33px; -} - -.flex1 { - min-width: 150px; -} - -.flex2 { - font-size: large; - text-align: left; -} - -.alert { - margin-bottom: 15px; - padding: 20px; - background-color: orange; /* Red */ - color: white; -} - -/* The close button */ -.closebtn { - margin-left: 15px; - color: white; - font-weight: bold; - float: right; - font-size: 22px; - line-height: 20px; - cursor: pointer; - transition: 0.3s; -} -- cgit v1.2.3