Skip to content

Instantly share code, notes, and snippets.

@stdray
Created September 15, 2013 17:26
Show Gist options
  • Save stdray/6572741 to your computer and use it in GitHub Desktop.
Save stdray/6572741 to your computer and use it in GitHub Desktop.
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<link type ="text/css" href="@Url.Content("~/Content/bootstrap/bootstrap.min.css")" rel ="stylesheet" />
<link type ="text/css" href="@Url.Content("~/Content/bootstrap/bootstrap-theme.min.css")" rel ="stylesheet" />
<!--link type ="text/css" href="@Url.Content("~/Content/Site.css")" rel ="stylesheet" /-->
<title>@RenderSection("Title", required: true)</title>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#board-list">
<span class="sr-only">Борды</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Йоборда</a>
</div>
<div>
<ul class="nav navbar-nav">
@RenderSection("Options", required: false)
</ul>
</div>
<div class="collapse navbar-collapse" id="board-list">
<ul class="nav navbar-nav">
@foreach (var b in ViewBag.Boards) {
@if (b.Info.Path == @Model.Board.Path) {
<li class="active"><a href="/@b.Info.Path">@b.Info.Name</a></li>
}
else {
<li><a href="/@b.Info.Path">@b.Info.Name</a></li>
}
}
</ul>
</div>
</nav>
@RenderBody()
<script type ="text/javascript" src ="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"></script>
<script type ="text/javascript" src ="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
<script type ="text/javascript" src ="@Url.Content("~/Scripts/Site.js")"></script>
<script type ="text/javascript" src ="@Url.Content("~/Scripts/jquery.cookie.js")"></script>
@RenderSection("Scripts", required: false)
</body>
</html>
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<XThread>
@{
Layout = "Shared/_Layout.cshtml";
}
@RenderBody()
@section Title {
@if (string.IsNullOrEmpty(Model.OpPost.Title)) {
<text>/@Model.Board.Path/ - #@Model.OpPost.Number</text>
}
else {
<text>/@Model.Board.Path/ - @Model.OpPost.Title</text>
}
}
@section Options {
<li><a href="/@Model.Board.Path">Назад в /@Model.Board.Path/</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Вид <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="active"><a href="/@(Model.Id).flat">Списком</a></li>
<li><a href="/@(Model.Id).tree">Деревом</a></li>
</ul>
</li>
}
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<XThread>
@{
Layout = "Shared/_Thread.cshtml";
}
<div class="post post-view-list">
@Html.Partial("Post.cshtml", Tuple.Create(Model.OpPost, "flat"))
</div>
@foreach (var reply in Model.GetOrderedReplies()) {
<div class="post post-view-list">
@Html.Partial("Post.cshtml", Tuple.Create(reply, "flat"))
</div>
}
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<BoardPage>
@{
Layout = "Shared/_Layout.cshtml";
}
@section Title {
/@Model.Board.Info.Path/ - @Model.Board.Info.Name
}
<div id="board-reply-form">
<button type="button" class="board-reply-btn" data-toggle="collapse" data-target="#board-form">
<span>Новый тред</span>
</button>
<div class="collapse post-form" id="board-form">
@Html.Partial("PostForm.cshtml", Tuple.Create(
Model.Board.Info.Path,
Model.Board.Info.Path + "/-1",
Model.Board.Info.Path + "/-1"
))
</div>
</div>
@foreach (var thread in Model.Threads) {
<div class="post post-view-tree">
<div class="post post-view-list">
@Html.Partial("Post.cshtml", Tuple.Create(thread.OpPost, "flat"))
@if (thread.PostsMissing > 0) {
<p class="post-missing-notice">
Всего @thread.PostsTotal сообщений, из них @thread.PostsMissing пропущен@( thread.PostsMissing > 1 ? "о" : "") (@thread.AttachesMissing с картинками.)
</p>
}
</div>
@foreach (var reply in thread.ExpandedPosts) {
<div class="post post-view-list">
@Html.Partial("Post.cshtml", Tuple.Create(reply, "flat"))
</div>
}
</div>
}
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<XThread>
@{
Layout = "Shared/_Thread.cshtml";
}
@Html.Partial("TreeNode.cshtml", Model.GetTree())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment