Skip to content

Commit

Permalink
update site styles
Browse files Browse the repository at this point in the history
  • Loading branch information
akarras committed Jun 20, 2024
1 parent 12a7fe2 commit 64e6aa3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 21 deletions.
2 changes: 2 additions & 0 deletions ultros-frontend/ultros-app/src/components/search_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ pub fn ItemSearchResult(
}
} else {
view! {
// this needs to be updated to be able to point to any region

// this needs to be updated to be able to point to any region
<a class="search-result">"Invalid result"</a>
}
Expand Down
5 changes: 5 additions & 0 deletions ultros-frontend/ultros-app/src/components/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ where
on:input=move |e| {
set_current_input(event_target_value(&e));
}

on:keydown=keydown
prop:value=current_input
/>
Expand All @@ -106,6 +107,7 @@ where
}
}
>

{move || choice().map(|c| { children(c.clone(), as_label(&c).into_view()) })}

</div>
Expand All @@ -131,6 +133,7 @@ where
}
}
>

<div
class="hover:bg-purple-700 hover:border-solid hover:border-violet-600 rounded-sm p-2 transition-all ease-in-out duration-500"
class:bg-purple-500=move || {
Expand All @@ -145,6 +148,7 @@ where
.unwrap_or_default()
}
>

{items
.with(|i| i.get(data.0).cloned())
.map(|c| children(
Expand All @@ -165,6 +169,7 @@ where
}
.into_view(),
))}

</div>
</button>
</For>
Expand Down
3 changes: 3 additions & 0 deletions ultros-frontend/ultros-app/src/routes/edit_retainers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ pub fn EditRetainers() -> impl IntoView {
// I have no idea how I would have found that the #[server] macro takes params as a struct
// without the compiler just spelling it out for me

// I have no idea how I would have found that the #[server] macro takes params as a struct
// without the compiler just spelling it out for me

<div>"Retainers" <br/> {e.to_string()}</div>
}
.into_view()
Expand Down
1 change: 1 addition & 0 deletions ultros-frontend/ultros-app/src/routes/item_explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ pub fn ItemExplorer() -> impl IntoView {
set_open(!menu_open.get_untracked());
}
>

<Icon icon=i::BiMenuRegular/>
<span>"Categories"</span>
</button>
Expand Down
28 changes: 15 additions & 13 deletions ultros-frontend/ultros-app/src/routes/item_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn WorldButton<'a>(world: AnyResult<'a>, item_id: i32) -> impl IntoView {
.concat()
href=format!("/item/{}/{item_id}", escape(&world_name))
>
{move || is_home_world.get().then(|| view! { <Icon icon=icondata::AiHomeFilled/> })}
{move || is_home_world.get().then(|| view! { <Icon icon=icondata::AiHomeFilled/><div class="w-1"></div> })}

{world_name}
</A>
Expand All @@ -52,7 +52,9 @@ fn WorldMenu(world_name: Memo<String>, item_id: Memo<i32>) -> impl IntoView {
let world_data = use_context::<LocalWorldData>().unwrap().0.unwrap();
let (home_world, _) = use_home_world();
let home_world_button = Signal::derive(move || home_world.get().map(|world| view! { <WorldButton world=AnyResult::World(&world) item_id=item_id()/> }));
move || {
view!{
<div class="content-nav">
{move || {
let world = world_name();
let world_name = escape(&world);
if let Some(world) = world_data.lookup_world_by_name(&world_name) {
Expand Down Expand Up @@ -129,6 +131,8 @@ fn WorldMenu(world_name: Memo<String>, item_id: Memo<i32>) -> impl IntoView {
.collect();
views.into_view()
}
}}
</div>
}
}

Expand All @@ -142,7 +146,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
view! {
<Transition fallback=move || {
view! {
<div class="h-[35em] grow w-screen md:w-[780px] xl:basis-1/2">
<div class="h-[35em] grow w-screen md:w-[780px]">
<BoxSkeleton/>
</div>
}
Expand All @@ -154,7 +158,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
.unwrap_or_default()
});
view! {
<div class="content-well max-h-[35em] overflow-y-auto grow-0 xl:basis-1/2">
<div class="content-well max-h-[35em] overflow-y-auto grow">
<PriceHistoryChart sales=MaybeSignal::from(sales)/>
</div>
}
Expand All @@ -163,7 +167,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
</Transition>
<Transition fallback=move || {
view! {
<div class="h-[35em] grow w-screen md:w-[780px] xl:basis-1/2">
<div class="h-[35em] grow w-screen md:w-[780px]">
<BoxSkeleton/>
</div>
}
Expand Down Expand Up @@ -192,7 +196,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
class="content-well max-h-[35em] overflow-y-auto grow"
class:hidden=move || hq_listings.with(|l| l.is_empty())
>
<div class="content-title">"high quality listings"</div>
<div class="content-title text-center">"high quality listings"</div>
<ListingsTable listings=hq_listings/>
</div>
}
Expand All @@ -201,7 +205,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
</Transition>
<Transition fallback=move || {
view! {
<div class="h-[35em] grow w-screen md:w-[780px] xl:basis-1/2">
<div class="h-[35em] grow w-screen md:w-[780px]">
<BoxSkeleton/>
</div>
}
Expand Down Expand Up @@ -230,7 +234,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
class="content-well max-h-[35em] overflow-y-auto grow"
class:hidden=move || lq_listings.with(|l| l.is_empty())
>
<div class="content-title">"low quality listings"</div>
<div class="content-title text-center">"low quality listings"</div>
<ListingsTable listings=lq_listings/>
</div>
}
Expand All @@ -252,7 +256,7 @@ fn ListingsContent(item_id: Memo<i32>, world: Memo<String>) -> impl IntoView {
});
view! {
<div class="content-well max-h-[35em] overflow-y-auto xl:basis-1/2">
<div class="content-title">"sale history"</div>
<div class="content-title text-center">"sale history"</div>
<div>
<SaleHistoryTable sales=Signal::from(sales)/>
</div>
Expand Down Expand Up @@ -380,7 +384,7 @@ pub fn ItemView() -> impl IntoView {
}}

<div class="flex flex-column bg-gradient-to-r from-slate-950 -mt-96 pt-96 ">
<div class="flex flex-row rounded-l items-start">
<div class="flex flex-row rounded-l items-start p-2">
<div class="flex flex-column grow" style="padding: 5px">
<div class="flex md:flex-row flex-col flex-wrap">
<div class="flex flex-row text-2xl gap-1">
Expand Down Expand Up @@ -461,9 +465,7 @@ pub fn ItemView() -> impl IntoView {
<Ad class="h-[90px] w-full"/>
</div>
</div>
<div class="content-nav">
<WorldMenu world_name=world item_id/>
</div>
<WorldMenu world_name=world item_id/>
</div>
<div class="main-content flex-wrap">
<ListingsContent item_id world/>
Expand Down
13 changes: 13 additions & 0 deletions ultros-frontend/ultros-app/src/routes/list_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ pub fn ListView() -> impl IntoView {
})
}
>

"bulk edit"
</button>
<div class:hidden=move || !edit_list_mode()>
Expand All @@ -389,6 +390,7 @@ pub fn ListView() -> impl IntoView {
delete_items.dispatch(items);
}
>

"DELETE"
</button>
</div>
Expand All @@ -403,6 +405,7 @@ pub fn ListView() -> impl IntoView {
})
}
>

"SELECT ALL"
</button>
<button
Expand All @@ -411,6 +414,7 @@ pub fn ListView() -> impl IntoView {
selected_items.update(|i| i.clear());
}
>

"DESLECT ALL"
</button>
</div>
Expand Down Expand Up @@ -452,6 +456,7 @@ pub fn ListView() -> impl IntoView {
})
}
/>

</td>
<td>{item.hq.and_then(|hq| hq.then_some("✅"))}</td>
<td>
Expand Down Expand Up @@ -479,6 +484,7 @@ pub fn ListView() -> impl IntoView {
</div>
}
})}

</div>
</td>
<td>{item.quantity}</td>
Expand All @@ -492,6 +498,7 @@ pub fn ListView() -> impl IntoView {
/>
}
}}

</td>
}
} else {
Expand All @@ -505,6 +512,7 @@ pub fn ListView() -> impl IntoView {
temp_item.update(|w| w.hq = Some(!w.hq.unwrap_or_default()))
}
/>

</td>
<td>
<div class="flex-row">
Expand All @@ -531,6 +539,7 @@ pub fn ListView() -> impl IntoView {
</div>
}
})}

</div>
</td>
<td>
Expand All @@ -545,6 +554,7 @@ pub fn ListView() -> impl IntoView {
}
}
/>

</td>
<td>
{move || {
Expand All @@ -556,6 +566,7 @@ pub fn ListView() -> impl IntoView {
/>
}
}}

</td>
}
}
Expand All @@ -575,6 +586,7 @@ pub fn ListView() -> impl IntoView {
set_edit(!edit())
}
>

<Icon icon=MaybeSignal::derive(move || {
if edit() { i::BsCheck } else { i::BsPencilFill }
})/>
Expand All @@ -584,6 +596,7 @@ pub fn ListView() -> impl IntoView {
}
}
/>

</table>
</div>
}
Expand Down
13 changes: 5 additions & 8 deletions ultros/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ a:hover,a:active {
}

body {
background-image: url('/static/images/flower_4.webp');
background-size: 500px;
background-position: top;
max-width: 100vw;
background-color: #100a13;
background-color: #0e0a10;
color: #fff;
position:relative;
overflow-x: hidden;
Expand Down Expand Up @@ -368,7 +367,7 @@ nav>*>a:hover {
}

.main-content {
background-color: rgba(16, 10, 18, .97);
background-color: rgb(7, 3, 9);
padding: 2em;
min-height: 90vh;
overflow-x: auto;
Expand Down Expand Up @@ -449,11 +448,9 @@ nav>*>a:hover {
}

.content-well {
margin: 10px;
padding: 5px 15px;
background-color: rgba(13, 5, 14, .7);
border-radius: 8px;
flex-grow: 1;
margin: 1.5rem;
padding: 1rem 3rem;
border-radius: 1rem;
}

.content-title {
Expand Down

0 comments on commit 64e6aa3

Please sign in to comment.