<commit_before>﻿@model PagedList.IPagedList<AstroPhotoGallery.Models.Category>
@using PagedList.Mvc;
@using System.Linq;
@{
    ViewBag.Title = "List";
}
<link href="~/Content/PagedList.css" rel="stylesheet" />
<div class="container">
    <h2 class="text-center">Browse by categories</h2>
    <br/>

    @foreach (var category in Model)
    {
        <div class="col-sm-4">
            <div class="thumbnail ">
                @if (category.Pictures.Any(p => p.CategoryId == category.Id))
                {
                    <img src="@Url.Content(category.Pictures.Where(p => p.CategoryId == category.Id).FirstOrDefault().ImagePath)" style="height:190px;width:350px">
                }
                else
                {
                    <img src="~/Content/images/default-gallery-image.jpg" style="height:190px;width:350px" />
                }

                <div class="caption text-center ">
                    <h4>
                        @Html.ActionLink(string.Format($"{category.Name}({category.Pictures.Count})"),
                                "ListPictures", "Home", new { @categoryId = category.Id }, null)                     
                    </h4>
                </div>
            </div>
        </div>
    }
</div>


Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount

@Html.PagedListPager(Model, page => Url.Action("ListCategories",<commit_msg>change the images to be with fixed size for more consistent view<commit_after>﻿@model PagedList.IPagedList<AstroPhotoGallery.Models.Category>
@using PagedList.Mvc;
@using System.Linq;
@{
    ViewBag.Title = "List";
}
<link href="~/Content/PagedList.css" rel="stylesheet" />
<div class="container">
    <h2 class="text-center">Browse by categories</h2>
    <br/>

    @foreach (var category in Model)
    {
        <div class="col-sm-4">
            <div class="thumbnail">
                @if (category.Pictures.Any(p => p.CategoryId == category.Id))
                {
                    <img src="@Url.Content(category.Pictures.Where(p => p.CategoryId == category.Id).FirstOrDefault().ImagePath)" style="width: 360px; height:270px" >
                }
                else
                {
                    <img src="~/Content/images/default-gallery-image.jpg" style="width: 360px; height:270px"/>
                }

                <div class="caption text-center ">
                    <h4>
                        @Html.ActionLink(string.Format($"{category.Name}({category.Pictures.Count})"),
                                "ListPictures", "Home", new { @categoryId = category.Id }, null)                     
                    </h4>
                </div>
            </div>
        </div>
    }
</div>


Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount

@Html.PagedListPager(Model, page => Url.Action("ListCategories",
{'fraction_non_alphanumeric': 0.14771151178918168, 'fraction_numerical': 0.012482662968099861, 'mean_word_length': 1.876370887337986, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6648026', 'n_tokens_mistral': 907, 'n_tokens_neox': 829, 'n_words': 146}