{font_size: 60},
+ // color: #x2563EB
+ // // wrap: Word,
+ // }
+ // }
+ }
+ {
+ width: 650
+ text: "From architectural masterpieces to regulatory compliance, we're your one-stop solution for all construction and design needs."
+ draw_text: {
+ text_style: {font_size: 16},
+ color: #4B5563
+ wrap: Word,
+ }
+ }
+ {
+ width: Fit,
+ height: Fit,
+ flow: Right
+ spacing: 20
+ // debug: B
+ explore = {
+ width: 220,
+ height: 60,
+ text: "Explore Services →"
+ draw_text: {
+ text_style: {font_size: 14},
+ // color: #x2563EB
+ }
+ draw_bg: { color: #x2563EB, border_color: #x2563EB }
+ }
+ requests = {
+ width: 220,
+ height: 60,
+ text: "View My Requests >"
+ draw_text: {
+ text_style: {font_size: 14},
+ // color: #x2563EB
+ }
+
+ draw_bg: { color: #1a365d, border_color: #x2563EB }
+ }
+ choose = {
+ width: 220,
+ height: 60,
+ text: "Help Me Choose ⓘ"
+ draw_text: {
+ text_style: {font_size: 14},
+ // color: #x2563EB
+ }
+ // draw_icon: {
+ // svg_file: (ICON_HELP_CIRCLE),
+ // fn get_color(self) -> vec4 {
+ // return #B42318;
+ // }
+ // }
+ draw_bg: { color: #x2563EB, border_color: #x2563EB }
+ }
+ }
+ {
+ width: Fit,
+ height: Fit,
+ flow: Right
+ spacing: 20
+ align: {x: 0.0, y: -0.5},
+ // debug: B
+
+ {
+ width: 220,
+ content = {
+ title ={
+ text: "Expert Team"
+ }
+ description ={
+ text: "Professional architects, engineers, and consultants at your service"
+ }
+ }
+ }
+ {
+ width: 220,
+ content = {
+ title = {
+ text: "Fast Turnaround"
+ }
+ description ={
+ text: "Quick response times and efficient project completion"
+ }
+ }
+ }
+ {
+ width: 220,
+ content = {
+ title ={
+ text: "Quality Assured"
+ }
+ description ={
+ text: "Committed to delivering excellence in every project"
+ }
+ }
+ }
+ }
+ }
+ // Choose = {
+ Choose = {
+ choices = {
+ indicators = {
+ ind = {
+ // indicator_titles: [
+ // "Step Four",
+ // "Step Five",
+ // "Step Six"
+ // ]
+ }
+ }
+ back = {
+ back_left_button = {
+ text: "Back"
+ }
+ }
+ steps = {}
+ next_button = {
+ next = {
+ text: "Next"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+#[derive(Live, LiveHook, Widget)]
+pub struct HeroScreen {
+ #[deref]
+ deref: View,
+}
+
+#[derive(Clone, DefaultNone, Debug)]
+pub enum ButtonClickAction {
+ None,
+ Click,
+}
+impl Widget for HeroScreen {
+ fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
+ self.deref.handle_event(cx, event, scope);
+
+ self.widget_match_event(cx, event, scope);
+ // if let Event::Actions(actions) = event {
+ // for action in actions {
+ // if self.deref.button(id!(next)).clicked(&actions) {
+ // log!("Hero - Next Button Clicked");
+
+ // let widget_uid = self.deref.widget_uid();
+ // // Navigate to the main content view
+ // cx.widget_action(
+ // widget_uid,
+ // &scope.path,
+ // NextBackAction::NextButton {
+ // clicked: true,
+ // page_no: 0, // You can pass the current page number if needed
+ // },
+ // );
+ // log!("Hero - Action dispatched: {:?}", widget_uid);
+ // self.redraw(cx);
+ // }
+ // if self.deref.button(id!(back_left_button)).clicked(&actions) {
+ // log!("Hero - Next Button Clicked");
+
+ // let widget_uid = self.deref.widget_uid();
+ // // Navigate to the main content view
+ // cx.widget_action(
+ // widget_uid,
+ // &scope.path,
+ // NextBackAction::BackButton {
+ // clicked: true,
+ // page_no: 0, // You can pass the current page number if needed
+ // },
+ // );
+ // log!("Hero - Action dispatched: {:?}", widget_uid);
+ // self.redraw(cx);
+ // }
+ // }
+ // }
+ }
+
+ fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
+ let _state = scope.data.get::().unwrap();
+
+ self.deref.draw_walk(cx, scope, walk)
+ }
+}
+
+impl WidgetMatchEvent for HeroScreen {
+ fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions, scope: &mut Scope) {
+ let _state = scope.data.get_mut::().unwrap();
+ if self.deref.button(id!(next)).clicked(&actions) {
+ // log!("Hero - Next Button Clicked");
+
+ let widget_uid = self.deref.widget_uid();
+ // Navigate to the main content view
+ cx.widget_action(
+ widget_uid,
+ &scope.path,
+ NextBackAction::NextButton {
+ clicked: true,
+ page_no: 0, // You can pass the current page number if needed
+ },
+ );
+ // log!("Hero - Action dispatched: {:?}", widget_uid);
+ self.redraw(cx);
+ }
+ if self.deref.button(id!(back_left_button)).clicked(&actions) {
+ // log!("Hero - Next Button Clicked");
+
+ let widget_uid = self.deref.widget_uid();
+ // Navigate to the main content view
+ cx.widget_action(
+ widget_uid,
+ &scope.path,
+ NextBackAction::BackButton {
+ clicked: true,
+ page_no: 0, // You can pass the current page number if needed
+ },
+ );
+ // log!("Hero - Action dispatched: {:?}", widget_uid);
+ self.redraw(cx);
+ }
+ // if self.deref.button(id!(file_button)).clicked(&actions) {
+ // cx.open_file_dialog("image/*");
+ // }
+ }
+}
diff --git a/src/home/home_screen.rs b/src/home/home_screen.rs
index a6327e2..f6e60d6 100644
--- a/src/home/home_screen.rs
+++ b/src/home/home_screen.rs
@@ -9,6 +9,7 @@ live_design! {
use crate::shared::styles::*;
use crate::home::main_desktop_ui::MainDesktopUI;
use crate::home::main_web_ui::MainWebUI;
+ use crate::home::bar::RoomsSideBar;
NavigationWrapper = {{NavigationWrapper}} {
view_stack = {}
@@ -46,6 +47,8 @@ live_design! {
padding: {top: 40.}
flow: Down
width: Fill, height: Fill
+ sidebar = {}
+ // spaces = {}
}
main_content_view = {
@@ -136,5 +139,7 @@ impl MatchEvent for NavigationWrapper {
fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions) {
self.stack_navigation(id!(view_stack))
.handle_stack_view_actions(cx, actions);
+ // self.stack_navigation(id!(view_stack))
+ // .show_view(id!(main_content_view));
}
}
diff --git a/src/home/landing_screen.rs b/src/home/landing_screen.rs
index 89b6342..f47b312 100644
--- a/src/home/landing_screen.rs
+++ b/src/home/landing_screen.rs
@@ -5,61 +5,88 @@ use crate::data::state::State;
live_design! {
use link::theme::*;
- use link::shaders::*;
+ // use link::shaders::*;
use link::widgets::*;
use crate::shared::styles::*;
- BG_COLOR = #3
+ // use crate::shared::widgets::*;
+ use crate::shared::widgets::MolyButton;
+ use crate::services::services::ServicesScreen;
+ use crate::howitworks::howitworks::HowItWorksScreen;
+ use crate::footer::footer::FooterScreen;
+ use crate::home::hero::HeroScreen;
+
+ BG_COLOR = #f9fafb
+
+
pub LandingScreen = {{LandingScreen}} {
flow: Down
- padding: { top: 30 }
+ // padding: { top: 30 }
show_bg: true
draw_bg: {
fn pixel(self) -> vec4 {
return (BG_COLOR);
}
}
- body = { width: 0, height: 0 }
- {
- flow: Right
- height: Fit
- file_button =