| 1 | <% content_for :meta_head do %> |
| 2 | <title><%= @meta_title %></title> |
| 3 | <meta name="description" content="<%= @meta_description %>"> |
| 4 | <meta property="og:title" content="<%= @meta_title %>" /> |
| 5 | <meta property="og:description" content="<%= @meta_description %>" /> |
| 6 | <meta property="og:url" content="<%= @meta_url %>" /> |
| 7 | <% end %> |
| 8 | <% content_for :breadcrumb do %> |
| 9 | <script type="application/ld+json"> |
| 10 | { |
| 11 | "@context": "http://schema.org", |
| 12 | "@type": "BreadcrumbList", |
| 13 | "itemListElement": [{ |
| 14 | "@type": "ListItem", |
| 15 | "position": 1, |
| 16 | "item": { |
| 17 | "@id": "<%= root_url %>", |
| 18 | "name": "<%= t("site_name") %>" |
| 19 | } |
| 20 | },{ |
| 21 | "@type": "ListItem", |
| 22 | "position": 2, |
| 23 | "item": { |
| 24 | "@id": "<%= what_is_this_url %>", |
| 25 | "name": "<%= t("nav_what_is_this") %>" |
| 26 | } |
| 27 | }] |
| 28 | } |
| 29 | </script> |
| 30 | <% end %> |
| 31 | <main> |
| 32 | <div class="row g-5"> |
| 33 | <div class="col-sm-3"> |
| 34 | <div class="position-sticky" style="top: 1rem;"> |
| 35 | <ul class="list-group list-group-flush"> |
| 36 | <li class="list-group-item"> |
| 37 | <%= link_to(t('nav_what_is_this'), what_is_this_path) %> |
| 38 | </li> |
| 39 | <% @what_are_these.each do |page| %> |
| 40 | <li class="list-group-item"> |
| 41 | <%= link_to(page.title, what_is_this_detail_path(slug: page.page_slug)) %> |
| 42 | </li> |
| 43 | <% end if @what_are_these %> |
| 44 | </ul> |
| 45 | </div> |
| 46 | </div> |
| 47 | <div class="col-sm-9"> |
| 48 | <div class="row"> |
| 49 | <div class="col-12"> |
| 50 | <% if I18n.locale.to_s != @page.locale %> |
| 51 | <div class="alert alert-warning" role="alert"> |
| 52 | No content in the current language. |
| 53 | </div> |
| 54 | <% end %> |
| 55 | </div> |
| 56 | </div> |
| 57 | <div class="row"> |
| 58 | <div class="col-10"> |
| 59 | <h1><%= @page.title if @page %></h1> |
| 60 | </div> |
| 61 | <div class="col-2"> |
| 62 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16"> |
| 63 | <path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"></path> |
| 64 | <path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"></path> |
| 65 | </svg> |
| 66 | </div> |
| 67 | </div> |
| 68 | <div class="row"> |
| 69 | <div class="col-12"> |
| 70 | <%= @page.page_content.html_safe if @page %> |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |
| 74 | </div> |
| 75 | <%= render "shared/partial_breadcrumbs" do %> |
| 76 | <li class="breadcrumb-item"><%= link_to t('nav_what_is_this'), what_is_this_url %></li> |
| 77 | <% end %> |
| 78 | </main> |