Skip to content

Commit

Permalink
Fix fontawesome (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja authored Nov 13, 2024
1 parent c7efd87 commit 19d1605
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 29 deletions.
31 changes: 8 additions & 23 deletions src/css/clipboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
display: inline-block;
margin-left: 0.5rem;
margin-right: 0.5rem;
position: relative;
}

a.copy-code-button:focus,
Expand All @@ -13,42 +14,30 @@ a.copy-code-button:hover {

.copy-code-button:hover::after {
content: attr(data-title);
color: var(--pre-annotation-font-color);
line-height: 1;
position: absolute;
top: -20px;
right: 0%;
left: auto;
top: -26px;
left: 50%;
transform: translate(-50%, 0);
margin: 0;
padding: 3px;
padding: 5px;
text-align: center;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
background: var(--neutral-lighter);
color: var(--secondary-text);
border: 1px solid var(--pre-border-color);
box-sizing: border-box;
border-radius: 3px;
border-radius: 8px;
min-width: 80px;
}

.copy-code-button:hover::before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 10px solid var(--pre-border-color);
position: absolute;
content: "";
box-shadow: inset 0 0 1px #bec0c1;
bottom: -27px;
right: auto;
left: auto;
}

.doc .listingblock code /*[data-lang]*/ + .source-type-box {
position: absolute;
top: -20px;
right: 0;
display: none;
align-items: center;
z-index: 1;
display: flex;
}

.doc .listingblock code /*[data-lang]*/ + .source-type-box .data-source {
Expand All @@ -62,10 +51,6 @@ a.copy-code-button:hover {
border-right: 1px solid var(--pre-border-color);
}

.doc .listingblock:hover code /*[data-lang]*/ + .source-type-box {
display: flex;
}

.doc .listingblock pre .fade-shadow {
display: none;
background:
Expand Down
6 changes: 3 additions & 3 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
font-weight: 450;
hyphens: none;
line-height: 1.3;
margin: 1rem 0 0;
margin: 1.1rem 0 0;
font-size: 1.09em;
}

Expand Down Expand Up @@ -138,7 +138,7 @@ strong.beta {
font-weight: var(--heading-font-weight);
hyphens: none;
line-height: 1.3;
margin: 1rem 0 0;
margin: 1.1rem 0 0;
}

.doc > h1.page:first-child {
Expand Down Expand Up @@ -315,7 +315,7 @@ strong.beta {
.doc .verseblock,
.doc .quoteblock,
.doc .partintro {
margin: 1rem 0 0;
margin: 1.1rem 0 0;
}

.doc .ulist.tablelist {
Expand Down
2 changes: 1 addition & 1 deletion src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

.article-banner p {
font-size: calc(14 / var(--rem-base) * 1rem);
margin: 0 1rem 0 0;
margin: 0 1.1rem 0 0;
margin-bottom: 10px;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/08-copy-to-clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var copyButton = document.createElement('a')
copyButton.className = 'copy-code-button'
copyButton.dataset.title = 'Copy'
copyButton.appendChild(document.createElement('i')).className = 'far fa-copy'
copyButton.appendChild(document.createElement('i')).className = 'fa-regular fa-copy'
var dataSource = document.createElement('span')
dataSource.className = 'data-source'
if (codeBlock.dataset.lang) {
Expand Down
2 changes: 1 addition & 1 deletion src/partials/head-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
<!-- End Kapa snippet -->
{{/with}}

<script src="https://kit.fontawesome.com/11f046e3f7.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/js/all.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>

0 comments on commit 19d1605

Please sign in to comment.