Skip to content

Commit

Permalink
refactoring styles and trying some css on shell
Browse files Browse the repository at this point in the history
  • Loading branch information
davidortinau committed Dec 6, 2019
1 parent b1cee3b commit b8fd285
Show file tree
Hide file tree
Showing 22 changed files with 224 additions and 157 deletions.
4 changes: 2 additions & 2 deletions FlyMe/FlyMe.Android/FlyMe.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.5.0.15-nightly" />
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991220-pre3" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms.StateSquid">
<Version>1.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Visual.Material">
<Version>4.5.0.15-nightly</Version>
<Version>4.4.0.991220-pre3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
Binary file added FlyMe/FlyMe.UWP/Assets/banner_01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/banner_02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/banner_03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/banner_04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/banner_05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/banner_06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.UWP/Assets/plane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 27 additions & 2 deletions FlyMe/FlyMe.UWP/FlyMe.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,34 @@
</AppxManifest>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Assets\banner_01.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Assets\banner_02.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Assets\banner_03.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Assets\banner_04.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Assets\banner_05.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Assets\banner_06.jpg">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</AndroidResource>
<Content Include="Assets\LargeTile.scale-100.png" />
<Content Include="Assets\LargeTile.scale-200.png" />
<Content Include="Assets\LargeTile.scale-400.png" />
<BundleResource Include="Assets\plane.png" />
<Content Include="Assets\SmallTile.scale-100.png" />
<Content Include="Assets\SmallTile.scale-200.png" />
<Content Include="Assets\SmallTile.scale-400.png" />
Expand Down Expand Up @@ -143,14 +168,14 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.5.0.15-nightly" />
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991220-pre3" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.9" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms.StateSquid">
<Version>1.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Visual.Material">
<Version>4.5.0.15-nightly</Version>
<Version>4.4.0.991220-pre3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
22 changes: 20 additions & 2 deletions FlyMe/FlyMe.iOS/FlyMe.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.5.0.15-nightly" />
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991220-pre3" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms.StateSquid">
<Version>1.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Visual.Material">
<Version>4.5.0.15-nightly</Version>
<Version>4.4.0.991220-pre3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
Expand All @@ -159,4 +159,22 @@
<Name>FlyMe</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_01.jpg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_02.jpg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_03.jpg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_04.jpg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_05.jpg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\banner_06.jpg" />
</ItemGroup>
</Project>
Binary file added FlyMe/FlyMe.iOS/Resources/banner_01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.iOS/Resources/banner_02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.iOS/Resources/banner_03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.iOS/Resources/banner_04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.iOS/Resources/banner_05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FlyMe/FlyMe.iOS/Resources/banner_06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 3 additions & 74 deletions FlyMe/FlyMe/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,7 @@
mc:Ignorable="d"
x:Class="FlyMe.App">
<Application.Resources>
<ResourceDictionary>
<OnPlatform x:Key="FontAwesome"
x:TypeArguments="x:String">
<On Platform="Android" Value="fa-solid-900.ttf#Font Awesome 5 Free"/>
<On Platform="iOS" Value="Font Awesome 5 Free"/>
<On Platform="UWP" Value="Assets/Fonts/fa-solid-900.ttf#Font Awesome 5 Free"/>
</OnPlatform>

<Color x:Key="PrimaryColor">#5561F9</Color>


<Style x:Key="BaseStyle"
TargetType="Element">
<Setter Property="Shell.BackgroundColor"
Value="{StaticResource PrimaryColor}" />
<Setter Property="Shell.ForegroundColor"
Value="#ffffff" />
<Setter Property="Shell.TitleColor"
Value="White" />
<Setter Property="Shell.DisabledColor"
Value="#B4FFFFFF" />
<Setter Property="Shell.UnselectedColor"
Value="#33FFFFFF" />
</Style>

<Style BasedOn="{StaticResource BaseStyle}"
ApplyToDerivedTypes="True"
TargetType="FlyoutItem" />

<Style BasedOn="{StaticResource BaseStyle}"
ApplyToDerivedTypes="True"
TargetType="TabBar" />

<Color x:Key="ColorTabIcon">Gray</Color>
<x:Double x:Key="SizeTabIcon">24</x:Double>

<FontImageSource x:Key="IconTabBook"
FontFamily="{StaticResource FontAwesome}"
Glyph="{x:Static local:IconFont.TicketAlt}"
Size="{StaticResource SizeTabIcon}"
Color="{StaticResource ColorTabIcon}" />

<FontImageSource x:Key="IconTabMyFlights"
FontFamily="{StaticResource FontAwesome}"
Glyph="{x:Static local:IconFont.PersonBooth}"
Size="{StaticResource SizeTabIcon}"
Color="{StaticResource ColorTabIcon}" />

<FontImageSource x:Key="IconTabToday"
FontFamily="{StaticResource FontAwesome}"
Glyph="{x:Static local:IconFont.CalendarDay}"
Size="{StaticResource SizeTabIcon}"
Color="{StaticResource ColorTabIcon}" />

<FontImageSource x:Key="IconTabNotifications"
FontFamily="{StaticResource FontAwesome}"
Glyph="{x:Static local:IconFont.Bell}"
Size="{StaticResource SizeTabIcon}"
Color="{StaticResource ColorTabIcon}" />

<FontImageSource x:Key="IconSearch"
FontFamily="{StaticResource FontAwesome}"
Glyph="{x:Static local:IconFont.Search}"
Size="18"
Color="White" />

<Style x:Key="EmptyLabel" TargetType="Label">
<Setter Property="FontSize" Value="16"/>
<Setter Property="TextColor" Value="Black"/>
<Setter Property="Margin" Value="0,8"/>
</Style>

<ResourceDictionary Source="common/GlobalStyles.xaml">
<x:Array x:Key="Banners" Type="{x:Type x:String}">
<x:String>banner_01.jpg</x:String>
<x:String>banner_02.jpg</x:String>
Expand All @@ -87,7 +16,7 @@
<x:String>banner_05.jpg</x:String>
<x:String>banner_06.jpg</x:String>
</x:Array>

</ResourceDictionary>
<StyleSheet Source="common/GlobalStyles.css"/>
</ResourceDictionary>
</Application.Resources>
</Application>
146 changes: 73 additions & 73 deletions FlyMe/FlyMe/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<Shell
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:FlyMe.Views"
xmlns:local="clr-namespace:FlyMe"
Shell.FlyoutBehavior="Disabled"
Visual="Material"
x:Class="FlyMe.AppShell">

<ShellItem Route="login">
<ShellContent ContentTemplate="{DataTemplate views:LoginPage}"/>
</ShellItem>

<FlyoutItem Route="home" Title="My Flights" Icon="{StaticResource IconTabMyFlights}">
<ShellContent ContentTemplate="{DataTemplate views:MyFlightsPage}"/>
</FlyoutItem>

<FlyoutItem Title="Today" Icon="{StaticResource IconTabToday}">
<ShellContent ContentTemplate="{DataTemplate views:TodayPage}"/>
</FlyoutItem>

<FlyoutItem Title="Book" Route="book" Icon="{StaticResource IconTabBook}">
<ShellContent ContentTemplate="{DataTemplate views:BookingPage}"/>
</FlyoutItem>

<FlyoutItem Title="Notifications" Icon="{StaticResource IconTabNotifications}">
<ShellContent ContentTemplate="{DataTemplate views:NotificationsPage}"/>
</FlyoutItem>

<MenuItem Text="Logout" Clicked="MenuItem_Clicked"
IconImageSource="{FontImage FontFamily={StaticResource FontAwesome},
Glyph={x:Static local:IconFont.DoorOpen}, Color=Black,Size=16
}"
/>

<Shell.FlyoutHeader>
<Grid Margin="0"
BackgroundColor="#5561F9"
>
<Grid.RowDefinitions>
<RowDefinition Height="{OnPlatform iOS=66, Default=0}"/>
<RowDefinition Height="120"/>
</Grid.RowDefinitions>

<Image
Grid.RowSpan="2"
VerticalOptions="Center"
HorizontalOptions="Center">
<Image.Source>
<FontImageSource
Glyph="{x:Static local:IconFont.PaperPlane}"
FontFamily="{StaticResource FontAwesome}"
Size="32"
Color="GhostWhite"
/>

</Image.Source>
</Image>
</Grid>
</Shell.FlyoutHeader>


<!--<TabBar>
<Tab Title="My Flights" Icon="{StaticResource IconTabMyFlights}">
<ShellContent ContentTemplate="{DataTemplate local:MyFlightsPage}"/>
</Tab>
<Tab Title="Today" Icon="{StaticResource IconTabToday}">
<ShellContent ContentTemplate="{DataTemplate local:FlightResultsPage}"/>
</Tab>
<Tab Title="Book" Route="book" Icon="{StaticResource IconTabBook}">
<ShellContent ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
<Tab Title="Notifications" Icon="{StaticResource IconTabNotifications}">
<ShellContent ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
</TabBar>-->


</Shell>
x:Class="FlyMe.AppShell">

<ShellItem Route="login">
<ShellContent ContentTemplate="{DataTemplate views:LoginPage}"/>
</ShellItem>

<FlyoutItem Route="home" Title="My Flights" Icon="{StaticResource IconTabMyFlights}">
<ShellContent ContentTemplate="{DataTemplate views:MyFlightsPage}"/>
</FlyoutItem>

<FlyoutItem Title="Today" Icon="{StaticResource IconTabToday}">
<ShellContent ContentTemplate="{DataTemplate views:TodayPage}"/>
</FlyoutItem>

<FlyoutItem Title="Book" Route="book" Icon="{StaticResource IconTabBook}">
<ShellContent ContentTemplate="{DataTemplate views:BookingPage}"/>
</FlyoutItem>

<FlyoutItem Title="Notifications" Icon="{StaticResource IconTabNotifications}">
<ShellContent ContentTemplate="{DataTemplate views:NotificationsPage}"/>
</FlyoutItem>

<MenuItem Text="Logout" Clicked="MenuItem_Clicked"
IconImageSource="{FontImage FontFamily={StaticResource FontAwesome},
Glyph={x:Static local:IconFont.DoorOpen}, Color=Black,Size=16
}"
/>

<Shell.FlyoutHeader>
<Grid Margin="0"
BackgroundColor="#5561F9"
>
<Grid.RowDefinitions>
<RowDefinition Height="{OnPlatform iOS=66, Default=0}"/>
<RowDefinition Height="120"/>
</Grid.RowDefinitions>

<Image
Grid.RowSpan="2"
VerticalOptions="Center"
HorizontalOptions="Center">
<Image.Source>
<FontImageSource
Glyph="{x:Static local:IconFont.PaperPlane}"
FontFamily="{StaticResource FontAwesome}"
Size="32"
Color="GhostWhite"
/>

</Image.Source>
</Image>
</Grid>
</Shell.FlyoutHeader>


<!--<TabBar>
<Tab Title="My Flights" Icon="{StaticResource IconTabMyFlights}">
<ShellContent ContentTemplate="{DataTemplate local:MyFlightsPage}"/>
</Tab>
<Tab Title="Today" Icon="{StaticResource IconTabToday}">
<ShellContent ContentTemplate="{DataTemplate local:FlightResultsPage}"/>
</Tab>
<Tab Title="Book" Route="book" Icon="{StaticResource IconTabBook}">
<ShellContent ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
<Tab Title="Notifications" Icon="{StaticResource IconTabNotifications}">
<ShellContent ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
</TabBar>-->


</Shell>
7 changes: 5 additions & 2 deletions FlyMe/FlyMe/FlyMe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
<ItemGroup>
<PackageReference Include="Refractored.MvvmHelpers" Version="1.3.0" />
<PackageReference Include="Xamanimation" Version="1.3.0" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.15-nightly" />
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991220-pre3" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms.StateSquid" Version="1.1.3" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="4.5.0.15-nightly" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="4.4.0.991220-pre3" />
</ItemGroup>
<ItemGroup>
<Folder Include="ViewModels\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="common\GlobalStyles.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\LoginPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
Expand Down
3 changes: 1 addition & 2 deletions FlyMe/FlyMe/Views/MyFlightsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
xmlns:xa="clr-namespace:Xamanimation;assembly=Xamanimation"
Title=""
Shell.NavBarIsVisible="True"
BackgroundColor="#D8D8D8"
x:Class="FlyMe.Views.MyFlightsPage">

<Grid BackgroundColor="#5561F9">
<Grid class="bgColor">
<Grid.RowDefinitions>
<RowDefinition Height="230"/>
<RowDefinition Height="*"/>
Expand Down
12 changes: 12 additions & 0 deletions FlyMe/FlyMe/common/GlobalStyles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
^ContentPage {
-shell-NavBarHasShadow: false;
background-color: red;
}

^Shell {
NavBarHasShadow: false;
}

.bgColor {
background-color: #5561F9;
}
Loading

0 comments on commit b8fd285

Please sign in to comment.