Skip to content
This repository has been archived by the owner on Oct 14, 2018. It is now read-only.

Commit

Permalink
bump dep and update template for search link
Browse files Browse the repository at this point in the history
  • Loading branch information
David Frank committed Aug 18, 2016
1 parent 49582bd commit 215b074
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ router.get('/', function *(next) {
var result = yield Shots.find().sort({ created: -1 }).limit(4)
var data = {
shots: result
, domain: siteDomain
, analytics: analyticsTemplate
, header: headerTemplate
, searchBox: searchBoxTemplate
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"mime-types": "^2.1.10",
"minimist": "^1.2.0",
"mz": "^2.4.0",
"purest": "^2.0.1",
"purest": "^3.0.0",
"redis": "^2.5.3",
"sharp": "^0.15.1",
"sharp": "^0.16.0",
"then-redis": "^2.0.0",
"xss-filters": "^1.2.6",
"yieldb": "^2.7.1"
Expand Down
4 changes: 3 additions & 1 deletion templates/home.marko
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ html lang="zh-cn"
blockquote class="preview-quote"
p - ${shot.text}
cite
a href="shots/${shot.sid}" - 链接
a href="shots/${shot.sid}" - 图片页面
-
a rel="nofollow" href="https://whatanime.ga/?url=${data.domain}/upload/${shot.sid}.600.jpg" - 查找出处
div
p
a href="/recent" class="btn" - 更多近期上传
6 changes: 5 additions & 1 deletion templates/home.marko.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ function create(__helpers) {
escapeXml(shot.text) +
"</p><cite><a href=\"shots/" +
escapeXmlAttr(shot.sid) +
"\">链接</a></cite></blockquote></div>");
"\">图片页面</a> <a rel=\"nofollow\" href=\"https://whatanime.ga/?url=" +
escapeXmlAttr(data.domain) +
"/upload/" +
escapeXmlAttr(shot.sid) +
".600.jpg\">查找出处</a></cite></blockquote></div>");
});

out.w("<div><p><a href=\"/recent\" class=\"btn\">更多近期上传</a></p></div></blocks></body></html>");
Expand Down
3 changes: 2 additions & 1 deletion templates/shot.marko
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ html lang="zh-cn"
div
h2 - 文字内容
p
a href="/shots/${data.sid}" - ${data.text}
- ${data.text} -
a rel="nofollow" href="https://whatanime.ga/?url=${data.domain}/upload/${data.sid}.600.jpg" - 查找出处
blocks cols="2" class="main"
for(size in data.size)
div class="main-preview"
Expand Down
10 changes: 6 additions & 4 deletions templates/shot.marko.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ function create(__helpers) {

data.searchBox.render({}, out);

out.w("</blocks><blocks cols=\"2\" class=\"main\"><div><h2>文字内容</h2><p><a href=\"/shots/" +
escapeXmlAttr(data.sid) +
"\">" +
out.w("</blocks><blocks cols=\"2\" class=\"main\"><div><h2>文字内容</h2><p>" +
escapeXml(data.text) +
"</a></p></div></blocks><blocks cols=\"2\" class=\"main\">");
" - <a rel=\"nofollow\" href=\"https://whatanime.ga/?url=" +
escapeXmlAttr(data.domain) +
"/upload/" +
escapeXmlAttr(data.sid) +
".600.jpg\">查找出处</a></p></div></blocks><blocks cols=\"2\" class=\"main\">");

forEach(data.size, function(size) {
out.w("<div class=\"main-preview\"><a href=\"/upload/" +
Expand Down

0 comments on commit 215b074

Please sign in to comment.