<?xml version="1.0" encoding="UTF-8"?>
<ContentView 
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
    x:Class="inutralia.Views.RecipeItemTemplate"
    x:Name="recipeItemTemplate" 
    BackgroundColor="White">

    <Grid BackgroundColor="Black">

        <!-- TODO: Cambiar icon.png por imagen adecuada -->
        <ffimageloading:CachedImage FadeAnimationEnabled="true" 
			                        Source="{ Binding Image }"
			                        Aspect="AspectFill"
			                        Opacity="0.5"/>

        <Grid ColumnSpacing="0" RowSpacing="6" Padding="20">

            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
            </Grid.RowDefinitions>

            <!--PARTE SUPERIOR-->
            <StackLayout Grid.Row="0" VerticalOptions="End" HorizontalOptions="Start">
                <StackLayout Grid.Row="1" Orientation="Horizontal" HorizontalOptions="Fill" VerticalOptions="FillAndExpand" Padding="5" >
                    <!--TITULO-->
                    <Label FontSize="30" FontAttributes="Bold" Text="{Binding ShortName}" LineBreakMode="WordWrap" TextColor="{ DynamicResource InverseTextColor }"/>
                </StackLayout>
            </StackLayout>

            <!--PARTE INFERIOR-->
            <StackLayout Grid.Row="1" Orientation="Horizontal" HorizontalOptions="FillAndExpand" VerticalOptions="End">

                <!--RESUMEN -->
                <Label Text="{ Binding Excerpt}" TextColor="{ DynamicResource InverseTextColor }" HorizontalOptions="FillAndExpand" />
            </StackLayout>

            <BoxView Grid.Row="2" Style="{StaticResource BrandNameOrnamentStyle}"/>
        </Grid>
    </Grid>
</ContentView>
