docbrown/app/views/pages/terms.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

27 lines
1.4 KiB
Text

<% title("Terms of Use for #{community_name}") %>
<%= content_for :page_meta do %>
<link rel="canonical" href="<%= app_url("/terms") %>" />
<meta name="description" content="Terms of Use for <%= community_name %>">
<%= meta_keywords_default %>
<meta property="og:type" content="article" />
<meta property="og:url" content="<%= app_url("/terms") %>" />
<meta property="og:title" content="Terms of Use for <%= community_name %>" />
<meta property="og:image" content="<%= Settings::General.main_social_image %>" />
<meta property="og:description" content="<%= community_name %> is great!" />
<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="Terms of Use for <%= community_name %>">
<meta name="twitter:description" content="<%= community_name %> is great!">
<meta name="twitter:image:src" content="<%= Settings::General.main_social_image %>">
<% 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">Web Site Terms and Conditions of Use</h1>
<%= Page.render_safe_html_for(slug: Page::TERMS_SLUG) { render "terms_text" } %>
</div>
</main>