18 Commits
latest ... 2.0

Author SHA1 Message Date
092ea79c5c removed license file to test signing 2024-02-14 18:14:28 -06:00
d17a3dc71f add a license file to test signing 2024-02-14 18:03:21 -06:00
8a5ff5e04b remove demo workflow 2024-02-14 17:56:06 -06:00
6221dda284 demo workflow added
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m6s
2024-02-14 17:46:13 -06:00
746db848df move into a public folder 2024-02-14 17:00:11 -06:00
97dacd3cd7 changed the wrong script 2023-04-09 19:04:24 -05:00
1beaa5b9b7 changed the wrong code 2023-04-09 18:17:51 -05:00
8171ba461e changed the fetch to source from the DO Spaces cdn instead of a local copy 2023-04-09 15:02:33 -05:00
ff9ff41aa2 new quote 2023-02-09 21:36:55 -06:00
b107639fb4 add the source code link in the footer 2023-01-22 10:45:14 -06:00
1d587d1707 removed tag and update readme 2023-01-22 10:28:57 -06:00
cb8f35d68a removed the gitlab ci yaml and change the page title 2023-01-22 10:21:27 -06:00
5969bbd4be change footer text size 2023-01-22 10:19:53 -06:00
0a886e6d97 Merge branch 'master' of https://fyrfli.dev/fyrfli/jsquotes 2023-01-22 10:18:18 -06:00
29b1f25cb9 strip dir 2023-01-22 10:17:32 -06:00
e3753b05e6 update readme 2023-01-22 10:14:01 -06:00
40d93d0da2 update README 2023-01-22 10:14:01 -06:00
2f31fa9709 merge upstream 2023-01-22 10:03:28 -06:00
31 changed files with 139 additions and 24 deletions

4
.gitignore vendored
View File

@ -1 +1,5 @@
<<<<<<< HEAD
.DS_Store
=======
.DS_Store
>>>>>>> 7f4013d (Initial)

View File

@ -1,16 +0,0 @@
pages:
stage: deploy
script:
- mkdir .public
- cp index.html .public
- cp FavouriteQuotes.json .public
- cp app.js .public
- cp style.css .public
- cp favicon.ico .public
- rm -rf public
- mv .public public
artifacts:
paths:
- public
only:
- master

View File

@ -9,6 +9,7 @@ pipeline:
from_secret: DOPrivateKey
target: /u/jsquotes
source: ./src
strip_components: 2
restart:
image: appleboy/drone-ssh

66
FavouriteQuotes.json Normal file
View File

@ -0,0 +1,66 @@
[
{
"quote": "Everything has its wonders, even darkness and silence, and I learn, whatever state I may be in , therein to be content.",
"author": "Helen Keller"
},
{
"quote": "Tomorrow, and tomorrow, and tomorrow, Creeps in this petty pace from day to day, To the last syllable of recorded time; And all our yesterdays have lighted fools The way to dusty death. Out, out, brief candle! Life's but a walking shadow, a poor player That struts and frets his hour upon the stage And then is heard no more. It is a tale Told by an idiot, full of sound and fury Signifying nothing.",
"author": "Macbeth \n (Act 5, Scene 5, lines 19-28)"
},
{
"quote": "He who has health has hope. And he who has hope, has everything.",
"author": "Arabian Proverb"
},
{
"quote": "In the midst of movement and chaos, keep stillness inside of you.",
"author": "Deepak Chopra"
},
{
"quote": "The worst sin toward our fellow creatures is not to hate them, but to be indifferent to them: that's the essence of inhumanity.",
"author": "George Bernard Shaw; \n Irish dramatist & socialist (1856 - 1950)"
},
{
"quote": "We come to love not by finding a perfect person, but by learning to see an imperfect person perfectly.",
"author": "Sam Keen"
},
{
"quote": "A friend is someone who understands your past, believes in your future, and accepts you just the way you are",
"author": "Paul Holdorsen"
},
{
"quote": "Ambition is the last refuge of failure",
"author": "Oscar Wilde"
},
{
"quote": "Love never dies a natural death. It dies because we don't know how to replenish its source. It dies of blindness and errors and betrayals. It dies of illness and wounds; it dies of weariness, of withering, of tarnishing.",
"author": "Anais Nin"
},
{
"quote": "Few people think more than two or three times a year; I have made an international reputation for myself by thinking once or twice a week.",
"author": "George Bernard Shaw; \n Irish dramatist & socialist (1856 - 1950)"
},
{
"quote": "It doesn't interest me where or what or with whom you have studied. I want to know what sustains you from the inside when all else falls away. I want to know if you can be alone with yourself and if you truly like the company you keep in the empty moments.",
"author": "from ... The Invitation, \n Oriah Mountain Dreamer"
},
{
"quote": "You never really understand a person until you consider things from his point of view... until you climb into his skin and walk around in it.",
"author": "Harper Lee, \n To Kill a Mockingbird"
},
{
"quote": "I think there's just one kind of folks. Folks.",
"author": "Harper Lee, \n To Kill a Mockingbird"
},
{
"quote": "The Best Things In Life... \n Hot showers on a cold night \n Snow flurries and moonlight \n The smell of freshly washed towels \n Fog over fields and fireflies \n Country storms \n Being home",
"author": "Camille Frantz"
},
{
"quote": "Nothing is original. Steal from anywhere that resonates with inspiration or fuels your imagination. Devour old films, new films, books, paintings, photographs, poems, dreams, random conversations, architecture, bridges, street signs, trees..., clouds, bodies of water, light and shadows. Select only things to steal from that speak directly to your soul. If you do this, your work (and theft) will be authentic. Authenticity is invaluable; originality is non-existent. And don't bother concealing your thievery - celebrate it if you feel like it. In any case, always remember what Jean-Luc Godard said: 'it's not where you take things from - its where you take them to.'",
"author": "Jim Jarmusch"
},
{
"quote": "I have come to believe that caring for myself is not self indulgent. Caring for myself is an act of survival.",
"author": "Audre Lorde"
}
]

View File

@ -14,4 +14,10 @@ Or at least create a timer loop to do the refreshing of the quotes automatically
I managed to get the looping done with a iteration count of 25 and an interval of 8seconds. So now, when you go to the live page, it should iterate 25 times through a random selection of my favourite quotes.
-- 28 May, 2022 - 09:28:53
-- 28 May, 2022 - 09:28:53
## Changed the entire format of the page
I didn't like that the looping would repeat the same quote several times so I decided on a column format instead. This way **all** the quotes show up at once. No looping, no excessive animations ... just a simple page.
[![status-badge](https://ci.fyrfli.dev/api/badges/fyrfli/jsquotes/status.svg)](https://ci.fyrfli.dev/fyrfli/jsquotes)

11
public/app.js Normal file
View File

@ -0,0 +1,11 @@
const disp = document.querySelector(".display");
fetch("https://cdn.fyrfli.link/FavouriteQuotes.json")
.then((response) => {
return response.json();
})
.then((data) => {
numQuotes = Object.entries(data).length;
num = Math.floor(Math.random() * numQuotes);
disp.innerText = data[num].quote + "\n\n" + data[num].author.replace(/"/g, '');
})

17
public/index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title>read quote</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="display"></div>
<script src="app.js"></script>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -64,8 +64,15 @@ body {
max-width: 340px;
display: inline-block;
}
.footer {
font-size: 0.8rem;
text-align: center;
margin-top: 1rem;
.icon {
width: 20px;
height: 20px;
border-radius: 12px;
display: inline-block;
vertical-align: text-bottom;
}
.footer {
font-size: 0.98rem;
text-align: center;
margin-top: 1rem;
}

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title>read quote</title>
<title>fyrfli's favourite quotes</title>
<link rel="shortcut icon" href="./assets/img/favicon.ico" type="image/x-icon">
<link rel="stylesheet/less" type="text/css" href="/css/styles.less" />
<script src="https://cdn.jsdelivr.net/npm/less@4"></script>
@ -24,6 +24,9 @@
</main>
<footer class="footer">
<a href="https://fyrfli.dev/fyrfli/jsquotes"><img src="https://cdn.fyrfli.link/DashboardIcons/gitea.png"
alt="the gitea logo - a green cup with a git symbol tagged tea bag tab hanging on the front" class="icon">
Source</a> for this page <br>
&copy;<span id="jsyear"></span> Camille (<a href="https://fyrfli.dev/fyrfli" target="_blank">@fyrfli</a>) Frantz.
</footer>

View File

@ -10,7 +10,7 @@ let intervalID;
let iteratorID = 0;
let currQuote;
fetch("assets/FavouriteQuotes.json")
fetch("https://cdn.fyrfli.link/FavouriteQuotes.json")
.then((response) => {
return response.json();
})

View File

@ -8,7 +8,7 @@ const debugDisplay = document.querySelector(".debug");
let i = 0;
let quote_section = "";
fetch("assets/FavouriteQuotes.json")
fetch("https://cdn.fyrfli.link/FavouriteQuotes.json")
.then((response) => {
return response.json();
})

16
public/style.css Normal file
View File

@ -0,0 +1,16 @@
body {
width: 80vw;
max-width: 500px;
margin: auto;
padding-top: 4rem;
background-color: beige;
}
.display {
background: linear-gradient(to bottom right, #0c024d, #0dbcc5);
background-attachment: fixed;
color: white;
font-size: 1.2rem;
padding: 2rem;
border-radius: 12px;
}