Skip to content

Commit 785ef5e

Browse files
committed
Widgets of standard theme improved
1 parent 4244b6d commit 785ef5e

6 files changed

Lines changed: 71 additions & 70 deletions

File tree

BlogEngine/BlogEngine.NET/Custom/Themes/Standard/src/css/styles.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BlogEngine/BlogEngine.NET/Custom/Themes/Standard/src/css/styles.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,79 @@
1-

2-
1+
$(document).ready(function () {
2+
//
3+
var blogAuthor = $(".blog-author");
4+
if ($.trim(blogAuthor.html()).length) {
5+
$(blogAuthor).show();
6+
}
37

4-
//
5-
var blogAuthor = $(".blog-author");
6-
if ($.trim(blogAuthor.html()).length) {
7-
$(blogAuthor).show();
8-
}
8+
//
9+
var socialNetwork = $(".social-network li a");
10+
for (i = 0; i < socialNetwork.length; ++i) {
11+
link = socialNetwork[i];
912

10-
//
11-
var socialNetwork = $(".social-network li a");
12-
for (i = 0; i < socialNetwork.length; ++i) {
13-
link = socialNetwork[i];
14-
15-
if ($(link).attr("href") != "") {
16-
$(link).parent().css("display","inline-block");
13+
if ($(link).attr("href") != "") {
14+
$(link).parent().css("display", "inline-block");
15+
}
1716
}
18-
}
1917

20-
//
21-
var simpleCap = $("label[for=simpleCaptchaValue]").parent();
22-
simpleCap.hide();
23-
$("#commentCaptcha").append(simpleCap.html());
18+
//
19+
var simpleCap = $("label[for=simpleCaptchaValue]").parent();
20+
simpleCap.hide();
21+
$("#commentCaptcha").append(simpleCap.html());
2422

25-
//
26-
var logintext = $(".item-login span").text();
27-
var aLogin = $(".item-login");
28-
aLogin.attr("title", logintext);
29-
var aLoginAttr = aLogin.attr("href");
30-
if (aLoginAttr == "/admin/") {
31-
aLogin.removeClass("item-login");
32-
aLogin.addClass("item-admin");
23+
//
24+
var logintext = $(".item-login span").text();
25+
var aLogin = $(".item-login");
3326
aLogin.attr("title", logintext);
34-
}
27+
var aLoginAttr = aLogin.attr("href");
28+
if (aLoginAttr == "/admin/") {
29+
aLogin.removeClass("item-login");
30+
aLogin.addClass("item-admin");
31+
aLogin.attr("title", logintext);
32+
}
3533

36-
//
37-
$(".widget a:has(img)").addClass("no-border");
34+
//
35+
$(".widget a:has(img)").addClass("no-border");
3836

39-
//
40-
if (location.pathname !== '/') {
41-
$('.blog-nav ul li a[href*="/' + location.pathname.split("/")[1] + '"]').addClass('active');
42-
} else {
43-
$('.blog-nav ul li a[href="proxy.php?url=https%3A%2F%2Fgithub.com%2F"]').addClass('active');
44-
}
37+
//
38+
if (location.pathname !== '/') {
39+
$('.blog-nav ul li a[href*="/' + location.pathname.split("/")[1] + '"]').addClass('active');
40+
} else {
41+
$('.blog-nav ul li a[href="proxy.php?url=https%3A%2F%2Fgithub.com%2F"]').addClass('active');
42+
}
4543

46-
//
47-
var postAdminLinks = $(".post-adminlinks a");
48-
if (postAdminLinks.length == 2) {
49-
$(".post-adminlinks a:nth-child(1)").addClass("item-edit");
50-
$(".post-adminlinks a:nth-child(2)").addClass("item-delete");
51-
}
52-
if (postAdminLinks.length == 4) {
53-
$(".post-adminlinks a:nth-child(1)").addClass("hidden");
54-
$(".post-adminlinks a:nth-child(2)").addClass("item-approve");
55-
$(".post-adminlinks a:nth-child(3)").addClass("item-edit");
56-
$(".post-adminlinks a:nth-child(4)").addClass("item-delete");
57-
}
44+
//
45+
var postAdminLinks = $(".post-adminlinks a");
46+
if (postAdminLinks.length == 2) {
47+
$(".post-adminlinks a:nth-child(1)").addClass("item-edit");
48+
$(".post-adminlinks a:nth-child(2)").addClass("item-delete");
49+
}
50+
if (postAdminLinks.length == 4) {
51+
$(".post-adminlinks a:nth-child(1)").addClass("hidden");
52+
$(".post-adminlinks a:nth-child(2)").addClass("item-approve");
53+
$(".post-adminlinks a:nth-child(3)").addClass("item-edit");
54+
$(".post-adminlinks a:nth-child(4)").addClass("item-delete");
55+
}
5856

59-
//
60-
if (!$.trim($('#commentlist').html()).length) {
61-
$("#commentlist").parent().hide();
62-
}
63-
$("#btnSaveAjax").click(function () {
64-
$("#commentlist").parent().show();
65-
});
57+
//
58+
if (!$.trim($('#commentlist').html()).length) {
59+
$("#commentlist").parent().hide();
60+
}
61+
$("#btnSaveAjax").click(function () {
62+
$("#commentlist").parent().show();
63+
});
6664

65+
// support theme
66+
var adminNav = $(".item-admin");
67+
var adminAlert = $(".admin-alerts-true");
68+
var adminName = $(".post-author a").html();
6769

68-
// support theme
69-
var adminNav = $(".item-admin");
70-
var adminAlert = $(".admin-alerts-true");
71-
var adminName = $(".post-author a").html();
70+
console.log(adminName);
71+
var adminAlertHtml = '<div class="support-theme visible-md visible-lg alert alert-info clearfix"><p class="pull-left">Hi ' + adminName + ', You can read <a href="http://francis.bio/notes/blogengine-standard-theme-2016/#customize" target="_blank" rel="nofollow"><b>This Article</b></a> that will help you customize this theme easily.</p><a href="admin/#/custom/themes" class="pull-right visible-lg"><i class="fa fa-times" data-toggle="tooltip" data-placement="left" title="remove from theme options"></i></a></div>';
72+
if (adminNav.length && adminAlert.length && (location.pathname == '/' || location.pathname == '/default.aspx')) {
73+
adminAlert.prepend(adminAlertHtml);
74+
}
7275

73-
console.log(adminName);
74-
var adminAlertHtml = '<div class="support-theme visible-md visible-lg alert alert-info clearfix"><p class="pull-left">Hi ' + adminName + ', You can read <a href="http://francis.bio/notes/blogengine-standard-theme-2016/#customize" target="_blank" rel="nofollow"><b>This Article</b></a> that will help you customize this theme easily.</p><a href="admin/#/custom/themes" class="pull-right visible-lg"><i class="fa fa-times" data-toggle="tooltip" data-placement="left" title="remove from theme options"></i></a></div>';
75-
if (adminNav.length && adminAlert.length && (location.pathname == '/' || location.pathname == '/default.aspx')) {
76-
adminAlert.prepend(adminAlertHtml);
77-
}
76+
//
77+
$(".blog-nav li a, [data-toggle=tooltip]").tooltip();
7878

79-
//
80-
$(".blog-nav li a, [data-toggle=tooltip]").tooltip();
79+
});

BlogEngine/BlogEngine.NET/Custom/Themes/Standard/src/scss/sections/_header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
text-align: center;
1616
color: #fff !important;
1717
display: block;
18-
font-size: 1.5rem;
18+
font-size: 1.75rem;
1919
padding: 3rem 0 1rem;
2020
font-family: $font-family-heading;
2121
outline: none !important;

BlogEngine/BlogEngine.NET/Custom/Themes/Standard/src/scss/sections/_widgets.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
padding-bottom: 1.5rem;
2121
margin-bottom: 1px;
2222
color: #fff;
23+
font-family: $font-family-base;
2324
font-weight: $font-weight-normal;
2425
text-transform: uppercase;
25-
letter-spacing: .125rem;
26+
letter-spacing: $px1;
2627
font-size: 1rem;
2728
line-height: 3.75rem;
2829
padding: 0 1.5rem;

BlogEngine/BlogEngine.NET/Custom/Themes/Standard/src/scss/widgets/_postlist.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
margin: 0;
1414
font-size: 1rem;
1515
vertical-align:middle;
16+
font-weight:$font-weight-normal;
1617
}
1718

1819
p {

0 commit comments

Comments
 (0)