Skip to content

Commit

Permalink
remove even more padding + bump version + color more blockquotes
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Feb 23, 2023
1 parent aadc59f commit 1105181
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flash"
version = "0.2.7"
version = "0.2.8"
edition = "2021"
authors = ["HJfod"]
description = "Documentation generator for C++"
Expand Down
22 changes: 20 additions & 2 deletions templates/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ main blockquote {

main blockquote.warning {
border-left: .5rem solid var(--flash-skin);
background-color: var(--flash-dark-skin);
}

main blockquote.warning strong {
color: var(--flash-orange);
}

main blockquote.info {
border-left: .5rem solid var(--flash-cyan);
}

main blockquote.book {
border-left: .5rem solid var(--flash-green);
}

main .emoji {
Expand Down Expand Up @@ -128,6 +141,7 @@ main h1 {
font-weight: bold;
font-size: 3rem;
color: var(--flash-h1-color);
margin-bottom: .25rem;
}

main h1.entity-title {
Expand Down Expand Up @@ -168,21 +182,24 @@ main h1 a:hover {
main h1::after {
content: ' ';
display: block;
margin-top: .5rem;
border: .1rem solid var(--flash-border);
margin-top: .5rem;
}

main h2 {
margin-top: 2rem;
font-family: 'Varela Round', sans-serif;
font-weight: bold;
font-size: 1.75rem;
margin-top: 1.5rem;
margin-bottom: .5rem;
}

main h3 {
font-family: 'Varela Round', sans-serif;
font-weight: bold;
font-size: 1.6rem;
margin-top: .5rem;
margin-bottom: .25rem;
}

main h4 {
Expand All @@ -196,6 +213,7 @@ main h2:not(.qna-question)::after {
display: block;
margin-top: .5rem;
border: .1rem solid var(--flash-border);
opacity: 50%;
}

main h2.qna-question {
Expand Down
14 changes: 14 additions & 0 deletions templates/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ function highlight() {
head.appendChild(linkBtn);
}
});

// Highlight warning quotes
document.querySelectorAll('blockquote > p')
.forEach(quote => {
if (quote.innerText.includes('⚠️')) {
quote.parentElement.classList.add('warning');
}
if (quote.innerText.includes('ℹ️')) {
quote.parentElement.classList.add('info');
}
if (quote.innerText.includes('📗')) {
quote.parentElement.classList.add('book');
}
});

Prism.highlightAll();
feather.replace();
Expand Down
6 changes: 6 additions & 0 deletions templates/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
--flash-purple: #9e6ad4;
--flash-pink: #f49fe9;
--flash-skin: #EC897C;
--flash-dark-skin: #58342f;
--flash-red: #e23485;
--flash-yellow: #f5dd9f;
--flash-orange: #f5c99f;
--flash-dark-orange: #5c4c3e;
--flash-border: rgba(255, 255, 255, .2);
--flash-hover: rgba(255, 255, 255, .1);
--flash-hover-light: rgba(255, 255, 255, .3);
Expand Down Expand Up @@ -57,9 +59,11 @@
--flash-purple: #9e6ad4;
--flash-pink: #f49fe9;
--flash-skin: #EC897C;
--flash-dark-skin: #58342f;
--flash-red: #e23485;
--flash-yellow: #f5dd9f;
--flash-orange: #f5c99f;
--flash-dark-orange: #5c4c3e;
--flash-border: rgba(155, 155, 255, .2);
--flash-hover: rgba(255, 255, 255, .1);
--flash-hover-light: rgba(255, 255, 255, .3);
Expand Down Expand Up @@ -95,9 +99,11 @@
--flash-purple: #9e6ad4;
--flash-pink: #f49fe9;
--flash-skin: #EC897C;
--flash-dark-skin: #58342f;
--flash-red: #e23485;
--flash-yellow: #f5dd9f;
--flash-orange: #f5c99f;
--flash-dark-orange: #5c4c3e;
--flash-border: rgba(255, 225, 155, .2);
--flash-hover: rgba(255, 255, 255, .1);
--flash-hover-light: rgba(255, 255, 255, .3);
Expand Down

0 comments on commit 1105181

Please sign in to comment.