Skip to content

Commit

Permalink
Merge pull request #105 from loftwah/dl/font-awesome-fix-maybe
Browse files Browse the repository at this point in the history
Dl/font awesome fix maybe
  • Loading branch information
loftwah committed Sep 5, 2024
2 parents 74148a3 + 9ea2116 commit fd92776
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 89 deletions.
86 changes: 86 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/* General avatar styles */
.avatar-container {
width: 8rem;
height: 8rem;
overflow: hidden;
border-radius: 50%;
display: inline-block;
}

.avatar-image {
width: 100%;
height: 100%;
object-fit: cover;
}

/* Enhanced rainbow border animation */
@keyframes rainbow-border {
0% { box-shadow: 0 0 0 4px red, 0 0 10px red; }
14% { box-shadow: 0 0 0 4px orange, 0 0 10px orange; }
28% { box-shadow: 0 0 0 4px yellow, 0 0 10px yellow; }
42% { box-shadow: 0 0 0 4px green, 0 0 10px green; }
56% { box-shadow: 0 0 0 4px blue, 0 0 10px blue; }
70% { box-shadow: 0 0 0 4px indigo, 0 0 10px indigo; }
84% { box-shadow: 0 0 0 4px violet, 0 0 10px violet; }
100% { box-shadow: 0 0 0 4px red, 0 0 10px red; }
}

/* Enhanced rainbow overlay animation */
@keyframes rainbow-overlay {
0% { filter: hue-rotate(0deg) brightness(1); }
50% { filter: hue-rotate(180deg) brightness(1.2); }
100% { filter: hue-rotate(360deg) brightness(1); }
}

/* Pulsing animation */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}

.avatar-rainbow-border,
.avatar-rainbow-overlay {
animation: rainbow-border 5s linear infinite, pulse 2s ease-in-out infinite;
position: relative;
}

.avatar-rainbow-overlay::before {
content: '';
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
background: linear-gradient(45deg,
rgba(255,0,0,0.7),
rgba(255,165,0,0.7),
rgba(255,255,0,0.7),
rgba(0,128,0,0.7),
rgba(0,0,255,0.7),
rgba(75,0,130,0.7),
rgba(238,130,238,0.7)
);
border-radius: 50%;
z-index: 1;
animation: rainbow-overlay 5s linear infinite;
mix-blend-mode: overlay;
opacity: 0.8;
}

/* Border color styles */
.avatar-border-white,
.avatar-border-black,
.avatar-rainbow-border,
.avatar-rainbow-overlay {
border-radius: 50%;
overflow: hidden;
}

.avatar-border-white {
box-shadow: 0 0 0 4px white, 0 0 10px rgba(255,255,255,0.5);
}

.avatar-border-black {
box-shadow: 0 0 0 4px black, 0 0 10px rgba(0,0,0,0.5);
}
83 changes: 0 additions & 83 deletions app/assets/stylesheets/application.css.scss

This file was deleted.

6 changes: 5 additions & 1 deletion app/javascript/entrypoints/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import "chartkick/chart.js";
import "flowbite";

// Import your stylesheet
import "../../assets/stylesheets/application.css.scss";
import "../../assets/stylesheets/application.css";
import "../../assets/stylesheets/application.tailwind.css";

// Import Font Awesome JS and CSS
import '@fortawesome/fontawesome-free/js/all.min.js';
import '@fortawesome/fontawesome-free/css/all.min.css';

Rails.start();

console.log('Vite ⚡️ Rails');
Expand Down
2 changes: 0 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<%= vite_client_tag %>
<%= vite_javascript_tag 'application' %>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<!-- Generic Open Graph Meta Tags (for general application pages) -->
<%= tag.meta property: 'og:type', content: 'website' %>
<%= tag.meta property: 'og:site_name', content: 'Linkarooie' %>
Expand Down
19 changes: 17 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"flowbite": "^2.4.1"
},
"devDependencies": {
"sass": "^1.78.0",
"vite": "^5.3.5",
"vite-plugin-ruby": "^5.0.0"
}
Expand Down

0 comments on commit fd92776

Please sign in to comment.