diff --git a/README.md b/README.md index 09e1775b3..ccf8a3592 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Welcome! [Misskey](https://misskey.xyz) is a completely open source, ultimately sophisticated new type of mini-blog based SNS. -![ss](./resources/ss.jpg) +![ss](./assets/ss.jpg) Key features -------------------------------- diff --git a/resources/apple-touch-icon.png b/assets/apple-touch-icon.png similarity index 100% rename from resources/apple-touch-icon.png rename to assets/apple-touch-icon.png diff --git a/resources/logo.svg b/assets/logo.svg similarity index 100% rename from resources/logo.svg rename to assets/logo.svg diff --git a/resources/ss.jpg b/assets/ss.jpg similarity index 100% rename from resources/ss.jpg rename to assets/ss.jpg diff --git a/docs/BASE.pug b/docs/BASE.pug index 77eac6de9..633488202 100644 --- a/docs/BASE.pug +++ b/docs/BASE.pug @@ -8,7 +8,7 @@ html(lang='ja', dir='ltr') meta(name='theme-color', content=themeColor) meta(name='referrer', content='origin') meta(name='viewport', content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no') - link(rel='stylesheet', href='/resources/style.css') + link(rel='stylesheet', href='/assets/style.css') title block title | | About Misskey diff --git a/gulpfile.ts b/gulpfile.ts index 9ba88125f..6376e0f89 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -85,8 +85,8 @@ gulp.task('build:about:docs', () => { gulp.task('build:copy', () => es.merge( gulp.src([ - './src/**/resources/**/*', - '!./src/web/app/**/resources/**/*' + './src/**/assets/**/*', + '!./src/web/app/**/assets/**/*' ]).pipe(gulp.dest('./built/')) as any, gulp.src([ './src/web/about/**/*', @@ -134,11 +134,11 @@ gulp.task('build:client:scripts', done => { require('./webpack.config').then(webpackOptions => { es.merge( webpack(webpackOptions, require('webpack')) - .pipe(gulp.dest('./built/web/resources/')) as any, + .pipe(gulp.dest('./built/web/assets/')) as any, gulp.src('./src/web/app/client/script.js') .pipe(replace('VERSION', JSON.stringify(version))) //.pipe(isProduction ? uglify() : gutil.noop()) - .pipe(gulp.dest('./built/web/resources/client/')) as any + .pipe(gulp.dest('./built/web/assets/client/')) as any ); done(); }); @@ -150,22 +150,22 @@ gulp.task('build:client:styles', () => .pipe(isProduction ? (cssnano as any)() : gutil.noop()) - .pipe(gulp.dest('./built/web/resources/')) + .pipe(gulp.dest('./built/web/assets/')) ); gulp.task('copy:client', [ 'build:client:scripts' ], () => gulp.src([ - './resources/**/*', - './src/web/resources/**/*', - './src/web/app/*/resources/**/*' + './assets/**/*', + './src/web/assets/**/*', + './src/web/app/*/assets/**/*' ]) .pipe(isProduction ? (imagemin as any)() : gutil.noop()) .pipe(rename(path => { - path.dirname = path.dirname.replace('resources', '.'); + path.dirname = path.dirname.replace('assets', '.'); })) - .pipe(gulp.dest('./built/web/resources/')) + .pipe(gulp.dest('./built/web/assets/')) ); gulp.task('build:client:pug', [ diff --git a/resources/favicon/128.png b/resources/favicon/128.png deleted file mode 100644 index 75b93cb1e..000000000 Binary files a/resources/favicon/128.png and /dev/null differ diff --git a/resources/favicon/16.png b/resources/favicon/16.png deleted file mode 100644 index 527ea7f41..000000000 Binary files a/resources/favicon/16.png and /dev/null differ diff --git a/resources/favicon/256.png b/resources/favicon/256.png deleted file mode 100644 index 8e0077b4b..000000000 Binary files a/resources/favicon/256.png and /dev/null differ diff --git a/resources/favicon/32.png b/resources/favicon/32.png deleted file mode 100644 index 2a4036545..000000000 Binary files a/resources/favicon/32.png and /dev/null differ diff --git a/resources/favicon/64.png b/resources/favicon/64.png deleted file mode 100644 index 2dd9d71a8..000000000 Binary files a/resources/favicon/64.png and /dev/null differ diff --git a/resources/icon.ai b/resources/icon.ai deleted file mode 100644 index 605a16a3b..000000000 Binary files a/resources/icon.ai and /dev/null differ diff --git a/resources/icon.png b/resources/icon.png deleted file mode 100644 index 8e0077b4b..000000000 Binary files a/resources/icon.png and /dev/null differ diff --git a/resources/icon.svg b/resources/icon.svg deleted file mode 100644 index f661393ba..000000000 Binary files a/resources/icon.svg and /dev/null differ diff --git a/src/file/resources/avatar.jpg b/src/file/assets/avatar.jpg similarity index 100% rename from src/file/resources/avatar.jpg rename to src/file/assets/avatar.jpg diff --git a/src/file/resources/bad-egg.png b/src/file/assets/bad-egg.png similarity index 100% rename from src/file/resources/bad-egg.png rename to src/file/assets/bad-egg.png diff --git a/src/file/resources/dummy.png b/src/file/assets/dummy.png similarity index 100% rename from src/file/resources/dummy.png rename to src/file/assets/dummy.png diff --git a/src/file/server.ts b/src/file/server.ts index 21447b596..8ab638aa6 100644 --- a/src/file/server.ts +++ b/src/file/server.ts @@ -24,7 +24,7 @@ app.use(cors()); /** * Statics */ -app.use('/resources', express.static(__dirname + '/resources', { +app.use('/assets', express.static(__dirname + '/assets', { maxAge: 1000 * 60 * 60 * 24 * 365 // 一年 })); @@ -33,12 +33,12 @@ app.get('/', (req, res) => { }); app.get('/default-avatar.jpg', (req, res) => { - const file = fs.readFileSync(__dirname + '/resources/avatar.jpg'); + const file = fs.readFileSync(__dirname + '/assets/avatar.jpg'); send(file, 'image/jpeg', req, res); }); app.get('/app-default.jpg', (req, res) => { - const file = fs.readFileSync(__dirname + '/resources/dummy.png'); + const file = fs.readFileSync(__dirname + '/assets/dummy.png'); send(file, 'image/png', req, res); }); @@ -54,7 +54,7 @@ async function raw(data: Buffer, type: string, download: boolean, res: express.R async function thumbnail(data: Buffer, type: string, resize: number, res: express.Response): Promise { if (!/^image\/.*$/.test(type)) { - data = fs.readFileSync(__dirname + '/resources/dummy.png'); + data = fs.readFileSync(__dirname + '/assets/dummy.png'); } let g = gm(data); @@ -100,7 +100,7 @@ app.get('/:id', async (req, res) => { const file = await File.findOne({_id: new mongodb.ObjectID(req.params.id)}); if (file == null) { - res.status(404).sendFile(__dirname + '/resources/dummy.png'); + res.status(404).sendFile(__dirname + '/assets/dummy.png'); return; } else if (file.data == null) { res.sendStatus(400); @@ -120,7 +120,7 @@ app.get('/:id/:name', async (req, res) => { const file = await File.findOne({_id: new mongodb.ObjectID(req.params.id)}); if (file == null) { - res.status(404).sendFile(__dirname + '/resources/dummy.png'); + res.status(404).sendFile(__dirname + '/assets/dummy.png'); return; } else if (file.data == null) { res.sendStatus(400); diff --git a/src/himasaku/resources/himasaku.png b/src/himasaku/assets/himasaku.png similarity index 100% rename from src/himasaku/resources/himasaku.png rename to src/himasaku/assets/himasaku.png diff --git a/src/himasaku/resources/index.html b/src/himasaku/assets/index.html similarity index 100% rename from src/himasaku/resources/index.html rename to src/himasaku/assets/index.html diff --git a/src/himasaku/server.ts b/src/himasaku/server.ts index e4fb0ef17..17edc6648 100644 --- a/src/himasaku/server.ts +++ b/src/himasaku/server.ts @@ -13,11 +13,11 @@ app.disable('x-powered-by'); app.locals.cache = true; app.get('/himasaku.png', (req, res) => { - res.sendFile(__dirname + '/resources/himasaku.png'); + res.sendFile(__dirname + '/assets/himasaku.png'); }); app.get('*', (req, res) => { - res.sendFile(__dirname + '/resources/index.html'); + res.sendFile(__dirname + '/assets/index.html'); }); module.exports = app; diff --git a/src/web/about/resources/style.css b/src/web/about/assets/style.css similarity index 100% rename from src/web/about/resources/style.css rename to src/web/about/assets/style.css diff --git a/src/web/about/index.ts b/src/web/about/index.ts index 18d259bcc..9fedeb627 100644 --- a/src/web/about/index.ts +++ b/src/web/about/index.ts @@ -3,7 +3,7 @@ import ms = require('ms'); const router = express.Router(); -router.use('/@/about/resources', express.static(`${__dirname}/resources`, { +router.use('/@/about/assets', express.static(`${__dirname}/assets`, { maxAge: ms('7 days') })); diff --git a/src/web/app/auth/resources/logo.svg b/src/web/app/auth/assets/logo.svg similarity index 100% rename from src/web/app/auth/resources/logo.svg rename to src/web/app/auth/assets/logo.svg diff --git a/src/web/app/auth/tags/index.tag b/src/web/app/auth/tags/index.tag index 218101f3d..6bc545df3 100644 --- a/src/web/app/auth/tags/index.tag +++ b/src/web/app/auth/tags/index.tag @@ -23,7 +23,7 @@

サインインしてください

- +