pupilfirst/pupilfirst

View on GitHub
app/views/communities/show.html.erb

Summary

Maintainability
Test Coverage
<% presenter = Communities::ShowPresenter.new(self, @community, @target) %>
<% content_for(:head) do %>
  <title><%= presenter.page_title %></title>
<% end %>
<div class="bg-gray-50">
  <div class="community-hero__container flex bg-white border-b border-primary-200 py-8 md:pt-18">
    <div class="max-w-3xl w-full flex flex-col items-center justify-center mx-auto px-3 md:px-0">
      <h1 class="text-center font-normal text-2xl md:text-3xl leading-tight">
        <%= t(".welcome") %>
        <span class="block font-bold text-3xl md:text-4xl">
          <%= t(".community_title", name: @community.name) %>
        </span>
      </h1>
      <div class="max-w-lg flex w-full mt-3 justify-center">
        <a class="no-underline btn btn-primary relative" href=<%= new_topic_community_path(@community) %>>
          <i class="fas fa-plus-circle text-lg"></i>
          <span class="font-semibold ms-2">
            <%= t(".new_topic") %>
          </span>
        </a>
      </div>
    </div>
  </div>
  <script type="application/json" id="react-root-data">
    <%= presenter.props_to_json.html_safe %>
  </script>
  <div id="react-root">
  </div>
</div>