summaryrefslogtreecommitdiffstats
path: root/front_end/templates/trending.rs.html
blob: 109029147cd3756269bd02ea3da4e69c04f2a9fb (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
38
39
40
41
42
43
44
45
@use crate::templates::simple_list_html;
@use crate::templates::base;
@use crate::Page;
@use kitchen_sink::RichCrateVersion;
@use kitchen_sink::RichCrate;
@use crate::Urler;
@use std::sync::Arc;
@use render_readme::Renderer;

@(page: &Page, trending: &[(Arc<RichCrateVersion>, RichCrate)], updated: &[(Arc<RichCrateVersion>, RichCrate)], url: &Urler, markup: &Renderer)

@:base(page, {
    <header id="home">
        <div class="inner-col" role="banner">
            <h1><a href="/">Lib.rs</a> › New</h1>
            <form role="search" id=search method="get" action="/search">
                <input 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><a href="/">Categories</a></li>
                <li  class="active">New and trending</li>
            </ul></nav>
        </div>
    </header>

    <main id="trending">
        <div class="inner-col">
        <section class="new">
            <h3>Notable new releases</h3>
            <ul class="crates-list">
                @:simple_list_html(updated, url, markup, true)
            </ul>
        </section>
        <section class="trending">
            <h3>Trending this month</h3>
            <ul class="crates-list">
                @:simple_list_html(trending, url, markup, false)
            </ul>
        </section>
    </main>

    <footer>
        <div class="inner-col" role="contentinfo">
        <p><a href="/">All categories</a>. <a href="/about">About the site</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> By <a href=https://kornel.ski>kornelski</a>.</div></footer>
})