-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·117 lines (97 loc) · 3.06 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Copyright (c) 2018 jamcha (jamcha.aa@gmail.com), (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license.
*/
const React = require('react');
const CompLibrary = require('../../core/CompLibrary.js');
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
const siteConfig = require(process.cwd() + '/siteConfig.js');
function imgUrl(img) {
return siteConfig.baseUrl + 'img/' + img;
}
function docUrl(doc, language) {
return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
}
function pageUrl(page, language) {
return siteConfig.baseUrl + (language ? language + '/' : '') + page;
}
class Button extends React.Component {
render() {
return (
<div className="pluginWrapper buttonWrapper">
<a className="button" href={this.props.href} target={this.props.target}>
{this.props.children}
</a>
</div>
);
}
}
Button.defaultProps = {
target: '_self',
};
const SplashContainer = props => (
<div className="homeContainer">
<div className="homeSplashFade">
<div className="wrapper homeWrapper">{props.children}</div>
</div>
</div>
);
const Logo = props => (
<div className="projectLogo">
<img src={props.img_src} />
</div>
);
const ProjectTitle = props => (
<h2 className="projectTitle">
{siteConfig.title}
<small>{siteConfig.tagline}</small>
</h2>
);
const PromoSection = props => (
<div className="section promoSection">
<div className="promoRow">
<div className="pluginRowBlock">{props.children}</div>
</div>
</div>
);
class HomeSplash extends React.Component {
render() {
let language = this.props.language || '';
return (
<SplashContainer>
<Logo img_src={imgUrl('docusaurus.png')} />
<div className="inner">
<ProjectTitle />
<PromoSection>
<Button href={docUrl('01.html', language)}>読む</Button>
<Button href={'https://github.com/jamcha-aa/Docusaurus-Guide/'}>GitHub</Button>
<Button href={'https://jamcha-aa.github.io/About/'}>作品一覧</Button>
</PromoSection>
</div>
</SplashContainer>
);
}
}
class Index extends React.Component {
render() {
let language = this.props.language || '';
return (
<div>
<HomeSplash language={language} />
<div className="mainContainer">
<div className="productShowcaseSection paddingbottom">
<MarkdownBlock>{`
スマホの場合は画面左上の「×」で目次の表示/非表示ができます。
この物語はフィクションであり,実在の人物・ソフトウェア・団体とは一切関係ありません。
[![Built with Spacemacs](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)](http://spacemacs.org)
`}</MarkdownBlock>
</div>
</div>
</div>
);
}
}
module.exports = Index;