Browse Source

minor accessibility improvements

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
a54da04094
  1. 20
      views/layout.pug

20
views/layout.pug

@ -1,5 +1,5 @@
doctype html doctype html
html html(lang="en")
head head
meta(charset="utf-8") meta(charset="utf-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no") meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no")
@ -29,10 +29,10 @@ html
a(class="navbar-brand", href="/") a(class="navbar-brand", href="/")
span span
if (coinConfig.logoUrl) if (coinConfig.logoUrl)
img(src=coinConfig.logoUrl, class="header-image") img(src=coinConfig.logoUrl, class="header-image", alt="logo")
span #{coinConfig.siteTitle} span #{coinConfig.siteTitle}
button(type="button", class="navbar-toggler navbar-toggler-right", data-toggle="collapse", data-target="#navbarNav") button(type="button", class="navbar-toggler navbar-toggler-right", data-toggle="collapse", data-target="#navbarNav", aria-label="collapse navigation")
span(class="navbar-toggler-icon") span(class="navbar-toggler-icon")
div(class="collapse navbar-collapse", id="navbarNav") div(class="collapse navbar-collapse", id="navbarNav")
@ -44,12 +44,12 @@ html
if (config.headerDropdownLinks) if (config.headerDropdownLinks)
li(class="nav-item dropdown") li(class="nav-item dropdown")
a(class="nav-link dropdown-toggle", href="javascript:void(0)", id="navbarDropdown", role="button", data-toggle="dropdown", aria-haspopup="true", aria-expanded="false") a(class="nav-link dropdown-toggle", href="javascript:void(0)", role="button", data-toggle="dropdown", aria-haspopup="true", aria-expanded="false")
span #{config.headerDropdownLinks.title} span #{config.headerDropdownLinks.title}
div(class="dropdown-menu", aria-labelledby="navbarDropdown") div(class="dropdown-menu", aria-label=(config.headerDropdownLinks.title + " Items"))
each item in config.headerDropdownLinks.links each item in config.headerDropdownLinks.links
a(class="dropdown-item", href=item.url) a(class="dropdown-item", href=item.url)
img(src=item.imgUrl, style="width: 24px; height: 24px; margin-right: 8px;") img(src=item.imgUrl, style="width: 24px; height: 24px; margin-right: 8px;", alt=item.name)
span #{item.name} span #{item.name}
li(class="nav-item dropdown") li(class="nav-item dropdown")
@ -136,11 +136,11 @@ html
div(class="mt-2") div(class="mt-2")
- var demoSiteCoins = ["BTC", "LTC"]; - var demoSiteCoins = ["BTC", "LTC"];
each demoSiteCoin in demoSiteCoins each demoSiteCoin in demoSiteCoins
a(href=coinConfigs[demoSiteCoin].demoSiteUrl, class="mr-2") a(href=coinConfigs[demoSiteCoin].demoSiteUrl, class="mr-2", title=coinConfigs[demoSiteCoin].siteTitle)
img(src=("/img/logo/" + demoSiteCoin.toLowerCase() + ".svg")) img(src=("/img/logo/" + demoSiteCoin.toLowerCase() + ".svg"), alt=demoSiteCoin.toLowerCase())
a(href="https://lightning.chaintools.io", class="mr-2") a(href="https://lightning.chaintools.io", class="mr-2", title="Lightning Explorer")
img(src=("/img/logo/lightning.svg"), style="width: 32px; height: 32px;") img(src=("/img/logo/lightning.svg"), style="width: 32px; height: 32px;", alt="lightning")
div(class="col-md-7 text-md-right") div(class="col-md-7 text-md-right")
dl dl

Loading…
Cancel
Save