mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Add website for documentation
This commit is contained in:
parent
eb22ac1626
commit
269df1bec3
2
.dockerignore
Executable file
2
.dockerignore
Executable file
@ -0,0 +1,2 @@
|
||||
*/node_modules
|
||||
*.log
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -37,4 +37,10 @@ sysinfo.txt
|
||||
*.unitypackage
|
||||
|
||||
# VS Code Settings
|
||||
.vscode
|
||||
.vscode
|
||||
|
||||
# Node
|
||||
node_modules
|
||||
|
||||
# Website build folder
|
||||
/website/build
|
10
Dockerfile
Executable file
10
Dockerfile
Executable file
@ -0,0 +1,10 @@
|
||||
FROM node:8.11.4
|
||||
|
||||
WORKDIR /app/website
|
||||
|
||||
EXPOSE 3000 35729
|
||||
COPY ./docs /app/docs
|
||||
COPY ./website /app/website
|
||||
RUN yarn install
|
||||
|
||||
CMD ["yarn", "start"]
|
@ -3,7 +3,7 @@
|
||||
"displayName": "Unity Atoms Tags",
|
||||
"version": "2.0.0-beta.0",
|
||||
"unity": "2019.1",
|
||||
"description": "A tags system based Unity Atoms.",
|
||||
"description": "A replacement to Unity´s tags based on Unity Atoms.",
|
||||
"keywords": [
|
||||
"scriptable objects",
|
||||
"unity"
|
||||
|
@ -3,7 +3,7 @@
|
||||
"displayName": "Unity Atoms UI",
|
||||
"version": "2.0.0-beta.0",
|
||||
"unity": "2019.1",
|
||||
"description": "An UI system using Unity Atoms.",
|
||||
"description": "UI system using Unity Atoms.",
|
||||
"keywords": [
|
||||
"scriptable objects",
|
||||
"unity"
|
||||
|
18
docker-compose.yml
Executable file
18
docker-compose.yml
Executable file
@ -0,0 +1,18 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
docusaurus:
|
||||
build: .
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 35729:35729
|
||||
volumes:
|
||||
- ./docs:/app/docs
|
||||
- ./website/blog:/app/website/blog
|
||||
- ./website/core:/app/website/core
|
||||
- ./website/i18n:/app/website/i18n
|
||||
- ./website/pages:/app/website/pages
|
||||
- ./website/static:/app/website/static
|
||||
- ./website/sidebars.json:/app/website/sidebars.json
|
||||
- ./website/siteConfig.js:/app/website/siteConfig.js
|
||||
working_dir: /app/website
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: actions
|
||||
title: Actions
|
||||
hide_title: true
|
||||
sidebar_label: Actions
|
||||
---
|
||||
|
||||
# Actions
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: constants
|
||||
title: Constants
|
||||
hide_title: true
|
||||
sidebar_label: Constants
|
||||
---
|
||||
|
||||
# Constants
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: events
|
||||
title: Events
|
||||
hide_title: true
|
||||
sidebar_label: Events
|
||||
---
|
||||
|
||||
# Events
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: functions
|
||||
title: Functions
|
||||
hide_title: true
|
||||
sidebar_label: Functions
|
||||
---
|
||||
|
||||
# Functions
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: listeners
|
||||
title: Listeners
|
||||
hide_title: true
|
||||
sidebar_label: Listeners
|
||||
---
|
||||
|
||||
# Listeners
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: lists
|
||||
title: Lists
|
||||
hide_title: true
|
||||
sidebar_label: Lists
|
||||
---
|
||||
|
||||
# Lists
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: references
|
||||
title: References
|
||||
hide_title: true
|
||||
sidebar_label: References
|
||||
---
|
||||
|
||||
# References
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: unity-events
|
||||
title: Unity Events
|
||||
hide_title: true
|
||||
sidebar_label: Unity Events
|
||||
---
|
||||
|
||||
# Unity Events
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: variables
|
||||
title: Variables
|
||||
hide_title: true
|
||||
sidebar_label: Variables
|
||||
---
|
||||
|
||||
# Variables
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: basic-tutorial
|
||||
title: Basic tutorial
|
||||
hide_title: true
|
||||
sidebar_label: Basic tutorial
|
||||
---
|
||||
|
||||
# Basic tutorial
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: generator
|
||||
title: Generator
|
||||
hide_title: true
|
||||
sidebar_label: Generator
|
||||
---
|
||||
|
||||
# Generator
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: overview
|
||||
title: Overview and philosopy
|
||||
hide_title: true
|
||||
sidebar_label: Overview and philosopy
|
||||
---
|
||||
|
||||
# Overview and philosopy
|
||||
|
||||
Unity Atoms is an event based system that encourages the game to be as data-driven as possible. The four most fundamental parts of Unity Atoms are:
|
||||
@ -25,7 +32,7 @@ Exactly the same as Variables, but can not be changed via script and therefore d
|
||||
|
||||
References can be toggled between `use as constant` or `use variable` via the Unity Inspector. When a reference is `used as constant` then it functions exactly like a regular serialized variable in a MonoBehaviour script. However, when it is set to `use variable` it functions exactly like a Variable.
|
||||
|
||||
#### Lists
|
||||
### Lists
|
||||
|
||||
A List is an array of values that is stored as a Scriptable Object. There is the possibility to add Events for when the following happens to the list:
|
||||
|
||||
@ -33,22 +40,22 @@ A List is an array of values that is stored as a Scriptable Object. There is the
|
||||
- An item is removed from the List.
|
||||
- The List is cleared.
|
||||
|
||||
### Events
|
||||
## Events
|
||||
|
||||
An event is a thing that happens in the game that others can listen / subscribe to. Events in Unity Atoms are also Scriptable Objects that lives outside of a specific scene. It is possible to raise an Event from the Unity Inspector for debug purposes.
|
||||
|
||||
### Listeners
|
||||
## Listeners
|
||||
|
||||
A Listener listens / observes / subscribes to an event and raises / invokes zero to many responses to that event. Listeners are MonoBehaviours and lives in a scene. See below for more information on the type of responses there are.
|
||||
|
||||
### Responses
|
||||
## Responses
|
||||
|
||||
A responses is raised by a listener in response to an event. Responses can live both in the scene as [UnityEvents](https://docs.unity3d.com/ScriptReference/Events.UnityEvent.html) or outside the scene as a Scriptable Object in the shape of an Action.
|
||||
|
||||
#### Actions
|
||||
### Actions
|
||||
|
||||
An Action in Unity Atoms is a C# function as a Scriptable Object. An Action can be used as a response in a Listener.
|
||||
|
||||
#### Game Functions
|
||||
### Game Functions
|
||||
|
||||
A Function in Unity Atoms is basically the same as an Action, but while an Actions does not return something a Function does.
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: quick-start
|
||||
title: Quick start
|
||||
hide_title: true
|
||||
sidebar_label: Quick start
|
||||
---
|
||||
|
||||
# Quick start
|
||||
|
||||
## Installation
|
||||
|
@ -1,3 +1,10 @@
|
||||
---
|
||||
id: unirx
|
||||
title: Usage with UniRX
|
||||
hide_title: true
|
||||
sidebar_label: Usage with UniRX
|
||||
---
|
||||
|
||||
# Usage with UniRX
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,7 +1,14 @@
|
||||
---
|
||||
id: mobile
|
||||
title: Mobile
|
||||
hide_title: true
|
||||
sidebar_label: Mobile
|
||||
---
|
||||
|
||||
# Unity Atoms / Mobile
|
||||
|
||||
[**TODO**]
|
||||
|
||||
## What does it do?
|
||||
Unity Atoms for your mobile project.
|
||||
|
||||
## API
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,7 +1,14 @@
|
||||
---
|
||||
id: scene-mgmt
|
||||
title: Scene Mgmt
|
||||
hide_title: true
|
||||
sidebar_label: Scene Mgmt
|
||||
---
|
||||
|
||||
# Unity Atoms / Scene Mgmt
|
||||
|
||||
[**TODO**]
|
||||
|
||||
## What does it do?
|
||||
Unity Atoms to manage your scenes.
|
||||
|
||||
## API
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,7 +1,14 @@
|
||||
---
|
||||
id: tags
|
||||
title: Tags
|
||||
hide_title: true
|
||||
sidebar_label: Tags
|
||||
---
|
||||
|
||||
# Unity Atoms / Tags
|
||||
|
||||
[**TODO**]
|
||||
|
||||
## What does it do?
|
||||
A replacement to Unity´s tags based on Unity Atoms.
|
||||
|
||||
## API
|
||||
|
||||
[**TODO**]
|
||||
|
@ -1,7 +1,14 @@
|
||||
---
|
||||
id: ui
|
||||
title: UI
|
||||
hide_title: true
|
||||
sidebar_label: UI
|
||||
---
|
||||
|
||||
# Unity Atoms / UI
|
||||
|
||||
[**TODO**]
|
||||
|
||||
## What does it do?
|
||||
UI system using Unity Atoms.
|
||||
|
||||
## API
|
||||
|
||||
[**TODO**]
|
||||
|
193
website/README.md
Executable file
193
website/README.md
Executable file
@ -0,0 +1,193 @@
|
||||
This website was created with [Docusaurus](https://docusaurus.io/).
|
||||
|
||||
# What's In This Document
|
||||
|
||||
* [Get Started in 5 Minutes](#get-started-in-5-minutes)
|
||||
* [Directory Structure](#directory-structure)
|
||||
* [Editing Content](#editing-content)
|
||||
* [Adding Content](#adding-content)
|
||||
* [Full Documentation](#full-documentation)
|
||||
|
||||
# Get Started in 5 Minutes
|
||||
|
||||
1. Make sure all the dependencies for the website are installed:
|
||||
|
||||
```sh
|
||||
# Install dependencies
|
||||
$ yarn
|
||||
```
|
||||
2. Run your dev server:
|
||||
|
||||
```sh
|
||||
# Start the site
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
|
||||
Your project file structure should look something like this
|
||||
|
||||
```
|
||||
my-docusaurus/
|
||||
docs/
|
||||
doc-1.md
|
||||
doc-2.md
|
||||
doc-3.md
|
||||
website/
|
||||
blog/
|
||||
2016-3-11-oldest-post.md
|
||||
2017-10-24-newest-post.md
|
||||
core/
|
||||
node_modules/
|
||||
pages/
|
||||
static/
|
||||
css/
|
||||
img/
|
||||
package.json
|
||||
sidebar.json
|
||||
siteConfig.js
|
||||
```
|
||||
|
||||
# Editing Content
|
||||
|
||||
## Editing an existing docs page
|
||||
|
||||
Edit docs by navigating to `docs/` and editing the corresponding document:
|
||||
|
||||
`docs/doc-to-be-edited.md`
|
||||
|
||||
```markdown
|
||||
---
|
||||
id: page-needs-edit
|
||||
title: This Doc Needs To Be Edited
|
||||
---
|
||||
|
||||
Edit me...
|
||||
```
|
||||
|
||||
For more information about docs, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Editing an existing blog post
|
||||
|
||||
Edit blog posts by navigating to `website/blog` and editing the corresponding post:
|
||||
|
||||
`website/blog/post-to-be-edited.md`
|
||||
```markdown
|
||||
---
|
||||
id: post-needs-edit
|
||||
title: This Blog Post Needs To Be Edited
|
||||
---
|
||||
|
||||
Edit me...
|
||||
```
|
||||
|
||||
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
||||
|
||||
# Adding Content
|
||||
|
||||
## Adding a new docs page to an existing sidebar
|
||||
|
||||
1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`:
|
||||
|
||||
```md
|
||||
---
|
||||
id: newly-created-doc
|
||||
title: This Doc Needs To Be Edited
|
||||
---
|
||||
|
||||
My new content here..
|
||||
```
|
||||
|
||||
1. Refer to that doc's ID in an existing sidebar in `website/sidebar.json`:
|
||||
|
||||
```javascript
|
||||
// Add newly-created-doc to the Getting Started category of docs
|
||||
{
|
||||
"docs": {
|
||||
"Getting Started": [
|
||||
"quick-start",
|
||||
"newly-created-doc" // new doc here
|
||||
],
|
||||
...
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Adding a new blog post
|
||||
|
||||
1. Make sure there is a header link to your blog in `website/siteConfig.js`:
|
||||
|
||||
`website/siteConfig.js`
|
||||
```javascript
|
||||
headerLinks: [
|
||||
...
|
||||
{ blog: true, label: 'Blog' },
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`:
|
||||
|
||||
`website/blog/2018-05-21-New-Blog-Post.md`
|
||||
|
||||
```markdown
|
||||
---
|
||||
author: Frank Li
|
||||
authorURL: https://twitter.com/foobarbaz
|
||||
authorFBID: 503283835
|
||||
title: New Blog Post
|
||||
---
|
||||
|
||||
Lorem Ipsum...
|
||||
```
|
||||
|
||||
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
||||
|
||||
## Adding items to your site's top navigation bar
|
||||
|
||||
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:
|
||||
|
||||
`website/siteConfig.js`
|
||||
```javascript
|
||||
{
|
||||
headerLinks: [
|
||||
...
|
||||
/* you can add docs */
|
||||
{ doc: 'my-examples', label: 'Examples' },
|
||||
/* you can add custom pages */
|
||||
{ page: 'help', label: 'Help' },
|
||||
/* you can add external links */
|
||||
{ href: 'https://github.com/facebook/Docusaurus', label: 'GitHub' },
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Adding custom pages
|
||||
|
||||
1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`:
|
||||
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:
|
||||
|
||||
`website/siteConfig.js`
|
||||
```javascript
|
||||
{
|
||||
headerLinks: [
|
||||
...
|
||||
{ page: 'my-new-custom-page', label: 'My New Custom Page' },
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages).
|
||||
|
||||
# Full Documentation
|
||||
|
||||
Full documentation can be found on the [website](https://docusaurus.io/).
|
81
website/core/Footer.js
Executable file
81
website/core/Footer.js
Executable file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require('react');
|
||||
|
||||
class Footer extends React.Component {
|
||||
docUrl(doc, language) {
|
||||
const baseUrl = this.props.config.baseUrl;
|
||||
const docsUrl = this.props.config.docsUrl;
|
||||
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
|
||||
const langPart = `${language ? `${language}/` : ''}`;
|
||||
return `${baseUrl}${docsPart}${langPart}${doc}`;
|
||||
}
|
||||
|
||||
pageUrl(doc, language) {
|
||||
const baseUrl = this.props.config.baseUrl;
|
||||
return baseUrl + (language ? `${language}/` : '') + doc;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<footer className="nav-footer" id="footer">
|
||||
<section className="sitemap">
|
||||
<a href={this.props.config.baseUrl} className="nav-home">
|
||||
{this.props.config.footerIcon && (
|
||||
<img
|
||||
src={this.props.config.baseUrl + this.props.config.footerIcon}
|
||||
alt={this.props.config.title}
|
||||
style={{ width: '52px', height: '52px' }}
|
||||
/>
|
||||
)}
|
||||
</a>
|
||||
<div>
|
||||
<h5>Docs</h5>
|
||||
<a href={this.docUrl('introduction/quick-start')}>
|
||||
Quick Start
|
||||
</a>
|
||||
<a href={this.docUrl('api/actions')}>
|
||||
API
|
||||
</a>
|
||||
<a href={this.docUrl('subpackages/mobile')}>
|
||||
Subpackages
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>Community</h5>
|
||||
<a
|
||||
href="https://gitter.im/unity-atoms/community#"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener">
|
||||
Gitter
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>More</h5>
|
||||
<a href="https://medium.com/@adamramberg">Blog</a>
|
||||
<a href="https://github.com/AdamRamberg/unity-atoms">GitHub</a>
|
||||
<a
|
||||
className="github-button"
|
||||
href={this.props.config.repoUrl}
|
||||
data-icon="octicon-star"
|
||||
data-count-href="/AdamRamberg/unity-atoms/stargazers"
|
||||
data-show-count="true"
|
||||
data-count-aria-label="# stargazers on GitHub"
|
||||
aria-label="Star this project on GitHub"
|
||||
>
|
||||
Star
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<section className="copyright">{this.props.config.copyright}</section>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Footer;
|
100
website/i18n/en.json
Normal file
100
website/i18n/en.json
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
"_comment": "This file is auto-generated by write-translations.js",
|
||||
"localized-strings": {
|
||||
"next": "Next",
|
||||
"previous": "Previous",
|
||||
"tagline": "Tiny modular pieces utilizing the power of Scriptable Objects",
|
||||
"docs": {
|
||||
"api/actions": {
|
||||
"title": "Actions",
|
||||
"sidebar_label": "Actions"
|
||||
},
|
||||
"api/constants": {
|
||||
"title": "Constants",
|
||||
"sidebar_label": "Constants"
|
||||
},
|
||||
"api/events": {
|
||||
"title": "Events",
|
||||
"sidebar_label": "Events"
|
||||
},
|
||||
"api/functions": {
|
||||
"title": "Functions",
|
||||
"sidebar_label": "Functions"
|
||||
},
|
||||
"api/listeners": {
|
||||
"title": "Listeners",
|
||||
"sidebar_label": "Listeners"
|
||||
},
|
||||
"api/lists": {
|
||||
"title": "Lists",
|
||||
"sidebar_label": "Lists"
|
||||
},
|
||||
"api/references": {
|
||||
"title": "References",
|
||||
"sidebar_label": "References"
|
||||
},
|
||||
"api/unity-events": {
|
||||
"title": "Unity Events",
|
||||
"sidebar_label": "Unity Events"
|
||||
},
|
||||
"api/variables": {
|
||||
"title": "Variables",
|
||||
"sidebar_label": "Variables"
|
||||
},
|
||||
"introduction/basic-tutorial": {
|
||||
"title": "Basic tutorial",
|
||||
"sidebar_label": "Basic tutorial"
|
||||
},
|
||||
"introduction/generator": {
|
||||
"title": "Generator",
|
||||
"sidebar_label": "Generator"
|
||||
},
|
||||
"introduction/overview": {
|
||||
"title": "Overview and philosopy",
|
||||
"sidebar_label": "Overview and philosopy"
|
||||
},
|
||||
"introduction/quick-start": {
|
||||
"title": "Quick start",
|
||||
"sidebar_label": "Quick start"
|
||||
},
|
||||
"introduction/unirx": {
|
||||
"title": "Usage with UniRX",
|
||||
"sidebar_label": "Usage with UniRX"
|
||||
},
|
||||
"README": {
|
||||
"title": "README"
|
||||
},
|
||||
"subpackages/mobile": {
|
||||
"title": "Mobile",
|
||||
"sidebar_label": "Mobile"
|
||||
},
|
||||
"subpackages/scene-mgmt": {
|
||||
"title": "Scene Mgmt",
|
||||
"sidebar_label": "Scene Mgmt"
|
||||
},
|
||||
"subpackages/tags": {
|
||||
"title": "Tags",
|
||||
"sidebar_label": "Tags"
|
||||
},
|
||||
"subpackages/ui": {
|
||||
"title": "UI",
|
||||
"sidebar_label": "UI"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"Quick Start": "Quick Start",
|
||||
"API": "API",
|
||||
"Github": "Github"
|
||||
},
|
||||
"categories": {
|
||||
"Introduction": "Introduction",
|
||||
"API Reference": "API Reference",
|
||||
"Subpackages": "Subpackages"
|
||||
}
|
||||
},
|
||||
"pages-strings": {
|
||||
"Help Translate|recruit community translators for your project": "Help Translate",
|
||||
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
|
||||
"Translate this Doc|recruitment message asking to translate the docs": "Translate"
|
||||
}
|
||||
}
|
14
website/package.json
Normal file
14
website/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"scripts": {
|
||||
"examples": "docusaurus-examples",
|
||||
"start": "docusaurus-start",
|
||||
"build": "docusaurus-build",
|
||||
"publish-gh-pages": "docusaurus-publish",
|
||||
"write-translations": "docusaurus-write-translations",
|
||||
"version": "docusaurus-version",
|
||||
"rename-version": "docusaurus-rename-version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"docusaurus": "^1.13.0"
|
||||
}
|
||||
}
|
140
website/pages/en/index.js
Executable file
140
website/pages/en/index.js
Executable file
@ -0,0 +1,140 @@
|
||||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
|
||||
const CompLibrary = require("../../core/CompLibrary.js");
|
||||
|
||||
const {MarkdownBlock, GridBlock, Container} = CompLibrary; /* Used to read markdown */
|
||||
|
||||
const siteConfig = require(`${process.cwd()}/siteConfig.js`);
|
||||
|
||||
function docUrl(doc, language) {
|
||||
return `${siteConfig.baseUrl}${language ? `${language}/` : ""}${doc}`;
|
||||
}
|
||||
|
||||
function imgUrl(img) {
|
||||
return `${siteConfig.baseUrl}img/${img}`;
|
||||
}
|
||||
|
||||
class Button extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="pluginWrapper buttonWrapper">
|
||||
<a className="button hero" 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 ProjectTitle = () => (
|
||||
<React.Fragment>
|
||||
<div style={{display : "flex", justifyContent : "center", alignItems : "center"}}>
|
||||
<img src={"img/atom-icon-pure-purple.png"} className="homeLogo" alt="Unity Atoms logo" width={82} height={82} style={{ marginRight: '0.5rem' }}/>
|
||||
<h1 className="projectTitle">{siteConfig.title}</h1>
|
||||
</div>
|
||||
|
||||
<h2 style={{marginTop : "0.5em"}}>
|
||||
Tiny modular pieces utilizing the power of Scriptable Objects
|
||||
</h2>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
const PromoSection = props => (
|
||||
<div className="section promoSection">
|
||||
<div className="promoRow">
|
||||
<div className="pluginRowBlock">{props.children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
class HomeSplash extends React.Component {
|
||||
render() {
|
||||
const language = this.props.language || "";
|
||||
return (
|
||||
<SplashContainer>
|
||||
<div className="inner">
|
||||
<ProjectTitle />
|
||||
<PromoSection>
|
||||
<Button href={docUrl("introduction/quick-start", language)}>
|
||||
Get Started
|
||||
</Button>
|
||||
</PromoSection>
|
||||
</div>
|
||||
</SplashContainer>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const Block = props => (
|
||||
<Container
|
||||
id={props.id}
|
||||
background={props.background}
|
||||
className={props.className}
|
||||
>
|
||||
<GridBlock align="center" contents={props.children} layout={props.layout}/>
|
||||
</Container>
|
||||
);
|
||||
|
||||
const FeaturesTop = props => (
|
||||
<Block layout="threeColumn" className="featureBlock">
|
||||
{[
|
||||
{
|
||||
content: "Avoid scripts and systems directly dependent on each other.",
|
||||
image : imgUrl("box.svg"),
|
||||
imageAlign: 'top',
|
||||
title: "Modular"
|
||||
},
|
||||
{
|
||||
content: "Scriptable Objects makes it possible to make changes to your game at runtime.",
|
||||
image : imgUrl("pen.svg"),
|
||||
imageAlign: 'top',
|
||||
title: "Editable"
|
||||
},
|
||||
{
|
||||
content: "Modular code is easier to debug than tightly coupled code.",
|
||||
image : imgUrl("bug.svg"),
|
||||
imageAlign: 'top',
|
||||
title: "Debuggable"
|
||||
},
|
||||
]}
|
||||
</Block>
|
||||
);
|
||||
|
||||
|
||||
class Index extends React.Component {
|
||||
render() {
|
||||
const language = this.props.language || "";
|
||||
|
||||
return (
|
||||
<div className="homeMainWrapper">
|
||||
<HomeSplash language={language} />
|
||||
<Container background="light">
|
||||
<div style={{ paddingTop: '3rem', paddingBottom: '3rem' }}>
|
||||
<FeaturesTop />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Index;
|
28
website/sidebars.json
Executable file
28
website/sidebars.json
Executable file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"docs": {
|
||||
"Introduction": [
|
||||
"introduction/quick-start",
|
||||
"introduction/overview",
|
||||
"introduction/basic-tutorial",
|
||||
"introduction/generator",
|
||||
"introduction/unirx"
|
||||
],
|
||||
"API Reference": [
|
||||
"api/actions",
|
||||
"api/constants",
|
||||
"api/events",
|
||||
"api/functions",
|
||||
"api/listeners",
|
||||
"api/lists",
|
||||
"api/references",
|
||||
"api/unity-events",
|
||||
"api/variables"
|
||||
],
|
||||
"Subpackages": [
|
||||
"subpackages/mobile",
|
||||
"subpackages/scene-mgmt",
|
||||
"subpackages/tags",
|
||||
"subpackages/ui"
|
||||
]
|
||||
}
|
||||
}
|
92
website/siteConfig.js
Normal file
92
website/siteConfig.js
Normal file
@ -0,0 +1,92 @@
|
||||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// See https://docusaurus.io/docs/site-config for all the possible
|
||||
// site configuration options.
|
||||
|
||||
const siteConfig = {
|
||||
title: 'Unity Atoms', // Title for your website.
|
||||
tagline: 'Tiny modular pieces utilizing the power of Scriptable Objects',
|
||||
url: 'https://adamramberg.github.io/unity-atoms', // Your website URL
|
||||
baseUrl: '/',
|
||||
docsUrl: '',
|
||||
|
||||
// Used for publishing and more
|
||||
projectName: 'unity-atoms',
|
||||
organizationName: 'Mambo Jambo Studios',
|
||||
// For top-level user or org sites, the organization is still the same.
|
||||
// e.g., for the https://JoelMarcey.github.io site, it would be set like...
|
||||
// organizationName: 'JoelMarcey'
|
||||
|
||||
// For no header links in the top nav bar -> headerLinks: [],
|
||||
headerLinks: [
|
||||
{ doc: 'introduction/quick-start', label: 'Quick Start' },
|
||||
{ doc: 'api/actions', label: 'API' },
|
||||
{ href: 'https://www.github.com/AdamRamberg/unity-atoms', label: 'Github' }
|
||||
],
|
||||
|
||||
/* path to images for header/footer */
|
||||
headerIcon: 'img/atoms-icon-white.png',
|
||||
footerIcon: 'img/atoms-icon-white.png',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
/* Colors for website */
|
||||
colors: {
|
||||
primaryColor: '#5b389b',
|
||||
secondaryColor: '#8555dc',
|
||||
},
|
||||
|
||||
/* Custom fonts for website */
|
||||
/*
|
||||
fonts: {
|
||||
myFont: [
|
||||
"Times New Roman",
|
||||
"Serif"
|
||||
],
|
||||
myOtherFont: [
|
||||
"-apple-system",
|
||||
"system-ui"
|
||||
]
|
||||
},
|
||||
*/
|
||||
|
||||
// This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Adam Ramberg`,
|
||||
|
||||
highlight: {
|
||||
// Highlight.js theme to use for syntax highlighting in code blocks.
|
||||
theme: 'default',
|
||||
},
|
||||
|
||||
// Add custom scripts here that would be placed in <script> tags.
|
||||
scripts: ['https://buttons.github.io/buttons.js'],
|
||||
|
||||
// On page navigation for the current documentation page.
|
||||
onPageNav: 'separate',
|
||||
// No .html extensions for paths.
|
||||
cleanUrl: true,
|
||||
|
||||
// Open Graph and Twitter card images.
|
||||
ogImage: 'img/undraw_online.svg',
|
||||
twitterImage: 'img/undraw_tweetstorm.svg',
|
||||
|
||||
// For sites with a sizable amount of content, set collapsible to true.
|
||||
// Expand/collapse the links and subcategories under categories.
|
||||
// docsSideNavCollapsible: true,
|
||||
|
||||
// Show documentation's last contributor's name.
|
||||
// enableUpdateBy: true,
|
||||
|
||||
// Show documentation's last update time.
|
||||
// enableUpdateTime: true,
|
||||
|
||||
// You may provide arbitrary config keys to be used as needed by your
|
||||
// template. For example, if you need your repo's URL...
|
||||
repoUrl: 'https://github.com/AdamRamberg/unity-atoms',
|
||||
};
|
||||
|
||||
module.exports = siteConfig;
|
30
website/static/css/custom.css
Executable file
30
website/static/css/custom.css
Executable file
@ -0,0 +1,30 @@
|
||||
/* your custom css */
|
||||
.homeMainWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.homeMainWrapper > * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.homeContainer {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1024px) {
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1023px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1400px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1500px) {
|
||||
}
|
BIN
website/static/img/atom-icon-pure-purple.png
Normal file
BIN
website/static/img/atom-icon-pure-purple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
website/static/img/atoms-icon-white.png
Normal file
BIN
website/static/img/atoms-icon-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
13
website/static/img/box.svg
Normal file
13
website/static/img/box.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;stroke:#20232A;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
|
||||
</style>
|
||||
<path class="st0" d="M12.9,1.5l8,4c0.7,0.3,1.1,1,1.1,1.8v9.5c0,0.8-0.4,1.5-1.1,1.8l-8,4c-0.6,0.3-1.2,0.3-1.8,0l-8-4
|
||||
c-0.7-0.3-1.1-1-1.1-1.8V7.2c0-0.8,0.4-1.5,1.1-1.8l8-4C11.7,1.2,12.3,1.2,12.9,1.5z"/>
|
||||
<polyline class="st0" points="2.3,6.2 12,11 21.7,6.2 "/>
|
||||
<line class="st0" x1="12" y1="22.8" x2="12" y2="11"/>
|
||||
<line class="st0" x1="7" y1="3.5" x2="17" y2="8.5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 845 B |
15
website/static/img/bug.svg
Normal file
15
website/static/img/bug.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#20232A;}
|
||||
</style>
|
||||
<path class="st0" d="M19,14h2c0.6,0,1-0.4,1-1s-0.4-1-1-1h-2v-1c0-0.5-0.1-0.9-0.2-1.4C20.7,8.9,22,7.1,22,5c0-0.6-0.4-1-1-1
|
||||
s-1,0.4-1,1c0,1.3-0.9,2.5-2.1,2.9c-0.5-0.6-1.1-1.1-1.9-1.5c0-0.1,0-0.3,0-0.4c0-2.2-1.8-4-4-4S8,3.8,8,6c0,0.1,0,0.3,0,0.4
|
||||
C7.3,6.7,6.6,7.2,6.1,7.9C4.8,7.5,4,6.3,4,5c0-0.6-0.4-1-1-1S2,4.4,2,5c0,2.1,1.3,3.9,3.2,4.6C5.1,10.1,5,10.5,5,11v1H3
|
||||
c-0.6,0-1,0.4-1,1s0.4,1,1,1h2v1c0,0.5,0,0.9,0.1,1.4C3.3,17.1,2,19,2,21c0,0.6,0.4,1,1,1s1-0.4,1-1c0-1.2,0.7-2.3,1.8-2.7
|
||||
c1.8,3.4,6,4.7,9.5,2.9c1.2-0.7,2.3-1.7,2.9-2.9c1.1,0.5,1.8,1.5,1.8,2.7c0,0.6,0.4,1,1,1s1-0.4,1-1c0-2-1.3-3.9-3.1-4.6
|
||||
C19,15.9,19,15.5,19,15V14z M11,19.9c-2.3-0.5-4-2.5-4-4.9v-4c0-1.7,1.3-3,3-3h1V19.9z M10,6c0-1.1,0.9-2,2-2s2,0.9,2,2H10z M17,15
|
||||
c0,2.4-1.7,4.4-4,4.9V8h1c1.7,0,3,1.3,3,3V15z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
website/static/img/favicon.ico
Normal file
BIN
website/static/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
19
website/static/img/pen.svg
Normal file
19
website/static/img/pen.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 64 61.5" style="enable-background:new 0 0 64 61.5;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#20232A;}
|
||||
</style>
|
||||
<title>Asset 21</title>
|
||||
<g id="Layer_2">
|
||||
<g id="Layer_1-2">
|
||||
<path class="st0" d="M36,16.7c1.5-2.5,2.1-5.5,1.5-8.4c-0.5-2.9-2.3-5.4-4.8-6.9c-5-3-11.8-1-15,4.4l-2.3,3.9l18.3,10.9L36,16.7z
|
||||
M31.8,13.3l-9.1-5.4C24.5,5.5,27.6,4.6,30,6c1.2,0.7,2,2,2.3,3.4C32.5,10.7,32.4,12,31.8,13.3z"/>
|
||||
<path class="st0" d="M1.5,53.9l1.6,0.8l15.3-8.2L31,25.2L12.6,14.3L0,35.6l0.1,15.8C0.1,52.4,0.6,53.4,1.5,53.9z M14.5,21.6
|
||||
l9.2,5.4l-9.2,15.4l-9.1,4.9l0-10.4L14.5,21.6z"/>
|
||||
<path class="st0" d="M2.7,56.2h58.7c1.5,0,2.7,1.2,2.7,2.7v0c0,1.5-1.2,2.7-2.7,2.7H2.7c-1.5,0-2.7-1.2-2.7-2.7v0
|
||||
C0,57.4,1.2,56.2,2.7,56.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
6690
website/yarn.lock
Normal file
6690
website/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user