Skip to content

Commit

Permalink
add github stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Aug 9, 2024
1 parent 23c13c6 commit 7c56636
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 17 deletions.
64 changes: 49 additions & 15 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<link rel="icon" href="/favicon.ico" type="image/x-icon">

<!-- Open Graph Meta Tags -->
<%= tag.meta property: 'og:type', content: 'website' %>
<%= tag.meta property: 'og:site_name', content: 'Linkarooie' %>
<%= tag.meta property: 'og:locale', content: 'en_US' %>
<%= tag.meta property: 'og:updated_time', content: '2024-08-08T12:00:19Z' %>
<%= tag.meta property: 'og:type', content: 'website' %>
<%= tag.meta property: 'og:site_name', content: 'Linkarooie' %>
<%= tag.meta property: 'og:locale', content: 'en_US' %>
<%= tag.meta property: 'og:updated_time', content: '2024-08-08T12:00:19Z' %>

<%= tag.meta property: 'og:title', content: content_for?(:og_title) ? content_for(:og_title) : 'Linkarooie - Simplify Your Online Presence' %>
<%= tag.meta property: 'og:description', content: content_for?(:og_description) ? content_for(:og_description) : 'Manage all your links in one place with Linkarooie.' %>
<%= tag.meta property: 'og:image', content: content_for?(:og_image) ? content_for(:og_image) : image_url('default_og_image.png') %>
<%= tag.meta property: 'og:image:alt', content: content_for?(:og_image_alt) ? content_for(:og_image_alt) : 'Default image description' %>
<%= tag.meta property: 'og:url', content: content_for?(:og_url) ? content_for(:og_url) : root_url %>
<%= tag.meta property: 'og:title', content: content_for?(:og_title) ? content_for(:og_title) : 'Linkarooie - Simplify Your Online Presence' %>
<%= tag.meta property: 'og:description', content: content_for?(:og_description) ? content_for(:og_description) : 'Manage all your links in one place with Linkarooie.' %>
<%= tag.meta property: 'og:image', content: content_for?(:og_image) ? content_for(:og_image) : image_url('default_og_image.png') %>
<%= tag.meta property: 'og:image:alt', content: content_for?(:og_image_alt) ? content_for(:og_image_alt) : 'Default image description' %>
<%= tag.meta property: 'og:url', content: content_for?(:og_url) ? content_for(:og_url) : root_url %>
</head>

<body class="bg-gray-900 text-white">
Expand Down Expand Up @@ -52,18 +52,34 @@
<h1 class="text-1xl font-bold text-lime-200">Linkarooie</h1>
</div>
<nav>
<ul class="flex space-x-4 text-sm md:text-base">
<ul class="flex space-x-2 md:space-x-4 text-sm md:text-base items-center">
<li><%= link_to 'Loftwah', user_links_path('loftwah'), class: 'bg-lime-500 hover:bg-lime-700 text-white font-bold py-1 px-2 rounded' %></li>
<li><%= link_to 'Home', root_path, class: 'text-white hover:text-lime-300' %></li>
<% if user_signed_in? %>
<li><%= link_to 'My Public Page', user_links_path(current_user.username), class: 'text-white hover:text-lime-300' %></li>
<li><%= link_to 'Edit Links', links_path, class: 'text-white hover:text-lime-300' %></li>
<li><%= link_to 'Edit Achievements', achievements_path, class: 'text-white hover:text-lime-300' %></li>
<li><%= link_to 'Edit Profile', edit_user_registration_path, class: 'text-white hover:text-lime-300' %></li>
<li><%= link_to 'Logout', destroy_user_session_path, method: :delete, class: 'text-white hover:text-lime-300' %></li>
<li><%= link_to 'Public Page', user_links_path(current_user.username), class: 'text-white hover:text-lime-300' %></li>
<li class="relative">
<button id="userMenuBtn" class="text-white hover:text-lime-300 focus:outline-none flex items-center space-x-1">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
<div id="userMenu" class="absolute right-0 mt-2 w-48 bg-gray-700 rounded-md shadow-xl z-20 hidden">
<%= link_to 'Links', links_path, class: 'block px-4 py-2 text-sm text-white hover:bg-gray-600' %>
<%= link_to 'Achievements', achievements_path, class: 'block px-4 py-2 text-sm text-white hover:bg-gray-600' %>
<%= link_to 'Profile', edit_user_registration_path, class: 'block px-4 py-2 text-sm text-white hover:bg-gray-600' %>
<%= link_to 'Logout', destroy_user_session_path, method: :delete, class: 'block px-4 py-2 text-sm text-white hover:bg-gray-600' %>
</div>
</li>
<% else %>
<li><%= link_to 'Login', new_user_session_path, class: 'text-white hover:text-lime-300' %></li>
<% end %>
<li>
<a href="https://github.com/loftwah/linkarooie" target="_blank" rel="noopener noreferrer" class="text-white hover:text-lime-300">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.463-1.11-1.463-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.418 22 12c0-5.523-4.477-10-10-10z" />
</svg>
</a>
</li>
</ul>
</nav>
</div>
Expand All @@ -76,5 +92,23 @@
<p class="text-gray-400">© 2024 Linkarooie. All rights reserved.</p>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
const userMenuBtn = document.getElementById('userMenuBtn');
const userMenu = document.getElementById('userMenu');

if (userMenuBtn && userMenu) {
userMenuBtn.addEventListener('click', function() {
userMenu.classList.toggle('hidden');
});

document.addEventListener('click', function(event) {
if (!userMenuBtn.contains(event.target) && !userMenu.contains(event.target)) {
userMenu.classList.add('hidden');
}
});
}
});
</script>
</body>
</html>
29 changes: 27 additions & 2 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</div>
</section>


<!-- Features Section -->
<section id="features" class="py-16 w-full bg-gray-900">
<div class="text-center mb-12">
Expand Down Expand Up @@ -46,7 +47,31 @@
</div>
</section>

<!-- Call to Action Section -->
<!-- NEW: GitHub Call to Action Section -->
<section class="py-16 w-full bg-gray-800">
<div class="text-center">
<h2 class="text-3xl font-bold mb-4 text-white">Support Linkarooie</h2>
<p class="text-lg mb-8 text-gray-400">
Help us grow by supporting our open-source project!
</p>
<div class="flex flex-wrap justify-center gap-4">
<a href="https://github.com/loftwah/linkarooie" target="_blank" rel="noopener noreferrer" class="inline-flex items-center bg-gray-700 hover:bg-gray-600 text-white font-bold py-2 px-4 rounded transition duration-300">
<i class="fab fa-github mr-2"></i>
Star on GitHub
</a>
<a href="https://github.com/loftwah/linkarooie/fork" target="_blank" rel="noopener noreferrer" class="inline-flex items-center bg-gray-700 hover:bg-gray-600 text-white font-bold py-2 px-4 rounded transition duration-300">
<i class="fas fa-code-branch mr-2"></i>
Fork the Project
</a>
<a href="https://github.com/loftwah/linkarooie/issues" target="_blank" rel="noopener noreferrer" class="inline-flex items-center bg-gray-700 hover:bg-gray-600 text-white font-bold py-2 px-4 rounded transition duration-300">
<i class="fas fa-bug mr-2"></i>
Report Issues
</a>
</div>
</div>
</section>

<!-- Existing Call to Action Section -->
<section class="py-16 text-white w-full">
<div class="text-center">
<h2 class="text-3xl font-bold mb-4">Get Started with Linkarooie</h2>
Expand Down Expand Up @@ -91,4 +116,4 @@
</div>
</div>
</section>
</div>
</div>
Binary file modified public/uploads/og_images/loftwah_og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c56636

Please sign in to comment.