mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-17 00:32:53 +00:00
Moving to github
This commit is contained in:
13
app/views/layouts/_flash.html.erb
Normal file
13
app/views/layouts/_flash.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="container mx-auto px-4 mt-4">
|
||||
<% if flash[:notice] %>
|
||||
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative mb-4" role="alert">
|
||||
<span class="block sm:inline"><%= flash[:notice] %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if flash[:alert] %>
|
||||
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4" role="alert">
|
||||
<span class="block sm:inline"><%= flash[:alert] %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
77
app/views/layouts/_footer.html.erb
Normal file
77
app/views/layouts/_footer.html.erb
Normal file
@@ -0,0 +1,77 @@
|
||||
<footer class="bg-gray-800 text-white mt-12">
|
||||
<div class="max-w-7xl mx-auto px-4 py-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<!-- About -->
|
||||
<div>
|
||||
<h3 class="text-lg font-bold mb-4">TurboVault</h3>
|
||||
<p class="text-gray-400 text-sm">
|
||||
Your personal video game collection tracker. Organize, track, and showcase your gaming library.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Quick Links -->
|
||||
<div>
|
||||
<h3 class="text-lg font-bold mb-4">Quick Links</h3>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<% if user_signed_in? %>
|
||||
<li><%= link_to "Dashboard", dashboard_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li><%= link_to "Games", games_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li><%= link_to "Collections", collections_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li><%= link_to "Settings", settings_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<% else %>
|
||||
<li><%= link_to "Home", root_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li><%= link_to "Sign Up", signup_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li><%= link_to "Login", login_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Features -->
|
||||
<div>
|
||||
<h3 class="text-lg font-bold mb-4">Features</h3>
|
||||
<ul class="space-y-2 text-sm text-gray-400">
|
||||
<li>📚 Track Physical & Digital Games</li>
|
||||
<li>🎮 IGDB Integration</li>
|
||||
<li>📊 Collection Statistics</li>
|
||||
<li>🔐 RESTful API Access</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Resources -->
|
||||
<div>
|
||||
<h3 class="text-lg font-bold mb-4">Resources</h3>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><%= link_to "API Documentation", api_docs_path, class: "text-gray-400 hover:text-white" %></li>
|
||||
<li>
|
||||
<a href="https://github.com/yourusername/turbovault" target="_blank" class="text-gray-400 hover:text-white">
|
||||
GitHub
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.igdb.com" target="_blank" class="text-gray-400 hover:text-white">
|
||||
Powered by IGDB
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Bar -->
|
||||
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-sm text-gray-400">
|
||||
<p>© <%= Time.current.year %> TurboVault. Built with Rails 8 & Hotwire.</p>
|
||||
<p class="mt-1">
|
||||
Game data supplied by
|
||||
<a href="https://www.igdb.com/" target="_blank" rel="noopener noreferrer" class="text-indigo-400 hover:text-indigo-300">
|
||||
IGDB
|
||||
</a>
|
||||
</p>
|
||||
<p class="mt-2">
|
||||
<% if user_signed_in? %>
|
||||
Logged in as <strong><%= current_user.username %></strong>
|
||||
<% else %>
|
||||
<%= link_to "Create an account", signup_path, class: "text-indigo-400 hover:text-indigo-300" %> to get started
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
47
app/views/layouts/_navigation.html.erb
Normal file
47
app/views/layouts/_navigation.html.erb
Normal file
@@ -0,0 +1,47 @@
|
||||
<nav class="bg-white shadow-lg">
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-8">
|
||||
<%= link_to "TurboVault", root_path, class: "text-2xl font-bold text-indigo-600" %>
|
||||
|
||||
<% if user_signed_in? %>
|
||||
<div class="hidden md:flex space-x-4">
|
||||
<%= link_to "Dashboard", dashboard_path, class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<%= link_to "Games", games_path, class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<%= link_to "Collections", collections_path, class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<% if current_user.igdb_sync_enabled? %>
|
||||
<%
|
||||
# Count games with pending suggestions (not total suggestions)
|
||||
pending_count = current_user.games
|
||||
.igdb_unmatched
|
||||
.joins(:igdb_match_suggestions)
|
||||
.where(igdb_match_suggestions: { status: 'pending' })
|
||||
.distinct
|
||||
.count
|
||||
%>
|
||||
<%= link_to igdb_matches_path, class: "text-gray-700 hover:text-indigo-600 relative" do %>
|
||||
IGDB
|
||||
<% if pending_count > 0 %>
|
||||
<span class="absolute -top-2 -right-2 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">
|
||||
<%= pending_count %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<% if user_signed_in? %>
|
||||
<%= link_to "Profile", profile_path(current_user.username), class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<%= link_to "Settings", settings_path, class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<%= button_to "Logout", logout_path, method: :delete, class: "px-4 py-2 bg-gray-200 rounded hover:bg-gray-300" %>
|
||||
<% else %>
|
||||
<%= link_to "Login", login_path, class: "text-gray-700 hover:text-indigo-600" %>
|
||||
<%= link_to "Sign Up", signup_path, class: "px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
39
app/views/layouts/application.html.erb
Normal file
39
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= content_for(:title) || "Turbovault Web" %></title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="application-name" content="Turbovault Web">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= yield :head %>
|
||||
|
||||
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
|
||||
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
|
||||
|
||||
<link rel="icon" href="/icon.png" type="image/png">
|
||||
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/icon.png">
|
||||
|
||||
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "themes", "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
</head>
|
||||
|
||||
<body class="<%= user_signed_in? ? current_user.theme_class : 'theme-light' %> bg-gray-50 flex flex-col min-h-screen">
|
||||
<%= render "layouts/navigation" %>
|
||||
|
||||
<%= render "layouts/flash" if flash.any? %>
|
||||
|
||||
<main class="container mx-auto px-4 py-8 flex-grow">
|
||||
<%= yield %>
|
||||
</main>
|
||||
|
||||
<%= render "layouts/footer" %>
|
||||
</body>
|
||||
</html>
|
||||
13
app/views/layouts/mailer.html.erb
Normal file
13
app/views/layouts/mailer.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style>
|
||||
/* Email styles need to be inline */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
1
app/views/layouts/mailer.text.erb
Normal file
1
app/views/layouts/mailer.text.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= yield %>
|
||||
Reference in New Issue
Block a user