<commit_before>{{title (concat "Search Results for '" q "'")}}

<div id='crates-heading' class='crate-search'>
    <div class='info'>
        <img class='magnifier' src="/assets/magnifier.png"/>
        <h1>Search Results</h1>
    </div>
    {{#if q}}
        <h2>for '{{ q }}'</h2>
    {{/if}}
</div>

<div id='results'>
    <div class='nav'>
        <span class='amt'>
            Displaying
            <span class='cur'>{{ currentPageStart }}-{{ currentPageEnd }}</span>
            of <span class='total'>{{ totalItems }}</span> total results
        </span>
    </div>

	<div class='sort'>
		<span class='small'>Sort by </span>
		
		{{#rl-dropdown-container class="dropdown-container"}}
			{{#rl-dropdown-toggle tagName="a" class="dropdown"}}
				<img class="sort" src="/assets/sort.png"/>
				{{ currentSortBy }}
				<span class='arrow'></span>
			{{/rl-dropdown-toggle}}

			{{#rl-dropdown tagName="ul" class="dropdown" closeOnChildClick="a:link"}}
				<li>
					{{#link-to (query-params page=1 sort="")}}
						Relevance
					{{/link-to}}
				</li>
				<li>
					{{#link-to (query-params page=1 sort="downloads")}}
						Downloads
					{{/link-to}}
				</li>
			{{/rl-dropdown}}
		{{/rl-dropdown-container}}
	</div>
</div>

<div id='crates' class='white-rows'>
    {{#each model as |crate|}}
        {{#if crate.exact_match}}
            <div class='exact-match'>
                <h1>Exact Match</h1>
                {{crate-row crate=crate}}
            </div>
        {{else}}
            <div>
                {{crate-row crate=crate}}
            </div>
        {{/if}}
    {{/each}}
</div>

<div class='pagination'>
    {{#link-to (query-params page=prevPage) class='prev'}}
        <img class="left-pag" src="/assets/left-pag.png"/>
    {{/link-to}}
    {{#each pages as |page|}}
        {{#link-to (query-params page=page)}}{{ page }}{{/link-to}}
    {{/each}}
    {{#link-to (query-params page=nextPage) class='next'}}
        <img class="right-pag" src="/assets/right-pag.png"/>
    {{/link-to}}
</div><commit_msg>Made the header for exact matches be a link to the crate homepage. This fixes #683<commit_after>{{title (concat "Search Results for '" q "'")}}

<div id='crates-heading' class='crate-search'>
    <div class='info'>
        <img class='magnifier' src="/assets/magnifier.png"/>
        <h1>Search Results</h1>
    </div>
    {{#if q}}
        <h2>for '{{ q }}'</h2>
    {{/if}}
</div>

<div id='results'>
    <div class='nav'>
        <span class='amt'>
            Displaying
            <span class='cur'>{{ currentPageStart }}-{{ currentPageEnd }}</span>
            of <span class='total'>{{ totalItems }}</span> total results
        </span>
    </div>

	<div class='sort'>
		<span class='small'>Sort by </span>
		
		{{#rl-dropdown-container class="dropdown-container"}}
			{{#rl-dropdown-toggle tagName="a" class="dropdown"}}
				<img class="sort" src="/assets/sort.png"/>
				{{ currentSortBy }}
				<span class='arrow'></span>
			{{/rl-dropdown-toggle}}

			{{#rl-dropdown tagName="ul" class="dropdown" closeOnChildClick="a:link"}}
				<li>
					{{#link-to (query-params page=1 sort="")}}
						Relevance
					{{/link-to}}
				</li>
				<li>
					{{#link-to (query-params page=1 sort="downloads")}}
						Downloads
					{{/link-to}}
				</li>
			{{/rl-dropdown}}
		{{/rl-dropdown-container}}
	</div>
</div>

<div id='crates' class='white-rows'>
    {{#each model as |crate|}}
        {{#if crate.exact_match}}
            <div class='exact-match'>
                {{#link-to "crate" crate}}
                    <h1>Exact Match</h1>
                {{/link-to}}
                {{crate-row crate=crate}}
            </div>
        {{else}}
            <div>
                {{crate-row crate=crate}}
            </div>
        {{/if}}
    {{/each}}
</div>

<div class='pagination'>
    {{#link-to (query-params page=prevPage) class='prev'}}
        <img class="left-pag" src="/assets/left-pag.png"/>
    {{/link-to}}
    {{#each pages as |page|}}
        {{#link-to (query-params page=page)}}{{ page }}{{/link-to}}
    {{/each}}
    {{#link-to (query-params page=nextPage) class='next'}}
        <img class="right-pag" src="/assets/right-pag.png"/>
    {{/link-to}}
</div>
{'fraction_non_alphanumeric': 0.218104062722737, 'fraction_numerical': 0.004514136374435733, 'mean_word_length': 2.368, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6403387', 'n_tokens_mistral': 1578, 'n_tokens_neox': 1441, 'n_words': 298}