Sha256: 9ed8d45e45bc2d292ce77cb4c6186b14c5d2922f49b0f253ef777283e8811662

Contents?: true

Size: 1.97 KB

Versions: 25

Compression:

Stored size: 1.97 KB

Contents

<%%= maglev_section.wrapper_tag.div class: 'py-6 md:py-12 px-4 md:px-6' do %>
  <div class="container mx-auto">
    <div class="mb-4">
      <h2 class="text-2xl font-bold"><%= file_name %></h2>
      <p class="mt-1 text-sm text-gray-500">
        Generated by the <strong class="text-black">Maglev</strong> generator.
      </p>
    </div>

    <!-- Section settings -->
    <div class="border-t border-gray-200 px-0 md:px-10 py-5">
      <div class="grid grid-cols-1 md:grid-cols-4 gap-x-4 gap-y-8">
        <%- settings.each do |setting| -%>
        <div class="col-span-1">
          <h4 class="text-sm font-medium text-gray-500">
            <%= setting.label %>
          </h4>
          <div class="mt-1 text-sm text-gray-900">
            <%%= maglev_section.setting_tag :<%= setting.id -%> %>
          </div>
        </div>
        <%- end -%>
      </div>
    </div>
    
    <%- unless blocks.empty? -%>
    <!-- Section blocks -->
    <div class="bg-gray-50 px-4 md:px-10 py-4 md:py-10">
      <h3 class="text-sm uppercase font-bold">Blocks</h3>

      <div class="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-8 mt-10">
        <%% section.blocks.each do |maglev_block| %>
          <%%= maglev_block.wrapper_tag.div class: 'col-span-1 bg-white rounded-lg shadow px-4 py-4' do %>
            <%% case maglev_block.type %>
              <%- blocks.each do |(type, block_settings)| -%>
              <%% when '<%= type %>' %>
                <%- block_settings.each do |setting| -%>
                <div class="mb-4">
                  <h4 class="text-sm font-medium text-gray-500">
                    <%= setting.label %>
                  </h4>
                  <div class="mt-1 text-sm text-gray-900">
                    <%%= maglev_block.setting_tag :<%= setting.id -%> %>
                  </div>
                </div>
                <%- end -%>
              <%- end -%>
            <%% end %>
          <%% end %>
        <%% end %>
      </div>
    </div> 
    <%- end -%>
  </div>
<%% end %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
maglevcms-1.8.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.7.3 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.7.2 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.7.1 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.7.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.6.1 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.6.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.5.1 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.4.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.3.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.2.2 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.2.1 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.2.0 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.7 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.6 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.5 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.4 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.3 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.2 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt
maglevcms-1.1.1 lib/generators/maglev/templates/section/app/views/theme/sections/%category%/%file_name%.html.erb.tt