Compare commits
4 Commits
main
...
readme-upd
Author | SHA1 | Date | |
---|---|---|---|
28fd37e74b | |||
e13ad30fdf | |||
b3f0449d4d | |||
2286ef5a1f |
17
README.md
17
README.md
@ -1,7 +1,7 @@
|
|||||||
<img align="left" width="128" height="128" src="https://git.stardust.wtf/attachments/842086e3-b718-4379-b718-c3a542842152" alt="logo">
|
<img align="left" width="128" height="128" src="https://git.stardust.wtf/attachments/842086e3-b718-4379-b718-c3a542842152" alt="logo">
|
||||||
|
|
||||||
# Redsunlib
|
# Redsunlib
|
||||||
> An alternative private front-end to Reddit, a fork of [Redlib](https://github.com/redlib-org/redlib) with some <sup><sub>(minor)</sub></sup> function and cosmetic changes.
|
> An alternative private front-end to Reddit, a fork of [Redlib](https://github.com/redlib-org/redlib) with some <sup><sub>(minor)</sub></sup> function and cosmetic changes. [(See.)](#additional-features)
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -27,6 +27,7 @@ There are rapid changes/features in this fork that can<sup>(will)</sup> change w
|
|||||||
- [Teddit](#teddit)
|
- [Teddit](#teddit)
|
||||||
- [Libreddit](#libreddit)
|
- [Libreddit](#libreddit)
|
||||||
5. [Comparison](#comparison)
|
5. [Comparison](#comparison)
|
||||||
|
- [Additional features](#additional-features)
|
||||||
- [Speed](#speed)
|
- [Speed](#speed)
|
||||||
- [Privacy](#privacy)
|
- [Privacy](#privacy)
|
||||||
- [Reddit](#reddit)
|
- [Reddit](#reddit)
|
||||||
@ -98,6 +99,19 @@ Several technical improvements have also been made, including:
|
|||||||
|
|
||||||
# Comparison
|
# Comparison
|
||||||
|
|
||||||
|
## Additional features
|
||||||
|
|
||||||
|
|Quick Access Feeds<br>*<sup>(Beta)</sup>*|![screenshot](https://git.stardust.wtf/attachments/fa732ded-8618-440c-98b4-8e491456b538)<br>*Toolbar*<br>![screenshot](https://git.stardust.wtf/attachments/fb21a7fb-3944-407b-b8b7-c664a1538d66)<br>*Dropdown*
|
||||||
|
|:-:|---|
|
||||||
|
|**Video Downloads**<br>*using FFmpeg.wasm*|<img align="left" width="400" src="https://git.stardust.wtf/attachments/2d5356dc-ce99-4e5e-bb64-b6e7cc343862" alt="Video Downloads">
|
||||||
|
|**Mascot Overlays**<br>*A friendly companion while you browse*|<img align="left" width="400" src="https://git.stardust.wtf/attachments/d8e1507d-8fde-4bf1-9150-6ec08b843f85" alt="Mascot Overlays (Image of boymoder)">
|
||||||
|
|**Extra Themes**<br>*Well... One.*|***Catppuccin*** <img width="400" src="https://git.stardust.wtf/attachments/ccf81f52-e653-4722-94b9-b370c58d6359" alt="Catppuccin">
|
||||||
|
|**Extra Layouts**|<br>***Waterfall*** <img width="400" src="https://git.stardust.wtf/attachments/b4f9e41e-27a9-4bd0-bb1e-f7aa025ffd38" alt="Waterfall"><br>***Old <sup>(Beta)</sup>*** <img width="400" src="https://git.stardust.wtf/attachments/fa4d78b9-17dd-4b64-90c9-510a75b3bc8e" alt="Old">
|
||||||
|
|**Tweaked Interface Elements**|<img width="200" src="https://git.stardust.wtf/attachments/1148dd14-63cf-481e-99f0-a2236f9414cd"><img width="200" src="https://git.stardust.wtf/attachments/c2055e09-fa96-46c6-9724-41a0bad28bc6"><br><br><img width="200" src="https://git.stardust.wtf/attachments/e99365d5-64d2-458e-a572-90ef030a0cfa"><img width="200" src="https://git.stardust.wtf/attachments/9248dfaa-28c2-443b-98f9-ed736f663701">
|
||||||
|
|**QoL**<br>*Quality of life*| Option to skip gated/quarantined <br> Option to disable Banners to save bandwidth <br> Display more information <br> Mute Users [?](## "Automaticly collapse content (A Weaker filter)") |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
This section outlines how Redlib compares to Reddit in terms of speed and privacy.
|
This section outlines how Redlib compares to Reddit in terms of speed and privacy.
|
||||||
|
|
||||||
## Speed
|
## Speed
|
||||||
@ -338,5 +352,4 @@ Assign a default value for each user-modifiable setting by passing environment v
|
|||||||
| `DISABLE_VISIT_REDDIT_CONFIRMATION` | `["on", "off"]` | `off` |
|
| `DISABLE_VISIT_REDDIT_CONFIRMATION` | `["on", "off"]` | `off` |
|
||||||
| `HIDE_SCORE` | `["on", "off"]` | `off` |
|
| `HIDE_SCORE` | `["on", "off"]` | `off` |
|
||||||
| `HIDE_SIDEBAR_AND_SUMMARY` | `["on", "off"]` | `off` |
|
| `HIDE_SIDEBAR_AND_SUMMARY` | `["on", "off"]` | `off` |
|
||||||
| `HIDE_BANNER` | `["on", "off"]` | `off` |
|
|
||||||
| `FIXED_NAVBAR` | `["on", "off"]` | `on` |
|
| `FIXED_NAVBAR` | `["on", "off"]` | `on` |
|
||||||
|
@ -7,7 +7,7 @@ use hyper::header::HeaderValue;
|
|||||||
use hyper::{body, body::Buf, header, Body, Client, Method, Request, Response, Uri};
|
use hyper::{body, body::Buf, header, Body, Client, Method, Request, Response, Uri};
|
||||||
use hyper_rustls::HttpsConnector;
|
use hyper_rustls::HttpsConnector;
|
||||||
use libflate::gzip;
|
use libflate::gzip;
|
||||||
use log::{debug, error, warn};
|
use log::{error, trace, warn};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use percent_encoding::{percent_encode, CONTROLS};
|
use percent_encoding::{percent_encode, CONTROLS};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
@ -396,7 +396,7 @@ pub async fn json(path: String, quarantine: bool) -> Result<Value, String> {
|
|||||||
response.headers().get("x-ratelimit-reset").and_then(|val| val.to_str().ok().map(|s| s.to_string())),
|
response.headers().get("x-ratelimit-reset").and_then(|val| val.to_str().ok().map(|s| s.to_string())),
|
||||||
response.headers().get("x-ratelimit-used").and_then(|val| val.to_str().ok().map(|s| s.to_string())),
|
response.headers().get("x-ratelimit-used").and_then(|val| val.to_str().ok().map(|s| s.to_string())),
|
||||||
) {
|
) {
|
||||||
debug!(
|
trace!(
|
||||||
"Ratelimit remaining: Header says {remaining}, we have {current_rate_limit}. Resets in {reset}. Rollover: {}. Ratelimit used: {used}",
|
"Ratelimit remaining: Header says {remaining}, we have {current_rate_limit}. Resets in {reset}. Rollover: {}. Ratelimit used: {used}",
|
||||||
if is_rolling_over { "yes" } else { "no" },
|
if is_rolling_over { "yes" } else { "no" },
|
||||||
);
|
);
|
||||||
|
@ -84,10 +84,6 @@ pub struct Config {
|
|||||||
#[serde(alias = "LIBREDDIT_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY")]
|
#[serde(alias = "LIBREDDIT_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY")]
|
||||||
pub(crate) default_hide_sidebar_and_summary: Option<String>,
|
pub(crate) default_hide_sidebar_and_summary: Option<String>,
|
||||||
|
|
||||||
#[serde(rename = "REDLIB_DEFAULT_HIDE_BANNER")]
|
|
||||||
#[serde(alias = "LIBREDDIT_DEFAULT_HIDE_BANNER")]
|
|
||||||
pub(crate) default_hide_banner: Option<String>,
|
|
||||||
|
|
||||||
#[serde(rename = "REDLIB_DEFAULT_HIDE_SCORE")]
|
#[serde(rename = "REDLIB_DEFAULT_HIDE_SCORE")]
|
||||||
#[serde(alias = "LIBREDDIT_DEFAULT_HIDE_SCORE")]
|
#[serde(alias = "LIBREDDIT_DEFAULT_HIDE_SCORE")]
|
||||||
pub(crate) default_hide_score: Option<String>,
|
pub(crate) default_hide_score: Option<String>,
|
||||||
@ -165,7 +161,6 @@ impl Config {
|
|||||||
default_hide_hls_notification: parse("REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION"),
|
default_hide_hls_notification: parse("REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION"),
|
||||||
default_hide_awards: parse("REDLIB_DEFAULT_HIDE_AWARDS"),
|
default_hide_awards: parse("REDLIB_DEFAULT_HIDE_AWARDS"),
|
||||||
default_hide_sidebar_and_summary: parse("REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY"),
|
default_hide_sidebar_and_summary: parse("REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY"),
|
||||||
default_hide_banner: parse("REDLIB_DEFAULT_HIDE_BANNER"),
|
|
||||||
default_hide_score: parse("REDLIB_DEFAULT_HIDE_SCORE"),
|
default_hide_score: parse("REDLIB_DEFAULT_HIDE_SCORE"),
|
||||||
default_subscriptions: parse("REDLIB_DEFAULT_SUBSCRIPTIONS"),
|
default_subscriptions: parse("REDLIB_DEFAULT_SUBSCRIPTIONS"),
|
||||||
default_filters: parse("REDLIB_DEFAULT_FILTERS"),
|
default_filters: parse("REDLIB_DEFAULT_FILTERS"),
|
||||||
@ -198,7 +193,6 @@ fn get_setting_from_config(name: &str, config: &Config) -> Option<String> {
|
|||||||
"REDLIB_DEFAULT_WIDE" => config.default_wide.clone(),
|
"REDLIB_DEFAULT_WIDE" => config.default_wide.clone(),
|
||||||
"REDLIB_DEFAULT_HIDE_AWARDS" => config.default_hide_awards.clone(),
|
"REDLIB_DEFAULT_HIDE_AWARDS" => config.default_hide_awards.clone(),
|
||||||
"REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY" => config.default_hide_sidebar_and_summary.clone(),
|
"REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY" => config.default_hide_sidebar_and_summary.clone(),
|
||||||
"REDLIB_DEFAULT_HIDE_BANNER" => config.default_hide_banner.clone(),
|
|
||||||
"REDLIB_DEFAULT_HIDE_SCORE" => config.default_hide_score.clone(),
|
"REDLIB_DEFAULT_HIDE_SCORE" => config.default_hide_score.clone(),
|
||||||
"REDLIB_DEFAULT_SUBSCRIPTIONS" => config.default_subscriptions.clone(),
|
"REDLIB_DEFAULT_SUBSCRIPTIONS" => config.default_subscriptions.clone(),
|
||||||
"REDLIB_DEFAULT_FILTERS" => config.default_filters.clone(),
|
"REDLIB_DEFAULT_FILTERS" => config.default_filters.clone(),
|
||||||
|
@ -13,7 +13,7 @@ use log::info;
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use redsunlib::client::{canonical_path, proxy, CLIENT};
|
use redsunlib::client::{canonical_path, proxy, CLIENT};
|
||||||
use redsunlib::server::{self, RequestExt};
|
use redsunlib::server::{self, RequestExt};
|
||||||
use redsunlib::utils::{error, redirect, MascotAssets, ThemeAssets};
|
use redsunlib::utils::{error, redirect, ThemeAssets, MascotAssets};
|
||||||
use redsunlib::{config, duplicates, headers, instance_info, post, search, settings, subreddit, user};
|
use redsunlib::{config, duplicates, headers, instance_info, post, search, settings, subreddit, user};
|
||||||
|
|
||||||
use redsunlib::client::OAUTH_CLIENT;
|
use redsunlib::client::OAUTH_CLIENT;
|
||||||
@ -110,7 +110,8 @@ async fn style() -> Result<Response<Body>, String> {
|
|||||||
|
|
||||||
/// Serve mascot
|
/// Serve mascot
|
||||||
async fn mascot_image(req: Request<Body>) -> Result<Response<Body>, String> {
|
async fn mascot_image(req: Request<Body>) -> Result<Response<Body>, String> {
|
||||||
let res = MascotAssets::get(&req.param("name").unwrap()).unwrap_or(MascotAssets::get("redsunlib.png").unwrap());
|
let res = MascotAssets::get(&req.param("name").unwrap())
|
||||||
|
.unwrap_or(MascotAssets::get("redsunlib.png").unwrap());
|
||||||
Ok(
|
Ok(
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.status(200)
|
.status(200)
|
||||||
|
@ -6,7 +6,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use base64::{engine::general_purpose, Engine as _};
|
use base64::{engine::general_purpose, Engine as _};
|
||||||
use hyper::{client, Body, Method, Request};
|
use hyper::{client, Body, Method, Request};
|
||||||
use log::{debug, error, info, trace};
|
use log::{error, info, trace};
|
||||||
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use tokio::time::{error::Elapsed, timeout};
|
use tokio::time::{error::Elapsed, timeout};
|
||||||
@ -160,7 +160,7 @@ pub async fn force_refresh_token() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("Rolling over refresh token. Current rate limit: {}", OAUTH_RATELIMIT_REMAINING.load(Ordering::SeqCst));
|
trace!("Rolling over refresh token. Current rate limit: {}", OAUTH_RATELIMIT_REMAINING.load(Ordering::SeqCst));
|
||||||
let new_client = Oauth::new().await;
|
let new_client = Oauth::new().await;
|
||||||
OAUTH_CLIENT.swap(new_client.into());
|
OAUTH_CLIENT.swap(new_client.into());
|
||||||
OAUTH_RATELIMIT_REMAINING.store(99, Ordering::SeqCst);
|
OAUTH_RATELIMIT_REMAINING.store(99, Ordering::SeqCst);
|
||||||
|
@ -21,7 +21,7 @@ struct SettingsTemplate {
|
|||||||
|
|
||||||
// CONSTANTS
|
// CONSTANTS
|
||||||
|
|
||||||
const PREFS: [&str; 22] = [
|
const PREFS: [&str; 21] = [
|
||||||
"theme",
|
"theme",
|
||||||
"mascot",
|
"mascot",
|
||||||
"redsunlib_colorway",
|
"redsunlib_colorway",
|
||||||
@ -38,7 +38,6 @@ const PREFS: [&str; 22] = [
|
|||||||
"hide_hls_notification",
|
"hide_hls_notification",
|
||||||
"autoplay_videos",
|
"autoplay_videos",
|
||||||
"hide_sidebar_and_summary",
|
"hide_sidebar_and_summary",
|
||||||
"hide_banner",
|
|
||||||
"fixed_navbar",
|
"fixed_navbar",
|
||||||
"hide_awards",
|
"hide_awards",
|
||||||
"hide_score",
|
"hide_score",
|
||||||
|
@ -12,9 +12,7 @@ use rinja::Template;
|
|||||||
|
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use time::{macros::format_description, Duration, OffsetDateTime};
|
use time::{Duration, OffsetDateTime};
|
||||||
|
|
||||||
use log::trace;
|
|
||||||
|
|
||||||
// STRUCTS
|
// STRUCTS
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
@ -302,6 +300,7 @@ pub async fn subscriptions_filters_quicklists(req: Request<Body>) -> Result<Resp
|
|||||||
// Remove sub name from filtered list
|
// Remove sub name from filtered list
|
||||||
quicklist.retain(|s| s.to_lowercase() != part.to_lowercase());
|
quicklist.retain(|s| s.to_lowercase() != part.to_lowercase());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect back to subreddit
|
// Redirect back to subreddit
|
||||||
@ -462,24 +461,14 @@ async fn subreddit(sub: &str, quarantined: bool) -> Result<Subreddit, String> {
|
|||||||
// Send a request to the url
|
// Send a request to the url
|
||||||
let res = json(path, quarantined).await?;
|
let res = json(path, quarantined).await?;
|
||||||
|
|
||||||
trace!("Subreddit info from r/{} : {}", sub, res["data"]);
|
|
||||||
|
|
||||||
// Metadata regarding the subreddit
|
// Metadata regarding the subreddit
|
||||||
let members: i64 = res["data"]["subscribers"].as_u64().unwrap_or_default() as i64;
|
let members: i64 = res["data"]["subscribers"].as_u64().unwrap_or_default() as i64;
|
||||||
let active: i64 = res["data"]["accounts_active"].as_u64().unwrap_or_default() as i64;
|
let active: i64 = res["data"]["accounts_active"].as_u64().unwrap_or_default() as i64;
|
||||||
|
|
||||||
// Grab creation date as unix timestamp
|
|
||||||
let created_unix = res["data"]["created"].as_f64().unwrap_or(0.0).round() as i64;
|
|
||||||
let created = OffsetDateTime::from_unix_timestamp(created_unix).unwrap_or(OffsetDateTime::UNIX_EPOCH);
|
|
||||||
|
|
||||||
// Fetch subreddit icon either from the community_icon or icon_img value
|
// Fetch subreddit icon either from the community_icon or icon_img value
|
||||||
let community_icon: &str = res["data"]["community_icon"].as_str().unwrap_or_default();
|
let community_icon: &str = res["data"]["community_icon"].as_str().unwrap_or_default();
|
||||||
let icon = if community_icon.is_empty() { val(&res, "icon_img") } else { community_icon.to_string() };
|
let icon = if community_icon.is_empty() { val(&res, "icon_img") } else { community_icon.to_string() };
|
||||||
|
|
||||||
// Fetch subreddit banner either from the banner_background_image or banner_img value
|
|
||||||
let banner_background_image: &str = res["data"]["banner_background_image"].as_str().unwrap_or_default();
|
|
||||||
let banner = if banner_background_image.is_empty() { val(&res, "banner_img") } else { banner_background_image.to_string() };
|
|
||||||
|
|
||||||
Ok(Subreddit {
|
Ok(Subreddit {
|
||||||
name: val(&res, "display_name"),
|
name: val(&res, "display_name"),
|
||||||
title: val(&res, "title"),
|
title: val(&res, "title"),
|
||||||
@ -487,10 +476,8 @@ async fn subreddit(sub: &str, quarantined: bool) -> Result<Subreddit, String> {
|
|||||||
info: rewrite_urls(&val(&res, "description_html")),
|
info: rewrite_urls(&val(&res, "description_html")),
|
||||||
// moderators: moderators_list(sub, quarantined).await.unwrap_or_default(),
|
// moderators: moderators_list(sub, quarantined).await.unwrap_or_default(),
|
||||||
icon: format_url(&icon),
|
icon: format_url(&icon),
|
||||||
banner: format_url(&banner),
|
|
||||||
members: format_num(members),
|
members: format_num(members),
|
||||||
active: format_num(active),
|
active: format_num(active),
|
||||||
created: created.format(format_description!("[month repr:short] [day] '[year repr:last_two]")).unwrap_or_default(),
|
|
||||||
wiki: res["data"]["wiki_enabled"].as_bool().unwrap_or_default(),
|
wiki: res["data"]["wiki_enabled"].as_bool().unwrap_or_default(),
|
||||||
nsfw: res["data"]["over18"].as_bool().unwrap_or_default(),
|
nsfw: res["data"]["over18"].as_bool().unwrap_or_default(),
|
||||||
})
|
})
|
||||||
|
@ -6,7 +6,6 @@ use crate::server::RequestExt;
|
|||||||
use crate::utils::{error, filter_posts, format_url, get_filters, nsfw_landing, param, setting, template, Post, Preferences, User};
|
use crate::utils::{error, filter_posts, format_url, get_filters, nsfw_landing, param, setting, template, Post, Preferences, User};
|
||||||
use crate::{config, utils};
|
use crate::{config, utils};
|
||||||
use hyper::{Body, Request, Response};
|
use hyper::{Body, Request, Response};
|
||||||
use log::trace;
|
|
||||||
use rinja::Template;
|
use rinja::Template;
|
||||||
use time::{macros::format_description, OffsetDateTime};
|
use time::{macros::format_description, OffsetDateTime};
|
||||||
|
|
||||||
@ -112,7 +111,6 @@ async fn user(name: &str) -> Result<User, String> {
|
|||||||
|
|
||||||
// Send a request to the url
|
// Send a request to the url
|
||||||
json(path, false).await.map(|res| {
|
json(path, false).await.map(|res| {
|
||||||
trace!("User info from r/{} : {}", name, res["data"]);
|
|
||||||
// Grab creation date as unix timestamp
|
// Grab creation date as unix timestamp
|
||||||
let created_unix = res["data"]["created"].as_f64().unwrap_or(0.0).round() as i64;
|
let created_unix = res["data"]["created"].as_f64().unwrap_or(0.0).round() as i64;
|
||||||
let created = OffsetDateTime::from_unix_timestamp(created_unix).unwrap_or(OffsetDateTime::UNIX_EPOCH);
|
let created = OffsetDateTime::from_unix_timestamp(created_unix).unwrap_or(OffsetDateTime::UNIX_EPOCH);
|
||||||
|
@ -585,10 +585,8 @@ pub struct Subreddit {
|
|||||||
pub info: String,
|
pub info: String,
|
||||||
// pub moderators: Vec<String>,
|
// pub moderators: Vec<String>,
|
||||||
pub icon: String,
|
pub icon: String,
|
||||||
pub banner: String,
|
|
||||||
pub members: (String, String),
|
pub members: (String, String),
|
||||||
pub active: (String, String),
|
pub active: (String, String),
|
||||||
pub created: String,
|
|
||||||
pub wiki: bool,
|
pub wiki: bool,
|
||||||
pub nsfw: bool,
|
pub nsfw: bool,
|
||||||
}
|
}
|
||||||
@ -619,7 +617,6 @@ pub struct Preferences {
|
|||||||
pub hide_hls_notification: String,
|
pub hide_hls_notification: String,
|
||||||
pub video_quality: String,
|
pub video_quality: String,
|
||||||
pub hide_sidebar_and_summary: String,
|
pub hide_sidebar_and_summary: String,
|
||||||
pub hide_banner: String,
|
|
||||||
pub use_hls: String,
|
pub use_hls: String,
|
||||||
pub ffmpeg_video_downloads: String,
|
pub ffmpeg_video_downloads: String,
|
||||||
pub autoplay_videos: String,
|
pub autoplay_videos: String,
|
||||||
@ -673,7 +670,6 @@ impl Preferences {
|
|||||||
blur_spoiler: setting(req, "blur_spoiler"),
|
blur_spoiler: setting(req, "blur_spoiler"),
|
||||||
show_nsfw: setting(req, "show_nsfw"),
|
show_nsfw: setting(req, "show_nsfw"),
|
||||||
hide_sidebar_and_summary: setting(req, "hide_sidebar_and_summary"),
|
hide_sidebar_and_summary: setting(req, "hide_sidebar_and_summary"),
|
||||||
hide_banner: setting(req, "hide_banner"),
|
|
||||||
blur_nsfw: setting(req, "blur_nsfw"),
|
blur_nsfw: setting(req, "blur_nsfw"),
|
||||||
use_hls: setting(req, "use_hls"),
|
use_hls: setting(req, "use_hls"),
|
||||||
ffmpeg_video_downloads: setting(req, "ffmpeg_video_downloads"),
|
ffmpeg_video_downloads: setting(req, "ffmpeg_video_downloads"),
|
||||||
|
@ -499,7 +499,7 @@ aside {
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
border: 2px solid var(--accent);
|
border: 2px solid var(--accent);
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
padding: 0px;
|
padding: 10px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,13 +531,10 @@ aside {
|
|||||||
grid-template-columns: auto 4fr 1fr;
|
grid-template-columns: auto 4fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#user_details {
|
#user_details,
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
}
|
|
||||||
#sub_details {
|
#sub_details {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 279px) {
|
@media screen and (max-width: 279px) {
|
||||||
#sub_actions { display: unset; }
|
#sub_actions { display: unset; }
|
||||||
@ -550,9 +547,13 @@ aside {
|
|||||||
|
|
||||||
/* Subscriptions */
|
/* Subscriptions */
|
||||||
|
|
||||||
|
#sub_subscription,
|
||||||
#user_subscription,
|
#user_subscription,
|
||||||
|
#sub_filter,
|
||||||
#user_filter,
|
#user_filter,
|
||||||
|
#sub_quicklist,
|
||||||
#user_quicklist,
|
#user_quicklist,
|
||||||
|
#sub_rss,
|
||||||
#user_rss {
|
#user_rss {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -65,11 +65,6 @@
|
|||||||
<input type="hidden" value="off" name="hide_sidebar_and_summary">
|
<input type="hidden" value="off" name="hide_sidebar_and_summary">
|
||||||
<input type="checkbox" name="hide_sidebar_and_summary" {% if prefs.hide_sidebar_and_summary == "on" %}checked{% endif %}>
|
<input type="checkbox" name="hide_sidebar_and_summary" {% if prefs.hide_sidebar_and_summary == "on" %}checked{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
<div class="prefs-group">
|
|
||||||
<label for="hide_banner">Hide subreddit banners</label>
|
|
||||||
<input type="hidden" value="off" name="hide_banner">
|
|
||||||
<input type="checkbox" name="hide_banner" {% if prefs.hide_banner == "on" %}checked{% endif %}>
|
|
||||||
</div>
|
|
||||||
<div class="prefs-group">
|
<div class="prefs-group">
|
||||||
<label for="disable_visit_reddit_confirmation">Do not confirm before visiting content on Reddit</label>
|
<label for="disable_visit_reddit_confirmation">Do not confirm before visiting content on Reddit</label>
|
||||||
<input type="hidden" value="off" name="disable_visit_reddit_confirmation">
|
<input type="hidden" value="off" name="disable_visit_reddit_confirmation">
|
||||||
@ -163,7 +158,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<div id="settings_note">
|
<div id="settings_note">
|
||||||
<p><b>Note:</b> settings and subscriptions are saved in browser cookies. Clearing your cookies will reset them.</p><br>
|
<p><b>Note:</b> settings and subscriptions are saved in browser cookies. Clearing your cookies will reset them.</p><br>
|
||||||
<p>You can restore your current settings and subscriptions after clearing your cookies using <a href="/settings/restore/?theme={{ prefs.theme }}&mascot={{ prefs.mascot }}&redsunlib_colorway={{ prefs.redsunlib_colorway }}&front_page={{ prefs.front_page }}&layout={{ prefs.layout }}&wide={{ prefs.wide }}&post_sort={{ prefs.post_sort }}&comment_sort={{ prefs.comment_sort }}&show_nsfw={{ prefs.show_nsfw }}&use_hls={{ prefs.use_hls }}&ffmpeg_video_downloads={{ prefs.ffmpeg_video_downloads }}&hide_hls_notification={{ prefs.hide_hls_notification }}&hide_awards={{ prefs.hide_awards }}&fixed_navbar={{ prefs.fixed_navbar }}&hide_sidebar_and_summary={{ prefs.hide_sidebar_and_summary}}&hide_banner={{ prefs.hide_banner}}&subscriptions={{ prefs.subscriptions.join("%2B") }}&filters={{ prefs.filters.join("%2B") }}&quicklist={{ prefs.quicklist.join("%2B") }}">this link</a>.</p>
|
<p>You can restore your current settings and subscriptions after clearing your cookies using <a href="/settings/restore/?theme={{ prefs.theme }}&mascot={{ prefs.mascot }}&redsunlib_colorway={{ prefs.redsunlib_colorway }}&front_page={{ prefs.front_page }}&layout={{ prefs.layout }}&wide={{ prefs.wide }}&post_sort={{ prefs.post_sort }}&comment_sort={{ prefs.comment_sort }}&show_nsfw={{ prefs.show_nsfw }}&use_hls={{ prefs.use_hls }}&ffmpeg_video_downloads={{ prefs.ffmpeg_video_downloads }}&hide_hls_notification={{ prefs.hide_hls_notification }}&hide_awards={{ prefs.hide_awards }}&fixed_navbar={{ prefs.fixed_navbar }}&hide_sidebar_and_summary={{ prefs.hide_sidebar_and_summary}}&subscriptions={{ prefs.subscriptions.join("%2B") }}&filters={{ prefs.filters.join("%2B") }}&quicklist={{ prefs.quicklist.join("%2B") }}">this link</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
{% if prefs.subscriptions.len() > 0 %}
|
{% if prefs.subscriptions.len() > 0 %}
|
||||||
<div class="prefs" id="settings_subs">
|
<div class="prefs" id="settings_subs">
|
||||||
|
@ -100,16 +100,8 @@
|
|||||||
<a href="/r/{{ sub.name }}/wiki/index">Wiki</a>
|
<a href="/r/{{ sub.name }}/wiki/index">Wiki</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prefs.hide_banner != "on" %}
|
|
||||||
{% block head %}
|
|
||||||
{% call super() %}
|
|
||||||
<link rel="preload" as="image" href="{{ sub.banner }}">
|
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
|
||||||
<div {% if prefs.hide_banner != "on" %}style="background: linear-gradient(to bottom, rgba(255,255,255,0) 10%, var(--outside)), url({{ sub.banner }});background-size: 100%;background-size: cover;background-position: center center;"{% endif %} id="iconbanner">
|
|
||||||
<img loading="lazy" id="sub_icon" src="{{ sub.icon }}" alt="Icon for r/{{ sub.name }}">
|
|
||||||
</div>
|
|
||||||
<div id="sub_meta">
|
<div id="sub_meta">
|
||||||
|
<img loading="lazy" id="sub_icon" src="{{ sub.icon }}" alt="Icon for r/{{ sub.name }}">
|
||||||
<h1 id="sub_title">{{ sub.title }}</h1>
|
<h1 id="sub_title">{{ sub.title }}</h1>
|
||||||
<p id="sub_name">r/{{ sub.name }}</p>
|
<p id="sub_name">r/{{ sub.name }}</p>
|
||||||
{% if crate::utils::enable_rss() %}
|
{% if crate::utils::enable_rss() %}
|
||||||
@ -128,12 +120,9 @@
|
|||||||
<div id="sub_details">
|
<div id="sub_details">
|
||||||
<label>Members</label>
|
<label>Members</label>
|
||||||
<label>Active</label>
|
<label>Active</label>
|
||||||
<label>Created</label>
|
|
||||||
<div title="{{ sub.members.1 }}">{{ sub.members.0 }}</div>
|
<div title="{{ sub.members.1 }}">{{ sub.members.0 }}</div>
|
||||||
<div title="{{ sub.active.1 }}">{{ sub.active.0 }}</div>
|
<div title="{{ sub.active.1 }}">{{ sub.active.0 }}</div>
|
||||||
<div>{{ sub.created }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<div id="sub_actions">
|
<div id="sub_actions">
|
||||||
<div id="sub_subscription">
|
<div id="sub_subscription">
|
||||||
{% if prefs.subscriptions.contains(sub.name) %}
|
{% if prefs.subscriptions.contains(sub.name) %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user