Skip to content

Commit

Permalink
Merge pull request #99 from loftwah/revert-93-dl/support-the-gays
Browse files Browse the repository at this point in the history
Revert "fix css and get some animation"
  • Loading branch information
loftwah authored Sep 3, 2024
2 parents bc52a57 + 2aadbea commit bbc1dd8
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 1,089 deletions.
26 changes: 1 addition & 25 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
/* Import Font Awesome */
@import "font-awesome/scss/font-awesome";

/* Import Tailwind CSS */
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

/* Your custom animations and styles */
@keyframes rainbow {
0%, 100% { border-color: red; }
14% { border-color: orange; }
28% { border-color: yellow; }
42% { border-color: green; }
56% { border-color: blue; }
70% { border-color: indigo; }
84% { border-color: violet; }
}

.animated-border {
border-width: 4px;
border-style: solid;
animation: rainbow 6s linear infinite;
border-radius: 50%; /* Ensure the avatar remains circular */
}
@import "font-awesome";
4 changes: 1 addition & 3 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ def avatar_border_class(border_preference)
'border-4 border-white'
when 'black'
'border-4 border-black'
when 'rainbow'
'animated-border'
else
''
end
end
end

def format_referrer(referrer)
return 'Direct' if referrer.blank?
Expand Down
3 changes: 0 additions & 3 deletions app/javascript/entrypoints/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import Rails from "@rails/ujs";
import "chartkick/chart.js";
import "flowbite";

import "../../assets/stylesheets/application.css.scss";
import "../../assets/stylesheets/application.tailwind.css";

Rails.start();

console.log('Vite ⚡️ Rails');
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class User < ApplicationRecord
validates :username, uniqueness: true, allow_blank: true
validates :full_name, presence: true
validate :ensure_username_presence
validates :avatar_border, inclusion: { in: ['white', 'black', 'none', 'rainbow'] }
validates :avatar_border, inclusion: { in: ['white', 'black', 'none'] }

after_save :generate_open_graph_image, unless: -> { Rails.env.test? }
after_save :download_and_store_avatar
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div>
<%= f.label :avatar_border, class: 'block text-lime-200 font-semibold mb-2' %>
<%= f.select :avatar_border, options_for_select([['White', 'white'], ['Black', 'black'], ['None', 'none'], ['Rainbow', 'rainbow']], @user.avatar_border), {}, class: 'block w-full px-4 py-2 border border-gray-700 rounded bg-gray-900 text-white focus:outline-none focus:border-lime-500' %>
<%= f.select :avatar_border, options_for_select([['White', 'white'], ['Black', 'black'], ['None', 'none']], @user.avatar_border), {}, class: 'block w-full px-4 py-2 border border-gray-700 rounded bg-gray-900 text-white focus:outline-none focus:border-lime-500' %>
</div>

<div>
Expand Down
11 changes: 5 additions & 6 deletions config/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const defaultTheme = require('tailwindcss/defaultTheme');
const defaultTheme = require('tailwindcss/defaultTheme')

module.exports = {
darkMode: 'media',
Expand All @@ -7,8 +7,7 @@ module.exports = {
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*.{erb,haml,html,slim}',
'./node_modules/flowbite/**/*.js',
'./app/assets/stylesheets/**/*.{css,scss}', // Make sure all CSS and SCSS files are included
'./node_modules/flowbite/**/*.js'
],
theme: {
extend: {
Expand All @@ -21,6 +20,6 @@ module.exports = {
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/container-queries'),
require('flowbite/plugin'),
],
};
require('flowbite/plugin')
]
}
Loading

0 comments on commit bbc1dd8

Please sign in to comment.