diff --git a/app/src/main/assets/web/bookSource.css b/app/src/main/assets/web/bookSource/index.css similarity index 100% rename from app/src/main/assets/web/bookSource.css rename to app/src/main/assets/web/bookSource/index.css diff --git a/app/src/main/assets/web/bookSource.html b/app/src/main/assets/web/bookSource/index.html similarity index 98% rename from app/src/main/assets/web/bookSource.html rename to app/src/main/assets/web/bookSource/index.html index 6a35d70d4..331ffe777 100644 --- a/app/src/main/assets/web/bookSource.html +++ b/app/src/main/assets/web/bookSource/index.html @@ -5,7 +5,7 @@ 阅读3.0书源编辑器_V4.0 - + @@ -386,15 +386,13 @@
(?i) 前缀表示忽略大小写 代码在线运行工具 - 阅读书架(经典) - 阅读书架(新潮) - + diff --git a/app/src/main/assets/web/bookSource.js b/app/src/main/assets/web/bookSource/index.js similarity index 100% rename from app/src/main/assets/web/bookSource.js rename to app/src/main/assets/web/bookSource/index.js diff --git a/app/src/main/assets/web/bookshelf.css b/app/src/main/assets/web/bookshelf.css deleted file mode 100644 index f6e26caa9..000000000 --- a/app/src/main/assets/web/bookshelf.css +++ /dev/null @@ -1,176 +0,0 @@ -html, body { - height: 100%; - margin: 0; -} - -.hide { - display: none; -} - -.top, .showchapter, .hidebooks { - width: 60px; - height: 50px; - position: absolute; - right: 30px; - bottom: 30px; - color: black; - font-size: 28px; - background-color: #ddd; - opacity: 0.85; -} - -.top { - bottom: 150px; -} - -.showchapter { - bottom: 90px; - bottom: 90px; -} - -.address { - width: 270px; -} - -.nav { - border-bottom: solid 1px #ccc; -} - -input, button { - width: 110px; - line-height: 34px; - background-color: #eee; - color: #555; - border: none; - margin: 10px 5px; - font-weight: 500; - border-radius: 2px; - outline: none; - cursor: pointer; -} - -input { - padding: 0 10px; - cursor: text; -} - - input:hover, button:hover { - border-color: #aaa; - background-color: #efefef; - color: #222; - outline: solid 1px #ccc; - } - -.allcontent { - height: calc(100% - 60px); -} - -.allscreen { - height: 100% -} - -.books > div { - display: inline-block; - margin: 10px; - vertical-align: top; - border: solid 1px #ddd; -} - -.read > .books { - width: 420px; - float: left; - height: 100%; - overflow: auto; - border-right: solid 1px #ccc; -} - - .read > .books > div { - margin-right: 0; - border-right: none; - } - - -.more { - overflow-y: auto; - height: 100%; - display: none; -} - -.read .more { - display: block; -} - -.books > div > img { - width: 120px; - height: 180px; - float: left; - margin-right: 10px; - cursor: pointer; -} - -.info { - padding: 10px 20px 0 20px; - width: 600px; - margin: 0 auto; -} - - .info > img { - width: 600px; - height: 900px; - } - - .info p { - line-height: 1.5; - text-align: justify; - margin: 0; - } - -.books tr:nth-child(n+2) td { - border-top: solid 1px #999; -} - -.books td:nth-child(1) { - vertical-align: top; - width: 50px; -} - -.books td:nth-child(2) { - vertical-align: top; - width: 200px; -} - -.clear { - clear: both; -} - -.chapter { - margin: 10px; - max-height: 500px; - overflow-y: auto; - border-top: solid 1px #333; - border-bottom: solid 1px #333; -} - - .chapter button { - width: 230px; - text-align: left; - text-indent: 14px; - margin: 10px 4px; - } - - -.content { - padding: 20px; - text-align: justify; - min-height: 1000px; - padding-bottom: 200px; -} - - .content h2 { - font-family: "Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu; - font-weight: 500; - text-align: center; - line-height: 100px; - font-size: 40px; - margin: 0; - } diff --git a/app/src/main/assets/web/bookshelf.html b/app/src/main/assets/web/bookshelf.html deleted file mode 100644 index 86639426f..000000000 --- a/app/src/main/assets/web/bookshelf.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - 阅读3.0书架 - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/app/src/main/assets/web/bookshelf.js b/app/src/main/assets/web/bookshelf.js deleted file mode 100644 index 7aa35df0f..000000000 --- a/app/src/main/assets/web/bookshelf.js +++ /dev/null @@ -1,203 +0,0 @@ -var $ = document.querySelector.bind(document) - , $$ = document.querySelectorAll.bind(document) - , $c = document.createElement.bind(document) - , randomImg = "http://api.mtyqx.cn/api/random.php" - , randomImg2 = "http://img.xjh.me/random_img.php" - , books - ; - -var now_chapter = -1; -var sum_chapter = 0; - -var formatTime = value => { - return new Date(value).toLocaleString('zh-CN', { - hour12: false, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" - }).replace(/\//g, "-"); -}; - -var apiMap = { - "getBookshelf": "/getBookshelf", - "getChapterList": "/getChapterList", - "getBookContent": "/getBookContent", - "saveBook": "/saveBook" -}; - -var apiAddress = (apiName, url, index) => { - let address = $('#address').value || window.location.host; - if (!(/^http|^\/\//).test(address)) { - address = "//" + address; - } - if (!(/:\d{4,}/).test(address.split("//")[1].split("/")[0])) { - address += ":1122"; - } - localStorage.setItem('address', address); - if (apiName == "getBookContent") { - return address + apiMap[apiName] + (url ? "?url=" + encodeURIComponent(url) : "") + "&index=" + index; - } - return address + apiMap[apiName] + (url ? "?url=" + encodeURIComponent(url) : ""); -}; - -var init = () => { - $('#allcontent').classList.remove("read"); - $('#books').innerHTML = ""; - fetch(apiAddress("getBookshelf"), { mode: "cors" }) - .then(res => res.json()) - .then(data => { - if (!data.isSuccess) { - alert(getBookshelf.errorMsg); - return; - } - books = data.data; - books.forEach((book, i) => { - let bookDiv = $c("div"); - let img = $c("img"); - img.src = book.coverUrl || randomImg; - img.setAttribute("data-series-num", i); - bookDiv.appendChild(img); - bookDiv.innerHTML += ` - - - - - -
书名:${book.name}
作者:${book.author}
阅读:${book.durChapterTitle}
${formatTime(book.durChapterTime)}
更新:${book.latestChapterTitle}
${formatTime(book.latestChapterTime)}
来源:${book.origin}
`; - $('#books').appendChild(bookDiv); - }); - $$('#books img').forEach(bookImg => - bookImg.addEventListener("click", () => { - now_chapter = -1; - sum_chapter = 0; - $('#allcontent').classList.add("read"); - var book = books[bookImg.getAttribute("data-series-num")]; - $("#info").innerHTML = ` -

  来源:${book.origin}

-

  书名:${book.name}

-

  作者:${book.author}

-

阅读章节:${book.durChapterName}

-

阅读时间:${formatTime(book.durChapterTime)}

-

最新章节:${book.latestChapterTitle}

-

检查时间:${formatTime(book.lastCheckTime)}

-

  简介:${book.intro.trim().replace(/\n/g, "
")}

`; - window.location.hash = ""; - window.location.hash = "#info"; - $("#content").innerHTML = "章节列表加载中..."; - $("#chapter").innerHTML = ""; - fetch(apiAddress("getChapterList", book.bookUrl), { mode: "cors" }) - .then(res => res.json()) - .then(data => { - if (!data.isSuccess) { - alert(data.errorMsg); - $("#content").innerHTML = "章节列表加载失败!"; - return; - } - - data.data.forEach(chapter => { - let ch = $c("button"); - ch.setAttribute("data-url", chapter.bookUrl); - ch.setAttribute("data-index", chapter.index); - ch.setAttribute("title", chapter.title); - ch.innerHTML = chapter.title.length > 15 ? chapter.title.substring(0, 14) + "..." : chapter.title; - $("#chapter").appendChild(ch); - }); - sum_chapter = data.data.length; - $('#chapter').scrollTop = 0; - $("#content").innerHTML = "章节列表加载完成!"; - }); - - })); - }); -}; - -$("#back").addEventListener("click", () => { - if (window.location.hash === "#content") { - window.location.hash = "#chapter"; - } else if (window.location.hash === "#chapter") { - window.location.hash = "#info"; - } else { - $('#allcontent').classList.remove("read"); - } -}); - -$("#refresh").addEventListener("click", init); - -$('#hidebooks').addEventListener("click", () => { - $("#books").classList.toggle("hide"); - $(".nav").classList.toggle("hide"); - $("#allcontent").classList.toggle("allscreen"); -}); - -$('#top').addEventListener("click", () => { - window.location.hash = ""; - window.location.hash = "#info"; -}); - -$('#showchapter').addEventListener("click", () => { - window.location.hash = ""; - window.location.hash = "#chapter"; -}); - -$('#up').addEventListener('click', e => { - if (now_chapter > 0) { - now_chapter--; - let clickEvent = document.createEvent('MouseEvents'); - clickEvent.initEvent("click", true, false); - $('[data-index="' + now_chapter + '"]').dispatchEvent(clickEvent); - } else if (now_chapter == 0) { - alert("已经是第一章了^_^!") - } else { - - } -}); - -$('#down').addEventListener('click', e => { - if (now_chapter > -1) { - if (now_chapter < sum_chapter - 1) { - now_chapter++; - let clickEvent = document.createEvent('MouseEvents'); - clickEvent.initEvent("click", true, false); - $('[data-index="' + now_chapter + '"]').dispatchEvent(clickEvent); - - } else { - alert("已经是最后一章了^_^!") - } - } -}); - -$('#chapter').addEventListener("click", (e) => { - if (e.target.tagName === "BUTTON") { - var url = e.target.getAttribute("data-url"); - var index = e.target.getAttribute("data-index"); - var name = e.target.getAttribute("title"); - if (!url) { - alert("未取得书籍地址"); - } - if (!index && (0 != index)) { - alert("未取得章节索引"); - } - now_chapter = parseInt(index); - $("#content").innerHTML = "

" + name + " 加载中...

"; - fetch(apiAddress("getBookContent", url, index), { mode: "cors" }) - .then(res => res.json()) - .then(data => { - if (!data.isSuccess) { - alert(data.errorMsg); - $("#content").innerHTML = "

" + name + " 加载失败!

"; - return; - } - var content = data.data.trim().split("\n\n"); - if (content.length === 2) { - $("#content").innerHTML = `

${content[0]}

  (全文 ${content[1].length} 字)

  ` + content[1].trim().replace(/\n/g, "

"); - } else { - $("#content").innerHTML = `

${name || e.target.innerHTML}

  (全文 ${data.data.length} 字)

  ` + data.data.trim().replace(/\n/g, "

"); - } - window.location.hash = ""; - window.location.hash = "#content"; - }); - } -}); - -$('#address').setAttribute("placeholder", "阅读APP地址或IP:" + window.location.host); -if (!$('#address').value && typeof localStorage && localStorage.getItem('address')) { - $('#address').value = localStorage.getItem('address'); -} -init(); diff --git a/app/src/main/assets/web/new/css/about.dbe575e1.css b/app/src/main/assets/web/bookshelf/css/about.dbe575e1.css similarity index 100% rename from app/src/main/assets/web/new/css/about.dbe575e1.css rename to app/src/main/assets/web/bookshelf/css/about.dbe575e1.css diff --git a/app/src/main/assets/web/new/css/app.e4c919b7.css b/app/src/main/assets/web/bookshelf/css/app.e4c919b7.css old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/css/app.e4c919b7.css rename to app/src/main/assets/web/bookshelf/css/app.e4c919b7.css diff --git a/app/src/main/assets/web/new/css/chunk-vendors.8a465a1d.css b/app/src/main/assets/web/bookshelf/css/chunk-vendors.8a465a1d.css similarity index 100% rename from app/src/main/assets/web/new/css/chunk-vendors.8a465a1d.css rename to app/src/main/assets/web/bookshelf/css/chunk-vendors.8a465a1d.css diff --git a/app/src/main/assets/web/new/css/detail.e03dc50b.css b/app/src/main/assets/web/bookshelf/css/detail.e03dc50b.css similarity index 100% rename from app/src/main/assets/web/new/css/detail.e03dc50b.css rename to app/src/main/assets/web/bookshelf/css/detail.e03dc50b.css diff --git a/app/src/main/assets/web/new/fonts/element-icons.535877f5.woff b/app/src/main/assets/web/bookshelf/fonts/element-icons.535877f5.woff old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/fonts/element-icons.535877f5.woff rename to app/src/main/assets/web/bookshelf/fonts/element-icons.535877f5.woff diff --git a/app/src/main/assets/web/new/fonts/element-icons.732389de.ttf b/app/src/main/assets/web/bookshelf/fonts/element-icons.732389de.ttf old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/fonts/element-icons.732389de.ttf rename to app/src/main/assets/web/bookshelf/fonts/element-icons.732389de.ttf diff --git a/app/src/main/assets/web/new/fonts/iconfont.f9a3fb0e.woff b/app/src/main/assets/web/bookshelf/fonts/iconfont.f9a3fb0e.woff old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/fonts/iconfont.f9a3fb0e.woff rename to app/src/main/assets/web/bookshelf/fonts/iconfont.f9a3fb0e.woff diff --git a/app/src/main/assets/web/new/fonts/popfont.f39ecc1a.ttf b/app/src/main/assets/web/bookshelf/fonts/popfont.f39ecc1a.ttf old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/fonts/popfont.f39ecc1a.ttf rename to app/src/main/assets/web/bookshelf/fonts/popfont.f39ecc1a.ttf diff --git a/app/src/main/assets/web/new/fonts/shelffont.6c094b6d.ttf b/app/src/main/assets/web/bookshelf/fonts/shelffont.6c094b6d.ttf old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/fonts/shelffont.6c094b6d.ttf rename to app/src/main/assets/web/bookshelf/fonts/shelffont.6c094b6d.ttf diff --git a/app/src/main/assets/web/new/img/icons/android-chrome-192x192.png b/app/src/main/assets/web/bookshelf/img/icons/android-chrome-192x192.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/android-chrome-192x192.png rename to app/src/main/assets/web/bookshelf/img/icons/android-chrome-192x192.png diff --git a/app/src/main/assets/web/new/img/icons/android-chrome-512x512.png b/app/src/main/assets/web/bookshelf/img/icons/android-chrome-512x512.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/android-chrome-512x512.png rename to app/src/main/assets/web/bookshelf/img/icons/android-chrome-512x512.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon-120x120.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-120x120.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon-120x120.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-120x120.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon-152x152.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-152x152.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon-152x152.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-152x152.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon-180x180.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-180x180.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon-180x180.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-180x180.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon-60x60.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-60x60.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon-60x60.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-60x60.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon-76x76.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-76x76.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon-76x76.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon-76x76.png diff --git a/app/src/main/assets/web/new/img/icons/apple-touch-icon.png b/app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/apple-touch-icon.png rename to app/src/main/assets/web/bookshelf/img/icons/apple-touch-icon.png diff --git a/app/src/main/assets/web/new/img/icons/msapplication-icon-144x144.png b/app/src/main/assets/web/bookshelf/img/icons/msapplication-icon-144x144.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/msapplication-icon-144x144.png rename to app/src/main/assets/web/bookshelf/img/icons/msapplication-icon-144x144.png diff --git a/app/src/main/assets/web/new/img/icons/mstile-150x150.png b/app/src/main/assets/web/bookshelf/img/icons/mstile-150x150.png old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/mstile-150x150.png rename to app/src/main/assets/web/bookshelf/img/icons/mstile-150x150.png diff --git a/app/src/main/assets/web/new/img/icons/safari-pinned-tab.svg b/app/src/main/assets/web/bookshelf/img/icons/safari-pinned-tab.svg old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/icons/safari-pinned-tab.svg rename to app/src/main/assets/web/bookshelf/img/icons/safari-pinned-tab.svg diff --git a/app/src/main/assets/web/new/img/noCover.b5c48bc1.jpeg b/app/src/main/assets/web/bookshelf/img/noCover.b5c48bc1.jpeg old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/img/noCover.b5c48bc1.jpeg rename to app/src/main/assets/web/bookshelf/img/noCover.b5c48bc1.jpeg diff --git a/app/src/main/assets/web/new/index.html b/app/src/main/assets/web/bookshelf/index.html old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/index.html rename to app/src/main/assets/web/bookshelf/index.html diff --git a/app/src/main/assets/web/new/js/about.517e59ea.js b/app/src/main/assets/web/bookshelf/js/about.517e59ea.js similarity index 100% rename from app/src/main/assets/web/new/js/about.517e59ea.js rename to app/src/main/assets/web/bookshelf/js/about.517e59ea.js diff --git a/app/src/main/assets/web/new/js/about~detail.d5f6fddf.js b/app/src/main/assets/web/bookshelf/js/about~detail.d5f6fddf.js similarity index 100% rename from app/src/main/assets/web/new/js/about~detail.d5f6fddf.js rename to app/src/main/assets/web/bookshelf/js/about~detail.d5f6fddf.js diff --git a/app/src/main/assets/web/new/js/app.b53a207e.js b/app/src/main/assets/web/bookshelf/js/app.b53a207e.js similarity index 100% rename from app/src/main/assets/web/new/js/app.b53a207e.js rename to app/src/main/assets/web/bookshelf/js/app.b53a207e.js diff --git a/app/src/main/assets/web/new/js/chunk-vendors.3ef7796f.js b/app/src/main/assets/web/bookshelf/js/chunk-vendors.3ef7796f.js similarity index 100% rename from app/src/main/assets/web/new/js/chunk-vendors.3ef7796f.js rename to app/src/main/assets/web/bookshelf/js/chunk-vendors.3ef7796f.js diff --git a/app/src/main/assets/web/new/js/detail.133910b4.js b/app/src/main/assets/web/bookshelf/js/detail.133910b4.js similarity index 100% rename from app/src/main/assets/web/new/js/detail.133910b4.js rename to app/src/main/assets/web/bookshelf/js/detail.133910b4.js diff --git a/app/src/main/assets/web/new/manifest.json b/app/src/main/assets/web/bookshelf/manifest.json old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/manifest.json rename to app/src/main/assets/web/bookshelf/manifest.json diff --git a/app/src/main/assets/web/new/precache-manifest.04173d48a716bddd6fb159c907ea23ec.js b/app/src/main/assets/web/bookshelf/precache-manifest.04173d48a716bddd6fb159c907ea23ec.js similarity index 100% rename from app/src/main/assets/web/new/precache-manifest.04173d48a716bddd6fb159c907ea23ec.js rename to app/src/main/assets/web/bookshelf/precache-manifest.04173d48a716bddd6fb159c907ea23ec.js diff --git a/app/src/main/assets/web/new/robots.txt b/app/src/main/assets/web/bookshelf/robots.txt old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/robots.txt rename to app/src/main/assets/web/bookshelf/robots.txt diff --git a/app/src/main/assets/web/new/service-worker.js b/app/src/main/assets/web/bookshelf/service-worker.js old mode 100755 new mode 100644 similarity index 100% rename from app/src/main/assets/web/new/service-worker.js rename to app/src/main/assets/web/bookshelf/service-worker.js diff --git a/app/src/main/assets/web/index.html b/app/src/main/assets/web/index.html index 1011d1a4c..95eeecb20 100644 --- a/app/src/main/assets/web/index.html +++ b/app/src/main/assets/web/index.html @@ -65,8 +65,8 @@
- 书架 - 书源 + 书架 + 书源