51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
<% content_for :head do %>
|
|
<title><%= @article.title %> | <%= @portal.name %></title>
|
|
<% if @article.meta["title"].present? %>
|
|
<meta name="title" content="<%= @article.meta["title"] %>">
|
|
<% end %>
|
|
<% if @article.meta["description"].present? %>
|
|
<meta name="description" content="<%= @article.meta["description"] %>">
|
|
<% end %>
|
|
<% if @article.meta["tags"].present? %>
|
|
<meta name="tags" content="<%= @article.meta["tags"].join(',') %>">
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if !@is_plain_layout_enabled %>
|
|
<div class="bg-woot-50 py-8 shadow-inner" style="background: url(/assets/images/hc/grid.svg) color-mix(in srgb, <%= @portal.color %> 10%, white)">
|
|
<div class="max-w-6xl px-8 pt-8 pb-16 mx-auto space-y-4 w-full">
|
|
<div>
|
|
<a
|
|
class="text-slate-700 hover:underline leading-8 text-sm font-semibold"
|
|
href="/hc/<%= @portal.slug %>/<%= @article.category&.locale %>"
|
|
>
|
|
Home
|
|
</a>
|
|
<span class="text-xs text-slate-600 px-1">/</span>
|
|
<% if @article.category %>
|
|
<a
|
|
class="text-slate-700 hover:underline leading-8 text-sm font-semibold"
|
|
href="/hc/<%= @portal.slug %>/<%= @article.category.locale %>/categories/<%= @article.category.slug %>"
|
|
>
|
|
<%= @article.category&.name %>
|
|
</a>
|
|
<% else %>
|
|
<span class="text-slate-700 leading-8 text-sm font-semibold" > Uncategorized </span>
|
|
<% end %>
|
|
</div>
|
|
<%= render "public/api/v1/portals/articles/article_header", article: @article %>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<div class="max-w-6xl p-8 mx-auto space-y-4 w-full <%= @is_plain_layout_enabled ? 'px-8 py-4' : 'p-8' %>">
|
|
<%= render "public/api/v1/portals/articles/article_header", article: @article %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="flex max-w-6xl w-full px-8 mx-auto">
|
|
<article id="cw-article-content" class="flex-grow flex-2 mx-auto text-slate-800 text-lg max-w-3xl prose break-words w-full <%= @is_plain_layout_enabled ? 'py-4' : 'py-12' %>">
|
|
<%= @parsed_content %>
|
|
</article>
|
|
<div class="flex-1" id="cw-hc-toc"></div>
|
|
</div>
|