Skip to content

Commit ba9cc82

Browse files
author
zmrenwu
committed
Collect the static files to static root
1 parent 83ff0aa commit ba9cc82

File tree

4 files changed

+188
-3
lines changed

4 files changed

+188
-3
lines changed

weblog/static/blog/css/comment.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.highlighted {
2+
color: red;
3+
}
4+
15
#comment-form {
26
margin: 50px 0 60px 0;
37
padding: 0 30px;
@@ -73,7 +77,26 @@
7377
display: none;
7478
}
7579

80+
.comment-panel .like-form {
81+
display: inline-block;
82+
margin: 0;
83+
padding: 0;
84+
}
85+
86+
.comment-panel .like-form button {
87+
background: none;
88+
border: none;
89+
margin-right: 10px;
90+
font-size: 16px;
91+
}
7692

93+
.comment-panel .like-form button i {
94+
margin: 0;
95+
}
96+
97+
input[name='honeypot'] {
98+
display: none;
99+
}
77100

78101
.comment-panel textarea {
79102
height: 32px;
@@ -97,4 +120,14 @@
97120
color: #fff;
98121
float: right;
99122
margin-left: 10px;
123+
}
124+
125+
.login-reminder {
126+
padding-left: 30px;
127+
margin-bottom: -40px;
128+
margin-top: 20px;
129+
}
130+
131+
.login-reminder a {
132+
color: deepskyblue;
100133
}

weblog/static/blog/css/custom.css

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,16 @@ figure {
238238

239239
.post-category,
240240
.post-date,
241-
.post-author {
241+
.post-author,
242+
.comments-link {
242243
position: relative;
243244
padding-right: 15px;
244245
}
245246

246247
.post-category::after,
247248
.post-date::after,
248-
.post-author::after {
249+
.post-author::after,
250+
.comments-link::after {
249251
position: absolute;
250252
content: '.';
251253
color: #000;
@@ -835,4 +837,76 @@ figure {
835837
.overlay ul li {
836838
min-height: 34px;
837839
}
840+
}
841+
842+
/**
843+
* 11.0 - login form
844+
*/
845+
.form-wrapper {
846+
margin-top: 100px;
847+
}
848+
849+
.form-wrapper h1 {
850+
margin-bottom: 20px;
851+
}
852+
853+
.login-form input, .register-form input {
854+
border: 1px solid #aaa;
855+
margin-bottom: 25px;
856+
width: 100%;
857+
padding: 15px 15px;
858+
font-size: 16px;
859+
line-height: 100%;
860+
transition: 0.4s border-color linear;
861+
}
862+
863+
.login-form input:focus, .register-form input:focus,
864+
.login-form textarea:focus {
865+
border-color: #666;
866+
}
867+
868+
.login-form .login-text, .register-form .login-text {
869+
display: block;
870+
text-align: right;
871+
margin-bottom: 10px;
872+
}
873+
874+
.login-form .login-btn, .register-form .register-btn {
875+
display: block;
876+
width: 100%;
877+
border: 1px solid #aaa;
878+
background-color: #FFFFFF;
879+
padding: 10px 0;
880+
font-size: 16px;
881+
}
882+
883+
.social-login {
884+
position: relative;
885+
margin-top: 30px;
886+
font-size: 15px;
887+
}
888+
889+
.social-login hr {
890+
margin-bottom: 15px;
891+
}
892+
893+
.social-text {
894+
text-align: center;
895+
position: absolute;
896+
display: block;
897+
width: 120px;
898+
padding: 0 10px;
899+
top: -11px;
900+
left: 50%;
901+
margin-left: -60px;
902+
background-color: #FFFFFF;
903+
}
904+
905+
.social-icon {
906+
text-align: center;
907+
}
908+
909+
.social-icon i {
910+
margin: 0 4px;
911+
font-size: 16px;
838912
}

weblog/static/blog/js/blog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $(
2525
}),
2626

2727
$('.comment-panel .ion-chatbox-working').click(function () {
28-
$(this).parent().siblings('.inner-panel , form').slideToggle(400);
28+
$(this).parent().siblings('.inner-panel , .comment-form').slideToggle(400);
2929
$(this).parent().siblings(':last').children(':button').click(function () {
3030
$(this).parent().parent().children('.inner-panel , form').slideUp(400);
3131
});
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
var notify_badge_id;
2+
var notify_menu_id;
3+
var notify_api_url;
4+
var notify_fetch_count;
5+
var notify_unread_url;
6+
var notify_mark_all_unread_url;
7+
var notify_refresh_period = 15000;
8+
var consecutive_misfires = 0;
9+
var registered_functions = [];
10+
11+
function fill_notification_badge(data) {
12+
var badge = document.getElementById(notify_badge_id);
13+
if (badge) {
14+
badge.innerHTML = data.unread_count;
15+
}
16+
}
17+
18+
function fill_notification_list(data) {
19+
var menu = document.getElementById(notify_menu_id);
20+
if (menu) {
21+
menu.innerHTML = "";
22+
for (var i=0; i < data.unread_list.length; i++) {
23+
var item = data.unread_list[i];
24+
console.log(item)
25+
var message = ""
26+
if(typeof item.actor !== 'undefined'){
27+
message = item.actor;
28+
}
29+
if(typeof item.verb !== 'undefined'){
30+
message = message + " " + item.verb;
31+
}
32+
if(typeof item.target !== 'undefined'){
33+
message = message + " " + item.target;
34+
}
35+
if(typeof item.timestamp !== 'undefined'){
36+
message = message + " " + item.timestamp;
37+
}
38+
39+
menu.innerHTML = menu.innerHTML + "<li>"+ message + "</li>";
40+
}
41+
}
42+
}
43+
44+
function register_notifier(func) {
45+
registered_functions.push(func);
46+
}
47+
48+
function fetch_api_data() {
49+
if (registered_functions.length > 0) {
50+
//only fetch data if a function is setup
51+
var r = new XMLHttpRequest();
52+
r.open("GET", notify_api_url+'?max='+notify_fetch_count, true);
53+
r.onreadystatechange = function () {
54+
if (r.readyState != 4 || r.status != 200) {
55+
consecutive_misfires++;
56+
}
57+
else {
58+
consecutive_misfires = 0;
59+
for (var i=0; i < registered_functions.length; i++) {
60+
var func = registered_functions[i];
61+
func(JSON.parse(r.responseText));
62+
}
63+
}
64+
}
65+
r.send();
66+
}
67+
if (consecutive_misfires < 10) {
68+
setTimeout(fetch_api_data,notify_refresh_period);
69+
} else {
70+
var badge = document.getElementById(notify_badge_id);
71+
if (badge) {
72+
badge.innerHTML = "!";
73+
badge.title = "Connection lost!"
74+
}
75+
}
76+
}
77+
78+
setTimeout(fetch_api_data,1000);

0 commit comments

Comments
 (0)