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-2.1.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.1.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.13 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.12 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.11 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.10 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.9 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.8 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.7 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.6 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.5 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.4 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.3 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.2 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.1 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.0.pre.test.pre.release.pre.525 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.0.pre.test.pre.release.pre.524 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.0.test.pre.release.521 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-2.0.0 lib/govuk_tech_docs/warning_text_extension.rb
govuk_tech_docs-1.9.0.pre.rc2 lib/govuk_tech_docs/warning_text_extension.rb