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

Home & Teacher home: show "HOC is coming" until actual HOC #19403

Merged
merged 1 commit into from
Nov 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/src/templates/studioHomepages/TeacherHomepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ export default class TeacherHomepage extends Component {
{hocLaunch &&
hocLaunch.special_announcement &&
hocLaunch.special_announcement === "celebs2017" &&
isEnglish && (
<SpecialAnnouncementActionBlock
isRtl={isRtl}
imageUrl={pegasus('/images/fill-540x289/special-announcements/celebs_hoc2017.jpg')}
heading={i18n.specialAnnouncementHeading()}
subHeading={""}
description={i18n.specialAnnouncementDescriptionCelebs()}
buttons={[
{url: pegasus('/challenge'), text: i18n.celebrityChallenge()},
{url: pegasus('/learn'), text: i18n.tryHOC()}
]}
/>
)}

{hocLaunch &&
hocLaunch.special_announcement &&
hocLaunch.special_announcement === "celebs2017actualhoc" &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a separate PR? It seems like we should hotfix the "Hour of Code is here" change below, then push the announcement update as part of the normal DTP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out that neither needs a hotfix, so we can just send them both out together as part of normal DTP.

isEnglish && (
<SpecialAnnouncementActionBlock
isRtl={isRtl}
Expand Down
3 changes: 2 additions & 1 deletion pegasus/sites.v3/code.org/views/homepage_hero.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- hoc_launch = DCDO.get('hoc_launch', nil)
- census_announcement = DCDO.get('census_announcement', nil)
- hoc_mode = DCDO.get('hoc_mode', nil)

-# Whether we show a HOC launch background
- show_hoc_launch_layout = hoc_launch && hoc_launch["homepage"]
Expand Down Expand Up @@ -59,7 +60,7 @@
- main_actions = capture_haml do
-# Temporary heading text for the Hour of Code
- if request.language == "en"
- if show_hoc_launch_layout && hoc_launch_hero_variation == "celebs"
- if show_hoc_launch_layout && hoc_launch_hero_variation == "celebs" && hoc_mode == 'actual-hoc'
= I18n.t(:homepage_hero_hoc_is_here)
- else
= I18n.t(:homepage_hero_hoc_is_coming)
Expand Down