class: center, middle, inverse # Bootstrap ### Llibreries de components .footnote[Mateu Yábar] --- # Web - Html - Css - Javascript --- # Javascript - Llenguatge de programació - Modificar l'html - Fer peticions web - (...) - Importar un javascript ```html ``` --- # Llibreries de components - Bootstrap - Bulma - Material - Foundation - Semantic-ui --- # Bootstrap - [https://getbootstrap.com/](https://getbootstrap.com/) - Build responsive, mobile-first projects on the web with the world’s most popular front-end component library. - Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. --- # Bootstrap - Permet mostrar una web de forma elegant, usable i responsive, afegint classes al nostre html (sense tocar el css ni javascript). - Sistema de grid per posicionar els elements - Llibreria de components (botons, menus, ...). --- # Instal·lar ## Css ```
``` ## Javascript ``` ``` --- # Plantilla ```
Hello, world!
Hello, world!
``` --- # Layout - container ```
``` - Extra small <576px: - 100% - Small (__sm__) ≥576px: - 540px - Medium (__md__) ≥768px: - 720px - Large (__lg__) ≥992px: - 960px - Extra large (__xl__) ≥1200px: - 1140px --- # Layout - grid system - Definirem una fila amb la classe _row_ i una columna amb la classe _col_ ```
1 of 2
2 of 2
``` --- # Layout - grid system - Podem definir columnes només per pantalles d'una certa mida afegint el postfix de la mida a la classe _col_: - _col-md_ ```
1 of 2
2 of 2
``` --- class: long_text # Layout - grid system
Extra small
<576px
Small
≥576px
Medium
≥768px
Large
≥992px
Extra large
≥1200px
Max container width
None (auto)
540px
720px
960px
1140px
Class prefix
.col-
.col-sm-
.col-md-
.col-lg-
.col-xl-
--- # Layout - grid system - Podem definir l'espai que ocupa cada columna, d'un total de 12 columnes per fila amb el prefix de la mida - _col-3_ ```
col-3
col-8
col
``` --- # Layout - grid system - Tot alhora ```
col-lg-8
col-8
col
``` --- # Taules - Afegeix la classe _.table_ a la taula - Podem fer la taula responsive afegint un div amb la classe _table-responsive-mida_ ```
...
``` --- # Taules - exemple ```
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
``` --- # Components - https://getbootstrap.com/docs/4.4/components/ - alerts - buttons - card - form - navbar - pagination - https://getbootstrap.com/docs/4.4/content/images/ -https://getbootstrap.com/docs/4.4/content/figures/ --- # Font-awesome - https://fontawesome.com/ >>> Get vector icons and social logos on your website with Font Awesome, the web's most popular icon set and toolkit. - Crear un compte - Crear un kit - Afegir javascript a la web --- # Font-awesome - Cerca icones: https://fontawesome.com/icons?d=gallery - Algunes no son gratuites. ```
Add user
```