Skip to content

Commit

Permalink
feat: add github logo
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed Aug 26, 2024
1 parent 028cc3e commit bee395b
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 4 deletions.
212 changes: 212 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ chrono = "0.4.38"
tokio-cron-scheduler = "0.10.2"
regex = "1.10.5"
codee = "0.2.0"
leptos_icons = "0.3.1"
icondata = "0.4.0"

[features]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
Expand Down Expand Up @@ -63,6 +65,9 @@ site-pkg-dir = "pkg"

# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css
style-file = "style/output.css"
tailwind-input-file = "input.css"
tailwind-config-file = "tailwind.config.js"

# Assets source dir. All files found here will be copied and synchronized to site-root.
# The assets-dir cannot have a sub directory with the same name/path as site-pkg-dir.
#
Expand Down
16 changes: 12 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ use crate::{
};
use chrono::{Datelike, Utc};
use codee::string::FromToStringCodec;
use icondata as i;
use leptos::*;
use leptos_icons::*;
use leptos_meta::*;
use leptos_use::storage::use_session_storage;

Expand All @@ -32,17 +34,23 @@ pub fn App() -> impl IntoView {
content="An interactive tutorial to get started with the Rust programming language. Experiment with Rust in your browser."
/>
<main class="flex overflow-auto flex-col w-screen md:flex-row md:items-center md:h-screen bg-[#1e1e1e]">
<div class="flex z-50 flex-row gap-2 items-center py-1 px-2 mt-8 ml-8 rounded-lg md:absolute md:top-4 md:left-8 md:mt-0 md:ml-0">
<img src="rust_color.png" width=56 height=56 />
<span class="text-4xl font-extrabold text-[#c6c6c6]">tryrust.org</span>
<div class="flex z-50 w-full flex-row gap-2 items-center justify-between py-1 mt-8 px-8 rounded-lg md:absolute md:top-4 md:mt-0 md:ml-0">
<div class="flex items-center gap-2">
<img src="rust_color.png" width=56 height=56 />
<span class="text-4xl font-extrabold text-[#c6c6c6]">tryrust.org</span>
</div>
<a href="https://github.com/rust-dd/tryrust.org" target="_blank">
<Icon icon=i::IoLogoGithub class="size-8 text-white" />
</a>
</div>
<div class="flex overflow-auto flex-col gap-4 justify-center items-center p-8 w-full md:flex-row md:gap-0 bg-custom-radial">
<terminal::Component />
<instruction::Component />
</div>
<div class="mb-4 text-center md:absolute md:right-0 md:left-0 md:bottom-4 md:mb-0">
<p class="text-gray-400">
Powered by <a href="https://github.com/rust-dd" class="text-[#ffbd2e]">
Powered by
<a href="https://github.com/rust-dd" target="_blank" class="text-[#ffbd2e]">
rust-dd
</a> {" © "} {Utc::now().year()}
</p>
Expand Down

0 comments on commit bee395b

Please sign in to comment.