Title, logo and netlify link (#14)

This commit is contained in:
Cecile Tonglet 2020-09-24 18:05:00 +02:00 committed by GitHub
parent 5cb8e75271
commit f150225017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 3 deletions

View file

@ -1,8 +1,5 @@
[![Build Status](https://travis-ci.org/cecton/yewprint.svg?branch=main)](https://travis-ci.org/cecton/yewprint)
[![Netlify Status](https://api.netlify.com/api/v1/badges/17f076ed-49e5-4185-921e-5c5759de2fdb/deploy-status)](https://app.netlify.com/sites/epic-poincare-f8adaa/deploys)
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
![Demo](https://github.com/cecton/blueprint-rs/blob/main/demo.mp4?raw=true)

View file

@ -53,6 +53,23 @@ impl Component for App {
<div class=class>
<div class="docs-nav-wrapper">
<div class="docs-nav">
<div class="docs-nav-title">
<a class="docs-logo" href="/">
{crate::include_raw_html!("logo.svg")}
</a>
<div>
<div class="docs-heading">
{"Yewprint"}
</div>
<a
class="bp3-text-muted"
href="https://github.com/cecton/yewprint"
target="_blank"
>
<small>{"View on GitHub"}</small>
</a>
</div>
</div>
<Menu>
<MenuItem
text={html!("Button")}
@ -79,6 +96,14 @@ impl Component for App {
onclick=self.link.callback(|_| Msg::GoToMenu(DocMenu::Tree))
/>
</Menu>
<div class="docs-nav-sponsors">
<a href="https://www.netlify.com">
<img
src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg"
alt="Deploys by Netlify"
/>
</a>
</div>
</div>
</div>
<main class="docs-content-wrapper" role="main">

View file

@ -36,6 +36,23 @@ macro_rules! log {
}};
}
#[cfg(feature = "doc")]
#[macro_export]
macro_rules! include_raw_html {
($file:expr) => {{
yew::virtual_dom::VNode::VRef(yew::web_sys::Node::from({
let div = web_sys::window()
.unwrap()
.document()
.unwrap()
.create_element("span")
.unwrap();
div.set_inner_html(include_str!($file));
div
}))
}};
}
#[cfg(feature = "doc")]
#[wasm_bindgen::prelude::wasm_bindgen(start)]
pub fn run_app() -> Result<(), wasm_bindgen::JsValue> {

1
src/logo.svg Normal file
View file

@ -0,0 +1 @@
<svg width="17.895mm" height="20.47mm" version="1.1" viewBox="0 0 17.895 20.47" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-52.12 -47.149)"><circle cx="61.221" cy="57.026" r="6.6146" fill="#ffefb8" stroke-width=".26458"/><g stroke-width=".26458"><path d="m60.171 47.622 0.576-0.33179a1.0583 1.0583 0 0 1 1.0687 0.0071l7.4168 4.4035a1.0583 1.0583 0 0 1 0.51779 0.91017v8.8493a1.0583 1.0583 0 0 1-0.51805 0.91017l-7.4163 4.4037a1.0583 1.0583 0 0 1-1.0687 0.0071l-7.6647-4.4132a1.0583 1.0583 0 0 1-0.53022-0.91731v-8.8302a1.0583 1.0583 0 0 1 0.53022-0.91731l7.0882-4.0812zm0.84005 0.127-0.13203-0.22939v-0.26458h0.99007l-0.84746 0.48789a0.53128 0.53128 0 0 0-0.01058 0.0061zm-7.6644 4.413a0.52917 0.52917 0 0 0-0.26511 0.45852v8.8302a0.52917 0.52917 0 0 0 0.26511 0.45852l7.665 4.4132a0.52917 0.52917 0 0 0 0.53393-0.0034l7.4163-4.4037a0.52917 0.52917 0 0 0 0.25929-0.45508v-8.8493a0.52917 0.52917 0 0 0-0.25903-0.45508l-7.4165-4.4035a0.52917 0.52917 0 0 0-0.52388-0.0095l-7.6748 4.4191z"/><path d="m61.683 52.204 3.8333 2.3006v5.3266l-4.2291 2.5374-0.13388-0.07514-3.9635-2.2296a0.79375 0.79375 0 0 1-0.40481-0.69215v-4.8723l4.1002-2.3064a0.79375 0.79375 0 0 1 0.79772 0.01138zm3.3041 2.6001-3.5766-2.1458a0.26458 0.26458 0 0 0-0.26591-4e-3l-3.8304 2.1545v4.5627a0.26458 0.26458 0 0 0 0.13494 0.23045l3.8296 2.1545 3.7084-2.2251v-4.7276z"/><path d="m52.657 52.697 0.25665-0.46276 6.9421 3.8484-0.25665 0.46276z"/><path d="m58.742 56.136 0.25664-0.46276 6.9421 3.8484-0.25665 0.46276z"/><path d="m61.283 52.273-4.2333 2.3812v5.0271l4.2333-2.3812zm7.9375 0-4.2333 2.3812v5.2917l4.2333-2.3812z"/><path d="m69.221 57.3-4.2333 2.3812v5.0271l4.2333-2.3812z"/><path d="m65.517 59.417-4.2333 2.3812v5.0271l4.2333-2.3812z"/></g><g fill="none" stroke="#444" stroke-linecap="round" stroke-width="1.5875"><path d="m61.283 57.3-8.3698-5.066"/><path d="m61.283 57.3 7.9375-5.0271"/><path d="m61.283 57.3v9.525"/></g><circle cx="61.221" cy="57.291" r="1.8521" fill="#ffd707" stroke="#444" stroke-width="1.0583"/></g></svg>

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -53,6 +53,30 @@
background: inherit;
}
.docs-nav .docs-nav-title {
display: flex;
flex-direction: row;
align-items: center;
padding: 15px;
}
.docs-nav .docs-nav-sponsors {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
}
.docs-nav .docs-nav-title .docs-logo {
margin-right: 15px;
}
.docs-nav .docs-nav-title .docs-heading {
font-size: 20px;
font-weight: 600;
margin-right: 10px;
}
.docs-content-wrapper {
flex-grow: 1;
flex-shrink: 1;