Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Dec 5, 2024
1 parent 4ebd734 commit a36e069
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/helpers/admin/sidebar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Admin::SidebarHelper
def simple_formatting_sidebar(options = {})
sidebar_content = []
sidebar_content << render("admin/editions/govspeak_help", options)
sidebar_content << render("admin/editions/landing_page_help", options) if options[:show_landing_page_help]
sidebar_content << render("admin/editions/style_guidance", options)
raw sidebar_content.join("\n")
end
Expand Down
27 changes: 27 additions & 0 deletions app/views/admin/editions/_landing_page_help.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

<div class="govspeak-help">
<h2 class="govuk-heading-l">Blocks</h2>

<%= render "govuk_publishing_components/components/details", {
title: "Action Link",
} do %>
<p class='govuk-body'>A wrapper around the action link component.</p>
<pre>
- type: action_link
text: "Learn more about our goals"
href: "/landing-page/goals"
</pre>
<% end %>

<%= render "govuk_publishing_components/components/details", {
title: "Big Number",
} do %>
<p class='govuk-body'>A wrapper around the Big number component</p<>>
<pre>
- type: big_number
number: £75m
label: amount of money that looks big</pre>
</pre>
<% end %>

</div>
2 changes: 1 addition & 1 deletion app/views/admin/editions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</div>

<div class="govuk-grid-column-one-third">
<%= simple_formatting_sidebar hide_inline_attachments_help: !@edition.allows_inline_attachments?, show_attachments_tab_help: true %>
<%= simple_formatting_sidebar hide_inline_attachments_help: !@edition.allows_inline_attachments?, show_attachments_tab_help: true, show_landing_page_help: @edition.document.document.document_type == "LandingPage" %>
</div>
</div>

0 comments on commit a36e069

Please sign in to comment.