Skip to content

Make right-side menus onclick. #1096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/header/package_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 id="crate-title">
{# If there are platforms, show a dropdown with them #}
{%- if platforms -%}
<ul class="pure-menu-list platforms-menu">
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
<li class="pure-menu-item pure-menu-has-children">
<a href="#" class="pure-menu-link">Platform</a>
<ul class="pure-menu-children">
{%- for platform in platforms -%}
Expand Down
20 changes: 14 additions & 6 deletions templates/header/topbar_begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,29 @@
</a>

<ul class="pure-menu-list pure-menu-right">
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover pure-menu-opt-children">
<a href="/about" class="pure-menu-link">
<li class="pure-menu-item pure-menu-has-children pure-menu-opt-children">
<a href="#" class="pure-menu-link">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keeping this element then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I removed the <a> tag and just had the text "About", clicks on "About" didn't do anything.

<span title="About">{{ "info-circle" | fas }}</span>
<span class="title">About</span>
</a>

<ul class="pure-menu-children">
{{ macros::menu_link(href="/about", text="About") }}
{{ macros::menu_link(href="/about/badges", text="Badges") }}
{{ macros::menu_link(href="/about/builds", text="Builds") }}
{{ macros::menu_link(href="/about/metadata", text="Metadata") }}
{{ macros::menu_link(href="/about/redirections", text="Shorthand URLs") }}
</ul>
</li>{#

#}<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover pure-menu-opt-children">
<a href="/releases" class="pure-menu-link">
#}<li class="pure-menu-item pure-menu-has-children pure-menu-opt-children">
<a href="#" class="pure-menu-link">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keeping this element?

<span title="Releases">{{ "leaf" | fas }}</span>
<span class="title">Releases</span>
</a>

<ul class="pure-menu-children">
{{ macros::menu_link(href="/releases", text="Releases by Recency") }}
{{ macros::menu_link(href="/releases/stars", text="Releases by Stars") }}
{{ macros::menu_link(href="/releases/recent-failures", text="Recent Build Failures") }}
{{ macros::menu_link(href="/releases/failures", text="Build Failures by Stars") }}
Expand All @@ -58,12 +60,18 @@
</li>{#

The Rust dropdown menu
#}<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover pure-menu-opt">
<a href="https://www.rust-lang.org/" target="_blank" class="pure-menu-link">
#}<li class="pure-menu-item pure-menu-has-children pure-menu-opt">
<a href="#" target="_blank" class="pure-menu-link">
Rust
</a>

<ul class="pure-menu-children">
{{ macros::menu_link(
href="https://www.rust-lang.org/",
text="Rust-Lang.org",
target="_blank"
) }}

{{ macros::menu_link(
href="https://doc.rust-lang.org/book/",
text="The Book",
Expand Down