Skip to content

Commit

Permalink
htmlcss: Add Bootstrap examples. python/preferences: Don't use django…
Browse files Browse the repository at this point in the history
…-bootstrap*
  • Loading branch information
jpmckinney committed Apr 25, 2023
1 parent 6ec2195 commit bc7b023
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion docs/htmlcss/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,29 @@ On each page of a public-facing website:
- `Facebook Sharing Debugger <https://developers.facebook.com/tools/debug/>`__
- `Twitter Card validator <https://cards-dev.twitter.com/validator>`__

.. _css:

CSS
---

.. seealso::

The Data Registry's `webpack.config.js <https://github.com/open-contracting/data-registry/blob/main/webpack.config.js>`__ file, for compiling SCSS (Sass).

Frameworks
~~~~~~~~~~

Most projects use `Bootstrap <https://getbootstrap.com>`__, some of which use Python packages like `django-bootstrap5 <https://pypi.org/project/django-bootstrap5/>`__. Designers are free to use other frameworks like:
Most projects use `Bootstrap <https://getbootstrap.com>`__. Designers are free to use other frameworks like:

- `Tailwind <https://tailwindcss.com>`__, a `utility classes <https://adamwathan.me/css-utility-classes-and-separation-of-concerns/>`__ framework
- `Vuetify <https://vuetifyjs.com>`__, a `Material Design <https://material.io/design>`__ framework

When using Bootstrap, `customize <https://getbootstrap.com/docs/5.2/customize/sass/>`__ it and `@import only the components you need <https://getbootstrap.com/docs/5.2/customize/optimize/>`__.

.. seealso::

The Data Registry's `_custom.scss` file <https://github.com/open-contracting/data-registry/blob/main/src/scss/_custom.scss>`__, for customizing Bootstrap.

Reminders
~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/python/preferences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HTML parsing
Markdown parsing
`markdown-it-py <https://pypi.org/project/markdown-it-py/>`__. Do not use `commonmark <https://pypi.org/project/commonmark/>`__, which is deprecated.
Templating
`Jinja <https://jinja.palletsprojects.com/>`__
`Jinja <https://jinja.palletsprojects.com/>`__. Do not use CSS framework integration packages like ``django-bootstrap*``, as they tend to lag the most recent releases. See :doc:`../htmlcss`.
Asset management
Do not use `django-compressor <https://django-compressor.readthedocs.io/en/stable/>`__ or `django-pipeline <https://django-pipeline.readthedocs.io/en/latest/>`__, which are always behind NPM packages. See :ref:`javascript-preferences` for JavaScript.
Translation
Expand Down

0 comments on commit bc7b023

Please sign in to comment.