summaryrefslogtreecommitdiffstats
path: root/front_end/templates/homepage.rs.html
blob: 9ae82c173a68759fed4e3c1d7c574f519b6c2c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@use crate::templates::base;
@use crate::templates::home_categories;
@use crate::home_page::HomePage;
@use crate::home_page::HomeCategory;
@use crate::Urler;

@(home: &HomePage, categories: &[HomeCategory], url: &Urler)

@:base(&home.page(), {
    <header id="home">
        <div class="inner-col" role="banner">
            <h1><a href="/about">Lib.rs</a></h1>
            <p>Index of @home.total_crates() <a href="https://rust-lang.org">Rust</a> libraries and applications. Fast, lightweight, opinionated, unofficial alternative to crates.io. <a class="linky" href="/about">More…</a></p>
            <form role="search" id=search method="get" action="/search">
                <input autofocus placeholder="name, keywords, description" autocapitalize="off" autocorrect="off" autocomplete="off" tabindex="1" type=search name=q><button type=submit>Search</button>
            </form>
            <nav>
                <ul><li class="active">Categories</li>
                <li><a href="/new">New and trending</a></li>
            </ul></nav>
        </div>
    </header>

    <main>
        <section id="home-categories">
            <nav class="inner-col">
                <ul class=cat>
                @:home_categories(categories, url, true)
                </ul>
            </nav>
        </section>
    </main>

    <footer>
        <div class="inner-col" role="contentinfo">
        <p><a href="/about">About the site</a>. By <a href=https://kornel.ski>kornelski</a>. (<a href="https://gitlab.com/crates.rs?sort=stars_desc">Source code</a>). <a href="/atom.xml">Feed</a>. <a href="https://gitlab.com/crates.rs/crates.rs/issues/new">Feedback and feature requests</a> are welcome!</p></div></footer>
})