<commit_before>﻿@using AstroPhotoGallery.Models
@using PagedList
@model List<AstroPhotoGallery.Models.Category>
@{
    ViewBag.Title = "Index";
}

<div class="container">
    <div id="mainCarousel" class="carousel slide" data-ride="carousel">

        <ol class="carousel-indicators">
            <li data-target="#mainCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#mainCarousel" data-slide-to="1"></li>
            <li data-target="#mainCarousel" data-slide-to="2"></li>
        </ol>

        <!--Not responsive 350px height-->
        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <img src="~/Content/images/NGC2237_New_b.jpg" alt="...">
                <div class="carousel-caption">
                    <h3>Slide Caption</h3>
                </div>
            </div>
            <div class="item">
                <img src="~/Content/images/IC443_HSO_com_b.jpg" alt="...">
                <div class="carousel-caption">
                    <h3>Slide Caption</h3>
                </div>
            </div>
            <div class="item">
                <img src="~/Content/images/IC2177_Ha_RGB_new_b.jpg" alt="...">
                <div class="carousel-caption">
                    <h3>Slide Caption</h3>
                </div>
            </div>
        </div>

        <a class="left carousel-control" href="#mainCarousel" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span>
            <span class="sr-only">PreviousPicture</span>
        </a>
        <a class="right carousel-control" href="#mainCarousel" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span>
            <span class="sr-only">NextPicture</span>
        </a>
    </div>
</div>
<div class="container">
    <div class="section">
        <div class="row">         
            @foreach (var category in Model)
            {
                <div class="col-md-3">
                    <div class="thumbnail" >
                        @if (category.Pictures.Any(p => p.CategoryId == category.Id))
                        {
                             <!--Not responsive-->
                            <img src="@Url.Content(category.Pictures.Where(p => p.CategoryId == category.Id).FirstOrDefault().ImagePath)" style="height:150px;width:320px">
                        }
                        else
                        {
                             <!--Not responsive -->
                            <img src="~/Content/images/default-gallery-image.jpg" style="height:150px;width:320px"/>
                        }
                    </div>
                    <h3>@category.Name</h3>   
                    @Html.ActionLink("All pictures", "ListPictures", new { @categoryId = category.Id }, new {@class="btn btn-primary"})
                </div>
            }
        </div>
    </div>
</div>

<commit_msg>modify the view to show 6 categories on 2 rows<commit_after>﻿@model List<AstroPhotoGallery.Models.Category>
@{
    ViewBag.Title = "Index";
}

<div class="container">
    <div id="mainCarousel" class="carousel slide" data-ride="carousel">

        <ol class="carousel-indicators">
            <li data-target="#mainCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#mainCarousel" data-slide-to="1"></li>
            <li data-target="#mainCarousel" data-slide-to="2"></li>
        </ol>

        <!--Not responsive 350px height-->
        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <img src="~/Content/images/NGC2237_New_b.jpg" alt="Astro picture">
            </div>
            <div class="item">
                <img src="~/Content/images/IC443_HSO_com_b.jpg" alt="Astro picture">
            </div>
            <div class="item">
                <img src="~/Content/images/IC2177_Ha_RGB_new_b.jpg" alt="Astro picture">
            </div>
        </div>

        <a class="left carousel-control" href="#mainCarousel" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span>
            <span class="sr-only">PreviousPicture</span>
        </a>
        <a class="right carousel-control" href="#mainCarousel" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span>
            <span class="sr-only">NextPicture</span>
        </a>
    </div>
</div>
<div class="container">
    <div class="section">

        @{ int start = 0;}
        @{int length = Model.Count / 2;}

        <h3>Some of our categories...</h3>
        <br>
        @for (int i = 0; i < 2; i++)
        {
            <div class="row">
                @if (i == 1)
                {
                    start = Model.Count / 2;
                    length = Model.Count;
                }
                @for (int j = start; j < length; j++)
                {
                    <div class="col-sm-4">
                        <div class="thumbnail">
                            @if (Model[j].Pictures.Any(p => p.CategoryId == Model[j].Id))
                            {
                                <img src="@Url.Content(Model[j].Pictures.Where(p => p.CategoryId == Model[j].Id).FirstOrDefault().ImagePath)" class="img-responsive">
                            }
                            else
                            {
                                <img src="~/Content/images/default-gallery-image.jpg" class="img-responsive" />
                            }
                            <br />
                        </div>
                        <h3>@Model[j].Name</h3>
                        @Html.ActionLink("All pictures", "ListPictures", new { @categoryId = Model[j].Id }, new { @class = "btn btn-primary" })
                    </div>
                }
            </div>
            <br />
        }
    </div>
</div>


{'fraction_non_alphanumeric': 0.1569650067294751, 'fraction_numerical': 0.011440107671601614, 'mean_word_length': 1.4812186978297162, 'pattern_counts': {'":': 0, '<': 126, '<?xml version=': 0, '>': 128, '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': '2889646', 'n_tokens_mistral': 1793, 'n_tokens_neox': 1659, 'n_words': 307}