Skip to content

Commit 31ff7f1

Browse files
authored
Merge pull request #118 from clemir/bulma-docs
Add Bulma to the documentation and fix templates
2 parents 4f6bfd9 + 49641e5 commit 31ff7f1

6 files changed

Lines changed: 61 additions & 27 deletions

File tree

LEEME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Es decir:
254254

255255
## Themes
256256

257-
Este paquete fue creado pensando que hay muchos frameworks de CSS por ahí, y aunque sólo Twitter Bootstrap es incluído por defecto, planeamos agregar más paquetes en el futuro (y también invitamos a colaborar).
257+
Este paquete fue creado pensando que hay muchos frameworks de CSS por ahí, y aunque Bootstrap (versión 3 y 4) y Bulma (version 0.7.2) son incluídos por defecto, planeamos agregar más paquetes en el futuro (y también invitamos a colaborar).
258258

259259
Puedes crear tus propios temas o modificar el existente con facilidad:
260260

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ i.e.:
261261

262262
## Themes
263263

264-
There are a lot of CSS frameworks out there, this package was created with that in mind, and even though only Twitter Bootstrap is included out of the box, we plan to add more packages in the future (we also invite you to collaborate).
264+
There are a lot of CSS frameworks out there, this package was created with that in mind, and even though *Bootstrap* (version 3 and 4) and *Bulma* are included out of the box, we plan to add more packages in the future (we also invite you to collaborate).
265265

266266
But you can also create your own themes with ease, or modify the existing one:
267267

docs/es/themes.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Temas
22

3-
Este paquete fue creado teniendo en cuenta que hay un montón de frameworks de CSS por ahí (de todo tipo) y aunque *Twitter Bootstrap* sea incluido por defecto, se planea agregar más temas en el futuro (te invitamos a colaborar). También puedes crear temas propios, publicarlos y personalizarlos, si es necesario.
3+
Este paquete fue creado teniendo en cuenta que hay un montón de frameworks de CSS por ahí (de todo tipo) y aunque *Bootstrap* (versión 3 y 4) y *Bulma* sean incluidos por defecto, se planea agregar más temas en el futuro (te invitamos a colaborar).
4+
5+
## Cambiar el tema
6+
7+
El tema Bootstrap 4 theme está definido por defecto, pero tu puedes ir a `config/html.php` y cambiar el valor del tema:
8+
```php
9+
//config/html.php
10+
11+
return [
12+
'theme' => 'bulma',
13+
];
14+
```
15+
>Nota: `bootstrap` es para Bootstrap versión 3, `bootstrap4` es para Bootstrap versión 4 and `bulma` es para Bulma CSS versión 0.7.2.
16+
17+
## Personalización
18+
19+
También puedes crear temas propios, publicarlos y personalizarlos, si es necesario.
420

521
Para cambiar o personalizar un theme, simplemente ejecuta:
622

@@ -22,7 +38,7 @@ Después crea una carpeta en `resources/views/themes/` llamada 'custom-theme', p
2238

2339
Si es necesario puedes cambiar todas las plantillas dentro de ese directorio o agregar nuevas.
2440

25-
## Personalizar plantillas individuales
41+
### Personalizar plantillas individuales
2642

2743
Quizás no necesites crear o usar un nuevo tema y simplemente necesitas sustituir una plantilla determinada; esto se puede hacer también, debido a que la mayoría de los métodos lo soporta, por ejemplo:
2844

@@ -38,10 +54,14 @@ Quizás no necesites crear o usar un nuevo tema y simplemente necesitas sustitui
3854
{!! Field::email('email', ['template' => 'custom-template'])
3955
```
4056

41-
## Personalizar plantillas por tipo de campo (fieldBuilder)
57+
### Personalizar plantillas por tipo de campo (fieldBuilder)
4258

4359
¿Estás usando un framework de CSS que requiere un markup diferente para un tipo de campo determinado? No te preocupes, solo lee la sección de "Personalizar por tipo" de la [página field builder](field-builder.md)
4460

4561
## Pull requests
4662

47-
Si creas un tema para un framework de CSS popular, puedes colaborar haciendo fork de este repositorio y crear un pull request, recuerda guardar las plantillas en la carpeta `themes/`. Gracias.
63+
Si creas un tema para un framework de CSS popular, puedes colaborar haciendo fork de este repositorio y crear un pull request, recuerda guardar las plantillas en la carpeta `themes/` y actualizar el archivo `config.php`.
64+
65+
Puedes probar tu tema usando este repositorio: [https://github.com/StydeNet/html-integration-tests](https://github.com/StydeNet/html-integration-tests).
66+
67+
Gracias.

docs/themes.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
# Themes
22

3-
There are a lot of CSS (and all kind of) frameworks out there, this package was created with that in mind, and even though *Bootstrap* is included _out of the box_, we plan to add more themes in the future (we also invite you to collaborate). You can also create your own themes, publish and customize them if you need to.
3+
There are a lot of CSS (and all kind of) frameworks out there, this package was created with that in mind, and even though *Bootstrap* (version 3 and 4) and *Bulma* are included _out of the box_, we plan to add more themes in the future (we also invite you to collaborate).
44

5-
To change or customize a theme, simply run:
5+
## Change the theme
6+
7+
The Bootstrap 4 theme is set by default, but you can go to `config/html.php` and change the theme value:
8+
```php
9+
//config/html.php
10+
11+
return [
12+
'theme' => 'bulma',
13+
];
14+
```
15+
>Note: `bootstrap` is for Bootstrap version 3, `bootstrap4` is for Bootstrap version 4 and `bulma` is for Bulma CSS version 0.7.2.
16+
17+
## Customize
18+
19+
You can also create your own themes, publish and customize them if you need to. To change or customize a theme, simply run:
620

721
```bash
822
php artisan vendor:publish
@@ -22,7 +36,7 @@ Then create a folder in `resources/views/themes/` called 'custom-theme', to save
2236

2337
Then you can change all the templates within that directory or add new ones if you need to.
2438

25-
## Customize individual templates
39+
### Customize individual templates
2640

2741
Maybe you don't need to create or use a new theme and you just simply need to override a particular template, you can do this too, since most methods support that, for example:
2842

@@ -38,10 +52,14 @@ Maybe you don't need to create or use a new theme and you just simply need to ov
3852
{!! Field::email('email', ['template' => 'custom-template']) !!}
3953
```
4054

41-
## Customize templates by field type (field builder)
55+
### Customize templates by field type (field builder)
4256

4357
Are you using a CSS framework that requires a different markup for a particular field type? Don't worry, just read the "Customize by type" section of the [ field builder page](field-builder.md)
4458

4559
## Pull requests
4660

47-
If you create a theme for a popular CSS framework, you can collaborate by forking this repository, and creating a pull request, remember to store the templates in the `themes/` folder. Thank you.
61+
If you create a theme for a popular CSS framework, you can collaborate by forking this repository, and creating a pull request, remember to store the templates in the `themes/` folder and update the `config.php` file.
62+
63+
You can prove your theme using this repository [https://github.com/StydeNet/html-integration-tests](https://github.com/StydeNet/html-integration-tests)
64+
65+
Thank you.

themes/bulma/alert.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@foreach ($messages as $msg)
22
<article class="message is-{{ $msg['type'] }}">
33
<div class="message-header">
4-
<p> <strong>Alerta!!</strong></p>
4+
<p><strong>Alert!</strong></p>
55
<button type="button" onclick="this.parentElement.parentElement.style.display = 'none';" class="delete" aria-label="delete"></button>
66
</div>
77
<div class="message-body">
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
<div id="field_{{ $id }}" class="field">
2-
<label class="label" for="{{ $id }}"{!! Html::classes(['text-danger' => $hasErrors]) !!}>
3-
{{ $label }}
2+
<div class="control">
3+
{!! $input !!}
4+
<label class="checkbox" for="{{ $id }}"{!! Html::classes(['text-danger' => $hasErrors]) !!}>
5+
{{ $label }}
46
@if ($required)
57
<span class="tag is-success">Required</span>
68
@endif
7-
</label>
8-
<div class="field-body">
9-
<div class="field">
10-
<div class="control">
11-
{!! $input !!}
12-
</div>
13-
<p class="help is-danger">
14-
@foreach ($errors as $error)
15-
{{ $error }}
16-
@endforeach
17-
</p>
18-
</div>
9+
</label>
10+
<p class="help is-danger">
11+
@foreach ($errors as $error)
12+
{{ $error }}
13+
@endforeach
14+
</p>
1915
</div>
20-
</div>
16+
</div>

0 commit comments

Comments
 (0)