diff --git a/.gitignore b/.gitignore index 496ee2c..e43b0f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.DS_Store \ No newline at end of file +.DS_Store diff --git a/.woodpecker.yml b/.woodpecker.yml index d2daafa..55fb9a8 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,8 +8,7 @@ pipeline: key: from_secret: DOPrivateKey target: /u/jsquotes - source: . - overwrite: true + source: ./src restart: image: appleboy/drone-ssh diff --git a/index.html b/index.html deleted file mode 100644 index 204381c..0000000 --- a/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - read quote - - - - - -
-
-
- - - - - \ No newline at end of file diff --git a/FavouriteQuotes.json b/src/assets/FavouriteQuotes.json similarity index 100% rename from FavouriteQuotes.json rename to src/assets/FavouriteQuotes.json diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..52928e7 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..7efa119 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..12d1be1 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete.ttf new file mode 100644 index 0000000..c7ae97d Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Italic Nerd Font Complete.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..24ccd43 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..36e6853 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Mono.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..087cfb3 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete.ttf b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete.ttf new file mode 100644 index 0000000..dc3b7b6 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Bold Nerd Font Complete.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..e3e7a1b Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono.ttf b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..07b47db Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Mono.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..0ea11ed Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete.ttf b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete.ttf new file mode 100644 index 0000000..3bba1c4 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Italic Nerd Font Complete.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono Windows Compatible.ttf new file mode 100644 index 0000000..2807f14 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf new file mode 100644 index 0000000..ee43a40 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Windows Compatible.ttf b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Windows Compatible.ttf new file mode 100644 index 0000000..c188a2e Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete Windows Compatible.ttf differ diff --git a/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete.ttf b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete.ttf new file mode 100644 index 0000000..f09f570 Binary files /dev/null and b/src/assets/fonts/Fantasque Sans Mono Regular Nerd Font Complete.ttf differ diff --git a/favicon.ico b/src/assets/img/favicon.ico similarity index 100% rename from favicon.ico rename to src/assets/img/favicon.ico diff --git a/style.css b/src/css/style.css similarity index 100% rename from style.css rename to src/css/style.css diff --git a/src/css/styles.less b/src/css/styles.less new file mode 100644 index 0000000..3dc711c --- /dev/null +++ b/src/css/styles.less @@ -0,0 +1,71 @@ +* { + margin: 0; + padding: 0; + border: 0; + list-style: none; + text-decoration: none; + border: none; + box-sizing: border-box; +} + +body { + // font-family: "Fantasque", monospace; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 16px; + background-color: beige; + color: #0c024d; + margin: 2rem auto; +} + +.header { + display: flex; + justify-content: space-between; + gap: 20px; + width: 85%; + align-items: center; + margin: auto; +} + +.hdr-img { + width: 80px; + height: 80px; + border-radius: 50%; + box-shadow: 1px 3px 5px lightgrey; +} + +.hdr-h1 { + font-size: 2rem; + text-align: center; +} + +.container { + width: 90%; + margin: 2rem auto; +} +.quotes { + border: 1px solid lightgrey; + border-radius: 14px; + box-shadow: 1px 3px 5px #d6d6a3; + padding: 1rem; + columns: 300px; + column-gap: auto; + column-fill: balance; + margin: auto; +} +.quote { + background: linear-gradient(to bottom right, #0c024d, #0dbcc5); + background-attachment: fixed; + color: beige; + border: 1px solid lightgrey; + border-radius: 14px; + box-shadow: 1px 3px 5px lightgrey; + margin: 12px; + padding: 1rem; + max-width: 340px; + display: inline-block; +} +.footer { + font-size: 0.8rem; + text-align: center; + margin-top: 1rem; +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..9a119dd --- /dev/null +++ b/src/index.html @@ -0,0 +1,34 @@ + + + + + + + read quote + + + + + + +
+ close-up of a black woman in a trilby, eyes down, the hat covering most of her face +

fyrfli's quote library

+
+ +
+
+
+
+ + + + + + + + diff --git a/app.js b/src/js/app.js similarity index 95% rename from app.js rename to src/js/app.js index 5ffaac8..d1c8e42 100644 --- a/app.js +++ b/src/js/app.js @@ -10,7 +10,7 @@ let intervalID; let iteratorID = 0; let currQuote; -fetch("FavouriteQuotes.json") +fetch("assets/FavouriteQuotes.json") .then((response) => { return response.json(); }) @@ -30,4 +30,4 @@ function getQuote(data) { let noQuotes = Object.entries(data).length; let randNo = Math.floor(Math.random() * noQuotes); return data[randNo].quote + "\n\n" + data[randNo].author.replace(/"/g, ''); -} \ No newline at end of file +} diff --git a/src/js/layout.js b/src/js/layout.js new file mode 100644 index 0000000..d1c0fc0 --- /dev/null +++ b/src/js/layout.js @@ -0,0 +1,23 @@ +'use strict'; +// Full year for footer +const todayDate = new Date(); +jsyear.innerText = todayDate.getFullYear(); + +const quoteDisplay = document.querySelector(".quotes"); +const debugDisplay = document.querySelector(".debug"); +let i = 0; +let quote_section = ""; + +fetch("assets/FavouriteQuotes.json") + .then((response) => { + return response.json(); + }) + .then((data) => { + while (i < Object.entries(data).length) { + quote_section = document.createElement("section") + quote_section.className = "quote"; + quote_section.innerText = "\"" + data[i].quote + "\"\n\n" + data[i].author; + quoteDisplay.appendChild(quote_section); + i++; + } + });