{% extends "base.html" %} {% load i18n static ui charts %} {% block title %}{% translate "Pattern library" %}{% endblock %} {% block head %}{% chart_scripts %}{% endblock %} {% block content %}

{% translate "Design system" %}

{% translate "Pattern library" %}

{% blocktranslate trimmed %} Every component of the web app, in both themes, for design review and the accessibility audit. Components are template includes in core/templates/components; each file lists its parameters. {% endblocktranslate %}

{% translate "Colour" %}

{% blocktranslate trimmed %} One accent and neutral surfaces. Every text and background pair meets WCAG AA in both themes (checked by a test from the token values). Chart colours are colour-blind safe and assigned in a fixed order; status colours are never used for data series and always come with an icon and a label. Charts outside the browser read chart-palette.json. {% endblocktranslate %}

{% for title, tokens in palette_groups %}

{{ title }}

    {% for token in tokens %}
  • {{ token }}
  • {% endfor %}
{% endfor %}

{% translate "Typography" %}

{% translate "Eyebrow" %}

{% translate "Heading 1: station results" %}

{% translate "Heading 2: temperature indices" %}

{% translate "Heading 3: warm days" %}

{% translate "Heading 4: trend" %}

{% translate "A lead paragraph introduces a page in a sentence or two." %}

{% blocktranslate trimmed %} Body text uses the system font of each device, so nothing is downloaded and every script the operating system supports displays. Lines are kept to a readable length. A link and inline code. {% endblocktranslate %}

{% translate "Small, muted text for notes and captions." %}

{% translate "Icons" %}

{% translate "An SVG sprite drawn for this app, inserted with the icon template tag. Icons are decorative unless given a label." %}

    {% for name in icons %}
  • {% icon name "" "icon--lg" %}{{ name }}
  • {% endfor %}

{% translate "Buttons" %}

{% translate "Calculate indices" as l_primary %}{% translate "Back" as l_secondary %}{% translate "Reset" as l_ghost %}{% translate "Delete run" as l_danger %}{% translate "Download all" as l_download %}{% translate "Working" as l_busy %}{% translate "Not yet" as l_disabled %}{% translate "Next step" as l_next %}{% translate "Refresh" as l_icon %}{% translate "Small" as l_small %}
{% include "components/button.html" with label=l_primary %} {% include "components/button.html" with label=l_secondary variant="secondary" %} {% include "components/button.html" with label=l_ghost variant="ghost" %} {% include "components/button.html" with label=l_danger variant="danger" %}
{% include "components/button.html" with label=l_next size="lg" icon_end="arrow-right" %} {% include "components/button.html" with label=l_download icon="download" variant="secondary" href="#buttons" %} {% include "components/button.html" with label=l_small size="sm" variant="secondary" %} {% include "components/button.html" with label=l_icon icon="refresh" icon_only=True variant="secondary" %} {% include "components/button.html" with label=l_busy busy=True %} {% include "components/button.html" with label=l_disabled disabled=True %}

{% translate "Form fields" %}

{% translate "Labels above inputs, hints under labels, errors inline and summarised at the top. This form is shown after a submission with mistakes." %}

{% include "components/form_errors.html" %} {% include "components/field.html" with field=form.station_name %}
{% translate "°N" as unit_deg %} {% include "components/field.html" with field=form.latitude unit=unit_deg %} {% include "components/field.html" with field=form.variable %}
{% include "components/field.html" with field=form.base_start %} {% include "components/field.html" with field=form.base_end %}
{% include "components/field.html" with field=form.method %} {% include "components/field.html" with field=form.detrend %} {% include "components/field.html" with field=form.notes %}
{% translate "Save" as l_save %}{% translate "Cancel" as l_cancel %} {% include "components/button.html" with label=l_save type="submit" %} {% include "components/button.html" with label=l_cancel variant="ghost" %}

{% translate "File drop zone" %}

{% translate "A real file input inside a large target. Without JavaScript it is a plain file input; with it, files can be dropped and the chosen file is shown." %}

{% translate "Text file (.txt or .csv), up to 50 MB" as hint_file %} {% include "components/dropzone.html" with field=form.station_file hint=hint_file %}

{% translate "Alerts" %}

{% translate "Quality control finished" as t_success %}{% translate "The data passed every check. You can calculate the indices." as m_success %} {% translate "Base period is short" as t_warning %}{% translate "The base period has fewer than 30 years, so percentile thresholds are less reliable." as m_warning %} {% translate "The file could not be read" as t_error %}{% translate "Line 1204 has 3 values; each line needs year, month, day, precipitation, maximum and minimum temperature." as m_error %} {% translate "Results are kept for 7 days." as m_info %}{% translate "Read more" as a_info %}
{% include "components/alert.html" with kind="info" message=m_info action_label=a_info action_href="#alerts" %} {% include "components/alert.html" with kind="success" title=t_success message=m_success dismissible=True %} {% include "components/alert.html" with kind="warning" title=t_warning message=m_warning %} {% include "components/alert.html" with kind="error" title=t_error message=m_error %}

{% translate "Toasts and dialogs" %}

{% translate "Toasts confirm something that happened in the background and disappear on their own; errors stay until dismissed. Dialogs ask for a decision and keep focus inside until closed." %}

{% translate "Delete this run?" as d_title %}{% translate "The uploaded file and all results will be deleted. This cannot be undone." as d_text %}{% translate "Delete" as d_confirm %} {% include "components/dialog.html" with id="pattern-dialog" title=d_title text=d_text confirm_label=d_confirm confirm_variant="danger" %}

{% translate "Cards" %}

{% translate "TXx: hottest day" as c1_title %}{% translate "Annual maximum of daily maximum temperature." as c1_text %}{% translate "+0.21 °C per decade" as c1_badge %} {% translate "Batch" as c2_title %}{% translate "Process many stations in one run." as c2_text %} {% translate "Gridded" as c3_title %}{% translate "Indices on netCDF grids, on your own computer." as c3_text %}{% translate "Available soon" as soon %}
{% include "components/card.html" with title=c1_title text=c1_text icon="thermometer" badge_label=c1_badge badge_kind="info" %} {% include "components/card.html" with title=c2_title text=c2_text icon="layers" href="#cards" %} {% include "components/card.html" with title=c3_title text=c3_text icon="grid" muted=True badge_label=soon %}

{% translate "Badges, statistics, summaries" %}

{% translate "Passed" as b1 %}{% translate "3 outliers" as b2 %}{% translate "12 duplicates" as b3 %}{% translate "Not calculated" as b4 %} {% translate "Days missing" as s1_l %}{% translate "1.2%" as s1_v %}{% translate "345 of 29,220" as s1_n %} {% translate "Trend" as s2_l %}{% translate "+0.21 °C" as s2_v %}{% translate "per decade, 1936 to 2015" as s2_n %}
{% include "components/badge.html" with label=b1 kind="success" icon="check" %} {% include "components/badge.html" with label=b2 kind="warning" icon="warning" %} {% include "components/badge.html" with label=b3 kind="danger" icon="error" %} {% include "components/badge.html" with label=b4 icon="" %}
{% include "components/stat.html" with label=s1_l value=s1_v note=s1_n %} {% include "components/stat.html" with label=s2_l value=s2_v note=s2_n %}
{% include "components/summary_list.html" with items=summary_items %}

{% translate "Tables" %}

{% translate "Annual indices, Sydney Observatory Hill" as t_caption %}{% translate "Empty table" as t_empty_caption %}{% translate "No index values for this period." as t_empty %}
{% include "components/table.html" with caption=t_caption columns=table_columns rows=table_rows %} {% include "components/table.html" with caption=t_empty_caption columns=table_columns rows=None empty=t_empty %}

{% translate "Tabs" %}

{% translate "Index views" as tabs_label %} {% include "components/tabs.html" with label=tabs_label tabs=tab_items %}

{% translate "Step indicator" %}

{% translate "Shown under the header during the single-station flow. Completed steps link back. On a narrow screen only the current step is named." %}

{% translate "Example: the first step" as steps_first_label %}{% translate "Example: a middle step" as steps_middle_label %}{% translate "Example: the last step" as steps_last_label %} {% include "components/steps.html" with steps=steps_first label=steps_first_label %} {% include "components/steps.html" with steps=steps_middle label=steps_middle_label %} {% include "components/steps.html" with steps=steps_last label=steps_last_label %}

{% translate "Progress" %}

{% translate "Calculating indices" as p_label %}{% translate "Thresholds: about 20 seconds left" as p_note %}{% translate "Waiting for a worker" as p_label2 %}{% translate "Your run is next in the queue." as p_note2 %}{% translate "Run stages" as st_label %}
{% include "components/progress.html" with id="pattern-progress" label=p_label value=45 note=p_note %} {% include "components/progress.html" with id="pattern-progress-2" label=p_label2 value=None note=p_note2 %}
{% include "components/stages.html" with label=st_label stages=stages %} {% include "components/stages.html" with label=st_label stages=stages_failed %}

{% translate "Loading and empty states" %}

{% translate "No runs yet" as e_title %}{% translate "Runs you start appear here while they are kept." as e_text %}{% translate "Start a run" as e_action %}
{% include "components/skeleton.html" with lines=4 %}
{% include "components/skeleton.html" with chart_block=True height="8rem" lines=2 %}
{% include "components/empty_state.html" with icon="folder" title=e_title text=e_text action_label=e_action action_href="#loading" %}

{% translate "Help in place" %}

{% translate "What is a base period?" as h_summary %}{% translate "The years used to calculate percentile thresholds, usually 1961 to 1990 or 1981 to 2010. The station needs enough data in those years." as h_text %} {% include "components/disclosure.html" with summary=h_summary text=h_text %}

{% translate "Chart frame" %}

{% translate "The chart scripts (#75) draw into the plot area; until then it shows a placeholder. Every chart has a text summary, a legend, a table view and a CSV download." %}

{% translate "TXx, hottest day of the year" as ch_title %}{% translate "Rising by 0.21 °C per decade since 1936 (significant at 5%). Highest 45.8 °C in 2013." as ch_summary %} {% include "components/chart_frame.html" with id="pattern-chart" title=ch_title summary=ch_summary legend=chart_legend csv_href="#charts" table_template="core/patterns_table.html" %}

{% translate "Interactive charts" %}

{% translate "The chart frame with a data URL: charts.js draws it with uPlot when it scrolls into view. Drag across the plot to zoom, double-click to show all; the buttons and the keyboard (plus, minus, arrows, 0) zoom and move; PNG and SVG save the current view. The data are the Sydney sample and its run." %}

{% translate "Daily series with quality-check flags" as d_title %} {% url "charts:sample_daily" as d_url %} {% include "components/chart_frame.html" with id="pattern-daily" title=d_title data_url=d_url height="24rem" only %} {% translate "TXx, annual, with the trend" as a_title %} {% url "charts:sample_series" "txx_ANN" as a_url %} {% include "components/chart_frame.html" with id="pattern-annual" title=a_title data_url=a_url only %} {% translate "TXx, monthly" as m_title %} {% url "charts:sample_series" "txx_MON" as m_url %} {% include "components/chart_frame.html" with id="pattern-monthly" title=m_title data_url=m_url only %} {% translate "SPI, 3 months, as bars" as s_title %} {% url "charts:sample_series" "3month_spi_MON" as s_url %} {% include "components/chart_frame.html" with id="pattern-spi" title=s_title data_url=s_url only %}
{% endblock %}