mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
Responsive tweaks
plus a little cleanup.
This commit is contained in:
parent
2846f28d69
commit
1c88bf257d
|
@ -212,7 +212,6 @@
|
|||
<Compile Include="Models\ViewModel\Front\FrontBuildGroup.cs" />
|
||||
<Compile Include="Models\ViewModel\LoginUser.cs" />
|
||||
<Compile Include="Models\ViewModel\ChangePassword.cs" />
|
||||
<Compile Include="Models\ViewModel\QuestionForm.cs" />
|
||||
<Compile Include="Models\ViewModel\RegistrationUser.cs" />
|
||||
<Compile Include="Models\ViewModel\SitemapData.cs" />
|
||||
<Compile Include="Models\ViewModel\StatsPage.cs" />
|
||||
|
@ -322,7 +321,6 @@
|
|||
<Content Include="Views\shared\error.cshtml" />
|
||||
<Content Include="Views\shared\_default.cshtml" />
|
||||
<Content Include="Views\front\editBuild.cshtml" />
|
||||
<Content Include="Views\build\index.cshtml" />
|
||||
<Content Include="Views\shared\DisplayTemplates\Enumeration.cshtml" />
|
||||
<Content Include="Views\support\register.cshtml" />
|
||||
<Content Include="Views\support\login.cshtml" />
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BuildFeed.Models.ViewModel
|
||||
{
|
||||
public class QuestionForm
|
||||
{
|
||||
[Required]
|
||||
[DisplayName("Your name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Your email address")]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Question")]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,210 +0,0 @@
|
|||
@model IEnumerable<BuildFeed.Models.Build>
|
||||
|
||||
@{
|
||||
ViewBag.Action = ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString().ToLower();
|
||||
ViewBag.Title = "BuildFeed";
|
||||
|
||||
|
||||
if (ViewBag.PageNumber > 1)
|
||||
{
|
||||
ViewBag.Title = string.Format("Page {1} | {0}", ViewBag.Title, ViewBag.PageNumber);
|
||||
}
|
||||
|
||||
switch (ViewBag.Action as string)
|
||||
{
|
||||
case "index":
|
||||
ViewBag.Title = "BuildFeed | The collaborative build list";
|
||||
break;
|
||||
case "lab":
|
||||
ViewBag.ItemId = ViewContext.Controller.ValueProvider.GetValue("lab").RawValue;
|
||||
ViewBag.Title = string.Format("Builds from {1} | {0}", ViewBag.Title, ViewBag.ItemId);
|
||||
break;
|
||||
case "year":
|
||||
ViewBag.ItemId = ViewContext.Controller.ValueProvider.GetValue("year").RawValue;
|
||||
ViewBag.Title = string.Format("Builds from {1} | {0}", ViewBag.Title, ViewBag.ItemId);
|
||||
break;
|
||||
case "version":
|
||||
ViewBag.ItemId = string.Format("{0}.{1}", ViewContext.Controller.ValueProvider.GetValue("major").RawValue, ViewContext.Controller.ValueProvider.GetValue("minor").RawValue);
|
||||
ViewBag.Title = string.Format("Windows NT {1} | {0}", ViewBag.Title, ViewBag.ItemId);
|
||||
break;
|
||||
case "source":
|
||||
ViewBag.ItemId = DisplayHelpers.GetDisplayTextForEnum(Enum.Parse(typeof(BuildFeed.Models.TypeOfSource), ViewContext.Controller.ValueProvider.GetValue("source").RawValue.ToString()));
|
||||
ViewBag.Title = string.Format("{1} | {0}", ViewBag.Title, ViewBag.ItemId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@section head
|
||||
{
|
||||
@switch (ViewBag.Action as string)
|
||||
{
|
||||
case "index":
|
||||
<meta name="description" content="BuildFeed is a collaborative build list for Microsoft Windows. Keep up to date with the latest Windows 10 builds or take a peek at the list back to 2000" />
|
||||
<meta property="og:description" content="BuildFeed is a collaborative build list for Microsoft Windows. Keep up to date with the latest Windows 10 builds or take a peek at the list back to 2000" />
|
||||
break;
|
||||
case "lab":
|
||||
if (ViewBag.MetaItem != null)
|
||||
{
|
||||
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
|
||||
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<meta name="description" content="Check out all the known builds to come out of the Windows development lab @ViewBag.ItemId through BuildFeed, a collaborative Windows build list" />
|
||||
<meta property="og:description" content="Check out all the known builds to come out of the Windows development lab @ViewBag.ItemId through BuildFeed, a collaborative Windows build list" />
|
||||
}
|
||||
break;
|
||||
case "year":
|
||||
<meta name="description" content="View a list of all Windows builds compiled in @ViewBag.ViewId, and watch how Windows developed steadily over time, through the collaborative build list, BuildFeed" />
|
||||
<meta property="og:description" content="View a list of all Windows builds compiled in @ViewBag.ViewId, and watch how Windows developed steadily over time, through the collaborative build list, BuildFeed" />
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
@switch (ViewBag.Action as string)
|
||||
{
|
||||
case "lab":
|
||||
<h2>@string.Format("Builds from {0}", ViewBag.ItemId)</h2>
|
||||
break;
|
||||
case "year":
|
||||
<h2>@string.Format("Builds from {0}", ViewBag.ItemId)</h2>
|
||||
break;
|
||||
case "version":
|
||||
<h2>@string.Format("Windows NT {0}", ViewBag.ItemId)</h2>
|
||||
break;
|
||||
case "source":
|
||||
<h2>@ViewBag.ItemId</h2>
|
||||
break;
|
||||
}
|
||||
@if (ViewBag.PageNumber == 1 && ViewBag.MetaItem != null && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
|
||||
{
|
||||
<h3>About</h3>
|
||||
@Html.Raw(ViewBag.MetaItem.PageContent)
|
||||
<h3>Share</h3>
|
||||
<div class="addthis_sharing_toolbox"></div>
|
||||
<h3>Listing</h3>
|
||||
}
|
||||
<ul class="list-unstyled">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<li>
|
||||
<div class="build-head">
|
||||
@Html.ActionLink("Info", "info", new { id = item.Id }, new { @class = "btn btn-info btn-xs" })
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
@Html.ActionLink("Edit", "edit", new { id = item.Id }, new { @class = "btn btn-default btn-xs" })
|
||||
}
|
||||
@if (Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
@Html.ActionLink("Delete", "delete", new { id = item.Id }, new { @class = "btn btn-danger btn-xs" })
|
||||
}
|
||||
<h3>@Html.DisplayFor(modelItem => item.FullBuildString)</h3>
|
||||
</div>
|
||||
<div class="build-foot">
|
||||
<span class="badge">@Html.DisplayFor(TypeOfSource => item.SourceType, "Enumeration")</span>
|
||||
@if ((item.MajorVersion == 6 && item.MinorVersion == 4) || (item.MajorVersion == 10 && item.MinorVersion == 0) && item.FlightLevel != BuildFeed.Models.LevelOfFlight.None)
|
||||
{
|
||||
<span class="badge">Flight Level: @Html.DisplayFor(TypeOfSource => item.FlightLevel, "Enumeration")</span>
|
||||
}
|
||||
@if (item.BetaWikiUri != null)
|
||||
{
|
||||
<a href="@item.BetaWikiServerUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaWiki (Client)</a>
|
||||
}
|
||||
@if (item.BetaWikiServerUri != null)
|
||||
{
|
||||
<a href="@item.BetaWikiServerUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaWiki (Server)</a>
|
||||
}
|
||||
@if (item.WinWorldPCUri != null)
|
||||
{
|
||||
<a href="@item.WinWorldPCUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> WinWorldPC</a>
|
||||
}
|
||||
@if (item.BetaArchiveUri != null)
|
||||
{
|
||||
<a href="@item.BetaArchiveUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaArchive Wiki</a>
|
||||
}
|
||||
@if (item.LonghornMsUri != null)
|
||||
{
|
||||
<a href="@item.LonghornMsUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> Longhorn.ms</a>
|
||||
}
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="panel panel-default panel-search">
|
||||
<div class="panel-body">
|
||||
@Html.TextBox("search-input", "", new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
@if (ViewBag.Action != "index")
|
||||
{
|
||||
<div class="list-group">
|
||||
@Html.ActionLink("Return to full listing", "index", new { controller = "build", area = "", page = 1 }, new { @class = "list-group-item" })
|
||||
</div>
|
||||
}
|
||||
<div class="list-group">
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
if (Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
@Html.ActionLink("Administration", "index", new { controller = "base", area = "admin" }, new { @class = "list-group-item" })
|
||||
}
|
||||
@Html.ActionLink("Add a build", "create", new { controller = "build" }, new { @class = "list-group-item" })
|
||||
@Html.ActionLink("Change your password", "password", new { controller = "support" }, new { @class = "list-group-item" })
|
||||
@Html.ActionLink("Log out", "logout", new { controller = "support" }, new { @class = "list-group-item" })
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLink("Log in", "login", new { controller = "support" }, new { @class = "list-group-item" })
|
||||
@Html.ActionLink("Register", "register", new { controller = "support" }, new { @class = "list-group-item" })
|
||||
}
|
||||
@Html.ActionLink("Ask a question", "question", new { controller = "support" }, new { @class = "list-group-item" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (ViewBag.PageCount > 1)
|
||||
{
|
||||
<ul class="pagination">
|
||||
@if (ViewBag.PageNumber > 1)
|
||||
{
|
||||
<li>@Html.ActionLink(HttpUtility.HtmlDecode("«"), ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString(), new { page = ViewBag.PageNumber - 1 })</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled"><span>«</span></li>
|
||||
}
|
||||
|
||||
|
||||
@for (int i = 1; i <= ViewBag.PageCount; i++)
|
||||
{
|
||||
<li @((i == ViewBag.PageNumber) ? "class=active" : "")>@Html.ActionLink(i.ToString(), ViewBag.Action as string, new { page = i })</li>
|
||||
}
|
||||
|
||||
|
||||
@if (ViewBag.PageNumber < ViewBag.PageCount)
|
||||
{
|
||||
<li>@Html.ActionLink(HttpUtility.HtmlDecode("»"), ViewBag.Action as string, new { page = ViewBag.PageNumber + 1 })</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled"><span>»</span></li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
|
||||
@section scripts
|
||||
{
|
||||
@Scripts.Render("~/bundles/jsrender")
|
||||
<script type="text/javascript" src="~/Scripts/bfs.js"></script>
|
||||
<script id="result-template" type="text/x-jsrender">
|
||||
<a href="{{:Url}}" class="list-group-item" title="{{:Title}}">
|
||||
<h4 class="list-group-item-heading">{{:Label}}</h4>
|
||||
<p class="list-group-item-text">{{:Group}}</p>
|
||||
</a>
|
||||
</script>
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
<div class="row">
|
||||
@foreach (BuildFeed.Models.ViewModel.Front.FrontBuildGroup group in Model)
|
||||
{
|
||||
<div class="col-sm-2">
|
||||
<div class="col-md-2 col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title"><a href="@Url.Action("viewGroup", new { major = group.Key.Major, minor = group.Key.Minor, number = group.Key.Build, revision = group.Key.Revision })"><span class="icon"><i class="fa fa-plus-square"></i></span> @group.Key.ToString()</a></h3>
|
||||
<p>
|
||||
@if (group.LastBuild.HasValue)
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<div class="row">
|
||||
@foreach (var build in Model.OrderBy(b => b.BuildTime))
|
||||
{
|
||||
<div class="col-sm-3">
|
||||
<h3 class="build-group-title">@build.Lab</h3>
|
||||
<div class="col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title no-wrapping" title="@build.Lab">@build.Lab</h3>
|
||||
<p>
|
||||
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<div class="row">
|
||||
@foreach (var build in Model)
|
||||
{
|
||||
<div class="col-sm-2">
|
||||
<div class="col-md-2 col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title">@string.Format("{0}.{1}.{2}.{3}", build.MajorVersion, build.MinorVersion, build.Number, build.Revision)</h3>
|
||||
<p>
|
||||
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="row">
|
||||
@foreach (var build in Model)
|
||||
{
|
||||
<div class="col-sm-2">
|
||||
<div class="col-md-2 col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title">@string.Format("{0}.{1}.{2}.{3}", build.MajorVersion, build.MinorVersion, build.Number, build.Revision)</h3>
|
||||
<p>
|
||||
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="row">
|
||||
@foreach (var build in Model)
|
||||
{
|
||||
<div class="col-sm-3">
|
||||
<div class="col-md-2 col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title">@string.Format("{0}.{1}.{2}.{3}", build.MajorVersion, build.MinorVersion, build.Number, build.Revision)</h3>
|
||||
<p>
|
||||
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<p>
|
||||
@if (!string.IsNullOrEmpty(build.Lab))
|
||||
{
|
||||
<span><i class="fa fa-code-fork fa-fw"></i> @build.Lab</span><br />
|
||||
<div class="no-wrapping" title="@build.Lab"><i class="fa fa-code-fork fa-fw"></i> @build.Lab</div>
|
||||
}
|
||||
@if (build.BuildTime.HasValue)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<div class="row">
|
||||
@foreach (var build in Model)
|
||||
{
|
||||
<div class="col-sm-2">
|
||||
<div class="col-md-2 col-sm-3 col-xs-6">
|
||||
<h3 class="build-group-title">@string.Format("{0}.{1}.{2}.{3}", build.MajorVersion, build.MinorVersion, build.Number, build.Revision)</h3>
|
||||
<p>
|
||||
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
||||
|
|
|
@ -58,23 +58,23 @@
|
|||
<ul class="nav navbar-nav navbar-right">
|
||||
@if (!User.Identity.IsAuthenticated)
|
||||
{
|
||||
<li><a href="@Url.Action("login", new { controller = "support", area = "" })" title="Log in"><i class="fa fa-user"></i> Log in</a></li>
|
||||
<li><a href="@Url.Action("login", new { controller = "support", area = "" })" title="Log in"><i class="fa fa-fw fa-user"></i> Log in</a></li>
|
||||
}
|
||||
else if (Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<li><a href="@Url.Action("index", new { controller = "base", area = "admin" })" title="Admin"><i class="fa fa-cogs"></i> Admin</a></li>
|
||||
<li><a href="@Url.Action("addBuild", new { controller = "front", area = "" })" title="Add a new build"><i class="fa fa-plus-square"></i> Add build</a></li>
|
||||
<li><a href="@Url.Action("logout", new { controller = "support", area = "" })" title="Log out"><i class="fa fa-user"></i> Log out</a></li>
|
||||
<li><a href="@Url.Action("index", new { controller = "base", area = "admin" })" title="Admin"><i class="fa fa-fw fa-cogs"></i> Admin</a></li>
|
||||
<li><a href="@Url.Action("addBuild", new { controller = "front", area = "" })" title="Add a new build"><i class="fa fa-fw fa-plus-square"></i> Add build</a></li>
|
||||
<li><a href="@Url.Action("logout", new { controller = "support", area = "" })" title="Log out"><i class="fa fa-fw fa-user"></i> Log out</a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li><a href="@Url.Action("addBuild", new { controller = "front", area = "" })" title="Add a new build"><i class="fa fa-plus-square"></i> Add build</a></li>
|
||||
<li><a href="@Url.Action("logout", new { controller = "support", area = "" })" title="Log out"><i class="fa fa-user"></i> Log out</a></li>
|
||||
<li><a href="@Url.Action("addBuild", new { controller = "front", area = "" })" title="Add a new build"><i class="fa fa-fw fa-plus-square"></i> Add build</a></li>
|
||||
<li><a href="@Url.Action("logout", new { controller = "support", area = "" })" title="Log out"><i class="fa fa-fw fa-user"></i> Log out</a></li>
|
||||
}
|
||||
<li><a href="#" title="Search" id="page-navigation-search"><i class="fa fa-search"></i> Search</a></li>
|
||||
<li><a href="@Url.Action("stats", new { controller = "support", area = "" })" title="Statistics"><i class="fa fa-line-chart"></i> Statistics</a></li>
|
||||
<li><a href="@Url.Action("rss", new { controller = "support", area = "" })" title="RSS Feeds"><i class="fa fa-rss"></i> RSS Feeds</a></li>
|
||||
<li><a href="https://twitter.com/buildfeed" title="Twitter" target="_blank"><i class="fa fa-twitter"></i> Twitter</a></li>
|
||||
<li><a href="#" title="Search" id="page-navigation-search"><i class="fa fa-fw fa-search"></i> Search</a></li>
|
||||
<li><a href="@Url.Action("stats", new { controller = "support", area = "" })" title="Statistics"><i class="fa fa-fw fa-line-chart"></i> Statistics</a></li>
|
||||
<li><a href="@Url.Action("rss", new { controller = "support", area = "" })" title="RSS Feeds"><i class="fa fa-fw fa-rss"></i> RSS Feeds</a></li>
|
||||
<li><a href="https://twitter.com/buildfeed" title="Twitter" target="_blank"><i class="fa fa-fw fa-twitter"></i> Twitter</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user