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

Skip to content

Commit f426326

Browse files
committed
nodes bugfix
1 parent 7a8f073 commit f426326

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

data/programming.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ cli 3 n
3939
pprof 3 n
4040
runtime 3 n
4141
context 3 n
42+
liteide 3 n
43+
sublime 3 n
44+
atom 3 n
45+
goland 3 n
46+
eclipse 3 n
47+
vim 3 n
48+
vimgo 3 n
49+
gosublime 3 n
4250
vscode 3 n
4351
eclipse 3 n
4452
docker 3 n
@@ -53,4 +61,9 @@ groupcache 3 n
5361
python 3 n
5462
php 3 n
5563
ruby 3 n
56-
java 3 n
64+
java 3 n
65+
mysql 3 n
66+
linux 3 n
67+
apache 3 n
68+
ai 3 n
69+
vr 3 n

src/http/controller/index.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (IndexController) NewIndex(ctx echo.Context) error {
4444
SetCookie(ctx, "INDEX_TAB", tab)
4545

4646
data := logic.DefaultIndex.FindData(ctx, tab)
47-
data["nodes"] = logic.GenNodes()
47+
data["all_nodes"] = logic.GenNodes()
4848

4949
return render(ctx, "new_index.html", data)
5050
}

src/logic/index.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ func (IndexLogic) FindData(ctx context.Context, tab string) map[string]interface
8282
if err != nil {
8383
break
8484
}
85-
users, nodes := DefaultSearcher.FillNodeAndUser(ctx, respBody)
8685
if respBody.NumFound == 0 {
8786
break
8887
}
8988

89+
users, nodes := DefaultSearcher.FillNodeAndUser(ctx, respBody)
90+
9091
data["docs"] = respBody.Docs
9192
data["users"] = users
9293
data["nodes"] = nodes

template/new_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
<div class="cell">
246246
<span class="cc">节点导航</span>
247247
</div>
248-
{{range .nodes}}
248+
{{range .all_nodes}}
249249
<div class="cell">
250250
<table cellpadding="0" cellspacing="0" border="0"><tbody>
251251
<tr>

template/projects/detail.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
</a>
1919
</div>
2020
<h1>
21-
{{if .project.Logo}}<img src="{{.project.Logo}}" alt="{{.project.Name}}" width="80px" />{{end}}
21+
{{if .project.Logo}}
22+
<img src="{{if hasPrefix .project.Logo "http"}}{{.project.Logo}}{{else}}{{.cdn_domain}}/{{.project.Logo}}{{end}}" alt="{{.project.Name}}" width="80px" />
23+
{{end}}
2224
{{.project.Category}} <u>{{.project.Name}}</u>
2325
</h1>
2426
<small class="gray">

template/top/dau.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2 style="margin-bottom: 0px; margin-top: 0px; border-bottom: none;"><span clas
3131
<span style="color: #ccc;">第 {{.Uid}} 号会员</span>
3232

3333
</td>
34-
<td width="200" align="center">
34+
<td width="150" align="center">
3535
<div class="balance_area" style="font-size: 24px; line-height: 24px;">&nbsp;{{.Weight}}&nbsp;</div>
3636
</td>
3737
</tr>

0 commit comments

Comments
 (0)