You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Views/SearchPage.xaml

117 lines
3.7 KiB

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.SearchPage"
xmlns:views="clr-namespace:ShoopNCook.Views"
Title="SearchPage"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
Margin="20"
RowDefinitions="Auto, Auto, Auto, Auto, *"
RowSpacing="10">
<!-- Search label and return button -->
<Grid
RowDefinitions="Auto, *"
ColumnDefinitions="*, 1.5*"
Margin="0, 0, 0, 30">
<HorizontalStackLayout>
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
</HorizontalStackLayout>
<Label
Grid.Column="1"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Search"
FontFamily="PoppinsBold"
VerticalOptions="Center"/>
</Grid>
<!-- Search input and filter button -->
<Grid
Grid.Row="1"
ColumnSpacing="10"
ColumnDefinitions="5*, *">
<Border
Grid.Column="0"
Style="{StaticResource SecondaryBorder}">
<Entry
Style="{StaticResource UserInput}"
Placeholder="Cake, Lasagna, Vegetarian..."/>
</Border>
<Border
Style="{StaticResource SecondaryBorder}"
Grid.Column="1"
BackgroundColor="{StaticResource ActionButton}"
Stroke="{StaticResource ActionButton}">
<ImageButton
Source="search_options.svg"
HeightRequest="40"
WidthRequest="40"/>
</Border>
</Grid>
<!-- Selection result count -->
<Label
Grid.Row="2"
Text="%Nb_Recipes% Recipes Found"
TextColor="{StaticResource TextColorSecondary}"
FontSize="20"/>
<!-- Sort selection -->
<Grid
Grid.Row="3"
ColumnSpacing="10"
ColumnDefinitions="*, *">
<Button
Grid.Column="0"
Text="Most Relevent"
Style="{StaticResource UserButton}"
TextColor="{StaticResource White}"
BackgroundColor="{StaticResource Selected}">
</Button>
<Button
Grid.Column="1"
Text="Most Recent"
Style="{StaticResource UserButton}"
TextColor="{StaticResource TextColorSecondary}"
BackgroundColor="{StaticResource BackgroundSecondary}">
</Button>
</Grid>
<!-- Search result items -->
<ScrollView
Grid.Row="4">
<FlexLayout
JustifyContent="Center"
AlignItems="Start"
AlignContent="Start"
Direction="Row"
Wrap="Wrap">
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
</FlexLayout>
</ScrollView>
</Grid>
</ContentPage>