Compare commits

..

4 Commits

Author SHA1 Message Date
e18d8eb471 fix style 2024-04-05 00:35:14 +13:00
f2c7454bf4 quick build for a quick fix 2024-04-05 00:35:01 +13:00
992257a8b1 indent fuck brain not working 2024-04-04 23:01:12 +13:00
d49d32fbc6 embed images 2024-04-04 22:59:20 +13:00
6 changed files with 12 additions and 38 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
target
Dockerfile
.dockerignore
.git
.gitignore

View File

@ -11,7 +11,7 @@ FROM debian:stable
ARG TARGET
RUN apt-get update
RUN apt-get install -y ca-certificates wget
RUN apt-get install -y ca-certificates
RUN apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*

View File

@ -1,20 +0,0 @@
FROM alpine:3.19
ARG TARGET
RUN apk add --no-cache curl
RUN curl -L https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz | \
tar xz -C /usr/local/bin/
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
USER redlib
# Tell Docker to expose port 8080
EXPOSE 8080
# Run a healthcheck every minute to make sure redlib is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
CMD ["redlib"]

View File

@ -883,7 +883,8 @@ pub fn rewrite_urls(input_text: &str) -> String {
let text1 =
// Rewrite Reddit links to Redlib
REDDIT_REGEX.replace_all(input_text, r#"href="/"#)
.to_string();
.to_string()
.replace("a href=\"https://preview.redd.it", "img src=\"https://preview.redd.it");
let text1 = REDDIT_EMOJI_REGEX
.replace_all(&text1, format_url(REDDIT_EMOJI_REGEX.find(&text1).map(|x| x.as_str()).unwrap_or_default()))
.to_string()

View File

@ -1209,6 +1209,10 @@ a.search_subreddit:hover {
min-width: 0;
}
.comment_right img {
width: 50%;
}
.comment_data > * {
margin-right: 5px;
}

View File

@ -1,16 +0,0 @@
.dark {
--accent: #b4befe; /* lavender */
--green: #a6e3a1; /* green */
--text: #cdd6f4; /* text */
--foreground: #11111b; /* crust */
--background: #1e1e2e; /* base */
--outside: #11111b; /* crust */
--post: #11111b; /* crust */
--panel-border: none;
--highlighted: #313244; /* surface0 */
--visited: #6c7086; /* overlay0 */
--shadow: 0 0 0 transparent;
--nsfw: #fab387; /* peach */
--admin: #eba0ac; /* maroon */
}