diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-27 09:38:35 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-27 12:53:39 +0100 |
commit | 49a32ffc906ac66b30bab56c450e8f9cb4f85866 (patch) | |
tree | 1999cd8a892468ac73a07b8a4c31c7406666693f | |
parent | b60d58b4875aea58106c65faa2753dede70152f1 (diff) |
search: start implementing search
-rwxr-xr-x | build.py | 1 | ||||
-rw-r--r-- | head.html | 8 | ||||
-rw-r--r-- | script.js | 6 | ||||
-rw-r--r-- | style.css | 15 |
4 files changed, 29 insertions, 1 deletions
@@ -32,6 +32,7 @@ unstable_features = get_features('unstable') os.makedirs('target', exist_ok=True) shutil.copy('style.css', 'target') +shutil.copy('script.js', 'target') with open('target/data.json', 'w') as f: json.dump(dict(unstable=unstable_features, versions=versions), f) @@ -7,7 +7,13 @@ </head> <body> -<h1>Rust features</h1> +<div class=header> +<div class=left><h1>Rust features</h1></div> +<input id=search autofocus autocomplete=off> +<script src=script.js></script> +<div class=right></div> +</div> +<div style="clear: both"></div> page generated by <a href="https://push-f.com/">push-f</a> from the <a href="https://github.com/jplatte/caniuse.rs">TOML files</a> @@ -0,0 +1,6 @@ +(async function(){ + const res = await fetch('data.json'); + const data = await res.json(); + + // TODO: implement search +})(); @@ -13,3 +13,18 @@ li { code { font-size: 1.1em; } + +.header { + display: flex; + padding-top: 0.5em; + padding-bottom: 1em; +} + +.left, .right { + flex: 1; +} + +h1 { + margin-top: 0; + margin-bottom: 0; +} |