Sha256: fd696403cc86ce14301bd31a6261725da41ae59505a9d46ff4840a532bc31caf

Contents?: true

Size: 626 Bytes

Versions: 47

Compression:

Stored size: 626 Bytes

Contents

module GovukTechDocs
  class WarningTextExtension < Middleman::Extension
    def initialize(app, options_hash = {}, &block)
      super
    end

    helpers do
      def warning_text(text)
        <<~EOS
        <div class="govuk-warning-text">
          <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
          <strong class="govuk-warning-text__text">
            <span class="govuk-warning-text__assistive">Warning</span>
            #{text}
          </strong>
        </div>
        EOS
      end
    end
  end
end

::Middleman::Extensions.register(:warning_text, GovukTechDocs::WarningTextExtension)

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
govuk_tech_docs-4.1.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-4.0.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.5.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.4.5 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.4.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.3.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.3.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.2.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.2.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.1.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.0.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-3.0.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.4.3 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.4.2 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.4.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.4.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.3.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.2.2 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.2.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.2.0 lib/govuk_tech_docs/warning_text_extension.rb