index.cshtml

<section class="section bg-white p-2">

    <div class="section-container container-fluid padding-top-50">
        <div class="box-row row l-relative">
            @{
                int card128Col = 9;
                int card128TotalRow = 1;
                int card128CategoryOrderNumber = 2;

                if (Partial.isCategoryOrderNumber(card128CategoryOrderNumber))
                {
                    IEnumerable<Post>
                    card128Posts = Partial.PostsOrderNumber(card128CategoryOrderNumber, 0, card128Col * card128TotalRow, Partial.Order.OrderBy, true, lang);
                    Category category128title = Partial.Category(card128CategoryOrderNumber, lang);
                    int card128Count = Convert.ToInt32(Math.Ceiling(card128Posts.Count() / Convert.ToDouble(card128Col)));
                    <!--1-->
                    <div class="box-col box-col__shortcut-buttons col-md-12 col-xl-4 sm-hidden">
                        <div class="box-heading">@category128title.CategoryTitle <div class="border haber"></div></div>

                        <div class="shortcut-buttons list">
                            @for (int componen = 0; componen < card128Count; componen++)
                            {
                                <ul class="row">
                                    @foreach (Post comPost in card128Posts.Skip(componen * card128Col).Take(card128Col))
                                    {
                                        <li class="shortcut-button col-md-4 mb-3">
                                            <a href="@Partial.PostLink(comPost.PostID)">
                                                <i class="fas fa-envelope"></i>
                                                <div class="text">@comPost.PostTitle.HtmlEncode()</div>
                                            </a>
                                        </li>
                                    }
                                </ul>
                            }
                        </div>

                        <div class="shortcut-buttons__more shortcut--toggle is-open">
                            <a class="button style-1 button--more" href="@Partial.CategoryLink(card128CategoryOrderNumber)">DAHA FAZLA</a>
                        </div>

                    </div>
                    <!--1-->
                }
            }
            <!--2-->
            <div class="box-col col-md-6 col-xl-4">
                <div class="box-heading">BÜYÜKŞEHİR DUYURULAR <div class="border haber"></div></div>

                <div class="announcements tab">

                    <ul class="nav" id="myTab" role="tablist">
                        @{
                            bool secound = true;
                        }
                        @foreach (Category kategorim in Partial.CategoryRoot(lang).OrderBy(m => m.CategoryOrder))
                        {
                            if (kategorim.CategoryOrder == 16) // Kategori Sıra Numarası 16 Kategorinin Alt Kategorilerini getir
                            {
                                foreach (Category cat in Partial.CategorySubID(kategorim.CategoryID))
                                {
                                    <li class="nav-item">
                                        <a class="nav-link @if (secound) {<text>active</text>}" data-id="@cat.CategoryLink" id="@cat.CategoryLink" data-toggle="tab" href="#@cat.CategoryLink" role="tab" aria-controls="@cat.CategoryLink" aria-selected="true">@cat.CategoryTitle</a>
                                    </li>
                                    secound = false;
                                }
                            }
                        }
                    </ul>
                    @{
                        secound = true;
                    }
                    <div class="tab-content" id="myTabContent">
                        @foreach (Category kategorim in Partial.CategoryRoot(lang).OrderBy(m => m.CategoryOrder))
                        {
                            if (kategorim.CategoryOrder == 16) // Kategori Sıra Numarası 16 olan Kategoriye ait Alt Kategorilerin, Makalelerini getir
                            {

                                foreach (Category cat in Partial.CategorySubID(kategorim.CategoryID))
                                {
                                    <div class="tab-pane fade @if (secound) {<text>show active</text>}" id="@cat.CategoryLink" role="tabpanel" aria-labelledby="@(cat.CategoryLink)-tab">
                                        @foreach (Post postim in Partial.PostsID(cat.CategoryID, 0, 5, Partial.Order.OrderBy, false))
                                        {
                                            <a class="titlehaber haberhover" href="@Partial.PostLink(postim.PostID)"><h4 class="m-2">@postim.PostTitle.HtmlEncode()</h4></a>
                                        }
                                    </div>
                                    secound = false;
                                }
                            }
                        }
                    </div>

                </div>
            </div>
            <!--2-->
            <!--3-->
            <div class="box-col col-md-6 col-xl-4 mt-5">
                <div class="owl-carousel-product3 owl-carousel-fix">
                    @foreach (PhotoGalleryImage resmim in Partial.PhotoGalleryImages("makale100-öncesi", lang))
                    {
                        <div class="text-center">
                            <a href="/Upload/PhotoGallery/Thumb/@resmim.PhotoGalleryImageLink">
                                <div class="disucs-imageframe haberslider">
                                    <img src="/Upload/PhotoGallery/Thumb/@resmim.PhotoGalleryImageLink" />
                                </div>
                            </a>
                        </div>
                    }
                </div>
            </div>
            <!--3-->
        </div>
    </div>

</section>

CSS

<style>
    .nav-link {
        background: #cdd4da;
        height: 55px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        text-align: center;
        color: #1b4b62;
        font-size: 14px;
        font-weight: 500;
        -webkit-transition: .3s;
        transition: .3s;
        line-height: 1.3;
        padding-left: 10px;
        padding-right: 10px;
        position: relative;
        z-index: 1;
        margin-left: 1px;
        margin-right: 1px;
    }

        .nav-link.active, .nav-link:hover {
            color: #fff !important;
            background: #1b4b62 !important;
        }

    .border.haber {
        display: block;
        height: 1px;
        width: 30px;
        background: #10304a;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .shortcut-buttons.list .row .shortcut-button.col-md-4 a {
        height: 110px;
        background: rgba(205, 212, 218, 0.4);
        display: block;
        position: relative;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        text-align: center;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        padding: 20px 10px;
        color: #1b4b62;
        -webkit-transition: .3s;
        transition: .3s;
    }

    .shortcut-buttons__more {
        right: 10px;
        left: 10px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: end;
        -ms-flex-align: end;
        align-items: flex-end;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        padding-bottom: 65px;
        text-align: center;
        -webkit-transition: .3s;
        transition: .3s;
    }

        .shortcut-buttons__more:before {
            filter: blur(3px);
        }

        .shortcut-buttons__more .button {
            padding-top: 8px;
            padding-left: 40px;
            padding-right: 40px;
            height: 45px;
            background: #e16327;
            color: #fff;
            border: 1px solid #e16327;
        }

    .shortcut-buttons.list .row .shortcut-button.col-md-4 a:hover {
        background: #1b4b62 !important;
        color: #fff !important;
    }

    .button.style-1:hover {
        border: 1px solid #e16327;
        background: #fff;
        color: #e16327;
    }

    .box-heading {
        font-size: 20px;
        font-weight: 800;
        color: #1b4b62;
        margin-bottom: 20px;
    }

    .haberslider:before {
        top: 0;
        right: 0;
        left: 0;
        background: -webkit-gradient(linear, left top, left bottom, from(rgba(16, 48, 74, 0.85)), to(transparent));
        background: linear-gradient(rgba(16, 48, 74, 0.85), transparent);
    }

    .titlehaber {
        display: block;
        position: relative;
        padding-left: 13px;
        padding-bottom: 13px;
        padding-top: 13px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 14px;
        color: #1b4b62;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

        .titlehaber:before {
            content: "";
            position: absolute;
            left: 0;
            background: #1b4b62;
            width: 2px;
            margin-left: 10px;
            height: 40px;
        }

    .haberhover:hover {
        background: rgba(205, 212, 218, 0.4);
    }
</style>

https://www.samsun.bel.tr/

İndex Bileşenleri