Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.4.0/fp 1439 yearly site theme for texascale #508

Merged

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Jun 30, 2022

Overview

Add get_url_match filter to render string that matches given pattern from current page URL.

This supports annual stylesheets for Texascale.

✓ To Do
  • FP-1652do without for now
  • local testing & screenshots
  • remote testing & screenshots

Related

Changes

Testing

Prep

Local. Have two pages that use Texascale templates and each has a year in it's url, e.g.:

Remote. Use existing pages:

If site is blocked for security (expired cert), follow instructions to bypass security.

Steps

  1. Load a page with 2019 (or any year 2019—2029) in its slug/path.
  2. Verify the following <link> IS added to <head>:
    <link rel="stylesheet" href="texascale-org/css/build/site.2019.css" data-year_slug="2019">
    
    (No such file exists, intentionally. I will create the stylesheet in a future PR. For now, just making sure I can.)
  3. Load a page with 2018 (or any year earlier than 2019) in its slug/path.
  4. Verify the following <link> is NOT added to <head>:
    <link rel="stylesheet" href="texascale-org/css/build/site.2019.css" data-year_slug="2018">
    

Screenshots

✓ Local
2019 2018
Local 2019 v3 4 0 Local 2018 v3 4 0
✓ Remote
2019 2018
Remote 2019 v3 4 0 Remote 2018 v3 4 0

Notes

Based off of v3.4.0 because Texascale can't even handle v3.5.0 until CEPWMA-680.

@wesleyboar wesleyboar changed the base branch from main to release/v3.4.0 June 30, 2022 17:48
@wesleyboar wesleyboar marked this pull request as ready for review June 30, 2022 17:48
Copy link
Collaborator

@taoteg taoteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wesleyboar wesleyboar merged commit 0c5cbd1 into release/v3.4.0 Jul 1, 2022
@wesleyboar wesleyboar deleted the v3.4.0/fp-1439-yearly-site-theme-for-texascale branch July 1, 2022 14:21
@wesleyboar
Copy link
Member Author

Reminder, this is a proof-of-concept change:

  • If user visits 2020 or 2019, then website will search for a 2020 or 2019 stylesheet.
  • If user visits 2018, then website will not search for a 2018 stylesheet.

The logic can be changed to support our needs, i.e.

  • 2021, 2020, 2018, 2019 pages would get site.2018-2021.css
  • “un-year-ed” (a.k.a. 2022) pages would get site.2022.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants