Default Comment Sort Setting

This commit is contained in:
spikecodes 2021-01-07 08:38:05 -08:00
parent 7e96bb3d80
commit 3444989f9a
13 changed files with 77 additions and 42 deletions

View file

@ -11,7 +11,7 @@
<link rel="stylesheet" href="/style.css">
{% endblock %}
</head>
<body {% if layout != "" %}id="{{ layout }}"{% endif %}>
<body id="{% block layout %}{% endblock %}">
<!-- NAVIGATION BAR -->
<nav>
<p id="logo">

View file

@ -88,7 +88,7 @@
<!-- SORT FORM -->
<form id="sort">
<select name="sort">
{% call utils::options(sort, ["confidence", "top", "new", "controversial", "old"], "") %}
{% call utils::options(sort, ["confidence", "top", "new", "controversial", "old"], "confidence") %}
</select><input id="sort_submit" type="submit" value="&rarr;">
</form>

View file

@ -3,6 +3,8 @@
{% block title %}Libreddit: search results - {{ params.q }}{% endblock %}
{% block layout %}{% if layout != "" %}{{ layout }}{% endif %}{% endblock %}
{% block content %}
<div id="column_one">
<form id="search_sort">

View file

@ -11,10 +11,18 @@
<main>
<form id="settings" action="/settings" method="POST">
<div id="prefs">
<label for="layout">Layout:</label>
<select name="layout">
{% call utils::options(layout, ["card", "clean", "compact"], "clean") %}
</select>
<div id="layout">
<label for="layout">Layout:</label>
<select name="layout">
{% call utils::options(layout, ["card", "clean", "compact"], "clean") %}
</select>
</div>
<div id="comment_sort">
<label for="comment_sort">Default comment sort:</label>
<select name="comment_sort">
{% call utils::options(comment_sort, ["confidence", "top", "new", "controversial", "old"], "confidence") %}
</select>
</div>
</div>
<input id="save" type="submit" value="Save">
</form>

View file

@ -11,6 +11,8 @@
{% call utils::search(["/r/", sub.name.as_str()].concat(), "") %}
{% endblock %}
{% block layout %}{% if layout != "" %}{{ layout }}{% endif %}{% endblock %}
{% block body %}
<main>
<div id="column_one">

View file

@ -6,6 +6,9 @@
{% endblock %}
{% block title %}{{ user.name.replace("u/", "") }} (u/{{ user.name }}) - Libreddit{% endblock %}
{% block layout %}{% if layout != "" %}{{ layout }}{% endif %}{% endblock %}
{% block body %}
<main style="max-width: 1000px;">
<div id="column_one">