Skip to content

Commit

Permalink
refactor: clean up imports and remove unused variables in components
Browse files Browse the repository at this point in the history
  • Loading branch information
Phosphorus-M committed Jan 1, 2025
1 parent c833bc7 commit c5cebb7
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 18 deletions.
Binary file modified public/assets/fonts/AkiraExpanded-SuperBold2.otf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use leptos_router::{
};
use reactive_stores::Store;

use crate::{components::templates::{aprende::AprendeSection, drawer::Drawer, hero::Hero}, models::global_state::{AppState, AppStateStoreFields}};
use crate::{components::templates::{aprende::AprendeSection, drawer::Drawer, hero::Hero}, models::global_state::AppState};

pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
Expand Down
8 changes: 0 additions & 8 deletions src/components/templates/aprende.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
use leptos::prelude::*;
use reactive_stores::Store;

use crate::{app, components::atoms::section_separator::Separator, models::global_state::{AppState, AppStateStoreFields}};

#[island]
pub fn AprendeSection() -> impl IntoView {
let app_state = expect_context::<Store<AppState>>();


view! {
// Two columns
<section class="grid md:grid-cols-2 gap-4 p-5">
// one column with information
<div class="flex flex-col gap-5 justify-center items-center p-4 md:py-12 mx-5">
<h3 class="text-3xl font-bold text-center">"¡Aprende Rust con nosotros!"</h3>
<p class="text-center">"En Rust Perú, fomentamos la participación, la integración, la colaboración y la diversidad en la comunidad. Nuestro objetivo es promover la adopción de Rust en el Perú y en la región, a través de la educación, la formación y la colaboración."</p>
Expand All @@ -32,7 +25,6 @@ pub fn AprendeSection() -> impl IntoView {
<p>"¡Podría ser una gran oportunidad!"</p>
</div>
</div>
// one column with images
<div class="p-3">
<div class="relative flex flex-row sm:block columns-1 sm:columns-3 gap-1 md:gap-8">
<div class="relative aspect-w-16 aspect-h-9">
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/drawer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use leptos::prelude::*;
use reactive_stores::Store;

use crate::{app, models::global_state::{AppState, AppStateStoreFields}};
use crate::models::global_state::{AppState, AppStateStoreFields};

#[island]
pub fn Drawer() -> impl IntoView {
Expand Down
9 changes: 2 additions & 7 deletions src/components/templates/hero.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
use leptos::prelude::*;
use reactive_stores::Store;

use crate::{app, components::atoms::{section_separator::Separator}, models::global_state::{AppState, AppStateStoreFields}};

use crate::components::atoms::section_separator::Separator;

#[island]
pub fn Hero() -> impl IntoView {
let app_state = expect_context::<Store<AppState>>();

let telegram_icon = include_str!("../../../public/assets/images/telegram_icon.svg");

view! {
// <div class="h-screen flex flex-col justify-center items-center text-center text-white bg-cover bg-center bg-machu-picchu bg-blend-hard-light bg-black/60">
<div class="h-screen flex flex-col justify-center items-center text-center text-white bg-cover bg-center bg-machu-picchu bg-blend-hard-light bg-black/60 justify-between">
<div class="h-screen flex flex-col items-center text-center text-white bg-cover bg-center bg-machu-picchu bg-blend-hard-light bg-black/60 justify-between">
<div class="h-full flex flex-col justify-center items-center">
<img src="/logo.png" width="640" height="640" class="w-64 h-64 rounded-full" />
<h1 class="text-6xl font-bold mt-4 bg-black bg-opacity-70 p-4 rounded-md font-akira">Rust Perú</h1>
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub mod models;
#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
use crate::app::*;
console_error_panic_hook::set_once();
leptos::mount::hydrate_islands();
// leptos::mount::hydrate_body(App);
Expand Down

0 comments on commit c5cebb7

Please sign in to comment.