Skip to content

Commit

Permalink
WIP: Remove template
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Apr 10, 2020
1 parent 58b333b commit 85d947b
Showing 1 changed file with 0 additions and 146 deletions.
146 changes: 0 additions & 146 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,146 +0,0 @@
<HeadLayout />

{{title "crates.io: Rust Package Registry" separator=' - ' prepend=true}}

<div local-class="application">
<nav local-class="header">
<LinkTo @route="index" @tabindex="-1">
<img src="/assets/Cargo-Logo-Small.png" height="100" width="100" alt="Cargo Logo">
</LinkTo>
<LinkTo @route="index">
<h1>
crates.io
<span local-class="subtitle">Rust Package Registry</span>
</h1>
</LinkTo>

<form local-class="desktop-search-form" action='/search' {{ action "search" on="submit" }} data-test-search-form>
<input
type="text"
local-class="search"
name="q"
id="cargo-desktop-search"
placeholder="Click or press 'S' to search..."
value={{this.searchQuery}}
oninput={{action (mut this.searchQuery) value="target.value"}}
autocorrect="off"
autocapitalize="off"
autofocus="autofocus"
spellcheck="false"
required
data-test-search-input
>
<label for="cargo-desktop-search" local-class="search-label">Search</label>
</form>

<div local-class='nav'>
<LinkTo @route="crates" @query={{hash letter=null page=1}} data-test-all-crates-link>
Browse All Crates
</LinkTo>
<span local-class="sep">|</span>
<Dropdown as |dd|>
<dd.Trigger local-class="dropdown-button">
Docs
</dd.Trigger>

<dd.Menu local-class="doc-links" as |menu|>
<menu.Item><a href='https://doc.rust-lang.org/cargo/getting-started/'>Getting Started</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/guide/'>Guide</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html'>Specifying Dependencies</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/publishing.html'>Publishing on crates.io</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/faq.html'>FAQ</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/manifest.html'>Cargo.toml Format</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/build-scripts.html'>Build Scripts</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/config.html'>Configuration</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/pkgid-spec.html'>Package ID specs</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/environment-variables.html'>Environment Variables</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/source-replacement.html'>Source Replacement</a></menu.Item>
<menu.Item><a href='https://doc.rust-lang.org/cargo/reference/external-tools.html'>External Tools</a></menu.Item>
<menu.Item><LinkTo @route="policies">Policies</LinkTo></menu.Item>
<menu.Item><LinkTo @route="category-slugs">List of category slugs</LinkTo></menu.Item>
</dd.Menu>
</Dropdown>
<span local-class="sep">|</span>
{{#if this.session.currentUser}}
<Dropdown data-test-user-menu as |dd|>
<dd.Trigger local-class="dropdown-button" data-test-toggle>
<UserAvatar @user={{this.session.currentUser}} @size="small" data-test-avatar />
{{ this.session.currentUser.name }}
</dd.Trigger>

<dd.Menu local-class="current-user-links" as |menu|>
<menu.Item><LinkTo @route="dashboard">Dashboard</LinkTo></menu.Item>
<menu.Item><LinkTo @route="me">Account Settings</LinkTo></menu.Item>
<menu.Item><LinkTo @route="me.pending-invites">Owner Invites</LinkTo></menu.Item>
<menu.Item local-class="menu-item-with-separator"><LinkTo @route="logout">Sign Out</LinkTo></menu.Item>
</dd.Menu>
</Dropdown>
{{else}}
<LinkTo @route="login" data-test-login-link>
{{svg-jar "lock"}}
Log in with GitHub
</LinkTo>
{{/if}}
</div>

<div local-class='menu'>
<Dropdown as |dd|>
<dd.Trigger local-class="dropdown-button">
Menu
</dd.Trigger>
<dd.Menu local-class="current-user-links" as |menu|>
<menu.Item><LinkTo @route="crates">Browse All Crates</LinkTo></menu.Item>
{{#if this.session.currentUser}}
<menu.Item><LinkTo @route="dashboard">Dashboard</LinkTo></menu.Item>
<menu.Item><LinkTo @route="me" data-test-me-link>Account Settings</LinkTo></menu.Item>
<menu.Item><LinkTo @route="me.pending-invites">Owner Invites</LinkTo></menu.Item>
<menu.Item local-class="menu-item-with-separator"><LinkTo @route="logout">Sign Out</LinkTo></menu.Item>
{{else}}
<menu.Item><LinkTo @route="login">Log in with GitHub</LinkTo></menu.Item>
{{/if}}
</dd.Menu>
</Dropdown>
</div>
</nav>

<form local-class='mobile-search' action='/search' {{ action "search" on="submit" }} >
<input
type="text"
local-class="search"
name="q"
id="cargo-mobile-search"
placeholder="Search"
value={{this.searchQuery}}
oninput={{action (mut this.searchQuery) value="target.value"}}
autocorrect="off"
required
>
<label for="cargo-mobile-search" local-class="search-label">Search</label>
</form>

<main local-class="main">
<FlashMessage @message={{this.flashMessages.message}} />

{{outlet}}
</main>

<footer local-class='after-main-links'>
<a href='https://doc.rust-lang.org/cargo/getting-started/installation.html'>Install</a>
<span local-class="sep">|</span>
<a href='https://doc.rust-lang.org/cargo/'>Getting Started</a>
<span local-class="sep">|</span>
<a href='https://doc.rust-lang.org/cargo/guide/'>Guide</a>
<span local-class="sep">|</span>
<a href='mailto:[email protected]'>Send us an email</a>
<span local-class="sep">|</span>
<a href='https://www.rust-lang.org/policies/security'>Report a security issue</a>
<span local-class="sep">|</span>
<a href='https://www.rust-lang.org/policies/privacy'>Privacy notice</a>
<span local-class="sep">|</span>
<LinkTo @route="policies">Policies</LinkTo>
</footer>

<a href='https://github.com/rust-lang/crates.io' local-class='fork-me'>
<img src='/assets/forkme.png' alt="Fork me on GitHub">
</a>
</div>

0 comments on commit 85d947b

Please sign in to comment.