Skip to content
Snippets Groups Projects
Unverified Commit 071ea66e authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Showcase (#1727)

* done

* useless

* style
parent 517a165d
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ module ApplicationController::WithDomain
helper_method :current_context
def current_mode
current_extranet.present? ? 'extranet' : 'university'
current_extranet.present? ? 'extranet'
: 'university'
end
helper_method :current_mode
......
class Showcase::ApplicationController < ApplicationController
layout 'showcase/layouts/application'
skip_before_action :ensure_university, :authenticate_user!
end
class Showcase::HomeController < Showcase::ApplicationController
def index
@websites = Communication::Website.in_production.order(created_at: :desc)
end
end
<% content_for :title, 'Showcase' %>
<h1>Showcase</h1>
<p>
<%= @websites.count %>
<%= Communication::Website.model_name.human(count: @websites.count).downcase %>
</p>
<div class="row mt-5">
<% @websites.each do |website| %>
<div class="col-lg-6 mb-5">
<% if website.screenshot.attached? %>
<%= link_to website.url, target: :_blank do %>
<%= kamifusen_tag website.screenshot,
width: 800,
class: 'img-fluid mb-1' %>
<% end %>
<% end %>
<h2 class="h6"><%= website %></h2>
<p class="small mb-1">
<i class="bi bi-compass-fill me-2"></i>
<%= link_to social_website_to_s(website.url),
website.url,
target: :_blank,
class: 'text-white' %>
</p>
<p class="small">
<i class="bi bi-github me-2"></i>
<%= link_to social_website_to_s(website.repository_url),
website.url,
target: :_blank,
class: 'text-white' %>
</p>
</div>
<% end %>
</div>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= yield :title %></title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= favicon_link_tag 'favicon.png' %>
</head>
<body class="bg-black text-white">
<nav class="navbar navbar-light">
<div class="container justify-content-center">
<a class="navbar-brand" href="/">
<%= image_tag 'osuny-white.svg', class: 'img-fluid', alt: 'Osuny', width: 100 %>
</a>
</div>
</nav>
<main class="container mt-5 pt-5">
<%= yield %>
</main>
</body>
</html>
......@@ -30,6 +30,7 @@ OSUNY_API_AUTOUPDATE_THEME_KEY:
OSUNY_DEVELOPMENT_DBNAME:
OSUNY_STAGING_APP_NAME:
OSUNY_STAGING_PG_ADDON_ID:
OSUNY_SHOWCASE:
OTP_SECRET_ENCRYPTION_KEY:
......
Rails.application.routes.draw do
constraints host: ENV['OSUNY_SHOWCASE'] do
get '/' => 'showcase/home#index'
end
authenticated :user, -> user { user.server_admin? } do
match "/delayed_job" => DelayedJobWeb, :anchor => false, :via => [:get, :post]
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment