1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00

Show the links when no JS on mobile

This commit is contained in:
Timur Ismagilov 2021-07-15 22:46:23 +05:00
parent b989956acb
commit e7ddb54877
3 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,8 @@ let wrapper = document.getElementsByClassName("top-bar__wrapper")[0],
highlights = document.getElementsByClassName("top-bar__section_highlights")[0]
const toggleElement = el => el.classList.toggle("top-bar__section_hidden-on-mobile")
toggleElement(auth)
toggleElement(highlights)
let hamburger = document.createElement("button")
hamburger.classList.add("top-bar__hamburger")

View File

@ -31,7 +31,7 @@
</form>
</li>
{% if cfg.UseAuth %}
<li class="top-bar__section top-bar__section_auth top-bar__section_hidden-on-mobile">
<li class="top-bar__section top-bar__section_auth">
<ul class="top-bar__auth auth-links">
<li class="auth-links__box auth-links__user-box">
{% if u.Group == "anon" %}
@ -53,7 +53,7 @@
</ul>
</li>
{% endif %}
<li class="top-bar__section top-bar__section_highlights top-bar__section_hidden-on-mobile">
<li class="top-bar__section top-bar__section_highlights">
<ul class="top-bar__highlights">
{%- for _, link := range cfg.HeaderLinks -%}
{% if link.Href != "/" %}

View File

@ -82,7 +82,7 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User,
if cfg.UseAuth {
//line views/stuff.qtpl:33
qw422016.N().S(`
<li class="top-bar__section top-bar__section_auth top-bar__section_hidden-on-mobile">
<li class="top-bar__section top-bar__section_auth">
<ul class="top-bar__auth auth-links">
<li class="auth-links__box auth-links__user-box">
`)
@ -148,7 +148,7 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User,
}
//line views/stuff.qtpl:55
qw422016.N().S(`
<li class="top-bar__section top-bar__section_highlights top-bar__section_hidden-on-mobile">
<li class="top-bar__section top-bar__section_highlights">
<ul class="top-bar__highlights">
`)
//line views/stuff.qtpl:58