Skip to content

Commit

Permalink
Make Chris' colour task different from Pawel's
Browse files Browse the repository at this point in the history
  • Loading branch information
selfthinker committed Dec 1, 2022
1 parent 480fcd1 commit d32f965
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
9 changes: 6 additions & 3 deletions source/_example_snippets/refer_to_colour/_bad.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
## Click the blue button
<% action1 = colour == 'blue' ? 'fail' : 'success' %>
<% action2 = colour == 'green' ? 'fail' : 'success' %>

<form action="<%= url_for '/fail.html' %>" method="get" class="game-button">
## Click the <%= colour %> button

<form action="<%= url_for "/#{action1}.html" %>" method="get" class="game-button">
<button class="govuk-button" data-module="govuk-button">Submit</button>
</form>

<form action="<%= url_for '/success.html' %>" method="get" class="game-button">
<form action="<%= url_for "/#{action2}.html" %>" method="get" class="game-button">
<button class="govuk-button blue" data-module="govuk-button">Save</button>
</form>

Expand Down
9 changes: 6 additions & 3 deletions source/_example_snippets/refer_to_colour/_good.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
## Click the Save button
<% action1 = colour == 'blue' ? 'fail' : 'success' %>
<% action2 = colour == 'green' ? 'fail' : 'success' %>

<form action="<%= url_for '/fail.html' %>" method="get" class="game-button">
## Click the <%= name %> button

<form action="<%= url_for "/#{action1}.html" %>" method="get" class="game-button">
<button class="govuk-button" data-module="govuk-button">Submit</button>
</form>

<form action="<%= url_for '/success.html' %>" method="get" class="game-button">
<form action="<%= url_for "/#{action2}.html" %>" method="get" class="game-button">
<button class="govuk-button blue" data-module="govuk-button">Save</button>
</form>

Expand Down
2 changes: 1 addition & 1 deletion source/chris/bad.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ title: Issues for Chris
<%= partial "/_example_snippets/table/bad" %>
<%= partial "/_example_snippets/refer_to_colour/bad" %>
<%= partial "/_example_snippets/refer_to_colour/bad", locals: { colour: "green" } %>
2 changes: 1 addition & 1 deletion source/chris/good.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ title: Fixes for Chris
<%= partial "/_example_snippets/table/good" %>
<%= partial "/_example_snippets/refer_to_colour/good" %>
<%= partial "/_example_snippets/refer_to_colour/good", locals: { colour: "green", name: "Submit" } %>
2 changes: 1 addition & 1 deletion source/pawel/bad.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ title: Issues for Pawel
<%= partial "/_example_snippets/complex_language/bad" %>
<%= partial "/_example_snippets/refer_to_colour/bad" %>
<%= partial "/_example_snippets/refer_to_colour/bad", locals: { colour: "blue" } %>
2 changes: 1 addition & 1 deletion source/pawel/good.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ title: Issues for Pawel
<%= partial "/_example_snippets/complex_language/good" %>
<%= partial "/_example_snippets/refer_to_colour/good" %>
<%= partial "/_example_snippets/refer_to_colour/good", locals: { colour: "blue", name: "Save" } %>

0 comments on commit d32f965

Please sign in to comment.