<commit_before>﻿<Page x:Class="Locana.Pages.EntrancePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:c="using:Locana.Controls"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:Locana.Pages"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      Loaded="Page_Loaded"
      RequestedTheme="Dark"
      Unloaded="Page_Unloaded"
      mc:Ignorable="d">

    <Page.Resources>
        <CollectionViewSource x:Name="PanelSources" IsSourceGrouped="True" />
    </Page.Resources>

    <Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="WindowWidthStates">
                <VisualState x:Name="WideState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="720" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="PanelGrid.ItemHeight" Value="180" />
                        <Setter Target="PanelGrid.ItemWidth" Value="180" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="NarrowState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="PanelGrid.ItemHeight" Value="120" />
                        <Setter Target="PanelGrid.ItemWidth" Value="120" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <c:PageHeader x:Name="pageHeader">
            <c:PageHeader.HeaderContent>
                <TextBlock x:Name="title"
                           Style="{ThemeResource PageTitleTextBlockStyle}"
                           Text="Entrance Page [TBD]" />
            </c:PageHeader.HeaderContent>
        </c:PageHeader>
        <GridView x:Name="EntranceGrid"
                  Grid.Row="1"
                  ItemsSource="{Binding Source={StaticResource PanelSources}}"
                  Loaded="EntranceGrid_Loaded"
                  Unloaded="EntranceGrid_Unloaded">
            <GridView.ItemTemplate>
                <DataTemplate>
                    <Grid x:Name="PanelHolder" Tapped="PanelHolder_Tapped">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="48" />
                        </Grid.RowDefinitions>
                        <Image Grid.Row="0" Source="{Binding PanelIcon}" />
                        <TextBlock Grid.Row="1" Text="{Binding PanelTitle}" />
                    </Grid>
                </DataTemplate>
            </GridView.ItemTemplate>
            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <ItemsWrapGrid x:Name="PanelGrid" Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>
            <GridView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="0,8,0,0">
                                <TextBlock Padding="8,0"<commit_msg>Fix entrance page's grid size issue<commit_after>﻿<Page x:Class="Locana.Pages.EntrancePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:c="using:Locana.Controls"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:Locana.Pages"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      Loaded="Page_Loaded"
      RequestedTheme="Dark"
      Unloaded="Page_Unloaded"
      mc:Ignorable="d">

    <Page.Resources>
        <CollectionViewSource x:Name="PanelSources" IsSourceGrouped="True" />

        <ItemsPanelTemplate x:Key="WideGridItemTemplate">
            <ItemsWrapGrid x:Name="PanelGrid"
                           ItemHeight="180"
                           ItemWidth="180"
                           Orientation="Horizontal" />
        </ItemsPanelTemplate>

        <ItemsPanelTemplate x:Key="NarrowGridItemTemplate">
            <ItemsWrapGrid x:Name="PanelGrid"
                           ItemHeight="120"
                           ItemWidth="120"
                           Orientation="Horizontal" />
        </ItemsPanelTemplate>
    </Page.Resources>

    <Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="WindowWidthStates">
                <VisualState x:Name="WideState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="720" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="EntranceGrid.ItemsPanel" Value="{StaticResource WideGridItemTemplate}" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="NarrowState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="EntranceGrid.ItemsPanel" Value="{StaticResource NarrowGridItemTemplate}" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <c:PageHeader x:Name="pageHeader">
            <c:PageHeader.HeaderContent>
                <TextBlock x:Name="title"
                           Style="{ThemeResource PageTitleTextBlockStyle}"
                           Text="Entrance Page [TBD]" />
            </c:PageHeader.HeaderContent>
        </c:PageHeader>
        <GridView x:Name="EntranceGrid"
                  Grid.Row="1"
                  ItemsSource="{Binding Source={StaticResource PanelSources}}"
                  Loaded="EntranceGrid_Loaded"
                  Unloaded="EntranceGrid_Unloaded">
            <GridView.ItemTemplate>
                <DataTemplate>
                    <Grid x:Name="PanelHolder" Tapped="PanelHolder_Tapped">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="48" />
                        </Grid.RowDefinitions>
                        <Image Grid.Row="0" Source="{Binding PanelIcon}" />
                        <TextBlock Grid.Row="1" Text="{Binding PanelTitle}" />
                    </Grid>
                </DataTemplate>
            </GridView.ItemTemplate>
            <GridView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="0,8,0,0">
                                <TextBlock Padding="8,0"
{'fraction_non_alphanumeric': 0.11048786851030525, 'fraction_numerical': 0.01121836681450561, 'mean_word_length': 1.630188679245283, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 120, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6061657', 'n_tokens_mistral': 2057, 'n_tokens_neox': 1860, 'n_words': 245}