Skip to content

Snapshot v1.3.1 docs #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Metalsmith(cwd)
moment,
localeMap: {
'en': 'English',
'es': 'Español',
'ko': '한국어',
'pt-BR': 'Português do Brasil',
'ru': 'Русский'
Expand Down Expand Up @@ -115,12 +116,12 @@ Metalsmith(cwd)
})
.use(locales({
defaultLocale: 'en',
locales: ['en', 'ko', 'pt-BR', 'ru']
locales: ['en', 'es', 'ko', 'pt-BR', 'ru']
}))
.use(versions({
versions: [
{ name: 'latest', url: '//nativescript-vue.org' },
{ name: 'v1.3.1', url: '//v1.3.1.nativescript-vue.org' },
{ name: 'v1.3.1', url: '//v1-3-1.nativescript-vue.org' },
],
currentVersion: {
name: 'latest',
Expand Down
1 change: 0 additions & 1 deletion build/plugins/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function plugin() {
if (res) {
const data = files[file];
data.order = res[1];

data.slug = data.slug.replace(res[0], '');

// rename file to not include the order
Expand Down
2 changes: 1 addition & 1 deletion content/docs/en/elements/components/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contributors: [MisterBrownRSA, rigor789, ikoevska]
---

```html
<DatePicker @loaded="onDatePickerLoaded" @dateChange="onDateChanged" />
<DatePicker :date="someDate" />
```

`<DatePicker>` provides two-way data binding using `v-model`.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/en/elements/components/list-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contributors: [MisterBrownRSA, rigor789, eddyverbruggen, ikoevska]
```html
<ListView for="item in listOfItems" @itemTap="onItemTap">
<v-template>
<!-- Shows the list item label in the default color and stye. -->
<!-- Shows the list item label in the default color and style. -->
<Label :text="item.text" />
</v-template>
</ListView>
Expand Down
2 changes: 1 addition & 1 deletion content/docs/en/elements/dialogs/action.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: ActionDialog
apiRef: https://docs.nativescript.org/api-reference/modules/_ui_dialogs_#action
apiRef: https://docs.nativescript.org/api-reference/modules/_ui_dialogs_#action
contributors: [MisterBrownRSA, rigor789, ikoevska]
---

Expand Down
35 changes: 22 additions & 13 deletions content/docs/en/elements/layouts/absolute-layout.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
---
title: AbsoluteLayout
apiRef: https://docs.nativescript.org/api-reference/modules/_ui_layouts_absolute_layout_
contributors: [rigor789]
docRef: https://docs.nativescript.org/ui/layouts/layout-containers#absolutelayout
contributors: [rigor789, ikoevska]
---

The AbsoluteLayout container is the simplest layout container in NativeScript. It uses absolute top-left coordinates to position its children. The AbsoluteLayout will not enforce any layout constraints on its children and will not resize them at runtime when its size changes.
The `<AbsoluteLayout>` container is the simplest layout container in NativeScript.

### Samples
`<AbsoluteLayout>` has the following behavior:

#### A grid-like layout
* Uses a pair of absolute left/top coordinates to position its children.
* Doesn't enforce any layout constraints on its children.
* Doesn't resize its children at runtime when its size changes.

## Examples

### A grid-like layout

The following example creates a simple grid. For more information about creating grid layouts, see [GridLayout](/en/docs/elements/layouts/grid-layout).

```html
<AbsoluteLayout backgroundColor="#3c495e">
Expand All @@ -20,7 +29,9 @@ The AbsoluteLayout container is the simplest layout container in NativeScript. I
```
<img class="md:w-1/2 lg:w-1/3" src="https://art.nativescript-vue.org/layouts/absolute_layout_grid.svg" />

#### Overlapping elements
### Overlapping elements

The following example creates a group of overlapping items.

```html
<AbsoluteLayout backgroundColor="#3c495e">
Expand All @@ -30,17 +41,15 @@ The AbsoluteLayout container is the simplest layout container in NativeScript. I
```
<img class="md:w-1/2 lg:w-1/3" src="https://art.nativescript-vue.org/layouts/absolute_layout_overlap.svg" />


## Props

AbsoluteLayout has no props.
None.

## Additional Children Props
## Additional children props

When an element is a direct child of the AbsoluteLayout, the following
props get a meaning:
When an element is a direct child of `<AbsoluteLayout>`, you can work with the following additional properties.

| name | type | description |
| Name | Type | Description |
|------|------|-------------|
| `top` | `Number` | A value representing the distance from the top of the parent AbsoluteLayout
| `left` | `Number` | A value representing the distance from the left of the parent AbsoluteLayout
| `top` | `Number` | Gets or sets the distance, in pixels, between the top edge of the child and the top edge of its parent.
| `left` | `Number` | Gets or sets the distance, in pixels, between the left edge of the child and the left edge of its parent.
52 changes: 39 additions & 13 deletions content/docs/en/elements/layouts/dock-layout.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
---
title: DockLayout
apiRef: https://docs.nativescript.org/api-reference/modules/_ui_layouts_dock_layout_
contributors: [rigor789]
contributors: [rigor789, ikoevska]
---

DockLayout is a layout that provides a docking mechanism for child elements to the `left`, `right`, `top`, `bottom` or center of the layout. To define the docking side of a child element, use its `dock` property. To dock a child element to the center of the DockLayout, it must be the **last child** of the DockLayout and the `stretchLastChild` property of the DockLayout must be set to `true`.
`<DockLayout>` is a layout container that lets you dock child elements to the sides or the center of the layout.

### Samples
`<DockLayout>` has the following behavior:

#### Dock to every side without stretching last child
* Uses the `dock` property to dock its children to the `left`, `right`, `top`, `bottom` or center of the layout.<br/>To dock a child element to the center, it must be the **last child** of the container and you must set the `stretchLastChild` property of the parent to `true`.
* Enforces layout constraints to its children.
* Resizes its children at runtime when its size changes.

## Examples

### Dock to every side without stretching the last child

The following example creates a frame-like layout consisting of 4 elements, position at the 4 edges of the screen.

```html
<DockLayout stretchLastChild="false" backgroundColor="#3c495e">
Expand All @@ -20,7 +28,9 @@ DockLayout is a layout that provides a docking mechanism for child elements to t
```
<img class="md:w-1/2 lg:w-1/3" src="https://art.nativescript-vue.org/layouts/dock_layout_no_stretch.svg" />

#### Dock to every side with stretching last child
### Dock to every side and stretch the last child

The following example shows how `stretchLastChild` affects the positioning of child elements in a `DockLayout` container. The last child (`bottom`) is stretched to take up all the remaining space after positioning the first three elements.

```html
<DockLayout stretchLastChild="true" backgroundColor="#3c495e">
Expand All @@ -32,8 +42,25 @@ DockLayout is a layout that provides a docking mechanism for child elements to t
```
<img class="md:w-1/2 lg:w-1/3" src="https://art.nativescript-vue.org/layouts/dock_layout_stretch.svg" />

#### Multiple children on the same side
### Dock to every side and the center

The following example creates a `<DockLayout>` of 5 elements. The first four wrap the center element in a frame.

```html
<DockLayout stretchLastChild="true" backgroundColor="#3c495e">
<Label text="left" dock="left" width="40" backgroundColor="#43b883"/>
<Label text="top" dock="top" height="40" backgroundColor="#289062"/>
<Label text="right" dock="right" width="40" backgroundColor="#43b883"/>
<Label text="bottom" dock="bottom" height="40" backgroundColor="#289062"/>
<Label text="center" backgroundColor="#1c6b48" />
</DockLayout>
```
<img class="md:w-1/2 lg:w-1/3" src="https://art.nativescript-vue.org/layouts/dock_layout_all_sides_and_stretch.svg" />

### Dock multiple children to the same side

The following example creates a single line of 4 elements that stretch across the entire height and width of the screen.

```html
<DockLayout stretchLastChild="true" backgroundColor="#3c495e">
<Label text="left 1" dock="left" width="40" backgroundColor="#43b883"/>
Expand All @@ -46,15 +73,14 @@ DockLayout is a layout that provides a docking mechanism for child elements to t

## Props

| name | type | description |
| Name | Type | Description |
|------|------|-------------|
`stretchLastChild` | `Boolean` | Enables/Disables stretching the last child to fit the remaining space.
| `stretchLastChild` | `Boolean` | Enables or disables stretching the last child to fit the remaining space.

## Additional Children Props
## Additional children props

When an element is a direct child of the DockLayout, the following
props get a meaning:
When an element is a direct child of `<DockLayout>`, you can work with the following additional properties.

| name | type | description |
| Name | Type | Description |
|------|------|-------------|
`dock` | `String` | Specifies which side to dock the element to. Values can be: `top`, `right`, `bottom`, `left`
| `dock` | `String` | Specifies which side to dock the element to.<br/>Valid values: `top`, `right`, `bottom`, or `left`.
Loading