@inherits System.Web.Mvc.WebViewPage<IEnumerable<Discus.Models.Post>>
@using System.Web.Helpers;
@using System.Web.Mvc;
@using Discus.Models;
@using Discus.Controllers;
@{
string lang = ViewBag.LanguageShortName;
Category category = ViewBag.Category as Category;
int ustID = category.RefCategoryID ?? 0;
Category ustCategory = Partial.Category(ustID);
int Categorysay = Partial.CategorySubID(category.CategoryID).Count();
int Postsay = ViewData.Model.Count();
DateTime sontarih = DateTime.Now;
foreach (Post tarih in ViewData.Model.OrderByDescending(m => m.PostUpdateDate).Skip(0).Take(1))
{
sontarih = tarih.PostUpdateDate;
}
string duvardakiresmine = "";
if (!String.IsNullOrEmpty(category.CategoryImage))
{
duvardakiresmine = category.CategoryImage;
}
else if (ustCategory != null && !String.IsNullOrEmpty(ustCategory.CategoryImage))
{
duvardakiresmine = ustCategory.CategoryImage;
}
else
{
duvardakiresmine = "/Upload/File/placeholder.jpg";
}
}
<div class="container-fluid makale-resimlibaslik baslikicin" style="background-image: url(/Upload/File/2020/2/5/kirmizikapak.jpg);">
<div class="text-center tablolastir makaleplace">
<div class="hucrelestir">
<h1>@category.CategoryTitle.HtmlEncode()</h1>
@{ int breadcrumbcount = 2;}
<div class="breadcrumbs">
<a href="@Partial.SiteAddress()@lang">@Partial.Translate("Anasayfa", lang)</a><span>→</span>
@foreach (Category kat in Partial.BreadcrumbCategory(category.CategoryID))
{
<a href="@Partial.CategoryLink(kat.CategoryID)">@kat.CategoryTitle.Replace("<br />", " ").HtmlEncode()</a><span class="musterlersevinsin">→</span>
<meta itemprop="position" content="@(breadcrumbcount)" />
breadcrumbcount++;
}
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 sayfasol text-center pine-text">
<h1 class="yoruk gigantic">@MvcHtmlString.Create(category.CategoryTitle)</h1>
@MvcHtmlString.Create(category.CategoryContent)
</div>
<div class="col-lg-6 col-md-6 col-sm-6 hidden-xs">
<img class="img-responsive" src="/Upload/File/2020/2/5/buyuk-kova.png" />
</div>
</div>
<div class="row galerirow">
<div class="col-md-12">
@{
IEnumerable<Post> Postler = ViewData.Model;
int Postdon = Convert.ToInt32(Math.Ceiling(Postler.Count() / Convert.ToDouble(4)));
for (int i = 0; i < Postdon; i++)
{
<div class="row">
@foreach (Post Postm in Postler.Skip(i * 4).Take(4))
{
string Postkapak = "";
if (!String.IsNullOrEmpty(Postm.PostThumbnail))
{
Postkapak = Postm.PostThumbnail;
}
else
{
Postkapak = "/Upload/File/placeholder.jpg";
}
<div class="col-lg-3 col-sm-6 center-tablet-portrait sent">
<div class="iconic">
<a href="@Partial.PostLink(Postm.PostID)">
<div class="resimstandart" style="background-image: url(@Postm.PostThumbnail);">
</div>
</a>
<div class="indexbas">
<div class="coverme tip-tablo">
<a class="hucre hucre-ortala fancybox"
href="@Partial.PostLink(Postm.PostID)">
<h5>@Postm.PostTitle.HtmlEncode()</h5>
</a>
</div>
</div>
</div>
</div>
}
</div>
}
IEnumerable<Category> Categoryler = Partial.CategorySubID(category.CategoryID);
int Categorydon = Convert.ToInt32(Math.Ceiling(Categoryler.Count() / Convert.ToDouble(4)));
for (int i = 0; i < Categorydon; i++)
{
<div class="row">
@foreach (Category Categorym in Categoryler.Skip(i * 4).Take(4))
{
<div class="col-lg-3 col-sm-6 center-tablet-portrait sent">
<div class="iconic">
<a href="@Partial.CategoryLink(Categorym.CategoryID)">
<div class="resimstandart" style="background-image: url(@Categorym.CategoryThumbnail);">
</div>
</a>
<div class="indexbas">
<div class="coverme tip-tablo">
<a class="hucre hucre-ortala fancybox"
href="@Partial.CategoryLink(Categorym.CategoryID)">
<h5>@Categorym.CategoryTitle.HtmlEncode()</h5>
</a>
</div>
</div>
</div>
</div>
}
</div>
}
}
</div>
</div>
@{
int bulunduguSayfa = Convert.ToInt32(ViewBag.BulunduguSayfa);
int ogeAdedi = Convert.ToInt32(ViewBag.OgeAdedi);
int sayfadaGosterilecekUrunSayisi = Convert.ToInt32(Partial.OptionGetValue("PostCount"));
if (ogeAdedi / sayfadaGosterilecekUrunSayisi > 1)
{
<div class="container">
<div class="footrow">
<nav>
<ul class="pagination">
@{
string link = Partial.CategoryLink(category.CategoryID);
if (ViewBag.CategoryID > 0)
{
@Function.Paging(link, bulunduguSayfa, ogeAdedi, sayfadaGosterilecekUrunSayisi, true, "", "page", "active", false, false, 5, "/" + ViewBag.CategoryID + "&sID=", "<<", "<", ">", ">>")
}
else
{
@Function.Paging(link, bulunduguSayfa, ogeAdedi, Convert.ToInt32(Partial.OptionGetValue("PostCount")), true, "", "page", "active", false, false, 5, "/", "<<", "<", ">", ">>")
}
}
</ul>
</nav>
</div>
</div>
}
}
</div>
</div>
</div>
</div>
.makale-resimlibaslik {
height: 195px;
background-position: center center;
margin-bottom: 45px;
color: #fff;
}
.coverbg, .makale-resimlibaslik {
background-repeat: no-repeat;
background-size: cover;
width: 100%;
}
.container-fluid:before {
display: table;
content: " ";
}
.makale-resimlibaslik .tablolastir {
display: table;
text-align: center;
width: 100%;
height: 195px;
}
.makale-resimlibaslik .tablolastir .hucrelestir {
display: table-cell;
vertical-align: middle;
}
.container-fluid:after {
clear: both;
display: table;
content: " ";
}
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}
.yoruk {
font-family: "Yorukoglu", sans-serif;
font-size: 103px;
font-weight: 600;
color: #c30827;
}
.makale-resimlibaslik h1 {
font-weight: 600;
}
.breadcrumbs span {
padding-left: 10px;
padding-right: 5px;
}
.makale-resimlibaslik a {
color: #fff;
}
.resimstandart {
width: 100%;
height: 230px;
}
.iconic {
width: 100%;
border: 5px solid #FFF;
background-color: #FFF;
box-shadow: 0 0 5px rgba(0, 0, 0, .15);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .15);
overflow: hidden;
min-height: 230px;
margin-bottom: 20px;
}
.indexbas {
background-color: #f5b428;
}
.coverme, .coverme2 {
min-height: 40px;
margin: 0 auto;
padding: 0 10px;
}
.coverme h5, .coverme2 h5 {
font-size: 18px;
text-align: center;
text-transform: uppercase;
font-weight: 600 !important;
color: #000;
padding: 8px 0px;
}
http://www.gorkemtarim.com.tr/tr/m/nar
Sosyal Ağ