dont show sort form if there is no javascript
This commit is contained in:
parent
5dcaf85984
commit
2a4bef84b1
2 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ replaceDates();
|
||||||
|
|
||||||
let form = document.getElementById("sort");
|
let form = document.getElementById("sort");
|
||||||
if (form) {
|
if (form) {
|
||||||
|
form.style.display = "block";
|
||||||
let postsByDate = document.getElementById("posts");
|
let postsByDate = document.getElementById("posts");
|
||||||
let postsByName = document.createElement("div");
|
let postsByName = document.createElement("div");
|
||||||
populateByName(postsByDate, postsByName);
|
populateByName(postsByDate, postsByName);
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
there are no posts right now. check back later!<!-- prettier-br -->
|
there are no posts right now. check back later!<!-- prettier-br -->
|
||||||
{% else %}<!-- prettier-br -->
|
{% else %}<!-- prettier-br -->
|
||||||
{% if js %}<!-- prettier-br -->
|
{% if js %}<!-- prettier-br -->
|
||||||
sort by:
|
<form id="sort" style="display: none">
|
||||||
<form id="sort">
|
sort by: <br />
|
||||||
<input type="radio" name="sort" id="sort-date" value="date" {% if sort == Sort::Date %} checked {% endif %} />
|
<input type="radio" name="sort" id="sort-date" value="date" {% if sort == Sort::Date %} checked {% endif %} />
|
||||||
<label for="sort-date">date</label>
|
<label for="sort-date">date</label>
|
||||||
<input type="radio" name="sort" id="sort-name" value="name" {% if sort == Sort::Name %} checked {% endif %} />
|
<input type="radio" name="sort" id="sort-name" value="name" {% if sort == Sort::Name %} checked {% endif %} />
|
||||||
|
|
Loading…
Reference in a new issue