diff --git a/assets/api1.json b/assets/api1.json index 3c48734..b7a1879 100644 --- a/assets/api1.json +++ b/assets/api1.json @@ -123223,7 +123223,7 @@ "banner_type": 2, "target_id": 1, "asset_path": "assets\/image\/webview\/wv_ba_01.png", - "webview_url": "\/webview.php\/static\/index?id=79", + "webview_url": "/manga", "fixed_flag": false, "back_side": true, "banner_id": 200001, diff --git a/main.go b/main.go index 2035815..e420ab6 100644 --- a/main.go +++ b/main.go @@ -84,6 +84,12 @@ func main() { r.GET("/webview.php/announce/index", handler.AnnounceIndexHandler) // Server APIs + // Web + // Manga + r.GET("/manga", func(ctx *gin.Context) { + ctx.HTML(http.StatusOK, "manga.tmpl", gin.H{}) + }) + r.Run(":8080") // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080") } } diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..fb58925 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,97 @@ +@charset "utf-8"; + +#list-container { + width: 386px; + height: 536px; + background-image: url("/static/images/bg-left.png"); + background-repeat: no-repeat; + float: left; +} + +h2 { + height: 76px; + margin: 16px auto 14px; +} + +h2>img { + display: block; + height: 76px; + margin: auto; +} + +#list-scroll { + height: 410px; + width: 363px; + margin-left: 8px; + position: relative; +} + +li { + text-align: left; + background-image: url("/static/images/list-content-bg.png"); + font-size: 18px; + width: 330px; + height: 58px; + margin: 0 0 8px 8px; + list-style-type: none; + position: relative; +} + +li.tapped { + background-image: url("/static/images/list-content-bg-on.png"); +} + +li p { + color: #fff; + padding: 16px 8px 8px 50px; +} + +.new-icon { + background-image: url("/static/images/new-icon.png"); + width: 50px; + height: 50px; + position: absolute; + left: -4px; +} + +#image-container { + float: left; + background-image: url("/static/images/bg-right.png"); + background-repeat: no-repeat; + width: 490px; + height: 536px; + margin-left: 4px; + position: relative; +} + +#image-scroll { + width: 454px; + height: 500px; + margin: 20px 0 0 16px; + position: relative; +} + +#large-image-container { + display: none; + position: absolute; + left: 5px; + top: 6px; + width: 855px; + height: 488px; + background-color: white; + box-shadow: 10px 10px 5px rgba(51, 51, 51, 0.5); + border-radius: 20px; + border: 2px solid dimgray; + padding: 15px 0; +} + +#large-image-scroll { + position: relative; + width: 850px; + height: 488px; + padding: 0 -17px; +} + +#large-image { + margin: auto; +} \ No newline at end of file diff --git a/static/images/15047550942873.jpg b/static/images/15047550942873.jpg new file mode 100644 index 0000000..a472650 Binary files /dev/null and b/static/images/15047550942873.jpg differ diff --git a/static/images/15047551059201.jpg b/static/images/15047551059201.jpg new file mode 100644 index 0000000..db8a08d Binary files /dev/null and b/static/images/15047551059201.jpg differ diff --git a/static/images/15047551145790.jpg b/static/images/15047551145790.jpg new file mode 100644 index 0000000..1a0ab91 Binary files /dev/null and b/static/images/15047551145790.jpg differ diff --git a/static/images/15047551242040.jpg b/static/images/15047551242040.jpg new file mode 100644 index 0000000..b34ec75 Binary files /dev/null and b/static/images/15047551242040.jpg differ diff --git a/static/images/15047553374283.jpg b/static/images/15047553374283.jpg new file mode 100644 index 0000000..ed5e62f Binary files /dev/null and b/static/images/15047553374283.jpg differ diff --git a/static/images/15047553496606.jpg b/static/images/15047553496606.jpg new file mode 100644 index 0000000..c9130e1 Binary files /dev/null and b/static/images/15047553496606.jpg differ diff --git a/static/images/15047553611357.jpg b/static/images/15047553611357.jpg new file mode 100644 index 0000000..d434094 Binary files /dev/null and b/static/images/15047553611357.jpg differ diff --git a/static/images/15047553728636.jpg b/static/images/15047553728636.jpg new file mode 100644 index 0000000..ec1c715 Binary files /dev/null and b/static/images/15047553728636.jpg differ diff --git a/static/images/15047553849518.jpg b/static/images/15047553849518.jpg new file mode 100644 index 0000000..cb77f59 Binary files /dev/null and b/static/images/15047553849518.jpg differ diff --git a/static/images/15047553982300.jpg b/static/images/15047553982300.jpg new file mode 100644 index 0000000..d031694 Binary files /dev/null and b/static/images/15047553982300.jpg differ diff --git a/static/images/15047554108052.jpg b/static/images/15047554108052.jpg new file mode 100644 index 0000000..3474378 Binary files /dev/null and b/static/images/15047554108052.jpg differ diff --git a/static/images/15047554203428.jpg b/static/images/15047554203428.jpg new file mode 100644 index 0000000..ec27da0 Binary files /dev/null and b/static/images/15047554203428.jpg differ diff --git a/static/images/15047554315307.jpg b/static/images/15047554315307.jpg new file mode 100644 index 0000000..48793f7 Binary files /dev/null and b/static/images/15047554315307.jpg differ diff --git a/static/images/15047554481319.jpg b/static/images/15047554481319.jpg new file mode 100644 index 0000000..4fbd319 Binary files /dev/null and b/static/images/15047554481319.jpg differ diff --git a/static/images/15047554596230.jpg b/static/images/15047554596230.jpg new file mode 100644 index 0000000..578d909 Binary files /dev/null and b/static/images/15047554596230.jpg differ diff --git a/static/images/15047554774569.jpg b/static/images/15047554774569.jpg new file mode 100644 index 0000000..68849ae Binary files /dev/null and b/static/images/15047554774569.jpg differ diff --git a/static/images/15047554922924.jpg b/static/images/15047554922924.jpg new file mode 100644 index 0000000..dbf0490 Binary files /dev/null and b/static/images/15047554922924.jpg differ diff --git a/static/images/15047555087747.jpg b/static/images/15047555087747.jpg new file mode 100644 index 0000000..4dd8fd1 Binary files /dev/null and b/static/images/15047555087747.jpg differ diff --git a/static/images/15047555219572.jpg b/static/images/15047555219572.jpg new file mode 100644 index 0000000..1233ade Binary files /dev/null and b/static/images/15047555219572.jpg differ diff --git a/static/images/15047555411780.jpg b/static/images/15047555411780.jpg new file mode 100644 index 0000000..395d005 Binary files /dev/null and b/static/images/15047555411780.jpg differ diff --git a/static/images/15047555499746.jpg b/static/images/15047555499746.jpg new file mode 100644 index 0000000..8bd9780 Binary files /dev/null and b/static/images/15047555499746.jpg differ diff --git a/static/images/15047555585712.jpg b/static/images/15047555585712.jpg new file mode 100644 index 0000000..3736b2e Binary files /dev/null and b/static/images/15047555585712.jpg differ diff --git a/static/images/15047555704112.jpg b/static/images/15047555704112.jpg new file mode 100644 index 0000000..a2c1008 Binary files /dev/null and b/static/images/15047555704112.jpg differ diff --git a/static/images/15047555798773.jpg b/static/images/15047555798773.jpg new file mode 100644 index 0000000..6913150 Binary files /dev/null and b/static/images/15047555798773.jpg differ diff --git a/static/images/15047555888980.jpg b/static/images/15047555888980.jpg new file mode 100644 index 0000000..5bbb5dd Binary files /dev/null and b/static/images/15047555888980.jpg differ diff --git a/static/images/15088959186072.jpg b/static/images/15088959186072.jpg new file mode 100644 index 0000000..e051650 Binary files /dev/null and b/static/images/15088959186072.jpg differ diff --git a/static/images/15107324142966.png b/static/images/15107324142966.png new file mode 100644 index 0000000..2a69e5a Binary files /dev/null and b/static/images/15107324142966.png differ diff --git a/static/images/15141856059568.jpg b/static/images/15141856059568.jpg new file mode 100644 index 0000000..78055fd Binary files /dev/null and b/static/images/15141856059568.jpg differ diff --git a/static/images/15141862776588.jpg b/static/images/15141862776588.jpg new file mode 100644 index 0000000..d9cbc77 Binary files /dev/null and b/static/images/15141862776588.jpg differ diff --git a/static/images/15141862946556.jpg b/static/images/15141862946556.jpg new file mode 100644 index 0000000..7ed0609 Binary files /dev/null and b/static/images/15141862946556.jpg differ diff --git a/static/images/15141863126912.jpg b/static/images/15141863126912.jpg new file mode 100644 index 0000000..ac16441 Binary files /dev/null and b/static/images/15141863126912.jpg differ diff --git a/static/images/15141863229129.jpg b/static/images/15141863229129.jpg new file mode 100644 index 0000000..06102d6 Binary files /dev/null and b/static/images/15141863229129.jpg differ diff --git a/static/images/15141863365919.jpg b/static/images/15141863365919.jpg new file mode 100644 index 0000000..edcadd1 Binary files /dev/null and b/static/images/15141863365919.jpg differ diff --git a/static/images/15141863483422.jpg b/static/images/15141863483422.jpg new file mode 100644 index 0000000..fa7cddc Binary files /dev/null and b/static/images/15141863483422.jpg differ diff --git a/static/images/15141863639911.jpg b/static/images/15141863639911.jpg new file mode 100644 index 0000000..0c7b43e Binary files /dev/null and b/static/images/15141863639911.jpg differ diff --git a/static/images/15141863772178.jpg b/static/images/15141863772178.jpg new file mode 100644 index 0000000..4c429fd Binary files /dev/null and b/static/images/15141863772178.jpg differ diff --git a/static/images/15141864261972.jpg b/static/images/15141864261972.jpg new file mode 100644 index 0000000..1735492 Binary files /dev/null and b/static/images/15141864261972.jpg differ diff --git a/static/images/15141864584520.jpg b/static/images/15141864584520.jpg new file mode 100644 index 0000000..1e7d98d Binary files /dev/null and b/static/images/15141864584520.jpg differ diff --git a/static/images/15141864695842.jpg b/static/images/15141864695842.jpg new file mode 100644 index 0000000..f035029 Binary files /dev/null and b/static/images/15141864695842.jpg differ diff --git a/static/images/15141864804128.jpg b/static/images/15141864804128.jpg new file mode 100644 index 0000000..07ba18f Binary files /dev/null and b/static/images/15141864804128.jpg differ diff --git a/static/images/15141864889884.jpg b/static/images/15141864889884.jpg new file mode 100644 index 0000000..5900eb3 Binary files /dev/null and b/static/images/15141864889884.jpg differ diff --git a/static/images/15141865055652.jpg b/static/images/15141865055652.jpg new file mode 100644 index 0000000..a6959fa Binary files /dev/null and b/static/images/15141865055652.jpg differ diff --git a/static/images/15141865133555.jpg b/static/images/15141865133555.jpg new file mode 100644 index 0000000..20e1530 Binary files /dev/null and b/static/images/15141865133555.jpg differ diff --git a/static/images/15141865196092.jpg b/static/images/15141865196092.jpg new file mode 100644 index 0000000..b1c5354 Binary files /dev/null and b/static/images/15141865196092.jpg differ diff --git a/static/images/15238681581968.png b/static/images/15238681581968.png new file mode 100644 index 0000000..a1d516c Binary files /dev/null and b/static/images/15238681581968.png differ diff --git a/static/images/15238694807202.png b/static/images/15238694807202.png new file mode 100644 index 0000000..430cb0e Binary files /dev/null and b/static/images/15238694807202.png differ diff --git a/static/images/15238694919055.png b/static/images/15238694919055.png new file mode 100644 index 0000000..043c5db Binary files /dev/null and b/static/images/15238694919055.png differ diff --git a/static/images/15238695116848.png b/static/images/15238695116848.png new file mode 100644 index 0000000..b6c8838 Binary files /dev/null and b/static/images/15238695116848.png differ diff --git a/static/images/15238695303404.png b/static/images/15238695303404.png new file mode 100644 index 0000000..5fdfddf Binary files /dev/null and b/static/images/15238695303404.png differ diff --git a/static/images/15238695455400.png b/static/images/15238695455400.png new file mode 100644 index 0000000..d522f15 Binary files /dev/null and b/static/images/15238695455400.png differ diff --git a/static/images/15238695587056.png b/static/images/15238695587056.png new file mode 100644 index 0000000..60bf6f4 Binary files /dev/null and b/static/images/15238695587056.png differ diff --git a/static/images/15238695641197.png b/static/images/15238695641197.png new file mode 100644 index 0000000..42df5a4 Binary files /dev/null and b/static/images/15238695641197.png differ diff --git a/static/images/15238701747409.png b/static/images/15238701747409.png new file mode 100644 index 0000000..c30cd98 Binary files /dev/null and b/static/images/15238701747409.png differ diff --git a/static/images/15238702168776.png b/static/images/15238702168776.png new file mode 100644 index 0000000..bcb6945 Binary files /dev/null and b/static/images/15238702168776.png differ diff --git a/static/images/bg-left.png b/static/images/bg-left.png new file mode 100644 index 0000000..5b83d75 Binary files /dev/null and b/static/images/bg-left.png differ diff --git a/static/images/bg-right.png b/static/images/bg-right.png new file mode 100644 index 0000000..91cb7c2 Binary files /dev/null and b/static/images/bg-right.png differ diff --git a/static/images/list-content-bg-on.png b/static/images/list-content-bg-on.png new file mode 100644 index 0000000..0b94ea4 Binary files /dev/null and b/static/images/list-content-bg-on.png differ diff --git a/static/images/list-content-bg.png b/static/images/list-content-bg.png new file mode 100644 index 0000000..4d69656 Binary files /dev/null and b/static/images/list-content-bg.png differ diff --git a/static/images/title-banner.png b/static/images/title-banner.png new file mode 100644 index 0000000..bdb0836 Binary files /dev/null and b/static/images/title-banner.png differ diff --git a/static/js/button.js b/static/js/button.js new file mode 100644 index 0000000..a523173 --- /dev/null +++ b/static/js/button.js @@ -0,0 +1,69 @@ +var Button = function() { +}; + +Button.TAPPED = 'tapped'; + +Button.initialize = function(element, onTap) { + var touchInfo = null; + + if (typeof onTap === 'function') { + onTap = onTap.bind(element); + } else { + onTap = function() {}; + } + + function d2(x1, y1, x2, y2) { + var dx = x2 - x1, dy = y2 - y1; + return dx * dx + dy * dy; + } + + function startTap(touch) { + touchInfo = {startX: touch.clientX, startY: touch.clientY, tapped: false}; + element.classList.add(Button.TAPPED); + } + + function endTap() { + element.classList.remove(Button.TAPPED); + touchInfo = null; + } + + element.addEventListener('touchstart', function(e) { + startTap(e.changedTouches[0]); + e.preventDefault(); + }); + + element.addEventListener('touchmove', function(e) { + if (touchInfo) { + var x0 = touchInfo.startX; + var y0 = touchInfo.startY; + var x = e.changedTouches[0].clientX; + var y = e.changedTouches[0].clientY; + + var current = document.elementFromPoint(x, y); + + const THRESHOLD_SQ_PX = 50 * 50; + if (!element.contains(current) || d2(x0, y0, x, y) > THRESHOLD_SQ_PX) { + endTap(); + } + } + + e.preventDefault(); + }); + + element.addEventListener('touchend', function(e) { + if (touchInfo && !touchInfo.tapped) { + touchInfo.tapped = true; + onTap(); + } + + endTap(); + e.preventDefault(); + }); + + element.addEventListener('touchcancel', function(e) { + endTap(); + e.preventDefault(); + }); + + return element; +}; diff --git a/static/manga.tmpl b/static/manga.tmpl new file mode 100644 index 0000000..5cf4379 --- /dev/null +++ b/static/manga.tmpl @@ -0,0 +1,253 @@ +{{ define "manga.tmpl" }} + + + + + + + + 转校生漫画 〜转校生庆典〜 + + + + + + +
+
+

+
+
    +
  • +

    第54 转学生派对话

    +
  • +
  • +

    第53 末路话

    +
  • +
  • +

    第52 练习话

    +
  • +
  • +

    第51 放松效果话

    +
  • +
  • +

    第50 好胜心话

    +
  • +
  • +

    第49 相遇的两人话

    +
  • +
  • +

    第48 消化话

    +
  • +
  • +

    第47 摘花话

    +
  • +
  • +

    第46 小心叮咛话

    +
  • +
  • +

    第45 好人有好报话

    +
  • +
  • +

    第44 被宠坏的鸟儿话

    +
  • +
  • +

    第43 海对岸的双峰话

    +
  • +
  • +

    第42 美丽的发声练习话

    +
  • +
  • +

    第41 强力副歌的美学话

    +
  • +
  • +

    第40 热血女子话

    +
  • +
  • +

    第39 恶作剧之风话

    +
  • +
  • +

    第38 禅之心话

    +
  • +
  • +

    第37 枪械迷话

    +
  • +
  • +

    第36 爱与正义的风纪纠察话

    +
  • +
  • +

    第35 帅哥特集话

    +
  • +
  • +

    第34 保护话

    +
  • +
  • +

    第33 窗边美景话

    +
  • +
  • +

    第32 机动性↑↑话

    +
  • +
  • +

    第31 祈祷话

    +
  • +
  • +

    第30 努力话

    +
  • +
  • +

    第29 溜冰话

    +
  • +
  • +

    第28 逃跑话

    +
  • +
  • +

    第27 突刺话

    +
  • +
  • +

    第26 咖喱饭话

    +
  • +
  • +

    第25 坠入爱河之日话

    +
  • +
  • +

    第24 饲料话

    +
  • +
  • +

    第23 刚才的事话

    +
  • +
  • +

    第22 天体观测话

    +
  • +
  • +

    第21 空腹话

    +
  • +
  • +

    第20 斗舞2话

    +
  • +
  • +

    第19 斗舞话

    +
  • +
  • +

    第18 点单话

    +
  • +
  • +

    第17 学园偶像祭最快决定战!!话

    +
  • +
  • +

    第16 历史话

    +
  • +
  • +

    第15 量尺寸话

    +
  • +
  • +

    第14 艺术话

    +
  • +
  • +

    第13 读书话

    +
  • +
  • +

    第12 演出前话

    +
  • +
  • +

    第11 特技话

    +
  • +
  • +

    第10 学园偶像祭最快决定战!!话

    +
  • +
  • +

    第9 给我醒过来!!话

    +
  • +
  • +

    第8 秘密调查话

    +
  • +
  • +

    第7 炎话

    +
  • +
  • +

    第6 野生话

    +
  • +
  • +

    第5 诞生话

    +
  • +
  • +

    第4 优雅的放学后话

    +
  • +
  • +

    第3 情人节话

    +
  • +
  • +

    第2 游泳话

    +
  • +
  • +

    第1 开始!话

    +
  • +
+
+
+
+
+ +
+
+
+
+ +
+
+
+ + + + + +{{ end }} \ No newline at end of file