diff --git a/README.md b/README.md index e6b8a19..8aecd57 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,50 @@ -# go2index-theme-acrou +![GoIndex](https://raw.githubusercontent.com/donwa/goindex/master/themes/logo.png) -## Project setup -``` -npm install -``` +# GoIndex-theme-acrou -### Compiles and hot-reloads for development -``` -npm run serve -``` +[README](README.md) | [中文文档](README_zh.md) -### Compiles and minifies for production -``` -npm run build -``` +## Demo -### Lints and fixes files -``` -npm run lint -``` +Acrou: [https://oss.achirou.workers.dev/](https://oss.achirou.workers.dev/) -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). +## Use + +The theme files can be downloaded from the dist directory and uploaded to your own CDN or you can use the link below. + +Modify the app.js used in index.js of goindex to (https://cdn.jsdelivr.net/gh/Aicirou/goindex-theme-acrou/dist/app.mini.js). + +The goindex author's `index.js` does not support search. Use this [index.js](https://oss.achirou.workers.dev/go2index/index.js?a=view) if you need a search function. + +## TODO + +- [x] Drive switch +- [ ] Pagination display +- [ ] Picture list display +- [ ] More file format preview + +GoIndex +==== + +Google Drive Directory Index +Combining the power of [Cloudflare Workers](https://workers.cloudflare.com/) and [Google Drive](https://www.google.com/drive/) will allow you to index you files on the browser on Cloudflare Workers. + +[index.js](https://github.com/donwa/goindex/) is the content of the Workers script. + +## Deployment +1.Install `rclone` software locally +2.Follow [https://rclone.org/drive/]( https://rclone.org/drive/) bind a drive +3.Execute the command`rclone config file` to find the file `rclone.conf` path +4.Open `rclone.conf`,find the configuration `root_folder_id` and `refresh_token` +5.Download index.js in https://github.com/donwa/goindex and fill in root and refresh_token +6.Deploy the code to [Cloudflare Workers](https://www.cloudflare.com/) + +## Quick Deployment +1.Open https://installen.gd.workers.dev/ +2.Auth and get the code +3.Deploy the code to [Cloudflare Workers](https://www.cloudflare.com/) + + + +## About +Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 150+ global data centers. diff --git a/README_zh.md b/README_zh.md new file mode 100644 index 0000000..fddc2ad --- /dev/null +++ b/README_zh.md @@ -0,0 +1,53 @@ +![GoIndex](https://raw.githubusercontent.com/donwa/goindex/master/themes/logo.png) + +# GoIndex-theme-acrou + +[README](README.md) | [中文文档](README_zh.md) + +## 预览 + +Acrou: [https://oss.achirou.workers.dev/](https://oss.achirou.workers.dev/) + +## 使用 + +主题文件在dist目录可以下载下来上传到自己cdn或者使用下面的链接也可以 + +修改goindex的index.js中所使用的app.js为(https://cdn.jsdelivr.net/gh/Aicirou/goindex-theme-acrou/dist/app.mini.js) + +goindex作者的`index.js`不支持搜索,需要搜索功能请使用[index.js](https://oss.achirou.workers.dev/go2index/index.js?a=view) + +## 即将支持 + +- [x] 多盘切换 +- [ ] 分页显示 +- [ ] 图片列表显示 +- [ ] 更多文件格式预览 + +GoIndex +==== + +Google Drive Directory Index +Combining the power of [Cloudflare Workers](https://workers.cloudflare.com/) and [Google Drive](https://www.google.com/drive/) will allow you to index you files on the browser on Cloudflare Workers. + +[index.js](https://github.com/donwa/goindex/) is the content of the Workers script. + +## Deployment + +1.Install `rclone` software locally +2.Follow [https://rclone.org/drive/]( https://rclone.org/drive/) bind a drive +3.Execute the command`rclone config file` to find the file `rclone.conf` path +4.Open `rclone.conf`,find the configuration `root_folder_id` and `refresh_token` +5.Download index.js in https://github.com/donwa/goindex and fill in root and refresh_token +6.Deploy the code to [Cloudflare Workers](https://www.cloudflare.com/) + +## Quick Deployment + +1.Open https://installen.gd.workers.dev/ +2.Auth and get the code +3.Deploy the code to [Cloudflare Workers](https://www.cloudflare.com/) + + + +## About + +Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 150+ global data centers. \ No newline at end of file diff --git a/public/index.html b/public/index.html index 5621ce5..e406d1e 100644 --- a/public/index.html +++ b/public/index.html @@ -1,33 +1,34 @@ + + + + + + <%= htmlWebpackPlugin.options.title %> + + - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - -
- - - \ No newline at end of file + +
+ + diff --git a/src/App.vue b/src/App.vue index bb86abd..f77f9c3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,33 +5,25 @@ \ No newline at end of file diff --git a/src/assets/style/public.scss b/src/assets/style/public.scss index 7cbd7e8..e69de29 100644 --- a/src/assets/style/public.scss +++ b/src/assets/style/public.scss @@ -1,62 +0,0 @@ -@import "~/node_modules/bulma" - -// .icon { -// width: 2em; -// height: 2em; -// vertical-align: -0.5em; -// fill: currentColor; -// overflow: hidden; -// } - -// th,td { -// border: 0 !important; -// } - -// .breadcrumb:not(:last-child) { -// margin: 0.5rem 0; -// padding: 0 0.75em; -// } - -// .breadcrumb ul { -// flex-wrap: inherit; -// } - -// .breadcrumb li:not(:first-child):not(:last-child) { -// margin: 0 5px; -// overflow: hidden; -// text-overflow: ellipsis; -// white-space: nowrap; -// } - -// body { -// overflow: hidden; -// } - -// .section { -// padding: 0.5rem 0.5rem 1.5rem 0.5rem; -// } - -// .container { -// max-width: 980px !important; -// } - -// .table { -// width: 100%; -// table-layout: fixed; -// } - -// .table td { -// overflow: hidden; -// text-overflow: ellipsis; -// white-space: nowrap; -// } - -// .no-content { -// background: url(https://s1.hdslb.com/bfs/static/jinkela/search/asserts/no-data.png) no-repeat 50% 50%; -// height: 240px; -// line-height: 240px; -// text-align: center; -// margin-top: 20px; -// } - -$widescreen-enabled: false diff --git a/src/assets/style/theme/acrou/index.scss b/src/assets/style/theme/acrou/index.scss new file mode 100644 index 0000000..c95a8c4 --- /dev/null +++ b/src/assets/style/theme/acrou/index.scss @@ -0,0 +1,57 @@ +body { + overflow: hidden; +} + +.section { + padding: 0.5rem 0.5rem 1.5rem 0.5rem; +} + +.container { + max-width: 980px; +} + +.icon { + width: 2em; + height: 2em; + vertical-align: middle; + fill: currentColor; + overflow: hidden; +} + +.breadcrumb:not(:last-child) { + margin: 0.5rem 0; + padding: 0 0.75em; +} + +.breadcrumb ul { + flex-wrap: inherit; +} + +.breadcrumb li:not(:first-child):not(:last-child) { + margin: 0 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.table { + width: 100%; + table-layout: fixed; + th,td { + border: 0 !important; + } + td { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; + } +} + +.no-content { + background: url(https://s1.hdslb.com/bfs/static/jinkela/search/asserts/no-data.png) no-repeat 50% 50%; + height: 240px; + line-height: 240px; + text-align: center; + margin-top: 20px; +} \ No newline at end of file diff --git a/src/assets/style/theme/register.scss b/src/assets/style/theme/register.scss new file mode 100644 index 0000000..0e7d9d7 --- /dev/null +++ b/src/assets/style/theme/register.scss @@ -0,0 +1,2 @@ +@import 'bulma'; +@import '~@/assets/style/theme/acrou/index.scss'; \ No newline at end of file diff --git a/src/main.js b/src/main.js index d6e715e..210cce4 100644 --- a/src/main.js +++ b/src/main.js @@ -2,7 +2,6 @@ import Vue from 'vue' import App from './App.vue' import axios from '@utils/axios' import VueAxios from 'vue-axios' -// import bulma from 'bulma' var styles = [ // 'https://cdn.jsdelivr.net/npm/bulma@0.8.1/css/bulma.min.css', @@ -13,38 +12,9 @@ styles.forEach(item=>{ document.write(``); }) -// document.write( -// `` -// ); +document.write('
'); Vue.config.productionTip = false -// Vue.use(bulma) Vue.use(VueAxios,axios) new Vue({ diff --git a/src/view/Layout.vue b/src/view/Layout.vue index 5826b8a..9b8c984 100644 --- a/src/view/Layout.vue +++ b/src/view/Layout.vue @@ -67,7 +67,7 @@ export default { var name = path.split("/").pop(); var ext = name.split(".").pop().toLowerCase(); if ( - "|html|php|css|go|java|js|json|txt|sh|md|".indexOf(`|${ext}|`) >= 0 + "|html|php|css|go|java|py|js|json|txt|sh|md|".indexOf(`|${ext}|`) >= 0 ) { this.show = "text"; this.text = { @@ -95,4 +95,7 @@ export default { } } } - \ No newline at end of file + + diff --git a/src/view/common/BreadCrumb.vue b/src/view/common/BreadCrumb.vue index 31ba53c..6fc3c25 100644 --- a/src/view/common/BreadCrumb.vue +++ b/src/view/common/BreadCrumb.vue @@ -1,9 +1,6 @@ \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index a3097c1..11d28b2 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,35 +1,37 @@ -const path = require('path'); +const path = require("path"); -function resolve (dir) { - return path.join(__dirname, dir); +function resolve(dir) { + return path.join(__dirname, dir); } module.exports = { - lintOnSave: true, - css: { - loaderOptions: { - // 设置 scss 公用变量文件 - sass: { - prependData: `@import '~@/assets/style/public.scss';` - } - } + lintOnSave: true, + // css: { + // loaderOptions: { + // sass: { + // prependData: `@import '~@/assets/style/public.scss';`, + // }, + // } + // }, + chainWebpack: (config) => { + config.resolve.alias + .set("@", resolve("src")) + .set("@assets", resolve("src/assets")) + .set("@utils", resolve("src/utils")) + .set("@node_modules", resolve("node_modules")); + config.output + .filename("js/app.mini.js") + .end(); + }, + devServer: { + proxy: { + "/api": { + target: "https://ossdev.achirou.workers.dev/", + ws: true, + changeOrigin: true, + pathRewrite: { + "^/api": "", + }, + }, }, - devServer: { - proxy: { - "/api": { - target: "https://ossdev.achirou.workers.dev/", - ws: true, - changeOrigin: true, - pathRewrite: { - "^/api": "", - }, - }, - } - }, - chainWebpack: (config) => { - config.resolve.alias - .set('@', resolve('src')) - .set('@assets', resolve('src/assets')) - .set('@utils', resolve('src/utils')) - .set('@node_modules', resolve('node_modules')) - } -}; \ No newline at end of file + }, +};