Skip to content

Commit

Permalink
docs: release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Sep 30, 2021
1 parent 6bed565 commit 6e4d276
Show file tree
Hide file tree
Showing 256 changed files with 16,735 additions and 0 deletions.
48 changes: 48 additions & 0 deletions website/versioned_docs/version-v3.6.3/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
sidebar_position: 1
---

# Installation

## Install this library using composer

```bash
composer require neilime/twbs-helper-module
```

## Include Twitter Bootstrap assets

### With **AssetsBundle** module (easy way)

- Install the [AssetsBundle module](https://github.com/neilime/zf-assets-bundle/wiki/Installation)
- Install [Twitter Bootstrap](https://github.com/twbs/bootstrap#quick-start):

```bash
composer require twbs/bootstrap
```

- Edit the application module configuration file `module/Application/config/module.config.php`, adding the configuration fragment below:

```php
return [
//...
'assets_bundle' => [
'assets' => [
'less' => ['@zfRootPath/vendor/twitter/bootstrap/less/bootstrap.less'],
],
],
//...
];
```

- Edit layout file `module/Application/view/layout/layout.phtml`, to render head scripts:

```php
//...
echo $this->headScript();
//...
```

### Manually

- Copy `bootstrap.css` file (available on [Twitter Bootstrap website](https://github.com/twbs/bootstrap/archive/v3.0.0.zip)) into your assets folder and add it in your head scripts.
4 changes: 4 additions & 0 deletions website/versioned_docs/version-v3.6.3/usage/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Usage",
"position": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Components",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Alerts",
"position": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Example",
"position": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_position: 2
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import HtmlCode from "../../../../../src/components/HtmlCode.tsx";

# Additional content

[Twitter bootstrap Documentation](https://getbootstrap.com/docs/4.5/components/alerts/#additional-content)

<Tabs>
<TabItem value="result" label="Result" default><HtmlCode bootstrapVersion="4.5"><div class="alert alert-success" role="alert">
<h4 class="alert-heading">Well done!</h4>
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
<hr/>
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div></HtmlCode></TabItem>
<TabItem value="source" label="Source">

```php
<?php

// Success
echo $this->alert(
'<p>Aww yeah, you successfully read this important alert message. '.'This example text is going to run a bit longer so that you can see '.'how spacing within an alert works with this kind of content.</p>'.PHP_EOL.'<hr/>'.PHP_EOL.'<p class="mb-0">'.'Whenever you need to, be sure to use margin utilities to keep things nice and tidy.'.'</p>',
[
'heading' => 'Well done!',
'variant' => 'success',
]
);

```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 3
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import HtmlCode from "../../../../../src/components/HtmlCode.tsx";

# Dismissing

[Twitter bootstrap Documentation](https://getbootstrap.com/docs/4.5/components/alerts/#dismissing)

<Tabs>
<TabItem value="result" label="Result" default><HtmlCode bootstrapVersion="4.5"><div class="alert alert-dismissible alert-warning fade show" role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true">×</span></button>
</div></HtmlCode></TabItem>
<TabItem value="source" label="Source">

```php
<?php

echo $this->alert(
'<strong>Holy guacamole!</strong> You should check in on some of those fields below.',
[
'variant' => 'warning',
'dismissible' => true,
]
);

```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
sidebar_position: 1
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import HtmlCode from "../../../../../src/components/HtmlCode.tsx";

# Link color

[Twitter bootstrap Documentation](https://getbootstrap.com/docs/4.5/components/alerts/#link-color)

<Tabs>
<TabItem value="result" label="Result" default><HtmlCode bootstrapVersion="4.5"><div class="alert alert-primary" role="alert">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-success" role="alert">
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-info" role="alert">
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-light" role="alert">
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div></HtmlCode></TabItem>
<TabItem value="source" label="Source">

```php
<?php

foreach ([
'primary',
'secondary',
'success',
'danger',
'warning',
'info',
'light',
'dark',
] as $sVariant) {
echo $this->alert(
'A simple '.$sVariant.' alert with '.'<a href="#" class="alert-link">an example link</a>. '.'Give it a click if you like.',
$sVariant
).PHP_EOL;
}

```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
sidebar_position: 0
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import HtmlCode from "../../../../src/components/HtmlCode.tsx";

# Example

[Twitter bootstrap Documentation](https://getbootstrap.com/docs/4.5/components/alerts/#examples)

<Tabs>
<TabItem value="result" label="Result" default><HtmlCode bootstrapVersion="4.5"><div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert—check it out!
</div>
<div class="alert alert-success" role="alert">
A simple success alert—check it out!
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert—check it out!
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert—check it out!
</div>
<div class="alert alert-info" role="alert">
A simple info alert—check it out!
</div>
<div class="alert alert-light" role="alert">
A simple light alert—check it out!
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert—check it out!
</div></HtmlCode></TabItem>
<TabItem value="source" label="Source">

```php
<?php

foreach ([
'primary',
'secondary',
'success',
'danger',
'warning',
'info',
'light',
'dark',
] as $sVariant) {
echo $this->alert(
'A simple '.$sVariant.' alert—check it out!',
$sVariant
).PHP_EOL;
}

```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Badges",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Contextual variations",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Example",
"position": 1
}
Loading

0 comments on commit 6e4d276

Please sign in to comment.