docbrown/app/views/pages/code_of_conduct.html.erb
Jeremy Friesen 711f1bb0cd
Let override of ToS and CoC show in onboarding (#16217)
* Let override of ToS and CoC show in onboarding

Prior to this commit any changes to the terms or code of conduct were
not reflected in the onboarding links.

With this commit, I'm leveraging a newly created method that first
checks if there's a page for the given slug.  If there is, use that
page's copy.

To test:

- Overwrite default /terms page on a Forem
- Navigate to /onboarding or sign up as a new user
- Click on Terms of Use link text
- Review Terms of Use

Closes #15296

* Adding spec around not passing a block
2022-01-20 19:45:39 -05:00

22 lines
1.1 KiB
Text

<% title "#{community_name} Code of Conduct" %>
<%= content_for :page_meta do %>
<link rel="canonical" href="<%= app_url(code_of_conduct_path) %>" />
<meta name="description" content="<%= community_name %> Code of Conduct">
<%= meta_keywords_default %>
<meta property="og:type" content="article" />
<meta property="og:url" content="<%= app_url(code_of_conduct_path) %>" />
<meta property="og:title" content="<%= community_name %> Code of Conduct" />
<meta property="og:site_name" content="<%= community_name %>" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@<%= Settings::General.social_media_handles["twitter"] %>">
<meta name="twitter:title" content="<%= community_name %> Code of Conduct">
<% end %>
<main id="main-content" class="crayons-layout crayons-layout--limited-l">
<div class="crayons-card text-styles text-padding">
<h1 class="fs-3xl s:fs-4xl l:fs-5xl fw-bold s:fw-heavy lh-tight mb-4 mt-0">Code of Conduct</h1>
<%= Page.render_safe_html_for(slug: Page::CODE_OF_CONDUCT_SLUG) { render "pages/coc_text" } %>
</div>
</main>