From 215b0746d1246b21797218bdb976b7357eb4eb12 Mon Sep 17 00:00:00 2001
From: David Frank
Date: Thu, 18 Aug 2016 21:16:45 +0800
Subject: [PATCH] bump dep and update template for search link
---
index.js | 1 +
package.json | 4 ++--
templates/home.marko | 4 +++-
templates/home.marko.js | 6 +++++-
templates/shot.marko | 3 ++-
templates/shot.marko.js | 10 ++++++----
6 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/index.js b/index.js
index 7c6aef4..af665c0 100644
--- a/index.js
+++ b/index.js
@@ -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
diff --git a/package.json b/package.json
index 65a155d..5986f6e 100644
--- a/package.json
+++ b/package.json
@@ -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"
diff --git a/templates/home.marko b/templates/home.marko
index e2c8516..93d3ac3 100644
--- a/templates/home.marko
+++ b/templates/home.marko
@@ -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" - 更多近期上传
\ No newline at end of file
diff --git a/templates/home.marko.js b/templates/home.marko.js
index f87df61..f2af6cd 100644
--- a/templates/home.marko.js
+++ b/templates/home.marko.js
@@ -50,7 +50,11 @@ function create(__helpers) {
escapeXml(shot.text) +
"
链接");
+ "\">图片页面 查找出处");
});
out.w("