Skip to content

Commit

Permalink
EREGCSC-2865 -- Update demo video information on homepage (#1445)
Browse files Browse the repository at this point in the history
* feat: add DEMO_VIDEO_URL where needed

* format: add spacing to please Ruff linter

* chore: add DEMO_VIDEO_URL to serverless experimental yml

* feat: update video link image label and alt text

* feat: use CMSHHVgov official YouTube page as fallback video link
  • Loading branch information
PhilR8 authored Oct 17, 2024
1 parent cd11aa8 commit 069c9b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions solution/backend/cmcs_regulations/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ def survey_url(request):
}


def demo_video_url(request):
return {
"DEMO_VIDEO_URL": settings.DEMO_VIDEO_URL
}


def signup_url(request):
return {
"SIGNUP_URL": settings.SIGNUP_URL
Expand Down
5 changes: 5 additions & 0 deletions solution/backend/cmcs_regulations/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"cmcs_regulations.context_processors.custom_url",
"cmcs_regulations.context_processors.survey_url",
"cmcs_regulations.context_processors.signup_url",
"cmcs_regulations.context_processors.demo_video_url",
"cmcs_regulations.context_processors.deploy_number",
"cmcs_regulations.context_processors.automated_testing",
'cmcs_regulations.context_processors.api_base',
Expand Down Expand Up @@ -225,6 +226,10 @@
"SIGNUP_URL",
"https://docs.google.com/forms/d/e/1FAIpQLSdcG9mfTz6Kebdni8YSacl27rIwpGy2a7GsMGO0kb_T7FSNxg/viewform?embedded=true"
)
DEMO_VIDEO_URL = os.environ.get(
"DEMO_VIDEO_URL",
"https://www.youtube.com/@CMSHHSgov"
)

DEPLOY_NUMBER = os.environ.get("DEPLOY_NUMBER", datetime.now())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
<div class="cta">
<div class="video__container">
<a
href="https://www.youtube.com/watch?v=dqy8WCFedU4"
href="{{ DEMO_VIDEO_URL }}"
target="_blank"
rel="noopener noreferrer"
>
<img
src="{% static 'images/home_video.png' %}"
alt="View a 6-minute video demonstration."
alt="View an 8-minute video demonstration."
/>
</a>
<label id="videoLabel">View a 6-minute video demonstration.</label>
<label id="videoLabel">View an 8-minute video demonstration.</label>
</div>
<div class="about-text__container">
<p>
Expand Down
1 change: 1 addition & 0 deletions solution/backend/serverless-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ provider:
CUSTOM_URL: ${ssm:/eregulations/custom_url, ''}
SURVEY_URL: ${ssm:/eregulations/survey_url}
SIGNUP_URL: ${ssm:/eregulations/signup_url}
DEMO_VIDEO_URL: ${ssm:/eregulations/demo_video_url}
AWS_STORAGE_BUCKET_NAME: file-repo-eregs-${self:custom.stage}
OIDC_OP_JWKS_ENDPOINT: ${ssm:/eregulations/oidc/jwks_endpoint}
OIDC_RP_CLIENT_ID: ${ssm:/eregulations/oidc/client_id}
Expand Down
1 change: 1 addition & 0 deletions solution/backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ provider:
CUSTOM_URL: ${ssm:/eregulations/custom_url}
SURVEY_URL: ${ssm:/eregulations/survey_url}
SIGNUP_URL: ${ssm:/eregulations/signup_url}
DEMO_VIDEO_URL: ${ssm:/eregulations/demo_video_url}
OIDC_RP_CLIENT_ID: ${ssm:/eregulations/oidc/client_id}
OIDC_RP_CLIENT_SECRET: ${ssm:/eregulations/oidc/client_secret}
OIDC_OP_AUTHORIZATION_ENDPOINT: ${ssm:/eregulations/oidc/authorization_endpoint}
Expand Down

0 comments on commit 069c9b3

Please sign in to comment.