Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b715111

Browse files
committed
feat: 样式修改&启用新 logo
1 parent 812212a commit b715111

31 files changed

+160
-106
lines changed

cmd/studygolang/background.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func ServeBackGround() {
4949

5050
c := cron.New()
5151

52-
if config.ConfigFile.MustBool("global", "is_master", true) {
52+
if config.ConfigFile.MustBool("global", "is_master", false) {
5353
// 每天对非活跃用户降频
5454
c.AddFunc("@daily", decrUserActiveWeight)
5555

db/conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
. "github.com/polaris1119/config"
1515

1616
_ "github.com/go-sql-driver/mysql"
17-
"xorm.io/xorm"
1817
"xorm.io/core"
18+
"xorm.io/xorm"
1919
)
2020

2121
var MasterDB *xorm.Engine

logic/article.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"time"
1818

1919
"github.com/PuerkitoBio/goquery"
20-
"xorm.io/xorm"
2120
"github.com/jaytaylor/html2text"
2221
"github.com/polaris1119/config"
2322
"github.com/polaris1119/goutils"
@@ -27,6 +26,7 @@ import (
2726
"github.com/polaris1119/times"
2827
"github.com/tidwall/gjson"
2928
"golang.org/x/text/encoding/simplifiedchinese"
29+
"xorm.io/xorm"
3030

3131
. "github.com/studygolang/studygolang/db"
3232
"github.com/studygolang/studygolang/global"

logic/feed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"github.com/studygolang/studygolang/model"
1919
"github.com/studygolang/studygolang/util"
2020

21-
"xorm.io/xorm"
2221
"github.com/polaris1119/set"
22+
"xorm.io/xorm"
2323
)
2424

2525
type FeedLogic struct{}

logic/message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import (
1515

1616
. "github.com/studygolang/studygolang/db"
1717

18-
"xorm.io/xorm"
1918
"github.com/polaris1119/goutils"
2019
"github.com/polaris1119/logger"
2120
"github.com/polaris1119/set"
2221
"golang.org/x/net/context"
22+
"xorm.io/xorm"
2323
)
2424

2525
type MessageLogic struct{}

logic/mission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
. "github.com/studygolang/studygolang/db"
1818
"github.com/studygolang/studygolang/model"
1919

20-
"xorm.io/xorm"
2120
"github.com/polaris1119/goutils"
2221
"github.com/polaris1119/times"
2322
"golang.org/x/net/context"
23+
"xorm.io/xorm"
2424
)
2525

2626
type MissionLogic struct{}

logic/topic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919
. "github.com/studygolang/studygolang/db"
2020

2121
"github.com/fatih/structs"
22-
"xorm.io/xorm"
2322
"github.com/polaris1119/goutils"
2423
"github.com/polaris1119/logger"
2524
"github.com/polaris1119/set"
2625
"golang.org/x/net/context"
26+
"xorm.io/xorm"
2727
)
2828

2929
type TopicLogic struct{}

logic/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import (
2121
"github.com/polaris1119/slices"
2222

2323
"github.com/go-validator/validator"
24-
"xorm.io/xorm"
2524
"github.com/polaris1119/config"
2625
"github.com/polaris1119/goutils"
2726
"github.com/polaris1119/logger"
2827
"golang.org/x/net/context"
28+
"xorm.io/xorm"
2929

3030
. "github.com/studygolang/studygolang/db"
3131
)

logic/user_rich.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import (
1717
. "github.com/studygolang/studygolang/db"
1818

1919
"github.com/garyburd/redigo/redis"
20-
"xorm.io/xorm"
2120
"github.com/polaris1119/goutils"
2221
"github.com/polaris1119/logger"
2322
"github.com/polaris1119/nosql"
2423
"github.com/polaris1119/times"
2524
"golang.org/x/net/context"
25+
"xorm.io/xorm"
2626
)
2727

2828
var (

model/article.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"strings"
1313
"time"
1414

15-
"xorm.io/xorm"
1615
"github.com/polaris1119/logger"
16+
"xorm.io/xorm"
1717
)
1818

1919
const (

model/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"math/rand"
1313
"time"
1414

15-
"xorm.io/xorm"
1615
"github.com/polaris1119/goutils"
16+
"xorm.io/xorm"
1717
)
1818

1919
// 用户登录信息

static/css/main.css

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
html, body { background: #e2e2e2; font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;}
22

3-
a:link, a:visited, a:active {color: #666; text-decoration: none; word-break: break-all; }
4-
a:hover {color: #474747; text-decoration: underline; }
3+
a:link, a:visited, a:active {color: #333; text-decoration: none; word-break: break-all; }
4+
a:hover {color: #000; text-decoration: underline; }
55

66
a.btn:link, a.btn:visited, a.btn:active { color: #fff; }
77

@@ -19,21 +19,26 @@ a.count_livid:hover {line-height: 12px; font-weight: bold; color: white; backgro
1919

2020
a.count_blue:visited, a.count_green:visited, a.count_orange:visited, a.count_livid:visited {line-height: 12px; font-weight: bold; color: white; background-color: #e5e5e5; display: inline-block; padding: 2px 10px 2px 10px; -moz-border-radius: 12px; -webkit-border-radius: 12px; border-radius: 12px; text-decoration: none; margin-right: 5px; }
2121

22+
a.author:link, a.author:visited, a.author:active { font-size: 10px; line-height: 10px; display: inline-block; padding: 4px 4px 4px 4px; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; text-decoration: none; color: #666; }
23+
a.author:hover {text-decoration: none; color: #444; }
24+
2225
a.node:link, a.node:visited, a.node:active {background-color: #f5f5f5; font-size: 10px; line-height: 10px; display: inline-block; padding: 4px 4px 4px 4px; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; text-decoration: none; color: #999; }
2326
a.node:hover {text-decoration: none; background-color: #e2e2e2; color: #777; }
2427

2528
a.tab:link, a.tab:visited, a.tab:active {display: inline-block; font-size: 13px; line-height: 13px; padding: 5px 8px 5px 8px; margin-right: 5px; border-radius: 3px; color: #555; }
2629
a.tab:hover {background-color: #f5f5f5; color: #000; text-decoration: none; }
2730

28-
a.tab_current:link, a.tab_current:visited, a.tab_current:active {display: inline-block; font-size: 13px; line-height: 13px; padding: 5px 8px 5px 8px; margin-right: 5px; border-radius: 3px; background-color: #334; color: #fff; }
29-
a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none; }
31+
a.tab_current:link, a.tab_current:visited, a.tab_current:active {display: inline-block; font-size: 13px; line-height: 13px; padding: 5px 8px 5px 8px; margin-right: 5px; border-radius: 3px; background-color: #59BF74; color: #fff; }
32+
a.tab_current:hover {background-color: rgb(84, 199, 115); color: #fff; text-decoration: none; }
3033

3134
.clr:after {clear: both;content: '\0020';display: block;visibility: hidden;height: 0;}
3235

3336
/* nav */
3437
.navbar-default { position: relative; z-index: 1000; }
35-
.navbar-default .navbar-nav>li>a { color: #bbbbbb; }
36-
.navbar-default .navbar-nav>.active>a { color: #ffffff; }
38+
.navbar-default .navbar-nav>li>a { color: #ddd; }
39+
.navbar-default .navbar-nav>.active>a { color: #fff; }
40+
41+
.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus { background-color: #59BF74; }
3742

3843
.search-query {padding-left: 8px;padding-right: 8px;margin-bottom: 0;-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px; height: 30px; margin-top: 6px;}
3944

@@ -53,8 +58,8 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
5358
.container .form-horizontal {padding-top:15px; padding-bottom:15px;}
5459

5560
.article { overflow: hidden; border-top: solid 2px #fff; margin-bottom: 11px; }
56-
.article:hover {border-top: solid 2px #DB6D4C;}
57-
.article:hover h2 a { color: #DB6D4C }
61+
.article:hover {border-top: solid 2px #59BF74;}
62+
.article:hover h2 a { color: #000 }
5863
.article:hover p.text { color: #343434; }
5964
.article .row { border-bottom: 1px solid #e5e5e5; padding: 10px 20px 10px 12px; margin-left:0px; margin-right:0px; }
6065
.article .row div { padding: 0px; }
@@ -72,7 +77,7 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
7277
.article .metatag .author {height: 20px; margin-right: 20px;}
7378
.article .metatag .cmt, .article .metatag .like, .article .metatag .view, .article .metatag .collect { margin: 0 5px; color:#979797; }
7479
.article .metatag .hadlike i { color: #ff0000; }
75-
.article .metatag a:hover { text-decoration: none; color: #DB6D4C; }
80+
.article .metatag a:hover { text-decoration: none; color: #59BF74; }
7681

7782
.sidebar {margin-bottom: 12px; border-bottom: 1px solid #e2e2e2;}
7883
.sidebar .top { height: 38px; line-height: 38px; border-bottom: solid 1px #EAEAEA; position: relative; margin-bottom: 15px; }
@@ -94,13 +99,13 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
9499
.sidebar .sb-content .topic-list ul { margin-left: 12px; }
95100
.sidebar .sb-content .topic-list ul li i{ float: left;width: 4px;height: 4px;background: #858585;margin-top: 13px;margin-right: 7px; }
96101
.sidebar .sb-content .topic-list ul li a { text-decoration: none; line-height: 30px;height: 30px;padding-bottom: 18px;width: 180px;font-size: 12px;color: #666666; white-space: nowrap; }
97-
.sidebar .sb-content .topic-list ul li a:hover { color: #d54f4b; }
102+
.sidebar .sb-content .topic-list ul li a:hover { color: #59BF74; }
98103

99104
.sidebar .sb-content .article-list { margin: 15px 5px 10px 0px; }
100105
.sidebar .sb-content .article-list ul { margin-left: 12px; }
101106
.sidebar .sb-content .article-list ul li i{ float: left;width: 4px;height: 4px;background: #858585;margin-top: 13px;margin-right: 7px; }
102107
.sidebar .sb-content .article-list ul li a { text-decoration: none; line-height: 30px;height: 30px;padding-bottom: 18px;width: 180px;font-size: 12px;color: #666666; white-space: nowrap; }
103-
.sidebar .sb-content .article-list ul li a:hover { color: #d54f4b; }
108+
.sidebar .sb-content .article-list ul li a:hover { color: #59BF74; }
104109

105110
.sidebar .sb-content .project-list { margin: 15px 5px 10px 0px; }
106111
.sidebar .sb-content .project-list ul { margin-left: 12px; }
@@ -110,13 +115,13 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
110115
.sidebar .sb-content .project-list ul li .title{ width: 145px;height: 54px;float: left;margin-left: 18px; }
111116
.sidebar .sb-content .project-list ul li .title h4{ height: 30px;padding: 7px 0;overflow: hidden; }
112117
.sidebar .sb-content .project-list ul li .title a { font-size: 12px;font-size: 1.2rem;font-family: "NSimSun";color: #858585;line-height: 18px; text-decoration: none; color: #666666; white-space: nowrap; }
113-
.sidebar .sb-content .project-list ul li .title a:hover { color: #d54f4b; }
118+
.sidebar .sb-content .project-list ul li .title a:hover { color: #59BF74; }
114119

115120
.sidebar .sb-content .resource-list { margin: 15px 5px 10px 0px; }
116121
.sidebar .sb-content .resource-list ul { margin-left: 12px; }
117122
.sidebar .sb-content .resource-list ul li i{ float: left;width: 4px;height: 4px;background: #858585;margin-top: 13px;margin-right: 7px; }
118123
.sidebar .sb-content .resource-list ul li a { text-decoration: none; line-height: 30px;height: 30px;padding-bottom: 18px;width: 180px;font-size: 12px;color: #666666; white-space: nowrap; }
119-
.sidebar .sb-content .resource-list ul li a:hover { color: #d54f4b; }
124+
.sidebar .sb-content .resource-list ul li a:hover { color: #59BF74; }
120125

121126
.sidebar .sb-content .cmt-list {}
122127
.sidebar .sb-content .cmt-list ul { margin: 2px 15px; position: relative; }
@@ -128,7 +133,7 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
128133
.sidebar .sb-content .cmt-list ul li .word .w-name { color: #949494;font-size: 12px;font-size: 1.2rem;font-family: "simsun";height: 20px;line-height: 20px; }
129134
.sidebar .sb-content .cmt-list ul li .word .w-name a { font-weight: bold;max-width: 80px;overflow: hidden;height: 20px; padding-right: 5px; }
130135
.sidebar .sb-content .cmt-list ul li .word .w-page { padding-top: 2px;font-family: "simsun";font-size: 12px;font-size: 1.2rem;color: #c1c1c1; }
131-
.sidebar .sb-content .cmt-list ul li .word .w-comment { line-height: 18px;max-height: 54px;_height: 54px;color: #db6d4c;font-family: "simsun";font-size: 12px;font-size: 1.2rem;overflow: hidden;padding-top: 2px; }
136+
.sidebar .sb-content .cmt-list ul li .word .w-comment { line-height: 18px;max-height: 54px;_height: 54px;color: #59BF74;font-family: "simsun";font-size: 12px;font-size: 1.2rem;overflow: hidden;padding-top: 2px; }
132137
.sidebar .sb-content .user-list ul li {width: 90px;text-align: center;margin-bottom: 8px;}
133138
.sidebar .sb-content .user-list ul li .name {text-overflow: clip;}
134139

@@ -148,7 +153,7 @@ a.tab_current:hover {background-color: #445; color: #fff; text-decoration: none;
148153
.sidebar .sb-content .rank-list ul { margin-left: 10px; }
149154
.sidebar .sb-content .rank-list ul li { font-size: 12px; color: #c1c1c1; position: relative; padding-left: 20px; }
150155
.sidebar .sb-content .rank-list ul li a { text-decoration: none; line-height: 30px;height: 30px;padding-bottom: 18px;width: 180px;font-size: 1.2rem;color: #666666; }
151-
.sidebar .sb-content .rank-list ul li a:hover { color: #d54f4b; }
156+
.sidebar .sb-content .rank-list ul li a:hover { color: #59BF74; }
152157
.sidebar .sb-content .rank-list ul li em { position: absolute; top: 5px; left: -5px; display: inline-block; border-radius: 50%; width: 20px; height: 20px; font-size: 1.2rem; background-color: #ccd0d3; color: #fff; text-align: center; line-height: 20px; vertical-align: middle;}
153158
.sidebar .sb-content .rank-list ul li img { position: absolute; top: 0px; left: -5px; }
154159

@@ -277,7 +282,7 @@ label.error {color:red;}
277282

278283
.dn {display: none;}
279284

280-
.nav-tabs {background: #fff; margin-top: 10px;}
285+
.nav-tabs {background: #fff; }
281286

282287
.no-record {padding: 10px 0; background: #D9EDF7;}
283288

@@ -500,3 +505,7 @@ img.avatar { -moz-border-radius: 4px; border-radius: 4px; }
500505
color: #999;
501506
font-weight: normal;
502507
}
508+
509+
#user_message_count .badge { background-color: #59BF74; }
510+
511+
.btn-success { color: #fff; background-color: #59BF74; border-color: #59BF74; }

static/css/subject.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
font-weight: bold;
3030
}
3131

32-
.btn-success {
32+
.btn-follow {
3333
border-radius: 40px;
3434
color: #fff;
3535
background-color: #42c02e;
@@ -342,4 +342,4 @@
342342

343343
.subject a.item:hover,.subject a.add-collection:hover {
344344
text-decoration: none;
345-
}
345+
}

static/css/topics.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@
44
.topics .topic .avatar {width:48px; margin-right:10px;}
55
.topics .topic .right-info {margin-left: 58px;}
66
.topics .topic .right-info .title {margin-bottom: 5px; font-size: 120%;}
7-
.topics .topic .right-info .title a {color:#474747}
8-
.topics .topic .right-info .title a:hover {color: #DB6D4C;text-decoration: none;}
97
.topics .topic .right-info .meta {color: #bbb; font-size: 13px;}
108
.topics .topic .right-info .meta .node {padding: 4px;color: #778087;text-decoration: none;background-color: #f5f5f5;}
11-
.topics .topic .right-info .meta .node:hover {background-color: #222;text-decoration: none; color:#fff;}
9+
.topics .topic .right-info .meta .node:hover {background-color: #59BF74;text-decoration: none; color:#fff;}
1210
.topics .topic .right-info .meta .author {color: #778087;}
1311
.topics .topic .right-info .meta .num {margin-right: 10px;}
1412
.topics .topic .right-info .meta .num a {color: #979797; text-decoration: none;}
15-
.topics .topic .right-info .meta .num a:hover {text-decoration: none;color: #DB6D4C;}
13+
.topics .topic .right-info .meta .num a:hover {text-decoration: none;color: #59BF74;}
1614
.topics .topic .right-info .meta .num span {margin-left: 5px;margin-right: 10px;}
1715

1816
.nodes .title {position: relative;border-bottom: 1px solid #ccc;}
1917
.nodes .title h3 {line-height: 24px;font-size: 14px;font-weight: bold;padding-top: 10px;}
2018
.nodes ul li {line-height: 200%;font-size: 14px;padding: 8px 10px;border-top: 1px solid #DDD;position: relative;overflow: auto;}
21-
.nodes ul li label {font-size: 12px;color: #999;display: inline-block;width: 120px;margin-right: -130px;padding-right: 10px;float: left;text-align: right;}
19+
.nodes ul li label {font-size: 12px;color: #999;display: inline-block;width: 120px;margin-right: -130px;padding-right: 10px; text-align: right;}
2220
.nodes ul li .childnodes {float: left;margin-left: 130px;}
2321
.nodes ul li .childnodes a {color:#424242;text-decoration: none;background-color: #f5f5f5; padding: 2px;}
2422
.nodes ul li .childnodes a:hover {background-color:#222;color:#fff;text-decoration: none;}
@@ -46,4 +44,4 @@
4644
.sb-author .sb-content .avatar {margin: 0 10px 10px;}
4745
.edit-info {color: #3c763d;background-color: #dff0d8;border-color: #d6e9c6; margin:0 10px;}
4846
.subtle {background-color: #fffff9; border-left: 3px solid #fffbc1; padding: 10px; font-size: 12px; line-height: 120%; text-align: left; border-bottom: 1px solid #e2e2e2; }
49-
.append_content { font-size: 14px; line-height: 1.6; color: #000; word-wrap: break-word; }
47+
.append_content { font-size: 14px; line-height: 1.6; color: #000; word-wrap: break-word; }

0 commit comments

Comments
 (0)