diff --git a/app/controllers/subscriptions_controller.rb b/app/controllers/subscriptions_controller.rb index 6b3ce70..22a98b2 100644 --- a/app/controllers/subscriptions_controller.rb +++ b/app/controllers/subscriptions_controller.rb @@ -1,9 +1,10 @@ class SubscriptionsController < ApplicationController - before_action :authenticate_user! + # before_action :authenticate_user! def index - if current_user.subscriptions.active.any? - redirect_to account_manager_url and return - end + # if current_user.subscriptions.active.any? + # redirect_to account_manager_url and return + # end + end def success diff --git a/app/javascript/controllers/clock_controller.js b/app/javascript/controllers/clock_controller.js new file mode 100644 index 0000000..c65229e --- /dev/null +++ b/app/javascript/controllers/clock_controller.js @@ -0,0 +1,41 @@ +import { Controller } from "@hotwired/stimulus"; + +// Connects to data-controller="clock" +export default class extends Controller { + static targets = ["central", "sydney", "islamabad"]; + + connect() { + this.updateTimes(); + this.timer = setInterval(() => this.updateTimes(), 1000); + } + + disconnect() { + clearInterval(this.timer); + } + + updateTimes() { + // Define time zones + const centralTimeOptions = { timeZone: "America/Chicago", hour12: true }; + const sydneyTimeOptions = { timeZone: "Australia/Sydney", hour12: true }; + const islamabadTimeOptions = { timeZone: "Asia/Karachi", hour12: true }; + + // Get current times + const centralTime = new Date().toLocaleTimeString( + "en-US", + centralTimeOptions + ); + const sydneyTime = new Date().toLocaleTimeString( + "en-US", + sydneyTimeOptions + ); + const islamabadTime = new Date().toLocaleTimeString( + "en-US", + islamabadTimeOptions + ); + + // Update the HTML elements with the current times + this.centralTarget.innerText = `${centralTime}`; + this.sydneyTarget.innerText = `${sydneyTime}`; + this.islamabadTarget.innerText = `${islamabadTime}`; + } +} diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb new file mode 100644 index 0000000..70f6cd8 --- /dev/null +++ b/app/views/layouts/_footer.html.erb @@ -0,0 +1,116 @@ + + + diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index a0ce5cd..fc526ff 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -1,24 +1,23 @@ - ArtSmith + ArtSmith - - - - Home + + + Home - + - Features - <% @features = [ { @@ -50,10 +49,10 @@ <% @features.each do |i| %> - - <%= i[:name] %> + + <%= i[:name] %> - <%= i[:description] %> + <%= i[:description] %> <% end %> @@ -63,33 +62,33 @@ - - Pricing + + Pricing - - + + - - + + <% if user_signed_in? %> - + <%= current_user.email.gsub(/@.*/, '') %> - <%= link_to 'Edit Password', edit_password_change_path, class: 'dropdown-item' %> + <%= link_to 'Edit Password', edit_password_change_path, class: 'dropdown-item fs-3' %> - <%= link_to 'Log out', session_path, class: 'dropdown-item', data: { turbo_method: :delete } %> + <%= link_to 'Log out', session_path, class: 'dropdown-item fs-3', data: { turbo_method: :delete } %> <% else %> - Get Started - <%= link_to 'Log In', new_session_path, class: 'dropdown-item' %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7639999..147fa64 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -19,6 +19,7 @@ <%= alert %> <% end %> <%= yield %> + <%= render "layouts/footer" %>
<%= i[:description] %>