Initial commit, my theme + changes
Some checks failed
Build and Publish Docker / build (push) Has been cancelled
Some checks failed
Build and Publish Docker / build (push) Has been cancelled
This commit is contained in:
parent
9129820cb0
commit
2a9c98fd0c
BIN
public/css/fonts/Hack-Bold.ttf
Executable file
BIN
public/css/fonts/Hack-Bold.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/Hack-BoldItalic.ttf
Executable file
BIN
public/css/fonts/Hack-BoldItalic.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/Hack-Italic.ttf
Executable file
BIN
public/css/fonts/Hack-Italic.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/Hack-Regular.ttf
Executable file
BIN
public/css/fonts/Hack-Regular.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/TerminessNerdFontMono-Bold.ttf
Executable file
BIN
public/css/fonts/TerminessNerdFontMono-Bold.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/TerminessNerdFontMono-BoldItalic.ttf
Executable file
BIN
public/css/fonts/TerminessNerdFontMono-BoldItalic.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/TerminessNerdFontMono-Italic.ttf
Executable file
BIN
public/css/fonts/TerminessNerdFontMono-Italic.ttf
Executable file
Binary file not shown.
BIN
public/css/fonts/TerminessNerdFontMono-Regular.ttf
Executable file
BIN
public/css/fonts/TerminessNerdFontMono-Regular.ttf
Executable file
Binary file not shown.
99
public/css/themes/eir.css
Executable file
99
public/css/themes/eir.css
Executable file
@ -0,0 +1,99 @@
|
||||
@font-face {
|
||||
font-family: hack;
|
||||
src: url("../fonts/Hack-Regular.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: hack;
|
||||
src: url("../fonts/Hack-Bold.ttf");
|
||||
font-weight: bold;
|
||||
}
|
||||
@font-face {
|
||||
font-family: hack;
|
||||
src: url("../fonts/Hack-Italic.ttf");
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: hack;
|
||||
src: url("../fonts/Hack-BoldItalic.ttf");
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Terminess;
|
||||
src: url("../fonts/TerminessNerdFontMono-Regular.ttf");
|
||||
}
|
||||
@font-face {
|
||||
font-family: Terminess;
|
||||
src: url("../fonts/TerminessNerdFontMono-Bold.ttf");
|
||||
font-weight: bold;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Terminess;
|
||||
src: url("../fonts/TerminessNerdFontMono-Italic.ttf");
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Terminess;
|
||||
src: url("../fonts/TerminessNerdFontMono-BoldItalic.ttf");
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
body {
|
||||
background: linear-gradient(rgba(130, 88, 88, 0.875), rgba(130, 88, 88, 0.5)), url("https://eir-nya.gay/res/images/cubes.png");
|
||||
background: -webkit-linear-gradient(rgba(130, 88, 88, 0.875), rgba(130, 88, 88, 0.5)), url("https://eir-nya.gay/res/images/cubes.png");
|
||||
background: -moz-linear-gradient(rgba(130, 88, 88, 0.875), rgba(130, 88, 88, 0.5)), url("https://eir-nya.gay/res/images/cubes.png");
|
||||
background: -o-linear-gradient(rgba(130, 88, 88, 0.875), rgba(130, 88, 88, 0.5)), url("https://eir-nya.gay/res/images/cubes.png");
|
||||
background: -ms-linear-gradient(rgba(130, 88, 88, 0.875), rgba(130, 88, 88, 0.5)), url("https://eir-nya.gay/res/images/cubes.png");
|
||||
background-attachment: fixed;
|
||||
|
||||
font-family: Terminess, hack, 'Courier New', courier, monospace;
|
||||
}
|
||||
.tweet-content {
|
||||
font-family: hack, 'Courier New', courier, monospace;
|
||||
}
|
||||
.show-more {
|
||||
background-color: transparent;
|
||||
}
|
||||
body {
|
||||
--bg_color: transparent; /*#282a36;*/
|
||||
--fg_color: #f8f8f2;
|
||||
--fg_faded: #818eb6;
|
||||
--fg_dark: var(--fg_faded);
|
||||
--fg_nav: var(--accent);
|
||||
|
||||
--bg_panel: rgba(0.9803921568627451, 0.6666666666666666, 0.6705882352941176, 0.875); /*#343746;*/
|
||||
--bg_elements: #292b36;
|
||||
--bg_overlays: #20202080; /*#44475a;*/
|
||||
--bg_hover: #2f323f;
|
||||
|
||||
--grey: var(--fg_faded);
|
||||
--dark_grey: #44475a;
|
||||
--darker_grey: #3d4051;
|
||||
--darkest_grey: #363948;
|
||||
--border_grey: #44475a;
|
||||
|
||||
--accent: #faaaab;
|
||||
--accent_light: #facdce;
|
||||
--accent_dark: #ab7475;
|
||||
--accent_border: #e36f7196;
|
||||
|
||||
--play_button: #ffb86c;
|
||||
--play_button_hover: #ffc689;
|
||||
|
||||
--more_replies_dots: #bd93f9;
|
||||
--error_red: #ff5555;
|
||||
|
||||
--verified_blue: var(--accent);
|
||||
--icon_text: ##F8F8F2;
|
||||
|
||||
--tab: #6272a4;
|
||||
--tab_selected: var(--accent);
|
||||
|
||||
--profile_stat: #919cbf;
|
||||
}
|
||||
|
||||
.search-bar > form input::placeholder{
|
||||
color: var(--fg_faded);
|
||||
}
|
7
public/js/eirResources.js
Executable file
7
public/js/eirResources.js
Executable file
@ -0,0 +1,7 @@
|
||||
let eirTheme = document.querySelector("link[href='/css/themes/eir.css']");
|
||||
if (eirTheme != null) {
|
||||
let cursorScr = document.createElement("script");
|
||||
cursorScr.src = "/res/js/cursors.js";
|
||||
cursorScr.defer = "";
|
||||
document.getElementsByTagName("head")[0].appendChild(cursorScr);
|
||||
}
|
0
public/js/hls.min.js → public/js/hls.light.min.js
vendored
Normal file → Executable file
0
public/js/hls.min.js → public/js/hls.light.min.js
vendored
Normal file → Executable file
@ -2,7 +2,8 @@
|
||||
|
||||
Nitter is a free and open source alternative Twitter front-end focused on
|
||||
privacy and performance. The source is available on GitHub at
|
||||
<https://github.com/zedeus/nitter>
|
||||
<https://gitdab.com/Cynosphere/nitter> (original Nitter repo:
|
||||
<https://github.com/zedeus/nitter>)
|
||||
|
||||
* No JavaScript or ads
|
||||
* All requests go through the backend, client never talks to Twitter
|
||||
@ -12,7 +13,7 @@ privacy and performance. The source is available on GitHub at
|
||||
* RSS feeds
|
||||
* Themes
|
||||
* Mobile support (responsive design)
|
||||
* AGPLv3 licensed, no proprietary instances permitted
|
||||
* AGPLv3 licensed, no proprietary instances permitted (source code below)
|
||||
|
||||
Nitter's GitHub wiki contains
|
||||
[instances](https://github.com/zedeus/nitter/wiki/Instances) and
|
||||
@ -42,6 +43,8 @@ Twitter account.
|
||||
|
||||
## Donating
|
||||
|
||||
Donations go to zedeus, original creator of Nitter.
|
||||
|
||||
Liberapay: <https://liberapay.com/zedeus> \
|
||||
Patreon: <https://patreon.com/nitter> \
|
||||
BTC: bc1qp7q4qz0fgfvftm5hwz3vy284nue6jedt44kxya \
|
||||
@ -49,6 +52,8 @@ ETH: 0x66d84bc3fd031b62857ad18c62f1ba072b011925 \
|
||||
LTC: ltc1qhsz5nxw6jw9rdtw9qssjeq2h8hqk2f85rdgpkr \
|
||||
XMR: 42hKayRoEAw4D6G6t8mQHPJHQcXqofjFuVfavqKeNMNUZfeJLJAcNU19i1bGdDvcdN6romiSscWGWJCczFLe9RFhM3d1zpL
|
||||
|
||||
## Contact
|
||||
## Instance info
|
||||
|
||||
Feel free to join our [Matrix channel](https://matrix.to/#/#nitter:matrix.org).
|
||||
Based on [Cynthia Foxwell's fork](https://gitdab.com/Cynosphere/nitter) ([her instance](https://tw.counter-strike.gay)).
|
||||
|
||||
[Source code for this instance](https://git.eir-nya.gay/eir/nitter).
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Nitter",
|
||||
"short_name": "Nitter",
|
||||
"name": "Kitter",
|
||||
"short_name": "Kitter",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
@ -18,7 +18,7 @@
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#333333",
|
||||
"background_color": "#333333",
|
||||
"theme_color": "#faaaab",
|
||||
"background_color": "#faaaab",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ proc getConfig*(path: string): (Config, parseCfg.Config) =
|
||||
httpMaxConns: cfg.get("Server", "httpMaxConnections", 100),
|
||||
staticDir: cfg.get("Server", "staticDir", "./public"),
|
||||
title: cfg.get("Server", "title", "Nitter"),
|
||||
oembedColor: cfg.get("Server", "oembedColor", "#1F1F1F"),
|
||||
hostname: cfg.get("Server", "hostname", "nitter.net"),
|
||||
|
||||
# Cache
|
||||
|
@ -36,4 +36,4 @@ proc createEmbedRouter*(cfg: Config) =
|
||||
resp Http404
|
||||
|
||||
get "/oembed.json":
|
||||
respJson generateOembed(cfg, @"type", @"title", @"user", @"url", @"provider")
|
||||
respJson generateOembed(cfg, @"type", @"title", @"user", @"url")
|
||||
|
@ -277,6 +277,7 @@ type
|
||||
useHttps*: bool
|
||||
httpMaxConns*: int
|
||||
title*: string
|
||||
oembedColor*: string
|
||||
hostname*: string
|
||||
staticDir*: string
|
||||
|
||||
|
@ -20,7 +20,3 @@ proc initAboutPage*(dir: string) =
|
||||
proc renderAbout*(): VNode =
|
||||
buildHtml(tdiv(class="overlay-panel")):
|
||||
verbatim aboutHtml
|
||||
h2: text "Instance info"
|
||||
p:
|
||||
text "Version "
|
||||
a(href=link): text version
|
||||
|
@ -23,11 +23,11 @@ proc renderVideoEmbed*(tweet: Tweet; cfg: Config; req: Request): string =
|
||||
|
||||
result = doctype & $node
|
||||
|
||||
proc generateOembed*(cfg: Config; typ, title, user, url, provider: string): JsonNode =
|
||||
proc generateOembed*(cfg: Config; typ, title, user, url: string): JsonNode =
|
||||
%*{
|
||||
"type": typ,
|
||||
"version": "1.0",
|
||||
"provider_name": provider,
|
||||
"provider_name": cfg.title,
|
||||
"provider_url": getUrlPrefix(cfg),
|
||||
"title": title,
|
||||
"author_name": user,
|
||||
|
@ -83,6 +83,9 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||
if prefs.infiniteScroll:
|
||||
script(src="/js/infiniteScroll.js", `defer`="")
|
||||
|
||||
# load custom js
|
||||
script(src="/js/eirResources.js", `defer`="")
|
||||
|
||||
title:
|
||||
if titleText.len > 0:
|
||||
text titleText & " | " & cfg.title
|
||||
@ -93,7 +96,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||
let finalizedDesc = stripHtml(desc)
|
||||
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(name="theme-color", content="#1F1F1F")
|
||||
meta(name="theme-color", content=cfg.oembedColor)
|
||||
meta(property="og:type", content=ogType)
|
||||
if video.len > 0 and len(finalizedDesc) <= 67:
|
||||
meta(property="og:title", content=finalizedDesc)
|
||||
@ -102,7 +105,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||
meta(property="og:description", content=finalizedDesc)
|
||||
meta(property="og:locale", content="en_US")
|
||||
|
||||
var siteName = "Nitter"
|
||||
var siteName = cfg.title
|
||||
|
||||
if time.isSome:
|
||||
let timeObj = time.get
|
||||
@ -110,8 +113,8 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||
meta(property="og:article:published_time", content=timeStr)
|
||||
|
||||
let formattedTime = timeObj.format("yyyy/MM/dd HH:mm:ss")
|
||||
siteName = &"Nitter • {formattedTime}"
|
||||
|
||||
siteName = &"{cfg.title} • {formattedTime}"
|
||||
|
||||
meta(property="og:site_name", content=siteName)
|
||||
|
||||
if banner.len > 0 and not banner.startsWith('#'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user