Skip to content

Commit

Permalink
Merge pull request #439 from weather-gov/mgwalker/248-location-page
Browse files Browse the repository at this point in the history
Location page
  • Loading branch information
greg-does-weather authored Nov 29, 2023
2 parents 41cffca + 8716ca3 commit eae404e
Show file tree
Hide file tree
Showing 44 changed files with 1,737 additions and 217 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ install-site: install-site-config import-content ## Install a minimal Drupal sit
install-site-config:
docker compose exec drupal drush site:install minimal --existing-config --account-pass=root -y

log: ## Tail the log for the Drupal container
docker compose logs --follow drupal

rebuild: ## Delete the Drupal container and rebuild. Does *NOT* delete the site
docker compose stop drupal
docker compose rm drupal -f
Expand All @@ -70,6 +73,10 @@ zap-containers:
docker compose stop
docker compose rm -f

### CSS
build-css: # Build CSS
cd web/themes/new_weather_theme && npx gulp compile

### Testing
a11y: accessibility-test
accessibility-test: ## Run accessibility tests (alias a11y)
Expand Down
2 changes: 2 additions & 0 deletions docs/dev/makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ recalling a specific command. The commands are also listed here:
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `help` | Shows the list of make commands. |
| `a11y` | Runs our accessibility tests using Cypress and Axe. Configured for WCAG2 AA. |
| `build-css` | Builds our CSS. |
| `cc` or `clear-cache` | Runs `drush cache:rebuild` to rebuild Drupal caches. |
| `ci` or `composer-install` | Runs `composer install` in the container. |
| `dd` or `database-dump` | Dumps your current Drupal database to a dump.sql file. |
Expand All @@ -28,6 +29,7 @@ recalling a specific command. The commands are also listed here:
| `import-content` | Imports content using the single_content_sync module, from a bunch of Yaml or zip files produced in a previous export. |
| `install-site` | Installs a new minimal Drupal site using our previously-exported configuration and populated with previously-exported content. |
| `lint` | Runs `phpcs` to scan all of our PHP code for conformance to our code style guide |
| `log` | Outputs and follows the logs from the Drupal container |
| `rebuild` | Destroy and rebuild the Drupal container, but leaves the database intact |
| `reset-site` | Destroys and rebuilds the database but leaves Drupal intact |
| `shell` | Get a shell inside the Drupal container. This allows running `drush` commands. |
Expand Down
25 changes: 25 additions & 0 deletions web/config/block.block.new_weather_theme_betabanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: 5b0420da-13cf-448c-b0a9-fd5324e58ec4
langcode: en
status: true
dependencies:
content:
- 'block_content:no_title_block:7faecf5a-0b52-4a91-8c34-83defcf42eba'
module:
- block_content
theme:
- new_weather_theme
id: new_weather_theme_betabanner
theme: new_weather_theme
region: beta
weight: 0
provider: null
plugin: 'block_content:7faecf5a-0b52-4a91-8c34-83defcf42eba'
settings:
id: 'block_content:7faecf5a-0b52-4a91-8c34-83defcf42eba'
label: 'Beta banner'
label_display: '0'
provider: block_content
status: true
info: ''
view_mode: full
visibility: { }
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies:
- new_weather_theme
id: new_weather_theme_currentconditionsblock
theme: new_weather_theme
region: content
weight: -2
region: current_conditions
weight: -5
provider: null
plugin: weathergov_current_conditions
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies:
- new_weather_theme
id: new_weather_theme_dailyforecastblock
theme: new_weather_theme
region: content
weight: 0
region: forecast
weight: -4
provider: null
plugin: weathergov_daily_forecast
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies:
- new_weather_theme
id: new_weather_theme_hourlyforecastblock
theme: new_weather_theme
region: content
weight: -1
region: forecast
weight: -5
provider: null
plugin: weathergov_hourly_forecast
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies:
- new_weather_theme
id: new_weather_theme_locationsearchblock
theme: new_weather_theme
region: content
weight: -3
region: location
weight: -5
provider: null
plugin: weathergov_location_search
settings:
Expand All @@ -21,5 +21,5 @@ settings:
visibility:
request_path:
id: request_path
negate: false
pages: '/*'
negate: true
pages: '/user/*'
2 changes: 1 addition & 1 deletion web/config/block.block.new_weather_theme_pagetitle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
id: new_weather_theme_pagetitle
theme: new_weather_theme
region: content
weight: -4
weight: -6
provider: null
plugin: page_title_block
settings:
Expand Down
2 changes: 1 addition & 1 deletion web/config/block.block.new_weather_theme_userlogin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
id: new_weather_theme_userlogin
theme: new_weather_theme
region: content
weight: 1
weight: -5
provider: null
plugin: user_login_block
settings:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: 961dc1ce-f791-4b88-a71b-102bfbb57124
langcode: en
status: true
dependencies:
config:
- views.view.weather_story
module:
- views
theme:
- new_weather_theme
id: new_weather_theme_views_block__weather_story_weather_story
theme: new_weather_theme
region: wfo_local_content
weight: -5
provider: null
plugin: 'views_block:weather_story-weather_story'
settings:
id: 'views_block:weather_story-weather_story'
label: ''
label_display: '0'
provider: views
context_mapping: { }
views_label: ''
items_per_page: none
visibility: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: afa5ab6a-ce4d-4dcb-9e3e-88f1a0226463
langcode: en
status: true
dependencies:
config:
- views.view.wfo_blurb
module:
- views
theme:
- new_weather_theme
id: new_weather_theme_views_block__wfo_blurb_weather_story
theme: new_weather_theme
region: wfo_local_content
weight: -4
provider: null
plugin: 'views_block:wfo_blurb-weather_story'
settings:
id: 'views_block:wfo_blurb-weather_story'
label: ''
label_display: '0'
provider: views
context_mapping: { }
views_label: ''
items_per_page: none
visibility: { }
104 changes: 104 additions & 0 deletions web/config/core.entity_form_display.node.wfo_blurb.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
uuid: bc682663-c0fc-4113-873b-f4e79544f028
langcode: en
status: true
dependencies:
config:
- field.field.node.wfo_blurb.body
- field.field.node.wfo_blurb.field_image
- field.field.node.wfo_blurb.field_office_address
- field.field.node.wfo_blurb.field_wfo
- image.style.thumbnail
- node.type.wfo_blurb
module:
- image
- path
- text
id: node.wfo_blurb.default
targetEntityType: node
bundle: wfo_blurb
mode: default
content:
body:
type: text_textarea_with_summary
weight: 121
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
field_image:
type: image_image
weight: 1
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
field_office_address:
type: string_textfield
weight: 125
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
field_wfo:
type: options_select
weight: 122
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
weight: 15
region: content
settings:
display_label: true
third_party_settings: { }
status:
type: boolean_checkbox
weight: 120
region: content
settings:
display_label: true
third_party_settings: { }
sticky:
type: boolean_checkbox
weight: 16
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden: { }
60 changes: 60 additions & 0 deletions web/config/core.entity_view_display.node.wfo_blurb.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
uuid: a2b70885-d578-4cf2-80d0-4097860ad215
langcode: en
status: true
dependencies:
config:
- field.field.node.wfo_blurb.body
- field.field.node.wfo_blurb.field_image
- field.field.node.wfo_blurb.field_office_address
- field.field.node.wfo_blurb.field_wfo
- image.style.wide
- node.type.wfo_blurb
module:
- image
- options
- text
- user
id: node.wfo_blurb.default
targetEntityType: node
bundle: wfo_blurb
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 101
region: content
field_image:
type: image
label: hidden
settings:
image_link: ''
image_style: wide
image_loading:
attribute: lazy
third_party_settings: { }
weight: -1
region: content
field_office_address:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 105
region: content
field_wfo:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 102
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden: { }
48 changes: 48 additions & 0 deletions web/config/core.entity_view_display.node.wfo_blurb.teaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
uuid: dee6acf8-3099-4143-99cd-87ddfaa9928c
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.wfo_blurb.body
- field.field.node.wfo_blurb.field_image
- field.field.node.wfo_blurb.field_office_address
- field.field.node.wfo_blurb.field_wfo
- image.style.medium
- node.type.wfo_blurb
module:
- image
- text
- user
id: node.wfo_blurb.teaser
targetEntityType: node
bundle: wfo_blurb
mode: teaser
content:
body:
type: text_summary_or_trimmed
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 101
region: content
field_image:
type: image
label: hidden
settings:
image_link: content
image_style: medium
image_loading:
attribute: lazy
third_party_settings: { }
weight: -1
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
field_office_address: true
field_wfo: true
Loading

0 comments on commit eae404e

Please sign in to comment.