Skip to content

Commit

Permalink
Merge pull request #989 from HackTricks-wiki/add-language-selector
Browse files Browse the repository at this point in the history
fixes language ui
  • Loading branch information
carlospolop authored Jan 3, 2025
2 parents f5fd0a0 + e6b5d5b commit 3741dd6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
17 changes: 17 additions & 0 deletions theme/css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ body.sidebar-visible #menu-bar {
}

/* Languages Menu Popup */

@media only screen and (max-width:799px) {
#menubar-languages-toggle span {
display: none !important;
}
}

#menubar-languages-toggle {
position: relative;
}
Expand Down Expand Up @@ -244,6 +251,11 @@ html:not(.js) .left-buttons button {
cursor: pointer;
color: var(--fg);
}
@media only screen and (max-width:799px) {
.menu-title {
font-size: 1.4rem;
}
}

.menu-bar,
.menu-bar:visited,
Expand Down Expand Up @@ -633,6 +645,11 @@ ul#searchresults li a span.teaser em {
color: var(--sidebar-fg);
}
}
@media only screen and (min-width:1440px) {
#sidebar-toggle{
display: none !important;
}
}
@media only screen and (max-width:549px) {
.sidebar {
position: fixed;
Expand Down
7 changes: 4 additions & 3 deletions theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@

<div id="menubar-languages-toggle" class="icon-button" type="button" title="Translations" aria-label="Toggle Tanslations" aria-expanded="false" aria-controls="translations">
<i class="fa fa-globe"></i>
<span class="menu-bar-link">Translations</span>

<div id="menubar-languages-popup" class="menubar-languages-popup" aria-label="Language menu" role="language menu">
<button id="af" role="menuitem" class="menu-bar-link">Afrikaans</button>
<button id="zh" role="menuitem" class="menu-bar-link">Chinese</button>
<button id="en" role="menuitem" class="menu-bar-link">English</button>
<button id="es" role="menuitem" class="menu-bar-link">Spanish</button>
<button id="fr" role="menuitem" class="menu-bar-link">French</button>
<button id="de" role="menuitem" class="menu-bar-link">German</button>
<button id="el" role="menuitem" class="menu-bar-link">Greek</button>
Expand All @@ -190,11 +192,10 @@
<button id="pl" role="menuitem" class="menu-bar-link">Polish</button>
<button id="pt" role="menuitem" class="menu-bar-link">Portuguese</button>
<button id="sr" role="menuitem" class="menu-bar-link">Serbian</button>
<button id="es" role="menuitem" class="menu-bar-link">Spanish</button>
<button id="sw" role="menuitem" class="menu-bar-link">Swahili</button>
<button id="tr" role="menuitem" class="menu-bar-link">Turkish</button>
<button id="uk" role="menuitem" class="menu-bar-link">Ukrainian</button>
<button id="af" role="menuitem" class="menu-bar-link">Afrikaans</button>
<button id="zh" role="menuitem" class="menu-bar-link">Chinese</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 3741dd6

Please sign in to comment.