Sha256: 75857ed2e11696d7718d31767e95c39ab49a393bffbcdeca9a9d7b8db827cd33

Contents?: true

Size: 1.38 KB

Versions: 94

Compression:

Stored size: 1.38 KB

Contents

<%
    raise "Missing 'header' key in structured_text landing page block" unless local_assigns['header']
    raise "Missing 'text' key in structured_text landing page block" unless local_assigns['text']
    raise "Missing 'icon color' key in structured_text landing page icon block" if (local_assigns['icon'] && local_assigns['icon']['color'].nil?)
    raise "Missing 'icon name' key in structured_text landing page icon block" if (local_assigns['icon'] && local_assigns['icon']['name'].nil?)
%>
<h2 class="Vlt-title--icon" id="<%= local_assigns['header'].parameterize %>">
    <% if local_assigns['icon'] %>
        <svg class="Vlt-<%= local_assigns['icon']['color'] %>"><use xlink:href="<%= local_assigns['icon']['name'].start_with?("Brand") ? "/symbol/volta-brand-icons.svg##{local_assigns['icon']['name']}" : "/symbol/volta-icons.svg#Vlt-#{local_assigns['icon']['name']}" %>"></use></svg>
    <% end %>
    <%= local_assigns['header'].render_markdown({skip_paragraph_surround: true}) %>
</h2>
<% local_assigns['text'] ||= [] %>
<% local_assigns['text'].each do |text| %>
    <% if text['type'] == 'large' %>
        <p class="p-large">
            <%= text['content'].render_markdown({skip_paragraph_surround: true}) %>
        </p>
    <% elsif text['type'] == 'small' %>
        <%= text['content'].render_markdown %>
    <% else 
        raise "Unknown text type: #{text['type']}"
    end %>
<% end %>

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.15 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.14 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.13 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.12 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.11 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.10 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.9 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.8 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.7 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.6 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.5 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.4 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.3 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.2 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.1 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.5.0 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.4.9 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.4.8 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.4.7 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb