Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo nulla porro qui quo expedita voluptas ab iure dolore.

MAKALE


@{
    int card3Col = 3;
    int card3TotalRow = 2;
    int card3CategoryID = 1;
    if (Partial.isCategoryID(card2CategoryID))
    {
        IEnumerable<Post> card3Posts = Partial.PostsID(card3CategoryID, 0, card3Col * card2TotalRow, Partial.Order.ID, true);
        Category card3Category = Partial.Category(card3CategoryID);
        int card3Count = Convert.ToInt32(Math.Ceiling(card3Posts.Count() / Convert.ToDouble(card3Col)));
        <div class="container-fluid bg-white pb-3">
            <h3 class="text-center pb-3">@card3Category.CategoryTitle.HtmlEncode()</h3>
            <div class="container">
                @for (int componen = 0; componen < card3Count; componen++)
                {
                    <div class="row">
                        @foreach (Post comPost in card3Posts.Skip(componen * card3Col).Take(card3Col))
                        {
                            <div class="col-md-@(12 / card2Col)">
                                <div class="thumbnail img-thumb-bg" style="background-image: url(@comPost.PostThumbnail);">
                                    <div class="overlay"></div>
                                    <div class="caption">
                                        <div class="tag"><a href="#"></a></div>
                                        <div class="title"><a href="al.PostLink(comPost.PostID)">@comPost.PostTitle.HtmlEncode()</a></div>
                                        <div class="content">
                                            <p>@Partial.PostShortContent(comPost.PostID, 170)</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        }
                    </div>
                }
            </div>
        </div>
    }
}

CSS


<style>
    .thumbnail-title {
        font-size: 20px;
        margin-top: 5px;
    }

    .img-thumb-bg {
        padding: 0;
        overflow: hidden;
        min-height: 200px;
        position: relative;
        border-radius: 3px;
        background-position: center;
        background-color: transparent;
    }

     .img-thumb-bg p {
        color: #fff;
        margin-bottom: 0;
        line-height: 16px;
        margin-top: 15px;
        }

        .img-thumb-bg .overlay {
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            position: absolute;
            transition: all 0.3s ease-in-out;
            background: rgba(0, 0, 0, 0);
            background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 50%, #000000 100%);
            background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 50%, #000000 100%);
            background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 50%, #000000 100%);
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, #000000 100%);
            background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 50%, #000000 100%);
            background: -webkit-gradient(left top, left bottom, color-stop(50%, rgba(0, 0, 0, 0)), color-stop(100%, #000000));
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#000000', GradientType=0);
        }

        .img-thumb-bg .caption {
            bottom: -5px;
            height: 100px;
            font-size: 12px;
            position: absolute;
            padding: 0 20px 20px;
            transition: all 0.3s ease-in-out;
        }
        .img-thumb-bg .caption .title {
                margin-top: 38px;
                font-size: 17px;
                line-height: 22px;
                text-transform: uppercase;
            }

        .img-thumb-bg .caption .title a {
                    color: #fff;
                }
        .img-thumb-bg .caption .title a:hover {
           color: #2980B9;
          }
            .img-thumb-bg .caption .content {
                display: none;
            }
        .img-thumb-bg:hover .overlay {
            background: rgba(46, 49, 58, 0.8);
        }
        .img-thumb-bg:hover .caption {
            bottom: 60px;
        }
            .img-thumb-bg:hover .caption .content {
                display: block;
            }
</style>