From b1dc56aeb78cbb28273de6aba82926b43d0944a0 Mon Sep 17 00:00:00 2001 From: Christa Hartsock Date: Fri, 6 Oct 2023 20:30:01 -0700 Subject: [PATCH] spoopy --- .../stylesheets/application.tailwind.css | 28 ++++++++++-------- app/assets/stylesheets/cursors.css.erb | 6 ++++ app/models/site_theme.rb | 13 ++++---- app/views/devise/confirmations/new.html.erb | 2 +- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/passwords/new.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 2 +- app/views/devise/unlocks/new.html.erb | 2 +- app/views/layouts/application.html.erb | 18 +++++------ app/views/profile/edit.html.erb | 2 +- app/views/profile/show.html.erb | 2 +- app/views/topics/_table.html.erb | 4 +-- app/views/topics/index.html.erb | 10 +++---- app/views/topics/mentions.html.erb | 2 +- app/views/topics/new.html.erb | 2 +- app/views/topics/starred.html.erb | 2 +- app/views/users/index.html.erb | 6 ++-- app/views/users/invitations/edit.html.erb | 2 +- app/views/users/invitations/new.html.erb | 2 +- config/tailwind.config.js | 8 +++-- public/{ => cursors}/flower_cursor.png | Bin public/cursors/halloween/bat.png | Bin 0 -> 4286 bytes public/cursors/halloween/candycorn.png | Bin 0 -> 766 bytes public/cursors/halloween/cathat.png | Bin 0 -> 4286 bytes public/cursors/halloween/pumpkin.png | Bin 0 -> 4286 bytes public/cursors/halloween/skull.png | Bin 0 -> 4286 bytes 26 files changed, 64 insertions(+), 53 deletions(-) create mode 100644 app/assets/stylesheets/cursors.css.erb rename public/{ => cursors}/flower_cursor.png (100%) create mode 100644 public/cursors/halloween/bat.png create mode 100644 public/cursors/halloween/candycorn.png create mode 100644 public/cursors/halloween/cathat.png create mode 100644 public/cursors/halloween/pumpkin.png create mode 100644 public/cursors/halloween/skull.png diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 4298166..14402e9 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -1,3 +1,5 @@ +@import "./cursors.css"; + @tailwind base; @tailwind components; @tailwind utilities; @@ -7,31 +9,39 @@ @apply py-1 px-2 rounded-sm bg-primary-200; } .btn:hover { - @apply bg-secondary-100; + @apply bg-secondary-900 text-white; } .btn-cta { - @apply py-1 px-2 rounded-sm bg-secondary-100; + @apply py-1 px-2 rounded-sm bg-secondary-900 text-white; } .btn-cta:hover { - @apply bg-secondary-200; + @apply bg-secondary-700 text-white; } .btn-sm { @apply py-0.5 px-1 rounded-sm text-sm bg-primary-200; } .btn-sm:hover { - @apply bg-secondary-100; + @apply bg-secondary-900 text-white; } .link { - @apply underline text-black; + @apply underline text-white; } .link:hover { @apply text-primary-400; } + .link--dark { + @apply underline text-secondary-900; + } + + .link--dark:hover { + @apply underline text-secondary-700; + } + .link--light { - @apply underline text-black bg-primary-400 px-1; + @apply underline text-white bg-primary-400 px-1; } .link--light:hover { @@ -39,12 +49,6 @@ } } -body { - cursor: url(flower_cursor.png), auto; -} -a, button { - cursor: url(flower_cursor.png), pointer; -} table a:hover { text-decoration: underline; } diff --git a/app/assets/stylesheets/cursors.css.erb b/app/assets/stylesheets/cursors.css.erb new file mode 100644 index 0000000..aca14a4 --- /dev/null +++ b/app/assets/stylesheets/cursors.css.erb @@ -0,0 +1,6 @@ +body { + cursor: url(<%= Dir[ './public/cursors/halloween/**/*' ].sample.split('/').last(3).join('/') %>), auto; +} +a, button { + cursor: url(<%= Dir[ './public/cursors/halloween/**/*' ].sample.split('/').last(3).join('/') %>), pointer; +} \ No newline at end of file diff --git a/app/models/site_theme.rb b/app/models/site_theme.rb index 4fcb7ef..5009eea 100644 --- a/app/models/site_theme.rb +++ b/app/models/site_theme.rb @@ -1,14 +1,11 @@ class SiteTheme def self.pick_color(number) color_wheel = %w[ - bg-fuchsia-100 - bg-orange-100 - bg-yellow-100 - bg-lime-100 - bg-teal-100 - bg-lime-100 - bg-yellow-100 - bg-orange-100 + bg-amber-600 + bg-amber-500 + bg-amber-400 + bg-amber-300 + bg-amber-200 ] index = number % color_wheel.length diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 3c88288..d62011a 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -1,6 +1,6 @@ <% title("Confirm account") %> -

resend confirmation instructions

+

resend confirmation instructions

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 37164ec..a4d4ff4 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,6 +1,6 @@ <% title("Change password") %> -

change your password

+

change your password

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }, class: "py-3") do |f| %> <%= render "devise/shared/error_messages", resource: resource %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 1a5fc3b..0863f45 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,6 +1,6 @@ <% title("Forgot password") %> -

forgot your password?

+

forgot your password?

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index b98584a..fe1942c 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,6 +1,6 @@ <% title("Log in") %> -

log in

+

log in

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index acc7d9c..b60c8af 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -1,6 +1,6 @@ <% title("Unlock account") %> -

resend unlock instructions

+

resend unlock instructions

<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index cf1f5b4..6e299e8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,22 +16,22 @@
-

<%= notice %>

-

<%= alert %>

+

<%= notice %>

+

<%= alert %>

<%= yield %> diff --git a/app/views/profile/edit.html.erb b/app/views/profile/edit.html.erb index ae7b201..5db2c04 100644 --- a/app/views/profile/edit.html.erb +++ b/app/views/profile/edit.html.erb @@ -1,6 +1,6 @@ <% title("Edit profile") %> -

editing <%= @profile.user.username %>'s profile

+

editing <%= @profile.user.username %>'s profile

<%= form_with model: @profile, url: profile_path(@profile.user) do |f| %> <%= render 'shared/errors', errors: @profile.errors %> diff --git a/app/views/profile/show.html.erb b/app/views/profile/show.html.erb index a78c49f..5edce73 100644 --- a/app/views/profile/show.html.erb +++ b/app/views/profile/show.html.erb @@ -1,7 +1,7 @@ <% title("@#{@profile.user.username}'s Profile") %> <% if Rails.configuration.x.invitations.enabled && current_user.has_invites_available? %> -
+
hello, you have an invite available! care to <%= link_to 'invite someone', new_user_invitation_path, class: 'link' %>?
<% end %> diff --git a/app/views/topics/_table.html.erb b/app/views/topics/_table.html.erb index 1a94640..16724ed 100644 --- a/app/views/topics/_table.html.erb +++ b/app/views/topics/_table.html.erb @@ -1,6 +1,6 @@ - + @@ -14,7 +14,7 @@ <% views_for_topic = topic_views[topic.id] %> <% unread_posts = unread_posts?(topic, views_for_topic) %> - +
📜notices title
<% if unread_mentions?(mentions[topic.id], views_for_topic) %> 👀 diff --git a/app/views/topics/index.html.erb b/app/views/topics/index.html.erb index d4e9760..f3569f2 100644 --- a/app/views/topics/index.html.erb +++ b/app/views/topics/index.html.erb @@ -3,16 +3,16 @@
<%= link_to root_path do %> -

topics

+

topics

<% end %> <%= link_to "new topic", new_topic_path, class: "btn inline-block" %>
-
- forum-wide pinned posts +
+ forum-wide pinned posts - + @@ -25,7 +25,7 @@ <% views_for_topic = @topic_views[topic.id] %> <% unread_posts = unread_posts?(topic, views_for_topic) %> - + diff --git a/app/views/topics/mentions.html.erb b/app/views/topics/mentions.html.erb index 822ae3d..035c520 100644 --- a/app/views/topics/mentions.html.erb +++ b/app/views/topics/mentions.html.erb @@ -1,7 +1,7 @@ <% title("Mentions") %>
-

topics you've been mentioned in

+

topics you've been mentioned in

<%= link_to "new topic", new_topic_path, class: "btn inline-block" %>
diff --git a/app/views/topics/new.html.erb b/app/views/topics/new.html.erb index 597beeb..abfc9e5 100644 --- a/app/views/topics/new.html.erb +++ b/app/views/topics/new.html.erb @@ -1,6 +1,6 @@ <% title("New topic") %> -

new topic

+

new topic

<%= form_with model: @topic, class: "py-2" do |f| %> <%= render 'shared/errors', errors: @topic.errors if @topic.errors.any? %> diff --git a/app/views/topics/starred.html.erb b/app/views/topics/starred.html.erb index a9246d8..8285a8b 100644 --- a/app/views/topics/starred.html.erb +++ b/app/views/topics/starred.html.erb @@ -1,7 +1,7 @@ <% title("Starred topics") %>
-

topics you've starred

+

topics you've starred

<%= link_to "new topic", new_topic_path, class: "btn inline-block" %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 158d876..68c3a6a 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,12 +1,12 @@ <% title("Directory") %>
-

the poster list

+

the poster list

title
<%= link_to topic.title, topic_path(topic) %> <%= '(unread)' if unread_posts %>
- + @@ -14,7 +14,7 @@ <% @users.each_with_index do |user, index| %> - + <% if user.invited_by.present? %>
username joined
<%= link_to user.username, profile_path(user) %>