forked from ccd0/4chan-x
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Re-added font-awesome for the header icons. This time I'm only impo…
- Loading branch information
1 parent
90fb87b
commit 79115f3
Showing
23 changed files
with
792 additions
and
532 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
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,9 +1,11 @@ | ||
/* | ||
* 4chan X | ||
* 4chan XT | ||
* | ||
* Licensed under the MIT license. | ||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE | ||
* https://github.com/TuxedoTako/4chan-xt/blob/project-XT/LICENSE | ||
* | ||
* 4chan X Copyright © 2009-2023 ccd0 | ||
* https://github.com/ccd0/4chan-x | ||
* Appchan X Copyright © 2013-2016 Zixaphir <[email protected]> | ||
* http://zixaphir.github.io/appchan-x/ | ||
* 4chan x Copyright © 2009-2011 James Campos <[email protected]> | ||
|
@@ -73,5 +75,8 @@ | |
* src/Monitoring/ThreadUpdater/beep.wav from http://freesound.org/people/pierrecartoons1979/sounds/90112/ | ||
* cc-by-nc-3.0 | ||
* | ||
* Font Awesome (https://fontawesome.com) | ||
* license: CC BY 4.0 (https://fontawesome.com/license/free#icons) | ||
* | ||
* Icons used to identify various websites are property of the respective websites. | ||
*/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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,38 @@ | ||
import { E } from '../globals/globals'; | ||
import $ from '../platform/$'; | ||
import { svgPathData as imgSvg, width as imgW, height as imgH } from "@fa/faImage"; | ||
import { svgPathData as eyeSvg, width as eyeW, height as eyeH } from "@fa/faEye"; | ||
import { svgPathData as expandSvg, width as expandW, height as expandH } from "@fas/faUpRightAndDownLeftFromCenter"; | ||
import { svgPathData as commentSvg, width as commentW, height as commentH } from "@fa/faComment"; | ||
import { svgPathData as refreshSvg, width as refreshW, height as refreshH } from "@fas/faRotate"; | ||
import { svgPathData as wrenchSvg, width as wrenchW, height as wrenchH } from "@fas/faWrench"; | ||
import { svgPathData as boltSvg, width as boltW, height as boltH } from "@fas/faBolt"; | ||
|
||
|
||
const toSvg = (svgPathData: string, width: string | number, height: string | number) => { | ||
return `<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 ${width} ${height}" preserveAspectRatio="true">` + | ||
`<path d="${svgPathData}" fill="currentColor" /></svg>`; | ||
} | ||
|
||
const icons = new Map<string, string>() | ||
.set('image', toSvg(imgSvg, imgW, imgH)) | ||
.set('eye', toSvg(eyeSvg, eyeW, eyeH)) | ||
.set('expand', toSvg(expandSvg, expandW, expandH)) | ||
.set('comment', toSvg(commentSvg, commentW, commentH)) | ||
.set('refresh', toSvg(refreshSvg, refreshW, refreshH)) | ||
.set('wrench', toSvg(wrenchSvg, wrenchW, wrenchH)) | ||
.set('bolt', toSvg(boltSvg, boltW, boltH)); | ||
|
||
|
||
var Icon = { | ||
set (node: HTMLElement, name: string, altText?: string) { | ||
const html = icons.get(name); | ||
if (altText) { | ||
node.innerHTML = `<span class="icon--alt-text">${E(altText)}</span>${html}`; | ||
} else { | ||
node.innerHTML = html; | ||
} | ||
} | ||
}; | ||
|
||
export default Icon; |
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,22 @@ | ||
/* Icons */ | ||
svg.icon { | ||
height: 14px; | ||
} | ||
:root.shortcut-icons #shortcuts .shortcut { | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
display: flex; | ||
height: 14px; | ||
} | ||
:root.shortcut-icons #shortcuts .icon--alt-text, | ||
:root:not(.shortcut-icons) .shortcut svg { | ||
display: none; | ||
} | ||
:root.shortcut-icons .shortcut.brackets-wrap::before, | ||
:root.shortcut-icons .shortcut.brackets-wrap::after{ | ||
display: none; | ||
} | ||
@keyframes spin { | ||
0% {transform:rotate(0deg);} | ||
100% {transform:rotate(359deg);} | ||
} |
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
Oops, something went wrong.