Skip to content

Commit

Permalink
Splitting css and js files
Browse files Browse the repository at this point in the history
  • Loading branch information
navchandar authored Sep 12, 2024
1 parent f93d4a6 commit dc442cb
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 247 deletions.
249 changes: 2 additions & 247 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,223 +11,7 @@
content="Python, scanned documents, PDF, image conversion, look like scanned, Scan pdf online, Convert JPEG to PDF, Convert PNG to PDF, CLI">
<link rel="shortcut icon"
href="data:image/x-icon;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAANwXAADcFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJOrFwCTqxcAk6sXAJOrFwCTqxcCk6sXKZOrF2yTqxesk6sX2ZOrF/ORqBf9dowT/WZ6EPRnexDbZ3sQrmd7EG5pfRArc4gSAmd7EABrgBEAan4RAP//NQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACTqxcAk6sXAJOrFwCTqxcBk6sXN5OrF5eTqxffk6sX+5OrF/+Tqxf/kakX/3qPE/9nexD/ZnoQ/2Z6EP9mehD/ZnoQ/GZ6EOBnexCZaHwQOHSJEgJofBAAYnYPAG+EEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAk6sXAJOrFwCTqxcAk6sXGZOrF4mTqxfqk6sX/5OrF/+Tqxf/k6sX/5GpF/95jxP/ZnoQ/2Z6EP9mehD/ZnoQ/2Z6EP9mehD/ZnoQ/2Z6EP9mehDrZ3sQi2l9EBpmehAAc4gSAG2CEQAAAAAAAAAAAAAAAAAAAAAAAAAAAJOrFwCTqxcAk6sXAJOrFzWTqxfCk6sX/5OrF/+Tqxf/k6sX/5OrF/+RqRf/eY8T/2Z6EP9mehD/ZnoQ/2Z6EP9mehD/ZnoQ/2Z6EP9mehD/ZnoQ/2Z6EP9mehD/Z3sQw2h8EDZkeBAAboMRAG2BE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NjD/OjYy/0pOJv9ofBD/f5UU/5KqF/+Tqxf/k6sX/ZOrF/2Tqxf/k6sX/5OrF/+Tqxf/YGcn/zg0M/86NTL/OjUy/zcyL/93dHL/5ubl/+fn5v/n5+b/5+fm/+fn5v/n5+b/5+fm/+fn5v/n5+b/5ubl/3h1cv83My//OjYz/zo2M/85NTP/T1Uk/3+VFP+Sqhf/k6sX/5OrF/+Tqxf9k6sX85OrF/+Tqxf/k6sX/5SsF/+DlRz/WmAp/1JWK/9SViv/T1Mn/5CTd///////////////////////////////////////////////////////iYp2/0NGJf9GSSn/Rkgp/0xQJv93iRr/k6sX/5OrF/+Tqxf/k6sX/5OrF/OTqxfZk6sX/5OrF/+Tqxf/k6sX/5SsF/+SqRf/kKcY/5CnGP+OphT/uMdq//7//v////////////////////////////////////////////7+/v+cqGb/YnYN/2R4Ef9mehH/fpQU/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX2ZOrF6yTqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5GqE/+6yWr//v/+/////////////////////////////////////////////v7+/52pZf9jeAz/aHwQ/3+VFP+Sqhf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxesk6sXbJOrF/uTqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/kaoT/7nJav/+//7////////////////////////////////////////////+/v7/nKll/2V6DP9/lRT/kqoX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX+5OrF2yTqxcpk6sX35OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+RqhP/uclq//7//v////////////////////////////////////////////////+frGb/fJMQ/5KqF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxffk6sXKZOrFwKTqxeXk6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5GqE/+5yWr//v/+//////////////////////////////////39/f/y8O//6+vi/6e3U/+QqRT/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tq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cAk6sXAAAAAAAAAAAAAAAAAAAAAAAAAAAAk6sXAJOrFwCTqxcAk6sXGZOrF4mTqxfqk6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxfqk6sXiZOrFxmTqxcAk6sXAJOrFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAk6sXAJOrFwCTqxcAk6sXAZOrFzeTqxeXk6sX35OrF/uTqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/+Tqxf/k6sX/5OrF/uTqxffk6sXl5OrFzeTqxcBk6sXAJOrFwCTqxcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAk6sXAJOrFwCTqxcAk6sXAJOrFwKTqxcpk6sXbJOrF6yTqxfZk6sX85OrF/2Tqxf9k6sX85OrF9mTqxesk6sXbJOrFymTqxcCk6sXAJOrFwCTqxcAk6sXAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAHwAAAA4AAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPgAAAH8AAAD/gAAB8=" />
<style>
:root {
--main-color: #333;
--secondary-color: #4d4d4d;
--link-color: #0070ba;
--hover-color: #00509d;
--code-bg-color: #272822;
--dark-bg-color: #111;
--dark-text-color: #d0d0d0;
--dark-link-color: #0000EE;
--mild-dark-text-color: #d9d9d9;
--background-color: #f9f9f9;
--font-family: 'Roboto', sans-serif;
--heading-font-family: 'Montserrat', sans-serif;
}


html {
font-size: 16px;
}

body {
background-color: var(--background-color);
font-family: var(--font-family);
color: var(--main-color);
padding: 2em;
width: 65em;
margin: 0 auto;
}

body.dark-mode {
background-color: var(--dark-bg-color);
color: var(--dark-text-color) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p {
color: var(--dark-text-color) !important;
}

body.dark-mode a {
color: var(--dark-link-color) !important;
}

body.dark-mode li,
body.dark-mode code {
color: var(--mild-dark-text-color) !important;
}

h1,
h2 {
color: var(--main-color);
margin-bottom: 0.5em;
margin-top: 0em;
font-family: var(--heading-font-family);
}

h3 {
color: var(--main-color);
margin-bottom: 0.5em;
font-family: var(--heading-font-family);
}

/* Style paragraphs */
p {
color: var(--secondary-color);
line-height: 1.25em;
}

/* Style unordered lists */
ul {
list-style-type: square;
margin-left: 0.2em;
margin-bottom: 1.5em;
}

/* Style list items */
li {
color: var(--secondary-color);
margin-bottom: 0.25em;
line-height: 1.6em;
}

/* Style links */
a {
color: var(--link-color);
text-decoration: none;
transition: color 0.3s, box-shadow 0.3s;
}

a:hover {
color: var(--hover-color);
box-shadow: 0 2px 0 var(--hover-color);
}

/* Style code blocks */
pre {
display: block;
background: var(--code-bg-color);
white-space: pre;
max-width: 70vw;
min-width: 6.666em;
padding: 0.3em;
border: 0.333em solid var(--code-bg-color);
border-radius: 0.5em;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
position: relative;
}

code {
font-family: Consolas, monospace;
font-size: 1.1em;
border: none;
color: white;
background-color: var(--code-bg-color);
line-height: 1.4em;
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-word;
box-decoration-break: clone;
padding-left: 0.666em;
}

li>code {
font-size: 1em;
line-height: 1.5em;
border: 0.333em solid var(--code-bg-color);
padding-left: 0.1em;
border-radius: 0.25em;
}

.comment {
color: lightgoldenrodyellow;
font-size: smaller;
}

/* Style images */
img {
max-width: 100%;
height: 30px;
}

a>img:hover {
box-shadow: 0.0666em 0.0666em 0.0666em var(--main-color);
}

.code-container {
position: relative;
margin: 0;
padding: 0;
}

.copy-icon {
cursor: pointer;
margin-left: 10px;
color: blue;
position: absolute;
right: 0.5em;
top: 0.5em;
}

.copied {
color: green;
}

@media all and (min-width:800px) and (max-width: 1024px) {
pre {
max-width: 70vw;
min-width: 6.666em;
border-radius: 0.333em;
}
}

@media all and (max-width: 800px) {
pre {
max-width: 100vw;
min-width: 6.666em;
border-radius: 0.3em;
padding: 0px
}

html {
font-size: 13px;
}

body {
padding: 0.5em;
padding-left: 1em;
width: auto;
margin: 5px 5px;
}

ul {
margin-left: -2em;
}

li {
margin-bottom: 0.3em;
line-height: 1.5em;
}

code {
font-size: smaller;
}

img {
height: 20px;
}

.copy-icon {
top: 0.5em;
}

}
</style>
<link rel="stylesheet" href="styles.css">
</head>

<body>
Expand Down Expand Up @@ -444,36 +228,7 @@ <h3>Support This Project</h3>
alt="KO-FI Badge">
</a>
</footer>
<script>
// Script to auto toggle dark mode
function toggleDarkMode() {
const currentHour = new Date().getHours();
const isDayTime = currentHour >= 8 && currentHour < 18;
document.body.classList.toggle('dark-mode', !isDayTime);
}
// Call the function initially
toggleDarkMode();
// Check every 10 minutes
setInterval(toggleDarkMode, 10 * 60 * 1000);

function copyToClipboard(codeId) {
const codeElement = document.getElementById(codeId);
const text = codeElement.innerText;
navigator.clipboard.writeText(text).then(() => {
const copyIcon = codeElement.parentElement.nextElementSibling;
copyIcon.innerText = '✔';
copyIcon.classList.add('copied');
copyIcon.title = "Command copied to clipboard";
setTimeout(() => {
copyIcon.innerText = '📋';
copyIcon.classList.remove('copied');
copyIcon.title = "Copy Command";
}, 2000);
}).catch(err => {
console.error('Failed to copy text: ', err);
});
}
</script>
<script src="script.js"></script>
</body>

</html>
28 changes: 28 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Script to auto toggle dark mode
function toggleDarkMode() {
const currentHour = new Date().getHours();
const isDayTime = currentHour >= 8 && currentHour < 18;
document.body.classList.toggle('dark-mode', !isDayTime);
}
// Call the function initially
toggleDarkMode();
// Check every 10 minutes
setInterval(toggleDarkMode, 10 * 60 * 1000);

function copyToClipboard(codeId) {
const codeElement = document.getElementById(codeId);
const text = codeElement.innerText;
navigator.clipboard.writeText(text).then(() => {
const copyIcon = codeElement.parentElement.nextElementSibling;
copyIcon.innerText = '✔';
copyIcon.classList.add('copied');
copyIcon.title = "Command copied to clipboard";
setTimeout(() => {
copyIcon.innerText = '📋';
copyIcon.classList.remove('copied');
copyIcon.title = "Copy Command";
}, 2000);
}).catch(err => {
console.error('Failed to copy text: ', err);
});
}
Loading

0 comments on commit dc442cb

Please sign in to comment.