Compare commits
17 Commits
temp-OUR-456
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d5b0abd1ae | |||
| 81ba5bd022 | |||
| 96a3ca71a7 | |||
| a8e253553a | |||
| 91280b18f6 | |||
| fbb8ef1ba0 | |||
| 3f46d94a93 | |||
| 161fcc7f01 | |||
| 5e2cb68299 | |||
| e6a5b59ac6 | |||
| a1d48afeca | |||
| e3c52baf3a | |||
| 0cef4124db | |||
| 87847769ce | |||
| 49c50046c9 | |||
| c93e4d1e2d | |||
| 686e3deb6c |
@@ -62,7 +62,7 @@ function GetSearchFilters(cssClass) {
|
||||
}
|
||||
|
||||
var forumId = $('#selectCategory').val();
|
||||
if(forumId !== undefined) {
|
||||
if(forumId) {
|
||||
forumId = forumId.replace(/([A-Za-z])\w+/g, "");
|
||||
}
|
||||
|
||||
@@ -365,7 +365,8 @@ $('#search-options input[type=checkbox]').click(function () {
|
||||
newUri = updateQueryString("order", orderValue, window.location.href);
|
||||
}
|
||||
} else {
|
||||
newUri = updateQueryString(this.name, this.checked, window.location.href);
|
||||
newUri = updateQueryString(this.name, this.checked, window.location.href);
|
||||
newUri = updateQueryString("page", 1, newUri);
|
||||
}
|
||||
console.log(newUri);
|
||||
window.location = newUri;
|
||||
|
||||
@@ -1,174 +1,174 @@
|
||||
body.packages {
|
||||
nav {
|
||||
|
||||
h3 {
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
opacity: .7;
|
||||
margin: .5rem 0 .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
h3 {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
&.open, &.active {
|
||||
h3, a {
|
||||
opacity: 1;
|
||||
color: #000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.active > ul {
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.packages-content {
|
||||
|
||||
.search-big {
|
||||
margin-bottom: 0;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 1em 0 10px;
|
||||
font-size: 2.1rem;
|
||||
}
|
||||
|
||||
.package {
|
||||
margin-bottom: 15px;
|
||||
padding: 20px;
|
||||
transition: all .1s linear;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #e9e9e9;
|
||||
|
||||
&:hover {
|
||||
@include box-shadow(2);
|
||||
|
||||
.icon {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
border: none;
|
||||
border-bottom: 1px solid whitesmoke;
|
||||
width: 100%;
|
||||
|
||||
body.packages {
|
||||
nav {
|
||||
|
||||
h3 {
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
opacity: .7;
|
||||
margin: .5rem 0 .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
h3 {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
&.open, &.active {
|
||||
h3, a {
|
||||
opacity: 1;
|
||||
color: #000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.active > ul {
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.packages-content {
|
||||
|
||||
.search-big {
|
||||
margin-bottom: 0;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 1em 0 10px;
|
||||
font-size: 2.1rem;
|
||||
}
|
||||
|
||||
.package {
|
||||
margin-bottom: 15px;
|
||||
padding: 20px;
|
||||
transition: all .1s linear;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #e9e9e9;
|
||||
|
||||
&:hover {
|
||||
@include box-shadow(2);
|
||||
|
||||
.icon {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
border: none;
|
||||
border-bottom: 1px solid whitesmoke;
|
||||
width: 100%;
|
||||
|
||||
.row{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: .5rem;
|
||||
font-weight: 600;
|
||||
|
||||
a {
|
||||
color: $color-headline;
|
||||
|
||||
&:hover {
|
||||
color: $color-our;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
|
||||
@media (min-width: $md) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.col-xs-2 {
|
||||
vertical-align: middle !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.other {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.stats {
|
||||
left: calc(16.666666666666664% + 15px);
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Monaco, Courier, monospace;
|
||||
font-size: .75rem;
|
||||
|
||||
i {
|
||||
margin-left: 3px;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
span {
|
||||
&:first-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: .9rem;
|
||||
color: $color-text;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.package-badge {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
bottom: -3px;
|
||||
|
||||
|
||||
@media (min-width: $md) {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.karma , .downloads {
|
||||
color: #000;
|
||||
|
||||
span {
|
||||
transform: translate(0, 2px);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
&.liked {
|
||||
.karma {
|
||||
i {
|
||||
color: $color-red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 1rem;
|
||||
line-height: 1.3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: .8rem;
|
||||
margin-top: 3px;
|
||||
max-height: 28px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: .5rem;
|
||||
font-weight: 600;
|
||||
|
||||
a {
|
||||
color: $color-headline;
|
||||
|
||||
&:hover {
|
||||
color: $color-our;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
|
||||
@media (min-width: $md) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.col-xs-2 {
|
||||
vertical-align: middle !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.other {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.stats {
|
||||
left: calc(16.666666666666664% + 15px);
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Monaco, Courier, monospace;
|
||||
font-size: .75rem;
|
||||
|
||||
i {
|
||||
margin-left: 3px;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
span {
|
||||
&:first-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: .9rem;
|
||||
color: $color-text;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.package-badge {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
bottom: -3px;
|
||||
|
||||
|
||||
@media (min-width: $md) {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.karma , .downloads {
|
||||
color: #000;
|
||||
|
||||
span {
|
||||
transform: translate(0, 2px);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
&.liked {
|
||||
.karma {
|
||||
i {
|
||||
color: $color-red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 1rem;
|
||||
line-height: 1.3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: .8rem;
|
||||
margin-top: 3px;
|
||||
max-height: 28px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
@@ -157,6 +157,10 @@ section.forum {
|
||||
max-width: 112px;
|
||||
height: auto;
|
||||
|
||||
.package-forum-activity & {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
@media (min-width: $md) {
|
||||
width: 58px;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
Html.RequiresCss("~/assets/css/style.min.css", 0);
|
||||
Html.RequiresCss("https://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic", 0);
|
||||
Html.RequiresCss("https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css", 0);
|
||||
Html.RequiresCss("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css", 0);
|
||||
|
||||
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js");
|
||||
@@ -23,7 +23,7 @@
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Editor.js");
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Sanitizer.js");
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.8.1/mustache.min.js");
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js");
|
||||
Html.RequiresJs("https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js");
|
||||
|
||||
Html.RequiresJs("~/assets/js/jquery.ajaxfileupload.js");
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
|
||||
@Html.Partial("~/Views/Partials/Community/JsValues.cshtml")
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
@inherits OurUmbraco.Our.Models.OurUmbracoTemplatePage
|
||||
|
||||
@{
|
||||
// Save query string for use in pagination links
|
||||
var queryString = HttpUtility.ParseQueryString(Request.QueryString.ToString());
|
||||
|
||||
const int pagesToShowLeft = 4;
|
||||
int page;
|
||||
if (!int.TryParse(Request["page"], out page))
|
||||
@@ -40,9 +43,9 @@
|
||||
TimeSpan.FromSeconds(4));
|
||||
}
|
||||
|
||||
var totalCountKey = "OurForumForumThreadCount[" + cat + "]";
|
||||
var totalCountKey = "OurForumForumThreadCount[" + cat + unsolved + noreplies + "]";
|
||||
var totalTopics = (int)cache.GetCacheItem(totalCountKey,
|
||||
() => topicService.GetAllTopicsCount(cat),
|
||||
() => topicService.GetAllTopicsCount(cat, unsolved, noreplies),
|
||||
TimeSpan.FromMinutes(1));
|
||||
|
||||
var pages = (totalTopics / pageSize) + 1;
|
||||
@@ -168,19 +171,22 @@
|
||||
<nav class="pagination" role="navigation">
|
||||
@if (page > 1)
|
||||
{
|
||||
<a class="prev" href="?page=@(page - 1)">Prev</a>
|
||||
queryString["page"] = (page - 1).ToString();
|
||||
<a class="prev" href="?@queryString">Prev</a>
|
||||
<span>…</span>
|
||||
}
|
||||
|
||||
@for (var i = (page - 1 > 0 ? page - 1 : 1); i < (page + (pagesToShowLeft - (page - 1 > 0 ? 1 : 0))) && i <= pages; i++)
|
||||
{
|
||||
<a class="@Umbraco.If(i == page, "active")" href="?page=@i">@i</a>
|
||||
queryString["page"] = i.ToString();
|
||||
<a class="@Umbraco.If(i == page, "active")" href="?@queryString">@i</a>
|
||||
}
|
||||
|
||||
@if (page < (pages - 3))
|
||||
@if (page < pages)
|
||||
{
|
||||
queryString["page"] = (page + 1).ToString();
|
||||
<span>…</span>
|
||||
<a class="next" href="?page=@(page + 1)">Next</a>
|
||||
<a class="next" href="?@queryString">Next</a>
|
||||
}
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -185,7 +185,9 @@
|
||||
defaultScreenshot = childContent.GetPropertyValue("defaultScreenshotPath", false, "/css/img/package2.png");
|
||||
}
|
||||
}
|
||||
<img src="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=50&height=50&format=png" />
|
||||
<img src="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=50&height=50&format=png"
|
||||
srcset="@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=100&height=100&format=png 2x,
|
||||
@Utils.GetScreenshotPath(defaultScreenshot)?bgcolor=fff&width=150&height=150&format=png 3x" />
|
||||
</div>
|
||||
<div class="col-xs-10 col-md-6">
|
||||
<div class="forum-thread-text">
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
@foreach (var image in screenshots)
|
||||
{
|
||||
<a class="fancybox" rel="gallery1" href="@Utils.GetScreenshotPath(image.Path)" title="">
|
||||
<a class="fancybox" data-fancybox="package-gallery" href="@Utils.GetScreenshotPath(image.Path)" title="">
|
||||
<img src="@Utils.GetScreenshotPath(image.Path)?bgcolor=fff&height=154&width=281&format=png" alt=""/>
|
||||
</a>
|
||||
}
|
||||
@@ -236,7 +236,7 @@
|
||||
<a href="@forum.Url" class="forum-thread">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-10 col-md-0">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="forum-thread-text">
|
||||
<h3>@forum.Name</h3>
|
||||
<p>@forum.forumDescription</p>
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
(function () {
|
||||
$(".fancybox")
|
||||
.fancybox({
|
||||
openEffect: 'none',
|
||||
closeEffect: 'none',
|
||||
padding: 0
|
||||
// options
|
||||
loop: true,
|
||||
arrows: true,
|
||||
infobar: false
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -157,7 +157,11 @@ namespace OurUmbraco.Community.Controllers
|
||||
|
||||
foreach (var group in filteredContributors)
|
||||
{
|
||||
temp.Add(new GitHubGlobalContributorModel(group));
|
||||
var contributor = new GitHubGlobalContributorModel(group);
|
||||
if (contributor.TotalCommits > 0)
|
||||
{
|
||||
temp.Add(contributor);
|
||||
}
|
||||
}
|
||||
|
||||
return temp;
|
||||
|
||||
@@ -123,7 +123,7 @@ FETCH NEXT @count ROWS ONLY";
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <returns></returns>
|
||||
public int GetAllTopicsCount(int category = -1)
|
||||
public int GetAllTopicsCount(int category = -1, bool unsolved = false, bool noreplies = false)
|
||||
{
|
||||
const string sql1 = @"SELECT COUNT(*) as forumTopicCount
|
||||
FROM forumTopics
|
||||
@@ -135,6 +135,18 @@ LEFT OUTER JOIN umbracoNode u2 ON (forumTopics.memberId = u2.id AND u2.nodeObjec
|
||||
|
||||
var sql = (category > 0 ? sqlic : sqlix);
|
||||
|
||||
if (unsolved)
|
||||
if (sql.Contains("WHERE"))
|
||||
sql = sql + " AND answer = 0";
|
||||
else
|
||||
sql = sql + " WHERE answer = 0";
|
||||
|
||||
if (noreplies)
|
||||
if (sql.Contains("WHERE"))
|
||||
sql = sql + " AND replies = 0";
|
||||
else
|
||||
sql = sql + " WHERE replies = 0";
|
||||
|
||||
return _databaseContext.Database.ExecuteScalar<int>(sql, new { category = category });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user