Skip to content
Snippets Groups Projects
Commit f0dd37af authored by Tim Fechner's avatar Tim Fechner
Browse files
parents b11c3a64 babc3de6
No related branches found
No related tags found
No related merge requests found
# hshassets [![python version](https://img.shields.io/badge/python-3.x-blue.svg)]() # hshassets [![python version](https://img.shields.io/badge/python-3.x-blue.svg)]() [![django version](https://img.shields.io/badge/Django-1.11.x-brightgreen.svg)]()
This django-app provides everything you ever wanted! (probably not, but i hope you feel happy anyways). It brings fonts, This django-app provides everything you ever wanted! (probably not, but i hope you feel happy anyways). It brings fonts,
styles, javascript and layouts as templates. styles, javascript and layouts as templates.
...@@ -20,7 +20,7 @@ The current version of this package ships the following own stuff and awesome th ...@@ -20,7 +20,7 @@ The current version of this package ships the following own stuff and awesome th
#### CSS #### CSS
- [animate.css](https://github.com/daneden/animate.css) (3.5.2) - cross-browser library of CSS animations - [animate.css](https://github.com/daneden/animate.css) (3.5.2) - cross-browser library of CSS animations
- [bulma](https://github.com/jgthms/bulma) (0.5.0) - modern CSS framework based on Flexbox - [bulma](https://github.com/jgthms/bulma) (0.5.1) - modern CSS framework based on Flexbox
- [font-awesome](https://github.com/FortAwesome/Font-Awesome) (4.7.0) - iconic font and CSS toolkit - [font-awesome](https://github.com/FortAwesome/Font-Awesome) (4.7.0) - iconic font and CSS toolkit
#### JavaScript #### JavaScript
...@@ -61,7 +61,8 @@ This example structure ... ...@@ -61,7 +61,8 @@ This example structure ...
│ │ │ ├── cat.png │ │ │ │ ├── cat.png │
│ │ │ └── mouse.png │ │ │ │ └── mouse.png │
│ │ ├── js │ │ │ ├── js │
│ │ │ └── somescript.js │ │ │ │ ├── foo.js │
│ │ │ └── bar.js │
│ │ └── sass │ │ │ └── sass │
│ │ ├── _init.scss │ │ │ ├── _init.scss │
│ │ └── stuff.scss │ │ │ └── stuff.scss │
...@@ -89,15 +90,18 @@ This example structure ... ...@@ -89,15 +90,18 @@ This example structure ...
│ │ └── [appname] ├─ The produced result │ │ └── [appname] ├─ The produced result
│ │ ├── fonts │ │ │ ├── fonts │
│ │ │ └── funny_font.woff │ But be careful, never edit files here directly! │ │ │ └── funny_font.woff │ But be careful, never edit files here directly!
│ │ ├── img │ `hshassets` manages this directory entirely. This │ │ │ | `hshassets` manages this directory entirely. This
│ │ │ ├── dog.png │ means that everything here will be overwritten or │ │ ├── img │ means that everything here will be overwritten or
│ │ │ ├── cat.png │ deleted if it shouldn't be here. Use the `assets` │ │ │ ├── dog.png │ deleted if it shouldn't be here. Use the `assets`
│ │ │ └── mouse.png │ folder for your custom stuff. │ │ │ ├── cat.png │ folder for your custom stuff.
│ │ │ └── mouse.png │
│ │ │ │ │ │ │ │
│ │ ├── script.js │ │ │ ├── js ├─ Javascript won't be concatinated but minified
│ │ ├── script.min.js │ │ │ │ ├── foo.js │
│ │ ├── styles.css │ │ │ │ └── bar.js |
│ │ └── styles.min.css │ │ │ │ |
│ │ ├── styles.css ├─ Sass / Scss files will be compiled, concatinated
│ │ └── styles.min.css │ and minified.
│ │ ┘ │ │ ┘
│ ├── urls.py │ ├── urls.py
│ ├── wsgi.py │ ├── wsgi.py
......
...@@ -20,7 +20,9 @@ def bulma_form_fields(form): ...@@ -20,7 +20,9 @@ def bulma_form_fields(form):
if field.errors: if field.errors:
widget_classes.append("is-danger") widget_classes.append("is-danger")
# done # done
field.field.widget.attrs["class"] = " ".join(widget_classes) if field.field.widget.attrs.get('class'):
widget_classes.append(field.field.widget.attrs['class'])
field.field.widget.attrs['class'] = " ".join(widget_classes)
if getattr(form, 'layout', None): if getattr(form, 'layout', None):
output = render_layout(form.layout, form) output = render_layout(form.layout, form)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment