✌️
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user