forked from FoundKeyGang/FoundKey
✌️
This commit is contained in:
parent
b563a67b8a
commit
0769566408
24 changed files with 65 additions and 42 deletions
|
@ -24,7 +24,7 @@ Note that Misskey uses following subdomains:
|
|||
|
||||
* **api**.*{primary domain}*
|
||||
* **auth**.*{primary domain}*
|
||||
* **about**.*{primary domain}*
|
||||
* **docs**.*{primary domain}*
|
||||
* **ch**.*{primary domain}*
|
||||
* **stats**.*{primary domain}*
|
||||
* **status**.*{primary domain}*
|
||||
|
|
|
@ -25,7 +25,7 @@ Misskeyは以下のサブドメインを使います:
|
|||
|
||||
* **api**.*{primary domain}*
|
||||
* **auth**.*{primary domain}*
|
||||
* **about**.*{primary domain}*
|
||||
* **docs**.*{primary domain}*
|
||||
* **ch**.*{primary domain}*
|
||||
* **stats**.*{primary domain}*
|
||||
* **status**.*{primary domain}*
|
||||
|
|
|
@ -9,7 +9,6 @@ import * as gulp from 'gulp';
|
|||
import * as gutil from 'gulp-util';
|
||||
import * as ts from 'gulp-typescript';
|
||||
import tslint from 'gulp-tslint';
|
||||
import * as es from 'event-stream';
|
||||
import cssnano = require('gulp-cssnano');
|
||||
import * as uglifyComposer from 'gulp-uglify/composer';
|
||||
import pug = require('gulp-pug');
|
||||
|
@ -74,16 +73,10 @@ gulp.task('build:ts', () => {
|
|||
});
|
||||
|
||||
gulp.task('build:copy', () =>
|
||||
es.merge(
|
||||
gulp.src([
|
||||
'./src/**/assets/**/*',
|
||||
'!./src/web/app/**/assets/**/*'
|
||||
]).pipe(gulp.dest('./built/')) as any,
|
||||
gulp.src([
|
||||
'./src/web/about/**/*',
|
||||
'!./src/web/about/**/*.pug'
|
||||
]).pipe(gulp.dest('./built/web/about/')) as any
|
||||
)
|
||||
]).pipe(gulp.dest('./built/'))
|
||||
);
|
||||
|
||||
gulp.task('test', ['lint', 'mocha']);
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"@types/debug": "0.0.30",
|
||||
"@types/deep-equal": "1.0.1",
|
||||
"@types/elasticsearch": "5.0.19",
|
||||
"@types/event-stream": "3.3.33",
|
||||
"@types/eventemitter3": "2.0.2",
|
||||
"@types/express": "4.0.39",
|
||||
"@types/gm": "1.17.33",
|
||||
|
@ -99,7 +98,6 @@
|
|||
"diskusage": "0.2.4",
|
||||
"elasticsearch": "14.0.0",
|
||||
"escape-regexp": "0.0.1",
|
||||
"event-stream": "3.3.4",
|
||||
"eventemitter3": "3.0.0",
|
||||
"exif-js": "2.3.0",
|
||||
"express": "4.16.2",
|
||||
|
|
|
@ -101,7 +101,7 @@ type Mixin = {
|
|||
secondary_scheme: string;
|
||||
api_url: string;
|
||||
auth_url: string;
|
||||
about_url: string;
|
||||
docs_url: string;
|
||||
ch_url: string;
|
||||
stats_url: string;
|
||||
status_url: string;
|
||||
|
@ -131,7 +131,7 @@ export default function load() {
|
|||
mixin.auth_url = `${mixin.scheme}://auth.${mixin.host}`;
|
||||
mixin.ch_url = `${mixin.scheme}://ch.${mixin.host}`;
|
||||
mixin.dev_url = `${mixin.scheme}://dev.${mixin.host}`;
|
||||
mixin.about_url = `${mixin.scheme}://about.${mixin.host}`;
|
||||
mixin.docs_url = `${mixin.scheme}://docs.${mixin.host}`;
|
||||
mixin.stats_url = `${mixin.scheme}://stats.${mixin.host}`;
|
||||
mixin.status_url = `${mixin.scheme}://status.${mixin.host}`;
|
||||
mixin.drive_url = `${mixin.secondary_scheme}://file.${mixin.secondary_host}`;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<h1>Misskeyとは?</h1>
|
||||
<p><ruby>Misskey<rt>みすきー</rt></ruby>は、<a href="http://syuilo.com" target="_blank">syuilo</a>が2014年くらいから<a href="https://github.com/syuilo/misskey" target="_blank">オープンソースで</a>開発・運営を行っている、ミニブログベースのSNSです。</p>
|
||||
<p>無料で誰でも利用でき、広告も掲載していません。</p>
|
||||
<p><a href={ _ABOUT_URL_ } target="_blank">もっと知りたい方はこちら</a></p>
|
||||
<p><a href={ _DOCS_URL_ } target="_blank">もっと知りたい方はこちら</a></p>
|
||||
</article>
|
||||
<style>
|
||||
:scope
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<mk-nav-links>
|
||||
<a href={ _ABOUT_URL_ }>%i18n:common.tags.mk-nav-links.about%</a><i>・</i><a href={ _STATS_URL_ }>%i18n:common.tags.mk-nav-links.stats%</a><i>・</i><a href={ _STATUS_URL_ }>%i18n:common.tags.mk-nav-links.status%</a><i>・</i><a href="http://zawazawa.jp/misskey/">%i18n:common.tags.mk-nav-links.wiki%</a><i>・</i><a href="https://github.com/syuilo/misskey/blob/master/DONORS.md">%i18n:common.tags.mk-nav-links.donors%</a><i>・</i><a href="https://github.com/syuilo/misskey">%i18n:common.tags.mk-nav-links.repository%</a><i>・</i><a href={ _DEV_URL_ }>%i18n:common.tags.mk-nav-links.develop%</a><i>・</i><a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
|
||||
<a href={ aboutUrl }>%i18n:common.tags.mk-nav-links.about%</a><i>・</i><a href={ _STATS_URL_ }>%i18n:common.tags.mk-nav-links.stats%</a><i>・</i><a href={ _STATUS_URL_ }>%i18n:common.tags.mk-nav-links.status%</a><i>・</i><a href="http://zawazawa.jp/misskey/">%i18n:common.tags.mk-nav-links.wiki%</a><i>・</i><a href="https://github.com/syuilo/misskey/blob/master/DONORS.md">%i18n:common.tags.mk-nav-links.donors%</a><i>・</i><a href="https://github.com/syuilo/misskey">%i18n:common.tags.mk-nav-links.repository%</a><i>・</i><a href={ _DEV_URL_ }>%i18n:common.tags.mk-nav-links.develop%</a><i>・</i><a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
|
||||
<style>
|
||||
:scope
|
||||
display inline
|
||||
</style>
|
||||
<script>
|
||||
this.aboutUrl = `${_DOCS_URL_}/${_LANG_}/about`;
|
||||
</script>
|
||||
</mk-nav-links>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</label>
|
||||
<label class="agree-tou">
|
||||
<input name="agree-tou" type="checkbox" autocomplete="off" required="required"/>
|
||||
<p><a href="https://github.com/syuilo/misskey/blob/master/src/docs/tou.md" target="_blank">利用規約</a>に同意する</p>
|
||||
<p><a href={ touUrl } target="_blank">利用規約</a>に同意する</p>
|
||||
</label>
|
||||
<button onclick={ onsubmit }>%i18n:common.tags.mk-signup.create%</button>
|
||||
</form>
|
||||
|
@ -182,6 +182,8 @@
|
|||
this.passwordRetypeState = null;
|
||||
this.recaptchaed = false;
|
||||
|
||||
this.aboutUrl = `${_DOCS_URL_}/${_LANG_}/tou`;
|
||||
|
||||
window.onRecaptchaed = () => {
|
||||
this.recaptchaed = true;
|
||||
this.update();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<mk-twitter-setting>
|
||||
<p>%i18n:common.tags.mk-twitter-setting.description%<a href={ _ABOUT_URL_ + '/link-to-twitter' } target="_blank">%i18n:common.tags.mk-twitter-setting.detail%</a></p>
|
||||
<p>%i18n:common.tags.mk-twitter-setting.description%<a href={ _DOCS_URL_ + '/link-to-twitter' } target="_blank">%i18n:common.tags.mk-twitter-setting.detail%</a></p>
|
||||
<p class="account" if={ I.twitter } title={ 'Twitter ID: ' + I.twitter.user_id }>%i18n:common.tags.mk-twitter-setting.connected-to%: <a href={ 'https://twitter.com/' + I.twitter.screen_name } target="_blank">@{ I.twitter.screen_name }</a></p>
|
||||
<p>
|
||||
<a href={ _API_URL_ + '/connect/twitter' } target="_blank" onclick={ connect }>{ I.twitter ? '%i18n:common.tags.mk-twitter-setting.reconnect%' : '%i18n:common.tags.mk-twitter-setting.connect%' }</a>
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
</mk-entrance>
|
||||
|
||||
<mk-entrance-signin>
|
||||
<a class="help" href={ _ABOUT_URL_ + '/help' } title="お困りですか?">%fa:question%</a>
|
||||
<a class="help" href={ _DOCS_URL_ + '/help' } title="お困りですか?">%fa:question%</a>
|
||||
<div class="form">
|
||||
<h1><img if={ user } src={ user.avatar_url + '?thumbnail&size=32' }/>
|
||||
<p>{ user ? user.name : 'アカウント' }</p>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<li><a href="/i/settings">%fa:cog%%i18n:mobile.tags.mk-ui-nav.settings%%fa:angle-right%</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href={ _ABOUT_URL_ }><p class="about">%i18n:mobile.tags.mk-ui-nav.about%</p></a>
|
||||
<a href={ aboutUrl }><p class="about">%i18n:mobile.tags.mk-ui-nav.about%</p></a>
|
||||
</div>
|
||||
<style>
|
||||
:scope
|
||||
|
@ -359,6 +359,8 @@
|
|||
this.connection = this.stream.getConnection();
|
||||
this.connectionId = this.stream.use();
|
||||
|
||||
this.aboutUrl = `${_DOCS_URL_}/${_LANG_}/about`;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.connection.on('read_all_notifications', this.onReadAllNotifications);
|
||||
this.connection.on('read_all_messaging_messages', this.onReadAllMessagingMessages);
|
||||
|
|
3
src/web/docs/about.en.pug
Normal file
3
src/web/docs/about.en.pug
Normal file
|
@ -0,0 +1,3 @@
|
|||
h1 About Misskey
|
||||
|
||||
p Misskey is a mini blog SNS.
|
3
src/web/docs/about.ja.pug
Normal file
3
src/web/docs/about.ja.pug
Normal file
|
@ -0,0 +1,3 @@
|
|||
h1 Misskeyについて
|
||||
|
||||
p MisskeyはミニブログSNSです。
|
|
@ -2,7 +2,7 @@ extends ../../layout.pug
|
|||
include ../mixins
|
||||
|
||||
block meta
|
||||
link(rel="stylesheet" href="/assets/docs/api/endpoints/style.css")
|
||||
link(rel="stylesheet" href="/assets/api/endpoints/style.css")
|
||||
|
||||
block main
|
||||
h1= endpoint
|
||||
|
|
|
@ -2,7 +2,7 @@ extends ../../layout.pug
|
|||
include ../mixins
|
||||
|
||||
block meta
|
||||
link(rel="stylesheet" href="/assets/docs/api/entities/style.css")
|
||||
link(rel="stylesheet" href="/assets/api/entities/style.css")
|
||||
|
||||
block main
|
||||
h1= name
|
||||
|
|
|
@ -14,13 +14,13 @@ mixin propTable(props)
|
|||
if prop.kind == 'id'
|
||||
if prop.entity
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| ID)
|
||||
else
|
||||
| (ID)
|
||||
else if prop.kind == 'entity'
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| )
|
||||
else if prop.kind == 'object'
|
||||
if prop.def
|
||||
|
|
|
@ -70,5 +70,5 @@ gulp.task('doc:styles', () =>
|
|||
gulp.src('./src/web/docs/**/*.styl')
|
||||
.pipe(stylus())
|
||||
.pipe((cssnano as any)())
|
||||
.pipe(gulp.dest('./built/web/assets/docs/'))
|
||||
.pipe(gulp.dest('./built/web/docs/assets/'))
|
||||
);
|
||||
|
|
|
@ -6,9 +6,9 @@ html(lang= lang)
|
|||
meta(name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no")
|
||||
title
|
||||
| #{title} | Misskey Docs
|
||||
link(rel="stylesheet" href="/assets/docs/style.css")
|
||||
link(rel="stylesheet" href="/assets/style.css")
|
||||
block meta
|
||||
base(href=`/docs/${lang}/`)
|
||||
base(href=`/${lang}/`)
|
||||
|
||||
body
|
||||
nav
|
||||
|
|
21
src/web/docs/server.ts
Normal file
21
src/web/docs/server.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Docs Server
|
||||
*/
|
||||
|
||||
import * as express from 'express';
|
||||
|
||||
/**
|
||||
* Init app
|
||||
*/
|
||||
const app = express();
|
||||
app.disable('x-powered-by');
|
||||
|
||||
app.use('/assets', express.static(`${__dirname}/assets`));
|
||||
|
||||
/**
|
||||
* Routing
|
||||
*/
|
||||
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
|
||||
res.sendFile(`${__dirname}/${req.params[0]}.html`));
|
||||
|
||||
module.exports = app;
|
3
src/web/docs/tou.ja.pug
Normal file
3
src/web/docs/tou.ja.pug
Normal file
|
@ -0,0 +1,3 @@
|
|||
h1 利用規約
|
||||
|
||||
p 公序良俗に反する行為はおやめください。
|
|
@ -1,4 +0,0 @@
|
|||
利用規約
|
||||
================================================================
|
||||
|
||||
公序良俗に反する行為はおやめください。
|
|
@ -10,6 +10,9 @@ import * as express from 'express';
|
|||
import * as bodyParser from 'body-parser';
|
||||
import * as favicon from 'serve-favicon';
|
||||
import * as compression from 'compression';
|
||||
import vhost = require('vhost');
|
||||
|
||||
import config from '../conf';
|
||||
|
||||
/**
|
||||
* Init app
|
||||
|
@ -17,6 +20,8 @@ import * as compression from 'compression';
|
|||
const app = express();
|
||||
app.disable('x-powered-by');
|
||||
|
||||
app.use(vhost(`docs.${config.host}`, require('./docs/server')));
|
||||
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(bodyParser.json({
|
||||
type: ['application/json', 'text/plain']
|
||||
|
@ -63,12 +68,6 @@ app.get('/manifest.json', (req, res) =>
|
|||
*/
|
||||
app.get(/\/api:url/, require('./service/url-preview'));
|
||||
|
||||
/**
|
||||
* Docs
|
||||
*/
|
||||
app.get(/^\/docs\/([a-z_\-\/]+?)$/, (req, res) =>
|
||||
res.sendFile(`${__dirname}/docs/${req.params[0]}.html`));
|
||||
|
||||
/**
|
||||
* Routing
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,7 @@ certbot certonly --standalone\
|
|||
-d $1\
|
||||
-d api.$1\
|
||||
-d auth.$1\
|
||||
-d about.$1\
|
||||
-d docs.$1\
|
||||
-d ch.$1\
|
||||
-d stats.$1\
|
||||
-d status.$1\
|
||||
|
|
|
@ -16,7 +16,7 @@ export default lang => {
|
|||
_VERSION_: version,
|
||||
_STATUS_URL_: config.status_url,
|
||||
_STATS_URL_: config.stats_url,
|
||||
_ABOUT_URL_: config.about_url,
|
||||
_DOCS_URL_: config.docs_url,
|
||||
_API_URL_: config.api_url,
|
||||
_DEV_URL_: config.dev_url,
|
||||
_CH_URL_: config.ch_url,
|
||||
|
|
Loading…
Reference in a new issue