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.1.5 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.1.4 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.1.3 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.1.2 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.1.1 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.1.0 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.145 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.144 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.143 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.142 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.141 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.140 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.139 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.138 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.137 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.136 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.135 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.134 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.133 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb
station-0.0.132 lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb