2019-06-04 03:40:48 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html lang="<%= system_locale_via_uri.locale %>"
|
2020-04-20 11:28:53 +00:00
|
|
|
dir="<%= system_locale_via_uri.dir %>"
|
|
|
|
adir="ltr"
|
2019-06-04 03:40:48 +00:00
|
|
|
data-id='<%= @knowledge_base.id %>'
|
|
|
|
data-iconset='<%= @knowledge_base.iconset %>'
|
|
|
|
data-available-locales='<%= all_locales.map(&:locale).join(',') %>'
|
2019-09-18 17:25:04 +00:00
|
|
|
data-base-path='<%= custom_path_if_needed help_root_path(locale: '{locale}'), @knowledge_base %>'
|
2019-06-04 03:40:48 +00:00
|
|
|
data-primary-locale="<%= (filter_primary_kb_locale || all_locales.first)&.locale %>">
|
|
|
|
|
|
|
|
<meta charset="utf-8">
|
2019-09-18 17:25:04 +00:00
|
|
|
<title><%= kb_public_page_title(@knowledge_base, @object, @page_title_error) %></title>
|
2019-06-06 08:26:42 +00:00
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover">
|
2019-06-04 03:40:48 +00:00
|
|
|
<%= stylesheet_link_tag "knowledge_base.css", :media => 'all' %>
|
2020-04-20 11:28:53 +00:00
|
|
|
<%= render 'knowledge_base/public/inline_stylesheet', knowledge_base: @knowledge_base, locale: system_locale_via_uri %>
|
2021-03-30 15:56:26 +00:00
|
|
|
<%= canonical_link_tag @knowledge_base, @category, @object %>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2019-06-20 07:56:27 +00:00
|
|
|
<div class="wrapper js-wrapper">
|
2021-08-16 08:20:07 +00:00
|
|
|
<%= render_top_bar_if_needed @object, @knowledge_base %>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2019-06-20 07:56:27 +00:00
|
|
|
<header class="header js-header">
|
|
|
|
<div class="container">
|
|
|
|
<h1 class="logo">
|
2019-09-18 17:25:04 +00:00
|
|
|
<%= link_to custom_path_if_needed(help_root_path(locale: params[:locale]), @knowledge_base) do %>
|
2019-06-20 07:56:27 +00:00
|
|
|
<img src="/assets/images/<%= Setting.get('product_logo') %>">
|
|
|
|
<% end %>
|
|
|
|
</h1>
|
|
|
|
<nav class="menu">
|
2020-05-13 17:01:42 +00:00
|
|
|
<% menu_items.location_header.each do |menu_item| %>
|
2019-06-20 07:56:27 +00:00
|
|
|
<%= link_to menu_item.title, menu_item.url, class: 'menu-item', target: menu_item.new_tab ? '_blank' : nil %>
|
|
|
|
<% end %>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
<div class="search">
|
|
|
|
<div class="search-field">
|
|
|
|
<%= icon 'magnifier' %>
|
|
|
|
<input class="js-search-input" type="search" placeholder="<%= zt('How can we help you? Search for an answer or a topic...') %>">
|
|
|
|
</div>
|
|
|
|
<ul class="search-results js-search-results" data-empty-placeholder="<%= zt('No results were found.') %>"></ul>
|
2019-06-04 03:40:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-20 07:56:27 +00:00
|
|
|
</header>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2019-09-18 17:25:04 +00:00
|
|
|
<%= render_breadcrumb_if_needed(@knowledge_base, @object, @alternative) %>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2019-06-20 07:56:27 +00:00
|
|
|
<%= yield %>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2019-06-20 07:56:27 +00:00
|
|
|
<footer class="footer">
|
|
|
|
<div class="container">
|
|
|
|
<div class="footer-menu">
|
|
|
|
<div class="copyright">
|
|
|
|
<%= @knowledge_base.translation.footer_note %>
|
|
|
|
</div>
|
2020-05-13 17:01:42 +00:00
|
|
|
|
|
|
|
<nav class="menu">
|
|
|
|
<% menu_items.location_footer.each do |menu_item| %>
|
|
|
|
<%= link_to menu_item.title, menu_item.url, class: 'menu-item', target: menu_item.new_tab ? '_blank' : nil %>
|
|
|
|
<% end %>
|
|
|
|
</nav>
|
|
|
|
|
2019-06-20 07:56:27 +00:00
|
|
|
<div class="language-picker">
|
|
|
|
<a class="btn btn--action" href="#" data-toggle="dropdown" aria-expanded="false">
|
|
|
|
<%= system_locale_via_uri.name %>
|
|
|
|
<%= icon 'arrow-down' %>
|
|
|
|
</a>
|
2020-04-20 11:28:53 +00:00
|
|
|
<ul class="dropdown-menu dropdown-menu-<%= dropdown_menu_direction %> dropdown-menu-up" role="menu">
|
2019-06-20 07:56:27 +00:00
|
|
|
<% @object_locales&.each do |locale| %>
|
|
|
|
<li class="<%= 'is-selected' if locale.name == system_locale_via_uri.name %>">
|
2019-09-18 17:25:04 +00:00
|
|
|
<%= link_to custom_path_if_needed(url_for(locale: locale.locale), @knowledge_base), hreflang: locale.locale do %>
|
2019-06-20 07:56:27 +00:00
|
|
|
<%= icon 'checkmark' %>
|
|
|
|
<%= locale.name %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2019-06-04 03:40:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-20 07:56:27 +00:00
|
|
|
</footer>
|
|
|
|
</div>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2020-02-13 08:35:58 +00:00
|
|
|
<%= javascript_tag nonce: true do -%>
|
2019-06-04 03:40:48 +00:00
|
|
|
if(window.fetch === undefined || window.Promise === undefined || Element.prototype.prepend === undefined){
|
2020-02-13 08:35:58 +00:00
|
|
|
var polyfillScriptTag = document.createElement('script');
|
|
|
|
polyfillScriptTag.setAttribute('src', '<%= path_to_javascript('knowledge_base_public_polyfills') %>');
|
|
|
|
polyfillScriptTag.setAttribute('nonce', '<%= content_security_policy_nonce %>');
|
|
|
|
document.body.appendChild(polyfillScriptTag);
|
2019-06-04 03:40:48 +00:00
|
|
|
}
|
2020-02-13 08:35:58 +00:00
|
|
|
<% end -%>
|
2019-06-04 03:40:48 +00:00
|
|
|
|
2020-02-13 08:35:58 +00:00
|
|
|
<%= javascript_include_tag 'knowledge_base_public', nonce: true %>
|