Compare commits

...

4 Commits

6 changed files with 26 additions and 15 deletions

View File

@ -23,6 +23,10 @@ jobs:
- name: Build - name: Build
run: cargo build --release run: cargo build --release
- name: Publish to crates.io
continue-on-error: true
run: cargo publish --no-verify --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
- uses: actions/upload-artifact@v2.2.1 - uses: actions/upload-artifact@v2.2.1
name: Upload a Build Artifact name: Upload a Build Artifact
with: with:

2
Cargo.lock generated
View File

@ -572,7 +572,7 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
[[package]] [[package]]
name = "libreddit" name = "libreddit"
version = "0.20.4" version = "0.20.5"
dependencies = [ dependencies = [
"askama", "askama",
"async-recursion", "async-recursion",

View File

@ -3,7 +3,7 @@ name = "libreddit"
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/spikecodes/libreddit" repository = "https://github.com/spikecodes/libreddit"
version = "0.20.4" version = "0.20.5"
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
edition = "2021" edition = "2021"

View File

@ -596,7 +596,7 @@ pub fn format_url(url: &str) -> String {
"external-preview.redd.it" => capture(r"https://external\-preview\.redd\.it/(.*)", "/preview/external-pre/", 1), "external-preview.redd.it" => capture(r"https://external\-preview\.redd\.it/(.*)", "/preview/external-pre/", 1),
"styles.redditmedia.com" => capture(r"https://styles\.redditmedia\.com/(.*)", "/style/", 1), "styles.redditmedia.com" => capture(r"https://styles\.redditmedia\.com/(.*)", "/style/", 1),
"www.redditstatic.com" => capture(r"https://www\.redditstatic\.com/(.*)", "/static/", 1), "www.redditstatic.com" => capture(r"https://www\.redditstatic\.com/(.*)", "/static/", 1),
_ => String::new(), _ => url.to_string(),
} }
}) })
} }

View File

@ -488,7 +488,7 @@ aside {
/* Sorting and Search */ /* Sorting and Search */
select, #search, #sort_options, #inside, #searchbox > *, #sort_submit { select, #search, #sort_options, #inside, #searchbox > *, #sort_submit {
height: 40px; height: 38px;
} }
.search_label { .search_label {
@ -505,7 +505,7 @@ select {
select, #search { select, #search {
border: none; border: none;
padding: 0 15px; padding: 0 10px;
appearance: none; appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
@ -593,6 +593,7 @@ button.submit:hover > svg { stroke: var(--accent); }
#sort_options, footer > a { #sort_options, footer > a {
border-radius: 5px; border-radius: 5px;
align-items: center;
box-shadow: var(--shadow); box-shadow: var(--shadow);
background: var(--outside); background: var(--outside);
display: flex; display: flex;
@ -719,7 +720,7 @@ a.search_subreddit:hover {
} }
.post_score { .post_score {
padding-top: 16px; padding-top: 19px;
padding-left: 12px; padding-left: 12px;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
@ -1180,12 +1181,10 @@ summary.comment_data {
color: var(--accent); color: var(--accent);
} }
.prefs { .prefs {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center;
padding: 20px; padding: 20px;
background: var(--post); background: var(--post);
border-radius: 5px; border-radius: 5px;
@ -1198,11 +1197,19 @@ summary.comment_data {
width: 100%; width: 100%;
height: 35px; height: 35px;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 7px;
} }
.prefs > p { .prefs legend {
font-weight: 500; font-weight: 500;
border-bottom: 1px solid var(--highlighted);
font-size: 18px;
padding-bottom: 10px;
}
.prefs legend:not(:first-child) {
padding-top: 10px;
margin-top: 15px;
} }
.prefs select { .prefs select {

View File

@ -11,14 +11,14 @@
<div id="settings"> <div id="settings">
<form action="/settings" method="POST"> <form action="/settings" method="POST">
<div class="prefs"> <div class="prefs">
<p>Appearance</p> <legend>Appearance</legend>
<div id="theme"> <div id="theme">
<label for="theme">Theme:</label> <label for="theme">Theme:</label>
<select name="theme"> <select name="theme">
{% call utils::options(prefs.theme, ["system", "light", "dark", "black", "dracula", "nord", "laserwave", "violet", "gold", "rosebox"], "system") %} {% call utils::options(prefs.theme, ["system", "light", "dark", "black", "dracula", "nord", "laserwave", "violet", "gold", "rosebox"], "system") %}
</select> </select>
</div> </div>
<p>Interface</p> <legend>Interface</legend>
<div id="front_page"> <div id="front_page">
<label for="front_page">Front page:</label> <label for="front_page">Front page:</label>
<select name="front_page"> <select name="front_page">
@ -36,7 +36,7 @@
<input type="hidden" value="off" name="wide"> <input type="hidden" value="off" name="wide">
<input type="checkbox" name="wide" {% if prefs.wide == "on" %}checked{% endif %}> <input type="checkbox" name="wide" {% if prefs.wide == "on" %}checked{% endif %}>
</div> </div>
<p>Content</p> <legend>Content</legend>
<div id="post_sort"> <div id="post_sort">
<label for="post_sort" title="Applies only to subreddit feeds">Default subreddit post sort:</label> <label for="post_sort" title="Applies only to subreddit feeds">Default subreddit post sort:</label>
<select name="post_sort"> <select name="post_sort">
@ -79,7 +79,7 @@
</form> </form>
{% if prefs.subscriptions.len() > 0 %} {% if prefs.subscriptions.len() > 0 %}
<div class="prefs" id="settings_subs"> <div class="prefs" id="settings_subs">
<p>Subscribed Feeds</p> <legend>Subscribed Feeds</legend>
{% for sub in prefs.subscriptions %} {% for sub in prefs.subscriptions %}
<div> <div>
{% let feed -%} {% let feed -%}
@ -94,7 +94,7 @@
{% endif %} {% endif %}
{% if !prefs.filters.is_empty() %} {% if !prefs.filters.is_empty() %}
<div class="prefs" id="settings_filters"> <div class="prefs" id="settings_filters">
<p>Filtered Feeds</p> <legend>Filtered Feeds</legend>
{% for sub in prefs.filters %} {% for sub in prefs.filters %}
<div> <div>
{% let feed -%} {% let feed -%}