-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (116 loc) · 5.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="canonical" href="https://weather-pwa-sample.firebaseapp.com/final/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/class/bootcss.buttons.css">
<!-- TODO add manifest here -->
<link rel="manifest" href="./manifest.json">
<!-- Add to home screen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Weather PWA">
<meta name="msapplication-TileColor" content="#2F3BA2">
<!-- CODELAB: Add description here -->
<meta name="description" content="小说爬虫学习">
<link rel="stylesheet" href="styles/class/font-awesome-4.7.0/css/font-awesome.css">
<title>Fiction</title>
<script src="JavaScript/class/jquery.min.js"></script>
<script src="JavaScript/class/layer/layer.js"></script>
<script src="JavaScript/class/Tools.js"></script>
<script src="JavaScript/class/JsNotification.js"></script>
<script src="JavaScript/class/Database.js"></script>
<script src="JavaScript/class/vue.js"></script>
<script src="JavaScript/class/gbk.js"></script>
<!-- <script src="JavaScript/class/vconsole.min.js"></script>-->
<!-- <script>var vConsole = new VConsole();</script>-->
<link rel="stylesheet" type="text/css" href="styles/inline.css?v=2019042902">
<script src="JavaScript/BooksSourceAPI.js?v=2019042902"></script>
<script src="JavaScript/API.js?v=2019042902"></script>
<!-- CODELAB: Add the install script here -->
<script src="JavaScript/install.js"></script>
<script>
// TODO add service worker code here
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('./service-worker.js')
.then(function () {
console.log('Service Worker Registered');
});
}
</script>
</head>
<body>
<div class="bookShelf">
<div class="book_list">
<form style="display: flex;" onsubmit="return false;">
<span class="button button-border button-rounded"
style="line-height: 1.5em;padding: 0.5em;margin-right: 5px;"
@click="reload()"><i class="fa"
:class="{'fa-home':search,'fa-refresh':!search,'fa-spin':(!search && isUpdating>0)}"></i></span>
<span class="fa fa-copy button button-border button-rounded"
style="line-height: 1.5em;padding: 0.5em;margin-right: 5px;"
@click="ImportMode()"></span>
<input style="min-width:1em;flex: 1;margin-right: 10px;" v-model="searchKeyword" placeholder="请输入要搜索的小说">
<button type="submit" class="fa fa-search button button-border button-rounded"
style="padding: 0.5em;" @click="searchBook();return false;"></button>
</form>
<select v-model="modeKey" v-if="search || searchKeyword.length>0"
style="padding:10px 2px;margin-right: 5px;width: 100%;margin-top: 10px;background: white;">
<option v-for="item,index in booksSource" :value="item.Model"
v-text="item.Name + '['+ item.Model +']'"></option>
</select>
</div>
<div class="book_list" v-text="isUpdating > 0?'正在更新':'更新完毕'" :style="{color:isUpdating > 0?'red':'green'}"
style="color:green;font-size: 14px;padding: 3px;text-align: center;">
</div>
<div class="book_list" v-for="el in list"
:class="{'hasUpdate':(el.CatalogIndex==undefined?-1:el.CatalogIndex)+1< el.catalog.length}">
<div @click="search?showCatalog(el):ReadBook(el)">
<div>
<img :src="el.data.image || './images/defaultCover.svg'"/>
</div>
<div>
<div><span>{{el.title}}</span></div>
<div><span>{{el.data.author}}</span></div>
<div v-if="el.data.time"><span>{{el.data.time}}</span></div>
<div><span>{{el.data.state}}</span></div>
</div>
</div>
<div v-text="search?'+':'-'" class="book_list_love" @click="search?AddBook(el):DelBook(el)">+</div>
<div class="book_list_readed" v-if="!search">
{{(el.CatalogIndex==undefined?-1:el.CatalogIndex)+1}}/{{el.catalog.length}}
</div>
</div>
</div>
<div class="bookCatalog" v-if="book.catalog && book.catalog.length>0">
<div @click="book={}">
</div>
<div>
<div class="bookCatalog_Catalog"><span>目录</span><span @click="GoBottom($event)">最新</span></div>
<div class="book_catalog" v-for="el,index in book.catalog "
:style="{background:book.CatalogIndex==index?'#d4f1ff':''}" @click="GoReadBook(book,index)">
<p>
<span>{{el.title}}</span>
</p>
</div>
</div>
</div>
<div class="bookRead" v-if="CatalogIndex!=-1">
<div class="bookRead_Catalog" v-text="book.catalog[CatalogIndex].title"></div>
<div class="content" @click="TouchBook($event)">
<div v-html="content"></div>
</div>
<div class="bookRead_Menu" v-if="showMenu">
<div @click="menu(0)">上一章</div>
<div @click="menu(3)">目录</div>
<div @click="menu(4)">刷新</div>
<div @click="menu(1)">返回</div>
<div @click="menu(2)">下一章</div>
</div>
</div>
</body>
<script src="JavaScript/main.js?v=2019042902"></script>
</html>