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");
|
||||
if (form) {
|
||||
form.style.display = "block";
|
||||
let postsByDate = document.getElementById("posts");
|
||||
let postsByName = document.createElement("div");
|
||||
populateByName(postsByDate, postsByName);
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
there are no posts right now. check back later!<!-- prettier-br -->
|
||||
{% else %}<!-- prettier-br -->
|
||||
{% if js %}<!-- prettier-br -->
|
||||
sort by:
|
||||
<form id="sort">
|
||||
<form id="sort" style="display: none">
|
||||
sort by: <br />
|
||||
<input type="radio" name="sort" id="sort-date" value="date" {% if sort == Sort::Date %} checked {% endif %} />
|
||||
<label for="sort-date">date</label>
|
||||
<input type="radio" name="sort" id="sort-name" value="name" {% if sort == Sort::Name %} checked {% endif %} />
|
||||
|
|
Loading…
Reference in a new issue