Sha256: f72abf6766cb2b0b27e9983d4cecccaae6cdcd108b544f1f3a10384966b3fb57

Contents?: true

Size: 1.71 KB

Versions: 9

Compression:

Stored size: 1.71 KB

Contents

<%
  add_gem_component_stylesheet("signup-link")

  local_assigns[:heading_level] ||= 3
  local_assigns[:margin_bottom] ||= 0
  link_text ||= false
  link_href ||= false
  heading ||= false
  background ||= false
  data ||= false

  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
  component_helper.add_class("gem-c-signup-link govuk-!-display-none-print")
  component_helper.add_class("gem-c-signup-link--link-only") unless heading
  component_helper.add_class("gem-c-signup-link--with-background-and-border") if background
%>
<% if link_text && link_href %>
  <%= tag.div(**component_helper.all_attributes) do %>
    <div class="gem-c-signup-link__inner govuk-width-container">
      <svg  class="gem-c-signup-link__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334">
        <path fill="black" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z"/>
      </svg>
      <%= content_tag(shared_helper.get_heading_level, heading, class: "govuk-heading-s gem-c-signup-link__title") if heading %>
      <%= link_to( link_text, link_href, {
        class: "govuk-link gem-c-signup-link__link",
        data: data
      }) %>
    </div>
  <% end %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
govuk_publishing_components-51.1.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-51.0.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-50.0.1 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-50.0.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-49.1.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-49.0.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/_signup_link.html.erb
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_signup_link.html.erb