Skip to content

Commit

Permalink
feat(landing-page): add core and general sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Sisha0 committed Oct 22, 2021
1 parent 4ced5e2 commit 81e2250
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 6 deletions.
7 changes: 7 additions & 0 deletions pages/views/core/base.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Base
---

{% markdown %}
{% include 'src/core/README.md' %}
{% endmarkdown %}
4 changes: 4 additions & 0 deletions pages/views/core/core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"layout": "basic.njk",
"tags": "core"
}
7 changes: 7 additions & 0 deletions pages/views/core/preview.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Preview
---

{% markdown %}
{% include 'src/core/preview/README.md' %}
{% endmarkdown %}
7 changes: 7 additions & 0 deletions pages/views/core/snippets.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Snippets
---

{% markdown %}
{% include 'src/core/snippets/README.md' %}
{% endmarkdown %}
4 changes: 4 additions & 0 deletions pages/views/general/general.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"layout": "basic.njk",
"tags": "general"
}
7 changes: 7 additions & 0 deletions pages/views/general/getting-started.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Getting started
---

{% markdown %}
{% include 'src/README.md' %}
{% endmarkdown %}
30 changes: 24 additions & 6 deletions pages/views/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ layout: basic
---

<ul class="uip-demo__list">
<h3 class="uip-demo__list-title">Samples</h3>
{% for sample in collections.samples %}
<li class="uip-demo__list-item">
<a href="{{ sample.url | url }}">{{ sample.data.title }}</a>
</li>
{%- endfor %}
<h3 class="uip-demo__list-title">General information</h3>
{% for page in collections.general %}
<li class="uip-demo__list-item">
<a href="{{ page.url | url }}">{{ page.data.title }}</a>
</li>
{%- endfor %}
</ul>

<ul class="uip-demo__list">
<h3 class="uip-demo__list-title">Core</h3>
{% for plugin in collections.core %}
<li class="uip-demo__list-item">
<a href="{{ plugin.url | url }}">{{ plugin.data.title }}</a>
</li>
{%- endfor %}
</ul>

<ul class="uip-demo__list">
Expand All @@ -19,3 +28,12 @@ layout: basic
</li>
{%- endfor %}
</ul>

<ul class="uip-demo__list">
<h3 class="uip-demo__list-title">Samples</h3>
{% for sample in collections.samples %}
<li class="uip-demo__list-item">
<a href="{{ sample.url | url }}">{{ sample.data.title }}</a>
</li>
{%- endfor %}
</ul>
51 changes: 51 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Installation

TBD

# Project structure

UIP components are organized in the following way:

1. Core components
- Base components
- [UIPRoot](core/README.md#uip-root)
- [UIPPreview](core/preview/README.md)
- [UIPSnippets](core/snippets/README.md)
2. Plugins
- [UIPEditor](plugins/editor/README.md)
- [UIPOptions](plugins/options/README.md)
- [UIPSettings](plugins/settings/settings/README.md)
- [UIPBoolSetting](plugins/settings/settings/setting/bool-setting/README.md)
- [UIPSelectSetting](plugins/settings/settings/setting/select-setting/README.md)
- [UIPTextSetting](plugins/settings/settings/setting/text-setting/README.md)

Any playground must have at least **core** components. **Plugins** are
optional, you can add them on your own free will.

To implement custom UIPPlayground components, see [UIPPlugin](core/README.md#uip-plugin).

# Modules/components imports
Modules main parts lay inside modules folders. So importing required
module is really straightforward:

```typescript
import {UIPRoot} from './root';
import {UIPEditor} from './editor';
import {UIPBoolSetting} from './bool-setting';
```

Every module has two versions of styles: *css* and *less*. If you want
to import styles for all UIP component, you can import either
*registration.less* or *registration.css* file.

Before using UIP components, you also need to *register* them. For example,
if you want to use [UIPRoot](src/core/README.md#uip-root) component, register it like that:

```typescript
import {UIPRoot} from './root';
UIPRoot.reguster();
```

# Browser support

UIPPlayground supports all modern browsers.

0 comments on commit 81e2250

Please sign in to comment.