Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ I made a Random Quote Generator.

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š I made a Random Quote Generator.


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

I recently made a random quote generator which was pretty good. More importantly it had a lighthouse performance of 99. I am going to teach how you can create a simple quote similar to what I made. Go check out my website citeal.web.app

HOW TO GET RANDOM QUOTES

The most obvious way of getting information is by using a javascript api.

"JavaScript APIs: Like a pre-made pizza crust - you gotta dress it up, but at least you're not starting from scratch."

To be honest this quote was made by gemini ai. Its ok lets look forward on how to find the perfect api. After searching for over 30 minutes, I found quotable in a github repo. I read the documentation and started to work on it. I simply called a function that would replace our html with the quote and author from the api json file. Thats pretty straight forward.

ERROR !!!!!

An error popped out for this code


const tags = ['inspirational','famous-quotes','technology','love','life','religion','philosophy',''];
const tag = tags[Math.floor(Math.random() * tags.length)];
const url = 'https://api.quotable.io/quotes/random?tags=' + tag;
author = document.getElementById('author');
quote = ocument.getElementById('author');

console.log(tag);

async function getQuote(xurl) {
    const response = await fetch(xurl);
    var data = await response.json();

    quote.innerHTML = data[0].content;
    author.innerHTML = data[0].author;
}

getQuote(url);

After searching the code inside stack overflow, I quickly got the solution i removed the variables and simply followed this markup

document.getElementById('author').innerHTML = data[0].content;

It worked :)

STYLING

I searched through millions of colour palettes but could not get a better palette than the most used and the most elegant colour palette. The black and white colour palette.

After giving simple and elegant styles, My application took shape

Deploying

The best free deploying service is firebase, so I used firebase to deploy my pretty simple application. I used firebase init command and then firebase deploy to deploy my app to citeal.web.app

Thanks for reading see you in another Post

Make sure to check out Citeal

...



๐Ÿ“Œ I made a Random Quote Generator.


๐Ÿ“ˆ 49.21 Punkte

๐Ÿ“Œ Build a Random Quote Generator with HTML, CSS, and JavaScript


๐Ÿ“ˆ 41.1 Punkte

๐Ÿ“Œ CVE-2013-4102 | Cryptocat up to 2.0.21 strophe.js Math.random Random random values (BID-61095 / OSVDB-95006)


๐Ÿ“ˆ 36.92 Punkte

๐Ÿ“Œ Enigmail bis 1.9.8 Random Generator Math.Random() schwache Verschlรผsselung


๐Ÿ“ˆ 35.61 Punkte

๐Ÿ“Œ FreeBSD 4.0/5.0 Random Generator /dev/random weak encryption


๐Ÿ“ˆ 35.61 Punkte

๐Ÿ“Œ Enigmail up to 1.9.8 Random Generator Math.Random() weak encryption


๐Ÿ“ˆ 35.61 Punkte

๐Ÿ“Œ Cryptocat up to 2.0.21 Random Generator strophe.js Math.random missing encryption


๐Ÿ“ˆ 35.61 Punkte

๐Ÿ“Œ CVE-2016-5085 | Johnson & Johnson Animas OneTouch Ping Random Number Generator random values (BID-93351)


๐Ÿ“ˆ 35.61 Punkte

๐Ÿ“Œ Khamil Landross and Zack Jones EFTP 2.0.7.337 Command LIST/QUOTE SIZE/QUOTE MDTM directory traversal


๐Ÿ“ˆ 35.6 Punkte

๐Ÿ“Œ I made universal Random Generator, which can make everything, by just only one line


๐Ÿ“ˆ 31.4 Punkte

๐Ÿ“Œ [TS] I made Ultimate Random Generator which can make Everything


๐Ÿ“ˆ 31.4 Punkte

๐Ÿ“Œ fortune-mod release 3.4.0: with some new quotations and a more robust build process (FOSS CLI utility for displaying a random quote)


๐Ÿ“ˆ 30.11 Punkte

๐Ÿ“Œ cowsay but it's random anime quote


๐Ÿ“ˆ 30.11 Punkte

๐Ÿ“Œ ๐ŸŸจย JavaScript 2 | Random Quote


๐Ÿ“ˆ 30.11 Punkte

๐Ÿ“Œ Dynamic Quote Generator for GitHub Readme


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Building the Quote Generator Web App with HTML, CSS, and JavaScript


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Build a Philosophy Quote Generator With Vector Search and Astra DB (Part 2)


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Full-Stack Next.js, TypeScript, and AWS Course โ€“ย Code a Quote Generator


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Build a Philosophy Quote Generator With Vector Search and Astra DB


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Build a Philosophy Quote Generator With Vector Search and Astra DB (Part 3)


๐Ÿ“ˆ 28.79 Punkte

๐Ÿ“Œ Enter 6 random characters to see how random you're capable of being.


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ Enter 6 random characters to see how random you're capable of being.


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ Weird Bug Makes Samsung Phones Text Random Photos To Random People


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ StashCat up to 1.7.5 Message CryptoJS.lib.WordArray.random() math.random() weak encryption


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ StashCat bis 1.7.5 Message CryptoJS.lib.WordArray.random() math.random() schwache Verschlรผsselung


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ CVE-2022-31034 | Argo CD up to 2.1.15/2.2.9/2.3.4/2.4.0 SSO Login random random values (GHSA-2m7h-86qq-fp4v)


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ How Truly Random are Random Numbers?


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ Canada's 'Random' Immigration Lottery Uses Microsoft Excel, Which Isn't Actually Random


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ Unix: How random is random?


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ What commonly installed program on Ubuntu accesses seemingly random files at seemingly random times?


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ BurpSuite Random User-Agents - Burp Suite Extension For Generate A Random User-Agents


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ random shutdown after random time


๐Ÿ“ˆ 24.61 Punkte

๐Ÿ“Œ How to Generate Random Numbers in JavaScript with Math.random()


๐Ÿ“ˆ 24.61 Punkte











matomo