kopia lustrzana https://github.com/wagtail/wagtail
Clean whitespace formatting in docs
- Update formatting with prettier in the documentationpull/10618/head
rodzic
0f97838381
commit
3d471edbcf
|
@ -121,6 +121,7 @@ There are two ways to customise Wagtail’s colour scheme:
|
||||||
For static colours, either set each colour separately (for example `--w-color-primary: #2E1F5E;`); or separately set [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) (`--w-color-primary-hue`, `--w-color-primary-saturation`, `--w-color-primary-lightness`) variables so all shades are customised at once. For example, setting `--w-color-secondary-hue: 180;` will customise all of the secondary shades at once.
|
For static colours, either set each colour separately (for example `--w-color-primary: #2E1F5E;`); or separately set [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) (`--w-color-primary-hue`, `--w-color-primary-saturation`, `--w-color-primary-lightness`) variables so all shades are customised at once. For example, setting `--w-color-secondary-hue: 180;` will customise all of the secondary shades at once.
|
||||||
|
|
||||||
```{include} ../../_static/wagtail_colors_tables.txt
|
```{include} ../../_static/wagtail_colors_tables.txt
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Specifying a site or page in the branding
|
## Specifying a site or page in the branding
|
||||||
|
|
|
@ -6,8 +6,8 @@ Here are guidelines and resources we recommend for projects with sustainability
|
||||||
|
|
||||||
To account for the emissions of websites and track their reduction, we recommend following:
|
To account for the emissions of websites and track their reduction, we recommend following:
|
||||||
|
|
||||||
- ITU [L.1420](https://www.itu.int/rec/T-REC-L.1420) and [L.1430](https://www.itu.int/rec/T-REC-L.1430)
|
- ITU [L.1420](https://www.itu.int/rec/T-REC-L.1420) and [L.1430](https://www.itu.int/rec/T-REC-L.1430)
|
||||||
- GHG Protocol [Product Life Cycle Accounting and Reporting Standard](https://ghgprotocol.org/product-standard) (Scope 3), and its additional [ICT Sector Guidance](https://ghgprotocol.org/guidance-built-ghg-protocol).
|
- GHG Protocol [Product Life Cycle Accounting and Reporting Standard](https://ghgprotocol.org/product-standard) (Scope 3), and its additional [ICT Sector Guidance](https://ghgprotocol.org/guidance-built-ghg-protocol).
|
||||||
|
|
||||||
Those are the same standards used to assess the [sustainability of Wagtail](https://wagtail.org/sustainability/).
|
Those are the same standards used to assess the [sustainability of Wagtail](https://wagtail.org/sustainability/).
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@ Those are the same standards used to assess the [sustainability of Wagtail](http
|
||||||
|
|
||||||
Here are guidelines we would recommend applying to Wagtail websites:
|
Here are guidelines we would recommend applying to Wagtail websites:
|
||||||
|
|
||||||
- [Sustainable Web Design Strategies](https://sustainablewebdesign.org/strategies/)
|
- [Sustainable Web Design Strategies](https://sustainablewebdesign.org/strategies/)
|
||||||
- [GR491](https://gr491.isit-europe.org/en/)
|
- [GR491](https://gr491.isit-europe.org/en/)
|
||||||
- [Green Design Principles by Microsoft (PDF)](https://wxcteam.microsoft.com/download/Microsoft-Green-Design-Principles.pdf)
|
- [Green Design Principles by Microsoft (PDF)](https://wxcteam.microsoft.com/download/Microsoft-Green-Design-Principles.pdf)
|
||||||
- [Green Software Foundation Patterns](https://patterns.greensoftware.foundation/catalog/web/)
|
- [Green Software Foundation Patterns](https://patterns.greensoftware.foundation/catalog/web/)
|
||||||
|
|
||||||
The [Sustainable Web Design W3C Community Group](https://www.w3.org/community/sustyweb/) is also working on _Web Environmental Sustainability Guidelines_, which will be highly relevant once published.
|
The [Sustainable Web Design W3C Community Group](https://www.w3.org/community/sustyweb/) is also working on _Web Environmental Sustainability Guidelines_, which will be highly relevant once published.
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ The [Sustainable Web Design W3C Community Group](https://www.w3.org/community/su
|
||||||
|
|
||||||
To quantify the emissions of a Wagtail website, we recommend three different approaches:
|
To quantify the emissions of a Wagtail website, we recommend three different approaches:
|
||||||
|
|
||||||
- The [Sustainable Web Design](https://sustainablewebdesign.org/calculating-digital-emissions/) model, which uses page weight as a metric of energy efficiency, and page views as a metric of site utilisation. This model has clear [known limitations](https://www.fershad.com/writing/is-data-the-best-proxy-for-website-carbon-emissions/), but is nonetheless ideal to provide high-level figures for a wide range of websites or pages.
|
- The [Sustainable Web Design](https://sustainablewebdesign.org/calculating-digital-emissions/) model, which uses page weight as a metric of energy efficiency, and page views as a metric of site utilisation. This model has clear [known limitations](https://www.fershad.com/writing/is-data-the-best-proxy-for-website-carbon-emissions/), but is nonetheless ideal to provide high-level figures for a wide range of websites or pages.
|
||||||
- Infrastructure-based calculators such as [Cloud Carbon Footprint](https://www.cloudcarbonfootprint.org/), a measurement and analysis tools.
|
- Infrastructure-based calculators such as [Cloud Carbon Footprint](https://www.cloudcarbonfootprint.org/), a measurement and analysis tools.
|
||||||
- Measurement orchestration tools such as [Green Metrics](https://github.com/green-coding-berlin/green-metrics-tool), [GreenFrame](https://greenframe.io/), [Scaphandre](https://github.com/hubblo-org/scaphandre).
|
- Measurement orchestration tools such as [Green Metrics](https://github.com/green-coding-berlin/green-metrics-tool), [GreenFrame](https://greenframe.io/), [Scaphandre](https://github.com/hubblo-org/scaphandre).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -639,7 +639,7 @@ Here, you use the `{% image %}` tag, which exists in the `wagtailimages_tags` li
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Since your gallery images are database objects in their own right, you can now query and re-use them independently of the blog post body. Now, define a `main_image` method in your `BlogPage` model, which returns the image from the first gallery item or `None` if no gallery items exist:
|
Since your gallery images are database objects in their own right, you can now query and re-use them independently of the blog post body. Now, define a `main_image` method in your `BlogPage` model, which returns the image from the first gallery item or `None` if no gallery items exist:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class BlogPage(Page):
|
class BlogPage(Page):
|
||||||
|
|
|
@ -458,8 +458,6 @@ def editor_css():
|
||||||
The `insert_editor_css` hook is deprecated and will be removed in a future release. We recommend using [](insert_global_admin_css) instead.
|
The `insert_editor_css` hook is deprecated and will be removed in a future release. We recommend using [](insert_global_admin_css) instead.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(insert_global_admin_css)=
|
(insert_global_admin_css)=
|
||||||
|
|
||||||
### `insert_global_admin_css`
|
### `insert_global_admin_css`
|
||||||
|
|
Ładowanie…
Reference in New Issue