Rename project to Ferrit.

This commit is contained in:
Daniel Valentine 2022-10-09 14:31:16 -06:00
parent a19f46ad18
commit be3a4013db
28 changed files with 93 additions and 93 deletions

View File

@ -1,6 +1,6 @@
--- ---
name: ✨ Feature parity name: ✨ Feature parity
about: Suggest implementing a feature into libbacon that is found in Reddit.com about: Suggest implementing a feature into Ferrit that is found in Reddit.com
title: '✨ Feature parity: ' title: '✨ Feature parity: '
labels: feature parity labels: feature parity
assignees: '' assignees: ''
@ -12,7 +12,7 @@ assignees: ''
A clear and concise description of what the feature is. A clear and concise description of what the feature is.
--> -->
## Describe how this could be implemented into libbacon ## Describe how this could be implemented into Ferrit
<!-- <!--
A clear and concise description of what you want to happen. A clear and concise description of what you want to happen.
--> -->

View File

@ -1,6 +1,6 @@
--- ---
name: 💡 Feature request name: 💡 Feature request
about: Suggest a feature for libbacon that is not found in Reddit about: Suggest a feature for Ferrit that is not found in Reddit
title: '💡 Feature request: ' title: '💡 Feature request: '
labels: enhancement labels: enhancement
assignees: '' assignees: ''

View File

@ -1,2 +1,2 @@
run = "while :; do set -ex; curl -o./libbacon -fsSL -- https://github.com/libbacon/libbacon/releases/latest/download/libbacon; chmod +x libbacon; set +e; ./libbacon -H 63115200; sleep 1; done" run = "while :; do set -ex; curl -o./ferrit -fsSL -- https://github.com/libbacon/ferrit/releases/latest/download/ferrit; chmod +x ferrit; set +e; ./ferrit -H 63115200; sleep 1; done"
language = "bash" language = "bash"

46
Cargo.lock generated
View File

@ -289,6 +289,29 @@ dependencies = [
"instant", "instant",
] ]
[[package]]
name = "ferrit"
version = "0.1.0"
dependencies = [
"askama",
"async-recursion",
"cached",
"clap",
"cookie",
"futures-lite",
"hyper",
"hyper-rustls",
"percent-encoding",
"regex",
"route-recognizer",
"rust-embed",
"serde",
"serde_json",
"time",
"tokio",
"url",
]
[[package]] [[package]]
name = "fnv" name = "fnv"
version = "1.0.7" version = "1.0.7"
@ -581,29 +604,6 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libbacon"
version = "0.1.0"
dependencies = [
"askama",
"async-recursion",
"cached",
"clap",
"cookie",
"futures-lite",
"hyper",
"hyper-rustls",
"percent-encoding",
"regex",
"route-recognizer",
"rust-embed",
"serde",
"serde_json",
"time",
"tokio",
"url",
]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.133" version = "0.2.133"

View File

@ -1,8 +1,8 @@
[package] [package]
name = "libbacon" name = "ferrit"
description = " Alternative private front-end to Reddit" description = " Alternative private front-end to Reddit"
license = "AGPL-3.0" license = "AGPL-3.0"
repository = "https://github.com/libbacon/libbacon" repository = "https://github.com/libbacon/ferrit"
version = "0.1.0" version = "0.1.0"
authors = ["Daniel Valentine <Daniel-Valentine@users.noreply.github.com>", "spikecodes <19519553+spikecodes@users.noreply.github.com>"] authors = ["Daniel Valentine <Daniel-Valentine@users.noreply.github.com>", "spikecodes <19519553+spikecodes@users.noreply.github.com>"]
edition = "2021" edition = "2021"

View File

@ -5,7 +5,7 @@ FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev RUN apk add --no-cache musl-dev
WORKDIR /libbacon WORKDIR /ferrit
COPY . . COPY . .
@ -21,16 +21,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs COPY --from=builder /etc/ssl/certs /etc/ssl/certs
# Copy our build # Copy our build
COPY --from=builder /libbacon/target/x86_64-unknown-linux-musl/release/libbacon /usr/local/bin/libbacon COPY --from=builder /ferrit/target/x86_64-unknown-linux-musl/release/ferrit /usr/local/bin/ferrit
# Use an unprivileged user. # Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libbacon RUN adduser --home /nonexistent --no-create-home --disabled-password ferrit
USER libbacon USER ferrit
# Tell Docker to expose port 8080 # Tell Docker to expose port 8080
EXPOSE 8080 EXPOSE 8080
# Run a healthcheck every minute to make sure libbacon is functional # Run a healthcheck every minute to make sure ferrit is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1 HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
CMD ["libbacon"] CMD ["ferrit"]

View File

@ -5,7 +5,7 @@ FROM rust:alpine AS builder
RUN apk add --no-cache g++ RUN apk add --no-cache g++
WORKDIR /usr/src/libbacon WORKDIR /usr/src/ferrit
COPY . . COPY . .
@ -21,16 +21,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs COPY --from=builder /etc/ssl/certs /etc/ssl/certs
# Copy our build # Copy our build
COPY --from=builder /usr/local/cargo/bin/libbacon /usr/local/bin/libbacon COPY --from=builder /usr/local/cargo/bin/ferrit /usr/local/bin/ferrit
# Use an unprivileged user. # Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libbacon RUN adduser --home /nonexistent --no-create-home --disabled-password ferrit
USER libbacon USER ferrit
# Tell Docker to expose port 8080 # Tell Docker to expose port 8080
EXPOSE 8080 EXPOSE 8080
# Run a healthcheck every minute to make sure libbacon is functional # Run a healthcheck every minute to make sure ferrit is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1 HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
CMD ["libbacon"] CMD ["ferrit"]

View File

@ -12,7 +12,7 @@ RUN apt-get update && apt-get -y install gcc-arm-linux-gnueabihf \
RUN rustup target add armv7-unknown-linux-musleabihf RUN rustup target add armv7-unknown-linux-musleabihf
WORKDIR /libbacon WORKDIR /ferrit
COPY . . COPY . .
@ -28,16 +28,16 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl/certs /etc/ssl/certs COPY --from=builder /etc/ssl/certs /etc/ssl/certs
# Copy our build # Copy our build
COPY --from=builder /libbacon/target/armv7-unknown-linux-musleabihf/release/libbacon /usr/local/bin/libbacon COPY --from=builder /ferrit/target/armv7-unknown-linux-musleabihf/release/ferrit /usr/local/bin/ferrit
# Use an unprivileged user. # Use an unprivileged user.
RUN adduser --home /nonexistent --no-create-home --disabled-password libbacon RUN adduser --home /nonexistent --no-create-home --disabled-password ferrit
USER libbacon USER ferrit
# Tell Docker to expose port 8080 # Tell Docker to expose port 8080
EXPOSE 8080 EXPOSE 8080
# Run a healthcheck every minute to make sure libbacon is functional # Run a healthcheck every minute to make sure ferrit is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1 HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
CMD ["libbacon"] CMD ["ferrit"]

View File

@ -1,3 +1,3 @@
# libbacon # Ferrit
**libbacon** is a front-end for Reddit, written in [Rust](https://www.rust-lang.org/). It is a fork of the [Libreddit project](https://github.com/spikecodes/libreddit) started by [spikecodes](https://spike.codes). **Ferrit** is a front-end for Reddit, written in [Rust](https://www.rust-lang.org/). It is a fork of the [Libreddit project](https://github.com/spikecodes/libreddit) started by [spikecodes](https://spike.codes).

View File

@ -1,5 +1,5 @@
{ {
"name": "libbacon", "name": "Ferrit",
"description": "Private front-end for Reddit", "description": "Private front-end for Reddit",
"buildpacks": [ "buildpacks": [
{ {
@ -11,34 +11,34 @@
], ],
"stack": "container", "stack": "container",
"env": { "env": {
"LIBBACON_DEFAULT_THEME": { "FERRIT_DEFAULT_THEME": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_FRONT_PAGE": { "FERRIT_DEFAULT_FRONT_PAGE": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_LAYOUT": { "FERRIT_DEFAULT_LAYOUT": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_WIDE": { "FERRIT_DEFAULT_WIDE": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_COMMENT_SORT": { "FERRIT_DEFAULT_COMMENT_SORT": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_POST_SORT": { "FERRIT_DEFAULT_POST_SORT": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_SHOW_NSFW": { "FERRIT_DEFAULT_SHOW_NSFW": {
"required": false "required": false
}, },
"LIBBACON_DEFAULT_BLUR_NSFW": { "FERRIT_DEFAULT_BLUR_NSFW": {
"required": false "required": false
}, },
"LIBBACON_USE_HLS": { "FERRIT_USE_HLS": {
"required": false "required": false
}, },
"LIBBACON_HIDE_HLS_NOTIFICATION": { "FERRIT_HIDE_HLS_NOTIFICATION": {
"required": false "required": false
} }
} }

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=libbacon daemon Description=Ferrit daemon
After=network.service After=network.service
[Service] [Service]
@ -8,8 +8,8 @@ DynamicUser=yes
Environment=ADDRESS=0.0.0.0 Environment=ADDRESS=0.0.0.0
Environment=PORT=8080 Environment=PORT=8080
# Optional Override # Optional Override
EnvironmentFile=-/etc/libbacon.conf EnvironmentFile=-/etc/ferrit.conf
ExecStart=/usr/bin/libbacon -a ${ADDRESS} -p ${PORT} ExecStart=/usr/bin/ferrit -a ${ADDRESS} -p ${PORT}
# Hardening # Hardening
DeviceAllow= DeviceAllow=

View File

@ -4,7 +4,7 @@ services:
web: web:
build: . build: .
restart: always restart: always
container_name: "libbacon" container_name: "ferrit"
ports: ports:
- 8080:8080 - 8080:8080
healthcheck: healthcheck:

View File

@ -73,7 +73,7 @@ fn request(url: String, quarantine: bool) -> Boxed<Result<Response<Body>, String
let builder = Request::builder() let builder = Request::builder()
.method("GET") .method("GET")
.uri(&url) .uri(&url)
.header("User-Agent", format!("web:libbacon:{}", env!("CARGO_PKG_VERSION"))) .header("User-Agent", format!("web:ferrit:{}", env!("CARGO_PKG_VERSION")))
.header("Host", "www.reddit.com") .header("Host", "www.reddit.com")
.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
.header("Accept-Language", "en-US,en;q=0.5") .header("Accept-Language", "en-US,en;q=0.5")

View File

@ -105,7 +105,7 @@ async fn style() -> Result<Response<Body>, String> {
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let matches = Command::new("libbacon") let matches = Command::new("Ferrit")
.version(env!("CARGO_PKG_VERSION")) .version(env!("CARGO_PKG_VERSION"))
.about("Private front-end for Reddit written in Rust ") .about("Private front-end for Reddit written in Rust ")
.arg( .arg(
@ -150,7 +150,7 @@ async fn main() {
let listener = [address, ":", &port].concat(); let listener = [address, ":", &port].concat();
println!("Starting libbacon..."); println!("Starting Ferrit...");
// Begin constructing a server // Begin constructing a server
let mut app = server::Server::new(); let mut app = server::Server::new();
@ -189,7 +189,7 @@ async fn main() {
.at("/hls.min.js") .at("/hls.min.js")
.get(|_| resource(include_str!("../static/hls.min.js"), "text/javascript", false).boxed()); .get(|_| resource(include_str!("../static/hls.min.js"), "text/javascript", false).boxed());
// Proxy media through libbacon // Proxy media through Ferrit
app.at("/vid/:id/:size").get(|r| proxy(r, "https://v.redd.it/{id}/DASH_{size}").boxed()); app.at("/vid/:id/:size").get(|r| proxy(r, "https://v.redd.it/{id}/DASH_{size}").boxed());
app.at("/hls/:id/*path").get(|r| proxy(r, "https://v.redd.it/{id}/{path}").boxed()); app.at("/hls/:id/*path").get(|r| proxy(r, "https://v.redd.it/{id}/{path}").boxed());
app.at("/img/*path").get(|r| proxy(r, "https://i.redd.it/{path}").boxed()); app.at("/img/*path").get(|r| proxy(r, "https://i.redd.it/{path}").boxed());
@ -297,7 +297,7 @@ async fn main() {
// Default service in case no routes match // Default service in case no routes match
app.at("/*").get(|req| error(req, "Nothing here".to_string()).boxed()); app.at("/*").get(|req| error(req, "Nothing here".to_string()).boxed());
println!("Running libbacon v{} on {}!", env!("CARGO_PKG_VERSION"), listener); println!("Running Ferrit v{} on {}!", env!("CARGO_PKG_VERSION"), listener);
let server = app.listen(listener); let server = app.listen(listener);

View File

@ -147,7 +147,7 @@ fn parse_comments(json: &serde_json::Value, post_link: &str, post_author: &str,
let is_filtered = filters.contains(&["u_", author.name.as_str()].concat()); let is_filtered = filters.contains(&["u_", author.name.as_str()].concat());
// Many subreddits have a default comment posted about the sub's rules etc. // Many subreddits have a default comment posted about the sub's rules etc.
// Many libbacon users do not wish to see this kind of comment by default. // Many Ferrit users do not wish to see this kind of comment by default.
// Reddit does not tell us which users are "bots", so a good heuristic is to // Reddit does not tell us which users are "bots", so a good heuristic is to
// collapse stickied moderator comments. // collapse stickied moderator comments.
let is_moderator_comment = data["distinguished"].as_str().unwrap_or_default() == "moderator"; let is_moderator_comment = data["distinguished"].as_str().unwrap_or_default() == "moderator";

View File

@ -42,7 +42,7 @@ pub async fn profile(req: Request<Body>) -> Result<Response<Body>, String> {
let url = String::from(req.uri().path_and_query().map_or("", |val| val.as_str())); let url = String::from(req.uri().path_and_query().map_or("", |val| val.as_str()));
let redirect_url = url[1..].replace('?', "%3F").replace('&', "%26"); let redirect_url = url[1..].replace('?', "%3F").replace('&', "%26");
// Retrieve other variables from libbacon request // Retrieve other variables from Ferrit request
let sort = param(&path, "sort").unwrap_or_default(); let sort = param(&path, "sort").unwrap_or_default();
let username = req.param("name").unwrap_or_default(); let username = req.param("name").unwrap_or_default();

View File

@ -665,7 +665,7 @@ pub fn setting(req: &Request<Body>, name: &str) -> String {
.cookie(name) .cookie(name)
.unwrap_or_else(|| { .unwrap_or_else(|| {
// If there is no cookie for this setting, try receiving a default from an environment variable // If there is no cookie for this setting, try receiving a default from an environment variable
if let Ok(default) = std::env::var(format!("LIBBACON_DEFAULT_{}", name.to_uppercase())) { if let Ok(default) = std::env::var(format!("FERRIT_DEFAULT_{}", name.to_uppercase())) {
Cookie::new(name, default) Cookie::new(name, default)
} else { } else {
Cookie::named(name) Cookie::named(name)
@ -750,7 +750,7 @@ pub fn format_url(url: &str) -> String {
} }
} }
// Rewrite Reddit links to libbacon in body of text // Rewrite Reddit links to Ferrit in body of text
pub fn rewrite_urls(input_text: &str) -> String { pub fn rewrite_urls(input_text: &str) -> String {
let text1 = Regex::new(r#"href="(https|http|)://(www\.|old\.|np\.|amp\.|)(reddit\.com|redd\.it)/"#) let text1 = Regex::new(r#"href="(https|http|)://(www\.|old\.|np\.|amp\.|)(reddit\.com|redd\.it)/"#)
.map_or(String::new(), |re| re.replace_all(input_text, r#"href="/"#).to_string()) .map_or(String::new(), |re| re.replace_all(input_text, r#"href="/"#).to_string())
@ -758,7 +758,7 @@ pub fn rewrite_urls(input_text: &str) -> String {
.replace("%5C", "") .replace("%5C", "")
.replace('\\', ""); .replace('\\', "");
// Rewrite external media previews to libbacon // Rewrite external media previews to Ferrit
Regex::new(r"https://external-preview\.redd\.it(.*)[^?]").map_or(String::new(), |re| { Regex::new(r"https://external-preview\.redd\.it(.*)[^?]").map_or(String::new(), |re| {
if re.is_match(&text1) { if re.is_match(&text1) {
re.replace_all(&text1, format_url(re.find(&text1).map(|x| x.as_str()).unwrap_or_default())).to_string() re.replace_all(&text1, format_url(re.find(&text1).map(|x| x.as_str()).unwrap_or_default())).to_string()

View File

@ -1,6 +1,6 @@
{ {
"name": "libbacon", "name": "Ferrit",
"short_name": "libbacon", "short_name": "Ferrit",
"display": "standalone", "display": "standalone",
"background_color": "#1f1f1f", "background_color": "#1f1f1f",
"description": "An alternative private front-end to Reddit", "description": "An alternative private front-end to Reddit",

View File

@ -94,7 +94,7 @@ nav {
} }
nav * { color: var(--text); } nav * { color: var(--text); }
nav #bacon, #code > span { color: var(--accent); } nav #ferrit_logo_p2, #code > span { color: var(--accent); }
nav #code > svg { stroke: var(--accent); } nav #code > svg { stroke: var(--accent); }
nav #logo { nav #logo {
@ -119,7 +119,7 @@ nav #version {
margin-right: 10px; margin-right: 10px;
} }
nav #libbacon { nav #ferrit_logo {
vertical-align: -2px; vertical-align: -2px;
} }

View File

@ -2,14 +2,14 @@
<html lang="en"> <html lang="en">
<head> <head>
{% block head %} {% block head %}
<title>{% block title %}libbacon{% endblock %}</title> <title>{% block title %}Ferrit{% endblock %}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="View on libbacon, an alternative private front-end to Reddit."> <meta name="description" content="View on Ferrit, an alternative private front-end to Reddit.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- General PWA --> <!-- General PWA -->
<meta name="theme-color" content="#1F1F1F"> <meta name="theme-color" content="#1F1F1F">
<!-- iOS Application --> <!-- iOS Application -->
<meta name="apple-mobile-web-app-title" content="libbacon"> <meta name="apple-mobile-web-app-title" content="Ferrit">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta name="apple-mobile-web-app-status-bar-style" content="default">
<!-- Android --> <!-- Android -->
@ -29,7 +29,7 @@
<!-- NAVIGATION BAR --> <!-- NAVIGATION BAR -->
<nav> <nav>
<div id="logo"> <div id="logo">
<a id="libbacon" href="/"><span id="lib">lib</span><span id="bacon">bacon.</span></a> <a id="ferrit_logo" href="/"><span id="ferrit_logo_p1">ferr</span><span id="ferrit_logo_p2">it.</span></a>
<span id="version">v{{ env!("CARGO_PKG_VERSION") }}</span> <span id="version">v{{ env!("CARGO_PKG_VERSION") }}</span>
{% block subscriptions %}{% endblock %} {% block subscriptions %}{% endblock %}
</div> </div>
@ -52,7 +52,7 @@
<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/> <circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
</svg> </svg>
</a> </a>
<a id="code" href="https://github.com/libbacon/libbacon"> <a id="code" href="https://github.com/libbacon/ferrit">
<span>code</span> <span>code</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title>code</title> <title>code</title>

View File

@ -16,12 +16,12 @@
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:url" content="{{ post.permalink }}"> <meta property="og:url" content="{{ post.permalink }}">
<meta property="og:title" content="{{ post.title }} - r/{{ post.community }}"> <meta property="og:title" content="{{ post.title }} - r/{{ post.community }}">
<meta property="og:description" content="View on libbacon, an alternative private front-end to Reddit."> <meta property="og:description" content="View on Ferrit, an alternative private front-end to Reddit.">
<meta property="og:image" content="{{ post.thumbnail.url }}"> <meta property="og:image" content="{{ post.thumbnail.url }}">
<meta property="twitter:card" content="summary_large_image"> <meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="{{ post.permalink }}"> <meta property="twitter:url" content="{{ post.permalink }}">
<meta property="twitter:title" content="{{ post.title }} - r/{{ post.community }}"> <meta property="twitter:title" content="{{ post.title }} - r/{{ post.community }}">
<meta property="twitter:description" content="View on libbacon, an alternative private front-end to Reddit."> <meta property="twitter:description" content="View on Ferrit, an alternative private front-end to Reddit.">
<meta property="twitter:image" content="{{ post.thumbnail.url }}"> <meta property="twitter:image" content="{{ post.thumbnail.url }}">
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% import "utils.html" as utils %} {% import "utils.html" as utils %}
{% block title %}libbacon: search results - {{ params.q }}{% endblock %} {% block title %}Ferrit: search results - {{ params.q }}{% endblock %}
{% block subscriptions %} {% block subscriptions %}
{% call utils::sub_list("") %} {% call utils::sub_list("") %}
@ -10,7 +10,7 @@
{% block content %} {% block content %}
<div id="column_one"> <div id="column_one">
<form id="search_sort"> <form id="search_sort">
<input id="search" type="text" name="q" placeholder="Search" value="{{ params.q }}" title="Search libbacon"> <input id="search" type="text" name="q" placeholder="Search" value="{{ params.q }}" title="Search Ferrit">
{% if sub != "" %} {% if sub != "" %}
<div id="inside"> <div id="inside">
<input type="checkbox" name="restrict_sr" id="restrict_sr" {% if params.restrict_sr != "" %}checked{% endif %}> <input type="checkbox" name="restrict_sr" id="restrict_sr" {% if params.restrict_sr != "" %}checked{% endif %}>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% import "utils.html" as utils %} {% import "utils.html" as utils %}
{% block title %}libbacon Settings{% endblock %} {% block title %}Ferrit Settings{% endblock %}
{% block search %} {% block search %}
{% call utils::search("".to_owned(), "", "") %} {% call utils::search("".to_owned(), "", "") %}
@ -68,7 +68,7 @@
<label for="use_hls">Use HLS for videos <label for="use_hls">Use HLS for videos
<details id="feeds"> <details id="feeds">
<summary>Why?</summary> <summary>Why?</summary>
<div id="feed_list" class="helper">Reddit videos require JavaScript (via HLS.js) to be enabled to be played with audio. Therefore, this toggle lets you either use libbacon JS-free or utilize this feature.</div> <div id="feed_list" class="helper">Reddit videos require JavaScript (via HLS.js) to be enabled to be played with audio. Therefore, this toggle lets you either use Ferrit JS-free or utilize this feature.</div>
</details> </details>
</label> </label>
<input type="hidden" value="off" name="use_hls"> <input type="hidden" value="off" name="use_hls">

View File

@ -4,7 +4,7 @@
{% block title %} {% block title %}
{% if sub.title != "" %}{{ sub.title }} {% if sub.title != "" %}{{ sub.title }}
{% else if sub.name != "" %}{{ sub.name }} {% else if sub.name != "" %}{{ sub.name }}
{% else %}libbacon{% endif %} {% else %}Ferrit{% endif %}
{% endblock %} {% endblock %}
{% block search %} {% block search %}

View File

@ -5,7 +5,7 @@
{% call utils::search("".to_owned(), "", "") %} {% call utils::search("".to_owned(), "", "") %}
{% endblock %} {% endblock %}
{% block title %}{{ user.name.replace("u/", "") }} (u/{{ user.name }}) - libbacon{% endblock %} {% block title %}{{ user.name.replace("u/", "") }} (u/{{ user.name }}) - Ferrit{% endblock %}
{% block subscriptions %} {% block subscriptions %}
{% call utils::sub_list("") %} {% call utils::sub_list("") %}

View File

@ -16,7 +16,7 @@
{% macro search(root, search) -%} {% macro search(root, search) -%}
<form action="{% if root != "/r/" && !root.is_empty() %}{{ root }}{% endif %}/search" id="searchbox"> <form action="{% if root != "/r/" && !root.is_empty() %}{{ root }}{% endif %}/search" id="searchbox">
<input id="search" type="text" name="q" placeholder="Search" title="Search libbacon" value="{{ search }}"> <input id="search" type="text" name="q" placeholder="Search" title="Search Ferrit" value="{{ search }}">
{% if root != "/r/" && !root.is_empty() %} {% if root != "/r/" && !root.is_empty() %}
<div id="inside"> <div id="inside">
<input type="checkbox" name="restrict_sr" id="restrict_sr" checked> <input type="checkbox" name="restrict_sr" id="restrict_sr" checked>

View File

@ -3,7 +3,7 @@
{% block title %} {% block title %}
{% if sub != "" %}{{ page }} - {{ sub }} {% if sub != "" %}{{ page }} - {{ sub }}
{% else %}libbacon{% endif %} {% else %}Ferrit{% endif %}
{% endblock %} {% endblock %}
{% block search %} {% block search %}