3 <!-- Completely hide the TOC and the section numbers -->
4 <style type="text/css">
5 #TOC { display: none; }
6 .header-section-number { display: none; }
7 li {list-style-type: none; }
9 width: calc(100% - 200px);
14 .search-but, .search-input {
16 border: 1px solid #ccc;
20 background-color: #fff;
22 .search-but:hover, .search-input:focus {
23 border-color: #55a9ff;
27 Looks like you've taken a wrong turn.
29 Some things that might be helpful to you though:
34 <form action="std/index.html" method="get">
35 <input id="std-search" class="search-input" type="search" name="search"
36 placeholder="Search through the standard library"/>
37 <button class="search-but">Search Standard Library</button>
42 <form action="https://duckduckgo.com/">
43 <input id="site-search" class="search-input" type="search" name="q"></input>
44 <input type="submit" value="Search DuckDuckGo" class="search-but">
50 * [The Rust official site](https://www.rust-lang.org)
51 * [The Rust reference](https://doc.rust-lang.org/reference/index.html)
55 [The standard library](https://doc.rust-lang.org/std/)
58 function get_url_fragments() {
59 var last = document.URL.split("/").pop();
60 var tokens = last.split(".");
62 for (var i=0; i < tokens.length; i++) {
64 if (t == 'html' || t.indexOf("#") != -1) {
73 function populate_site_search() {
74 var op = get_url_fragments();
76 var search = document.getElementById('site-search');
77 search.value = op.join(' ') + " site:doc.rust-lang.org";
80 function populate_rust_search() {
81 var op = get_url_fragments();
82 document.getElementById('std-search').value = op.join(' ');
84 populate_site_search();
85 populate_rust_search();