Add word-wrapping to pre tag to prevent page stretching

refactor-intermediate-models
BuildFeed Bot 2018-02-11 18:38:20 +00:00
parent 1d4fc6f91e
commit 1dbdc8486b
6 changed files with 87 additions and 84 deletions

View File

@ -303,11 +303,9 @@ namespace BuildFeed.Model
}
[DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<Build> SelectBuildByFullBuildString(string build)
{
return await _buildCollection.Find(Builders<Build>.Filter.Eq(b => b.FullBuildString, build))
.SingleOrDefaultAsync();
}
public async Task<Build> SelectBuildByFullBuildString(string build) => await _buildCollection
.Find(Builders<Build>.Filter.Eq(b => b.FullBuildString, build))
.SingleOrDefaultAsync();
[DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<List<Build>> SelectBuildsByCompileDate(int limit = -1, int skip = 0)

View File

@ -35,7 +35,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> Index()
{
ViewBag.Versions = await _bModel.SelectAllFamilies();
@ -50,7 +50,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "page", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> IndexPage(int page)
{
var buildGroups = await _bModel.SelectAllGroups(PAGE_SIZE, (page - 1) * PAGE_SIZE);
@ -73,7 +73,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewGroup(uint major, uint minor, uint number, uint? revision = null)
{
var bg = new BuildGroup
@ -99,7 +99,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewBuild(Guid id)
{
Build b = await _bModel.SelectById(id);
@ -131,7 +131,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[CustomContentType(ContentType = "image/png", Order = 2)]
#endif
#endif
public async Task<ActionResult> TwitterCard(Guid id)
{
Build b = await _bModel.SelectById(id);
@ -279,7 +279,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewFamily(ProjectFamily family)
{
return await ViewFamilyPage(family, 1);
@ -289,7 +289,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "page", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewFamilyPage(ProjectFamily family, int page)
{
ViewBag.MetaItem = await _mModel.SelectById(new MetaItemKey
@ -318,7 +318,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewLab(string lab)
{
return await ViewLabPage(lab, 1);
@ -328,7 +328,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "page", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewLabPage(string lab, int page)
{
ViewBag.MetaItem = await _mModel.SelectById(new MetaItemKey
@ -357,7 +357,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewSource(TypeOfSource source)
{
return await ViewSourcePage(source, 1);
@ -367,7 +367,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "page", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewSourcePage(TypeOfSource source, int page)
{
ViewBag.MetaItem = await _mModel.SelectById(new MetaItemKey
@ -396,7 +396,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewYear(int year)
{
return await ViewYearPage(year, 1);
@ -406,7 +406,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "page", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewYearPage(int year, int page)
{
ViewBag.MetaItem = await _mModel.SelectById(new MetaItemKey
@ -434,7 +434,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewVersion(uint major, uint minor)
{
return await ViewVersionPage(major, minor, 1);
@ -444,7 +444,7 @@ namespace BuildFeed.Controllers
#if !DEBUG
[OutputCache(Duration = 600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
[OutputCachePush(Order = 2)]
#endif
#endif
public async Task<ActionResult> ViewVersionPage(uint major, uint minor, int page)
{
string valueString = $"{major}.{minor}";

View File

@ -22,7 +22,7 @@
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>@ViewBag.Title</title>
<link href="/res/css/default.css?180209" rel="stylesheet" type="text/css" />
<link href="/res/css/default.css?180211" rel="stylesheet" type="text/css" />
<link href="@(VirtualPathUtility.ToAbsolute(((Theme)ViewBag.Theme).CssPath))" rel="stylesheet" type="text/css" />
@if (isRtl)
{
@ -137,74 +137,74 @@
<li id="user-action-menu" class="dropdown-menu-block">
<ul>
@if (!User.Identity.IsAuthenticated)
{
<li>
<a href="@Url.Action(nameof(AccountController.Login), new
{
<li>
<a href="@Url.Action(nameof(AccountController.Login), new
{
controller = "Account",
area = ""
})" title="@VariantTerms.Common_LogIn">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogIn
</a>
</li>
}
else
{
if (Roles.IsUserInRole("Administrators"))
{
<li>
<a href="@Url.Action("Index", new
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogIn
</a>
</li>
}
else
{
if (Roles.IsUserInRole("Administrators"))
{
<li>
<a href="@Url.Action("Index", new
{
controller = "Root",
area = "admin"
})" title="@VariantTerms.Common_Admin">
<i class="fa fa-fw fa-cogs"></i> @VariantTerms.Common_Admin
</a>
</li>
}
if (Roles.IsUserInRole("Administrators") || Roles.IsUserInRole("Editors"))
{
<li>
<a href="@Url.Action(nameof(FrontController.AddBuild), new
<i class="fa fa-fw fa-cogs"></i> @VariantTerms.Common_Admin
</a>
</li>
}
if (Roles.IsUserInRole("Administrators") || Roles.IsUserInRole("Editors"))
{
<li>
<a href="@Url.Action(nameof(FrontController.AddBuild), new
{
controller = "Front",
area = ""
})" title="@VariantTerms.Common_AddBuild">
<i class="fa fa-fw fa-plus-square"></i> @VariantTerms.Common_AddBuild
</a>
</li>
}
if (Roles.IsUserInRole("Administrators"))
{
<li>
<a href="@Url.Action(nameof(FrontController.AddBulk), new
<i class="fa fa-fw fa-plus-square"></i> @VariantTerms.Common_AddBuild
</a>
</li>
}
if (Roles.IsUserInRole("Administrators"))
{
<li>
<a href="@Url.Action(nameof(FrontController.AddBulk), new
{
controller = "Front",
area = ""
})" title="@VariantTerms.Common_AddBulk">
<i class="fa fa-fw fa-database"></i> @VariantTerms.Common_AddBulk
</a>
</li>
}
<li>
<a href="@Url.Action(nameof(AccountController.Logout), new
<i class="fa fa-fw fa-database"></i> @VariantTerms.Common_AddBulk
</a>
</li>
}
<li>
<a href="@Url.Action(nameof(AccountController.Logout), new
{
controller = "Account",
area = ""
})" title="@VariantTerms.Common_LogOut">
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogOut
</a>
</li>
<li>
<a href="@Url.Action(nameof(AccountController.Password), new
<i class="fa fa-fw fa-user"></i> @VariantTerms.Common_LogOut
</a>
</li>
<li>
<a href="@Url.Action(nameof(AccountController.Password), new
{
controller = "Account",
area = ""
})" title="@VariantTerms.Common_ChangePassword">
<i class="fa fa-fw fa-key"></i> @VariantTerms.Common_ChangePassword
</a>
</li>
}
<i class="fa fa-fw fa-key"></i> @VariantTerms.Common_ChangePassword
</a>
</li>
}
</ul>
</li>
</ul>
@ -218,26 +218,26 @@ if (Roles.IsUserInRole("Administrators"))
<h4>@VariantTerms.Common_NavigationTheme</h4>
<ul>
@foreach (Theme item in Theme.AvailableThemes)
{
<li>
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
</li>
}
{
<li>
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
</li>
}
</ul>
</li>
<li id="settings-lang-menu" class="dropdown-menu-block">
<h4>@VariantTerms.Common_NavigationLanguage</h4>
<ul>
@foreach (Locale locale in Locale.AvailableLocales)
{
<li>
<a href="#" data-lang="@locale.LocaleId" dir="@(locale.Info.TextInfo.IsRightToLeft
{
<li>
<a href="#" data-lang="@locale.LocaleId" dir="@(locale.Info.TextInfo.IsRightToLeft
? "rtl"
: "ltr")">
@locale.DisplayName
</a>
</li>
}
@locale.DisplayName
</a>
</li>
}
<li></li>
<li></li>
<li></li>
@ -320,11 +320,11 @@ if (Roles.IsUserInRole("Administrators"))
}
@RenderSection("scripts", false)
<script id="result-template" type="text/x-jsrender">
<a href="{{:Url}}" class="search-result-item" title="{{:Title}}">
<h4 class="search-result-heading no-wrapping">{{:Label}}</h4>
<p class="search-result-text">{{:Group}}</p>
</a>
</script>
<a href="{{:Url}}" class="search-result-item" title="{{:Title}}">
<h4 class="search-result-heading no-wrapping">{{:Label}}</h4>
<p class="search-result-text">{{:Group}}</p>
</a>
</script>
<script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -116,6 +116,11 @@ table
}
}
pre
{
white-space: normal;
}
.at-share-btn-elements
{
margin-left: -8px;