-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into prajwal_branch
- Loading branch information
Showing
13 changed files
with
8,880 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es2021": true | ||
}, | ||
"extends": "airbnb", | ||
"overrides": [ | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint:fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
exec < /dev/tty && npx git-cz --hook || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,116 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Quotes Generator</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="icons/favicon-32x32.png" | ||
/> | ||
<link rel="stylesheet" href="styles/style.css" /> | ||
<link rel="stylesheet" href="styles/popup.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/text-image/dist/text-image.js"></script> | ||
</head> | ||
<body> | ||
<div id="mode"> | ||
<i class="far fa-lightbulb" id="modeIcon"></i> | ||
<p id="modeText">Light Mode</p> | ||
</div> | ||
<div class="container"> | ||
<div class="header"> | ||
<h2>Quote Generator</h2> | ||
</div> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Quotes Generator</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="icons/favicon-32x32.png" | ||
/> | ||
<link rel="stylesheet" href="styles/style.css" /> | ||
<link rel="stylesheet" href="styles/popup.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/text-image/dist/text-image.js"></script> | ||
</head> | ||
<body> | ||
<div id="mode"> | ||
<i class="far fa-lightbulb" id="modeIcon"></i> | ||
<p id="modeText">Light Mode</p> | ||
</div> | ||
<div class="container"> | ||
<div class="header"> | ||
<h2>Quote Generator</h2> | ||
</div> | ||
|
||
<div class="main-content"> | ||
<div class="text-area"> | ||
<span class="quote" | ||
>"Life is what happens when you're busy making other plans"</span | ||
> | ||
</div> | ||
<div class="main-content"> | ||
<div class="text-area"> | ||
<span class="quote" | ||
>"Life is what happens when you're busy making other plans"</span | ||
> | ||
</div> | ||
|
||
<div class="writer">-John Lennon</div> | ||
<div class="writer">-John Lennon</div> | ||
|
||
<div class="button-area"> | ||
<div> | ||
<button id="Qbtn" class="allBtn">Generate</button> | ||
<button id="Tbtn" class="allBtn" title="Tweet This!"> | ||
<i class="fab fa-twitter"></i> | ||
Tweet This | ||
</button> | ||
<button id="Cbtn" class="allBtn" title="Copy This!"> | ||
<i class="fas fa-clipboard"></i> | ||
Copy to Clipboard | ||
</button> | ||
</div> | ||
<div> | ||
<button | ||
id="Cbtn" | ||
class="allBtn" | ||
title="Download This!" | ||
onclick="downloadImage()" | ||
> | ||
<i class="fas fa-clipboard"></i> | ||
Download Image | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container-bot"> | ||
<div id="snackbar">Copied to clipboard</div> | ||
</div> | ||
<div class="button-area"> | ||
<div class="button-container"> | ||
<button id="Qbtn" class="allBtn"> | ||
<i class="fas fa-cogs"></i> | ||
Generate | ||
</button> | ||
<button id="Tbtn" class="allBtn" title="Tweet This!"> | ||
<i class="fab fa-twitter"></i> | ||
Tweet This | ||
</button> | ||
<button id="Cbtn" class="allBtn" title="Copy This!"> | ||
<i class="fas fa-clipboard"></i> | ||
Copy to Clipboard | ||
</button> | ||
</div> | ||
<div> | ||
<button | ||
id="Cbtn" | ||
class="allBtn" | ||
title="Download This!" | ||
onclick="downloadImage()" | ||
> | ||
<i class="fas fa-clipboard"></i> | ||
Download Image | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container-bot"> | ||
<div id="snackbar">Copied to clipboard</div> | ||
</div> | ||
|
||
<script src="js/quotes.js"></script> | ||
<script src="js/script.js"></script> | ||
<script> | ||
const downloadImage = () => { | ||
let text = document.querySelector('.quote').innerText; | ||
let writer = String(document.querySelector('.writer').innerText); | ||
// Add a line break after 10 words | ||
let words = text.split(' '); | ||
if (words.length > 10) { | ||
let newWords = []; | ||
let line = ''; | ||
for (let i = 0; i < words.length; i++) { | ||
if (i % 10 === 0 && i !== 0) { | ||
newWords.push(line); | ||
line = ''; | ||
} | ||
line += words[i] + ' '; | ||
} | ||
newWords.push(line); | ||
text = newWords.join('\n'); | ||
} | ||
var style = { | ||
font: "'Helvetica Neue'", | ||
align: 'center', | ||
color: 'rgba(0, 0, 0, 1)', | ||
size: 16, | ||
background: 'rgba(255, 255, 255, 1)', | ||
stroke: 0, | ||
strokeColor: 'rgba(0, 0, 255, 1)', | ||
lineHeight: '1.6em', | ||
bold: false, | ||
italic: false, | ||
}; | ||
var textImage = TextImage(style); | ||
var data = textImage.toDataURL(text + '\n' + writer, 'image/png', 0.8); | ||
var link = document.createElement('a'); | ||
link.download = `${writer | ||
.substring(1, writer.length) | ||
.toLowerCase()}-quote.png`; | ||
link.href = data; | ||
link.click(); | ||
}; | ||
</script> | ||
</body> | ||
<script src="js/quotes.js"></script> | ||
<script src="js/script.js"></script> | ||
<script> | ||
const downloadImage = () => { | ||
let text = document.querySelector(".quote").innerText; | ||
let writer = String(document.querySelector(".writer").innerText); | ||
// Add a line break after 10 words | ||
let words = text.split(" "); | ||
if (words.length > 10) { | ||
let newWords = []; | ||
let line = ""; | ||
for (let i = 0; i < words.length; i++) { | ||
if (i % 10 === 0 && i !== 0) { | ||
newWords.push(line); | ||
line = ""; | ||
} | ||
line += words[i] + " "; | ||
} | ||
newWords.push(line); | ||
text = newWords.join("\n"); | ||
} | ||
var style = { | ||
font: "'Helvetica Neue'", | ||
align: "center", | ||
color: "rgba(0, 0, 0, 1)", | ||
size: 16, | ||
background: "rgba(255, 255, 255, 1)", | ||
stroke: 0, | ||
strokeColor: "rgba(0, 0, 255, 1)", | ||
lineHeight: "1.6em", | ||
bold: false, | ||
italic: false, | ||
}; | ||
var textImage = TextImage(style); | ||
var data = textImage.toDataURL(text + "\n" + writer, "image/png", 0.8); | ||
var link = document.createElement("a"); | ||
link.download = `${writer | ||
.substring(1, writer.length) | ||
.toLowerCase()}-quote.png`; | ||
link.href = data; | ||
link.click(); | ||
}; | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.