Merge pull request 'xaml/search' (#15) from xaml/search into master
Reviewed-on: ShopNCook/ShopNCook#15pull/29/head
commit
eaf9dd4dcd
Before Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Views.RecipeView">
|
||||
|
||||
|
||||
<Border
|
||||
StrokeShape="RoundRectangle 30"
|
||||
Stroke="Transparent">
|
||||
|
||||
<Grid
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
Padding="10"
|
||||
MinimumHeightRequest="175"
|
||||
MinimumWidthRequest="150"
|
||||
RowDefinitions="*, Auto">
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Stroke="Transparent"
|
||||
StrokeShape="RoundRectangle 20"
|
||||
BackgroundColor="AliceBlue">
|
||||
<Image/>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout Grid.Row="1">
|
||||
<Label
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="Recipe Name"/>
|
||||
<Label
|
||||
TextColor="{StaticResource TextColorSecondary}"
|
||||
Text="Preparation time"/>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
</ContentView>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class RecipeView : ContentView
|
||||
{
|
||||
public RecipeView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
<?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>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class SearchPage : ContentPage
|
||||
{
|
||||
public SearchPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue