mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
star tailwind css migration
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,3 +37,6 @@
|
|||||||
.env
|
.env
|
||||||
.env.*.local
|
.env.*.local
|
||||||
!.env.example
|
!.env.example
|
||||||
|
|
||||||
|
/app/assets/builds/*
|
||||||
|
!/app/assets/builds/.keep
|
||||||
|
|||||||
4
Gemfile
4
Gemfile
@@ -133,3 +133,7 @@ gem "htmlcompressor", "~> 0.4.0"
|
|||||||
gem "doorkeeper", "~> 5.8"
|
gem "doorkeeper", "~> 5.8"
|
||||||
|
|
||||||
gem "autotuner", "~> 1.0"
|
gem "autotuner", "~> 1.0"
|
||||||
|
|
||||||
|
gem "tailwindcss-ruby", "~> 4.1"
|
||||||
|
|
||||||
|
gem "tailwindcss-rails", "~> 4.2"
|
||||||
|
|||||||
11
Gemfile.lock
11
Gemfile.lock
@@ -490,6 +490,15 @@ GEM
|
|||||||
stimulus-rails (1.3.4)
|
stimulus-rails (1.3.4)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
stringio (3.1.7)
|
stringio (3.1.7)
|
||||||
|
tailwindcss-rails (4.2.3)
|
||||||
|
railties (>= 7.0.0)
|
||||||
|
tailwindcss-ruby (~> 4.0)
|
||||||
|
tailwindcss-ruby (4.1.10)
|
||||||
|
tailwindcss-ruby (4.1.10-aarch64-linux-gnu)
|
||||||
|
tailwindcss-ruby (4.1.10-aarch64-linux-musl)
|
||||||
|
tailwindcss-ruby (4.1.10-arm64-darwin)
|
||||||
|
tailwindcss-ruby (4.1.10-x86_64-linux-gnu)
|
||||||
|
tailwindcss-ruby (4.1.10-x86_64-linux-musl)
|
||||||
thor (1.3.2)
|
thor (1.3.2)
|
||||||
thruster (0.1.14)
|
thruster (0.1.14)
|
||||||
thruster (0.1.14-aarch64-linux)
|
thruster (0.1.14-aarch64-linux)
|
||||||
@@ -587,6 +596,8 @@ DEPENDENCIES
|
|||||||
sqlite3 (>= 2.1)
|
sqlite3 (>= 2.1)
|
||||||
stackprof
|
stackprof
|
||||||
stimulus-rails
|
stimulus-rails
|
||||||
|
tailwindcss-rails (~> 4.2)
|
||||||
|
tailwindcss-ruby (~> 4.1)
|
||||||
thruster
|
thruster
|
||||||
turbo-rails
|
turbo-rails
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
|
|||||||
2
Procfile.dev
Normal file
2
Procfile.dev
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
web: bin/rails server -b 0.0.0.0
|
||||||
|
css: bin/rails tailwindcss:watch
|
||||||
@@ -40,7 +40,7 @@ $ docker compose run --service-ports web /bin/bash
|
|||||||
app# bin/rails db:create db:schema:load db:seed
|
app# bin/rails db:create db:schema:load db:seed
|
||||||
|
|
||||||
# Now start up the app:
|
# Now start up the app:
|
||||||
app# bin/rails s -b 0.0.0.0
|
app# bin/dev
|
||||||
# This hosts the server on your computer w/ default port 3000
|
# This hosts the server on your computer w/ default port 3000
|
||||||
|
|
||||||
# Want to do other things?
|
# Want to do other things?
|
||||||
|
|||||||
0
app/assets/builds/.keep
Normal file
0
app/assets/builds/.keep
Normal file
1
app/assets/tailwind/application.css
Normal file
1
app/assets/tailwind/application.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
@@ -134,6 +134,8 @@
|
|||||||
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
||||||
<%= stylesheet_link_tag :app %>
|
<%= stylesheet_link_tag :app %>
|
||||||
<%= javascript_importmap_tags %>
|
<%= javascript_importmap_tags %>
|
||||||
|
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||||
|
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
||||||
<%= Sentry.get_trace_propagation_meta.html_safe %>
|
<%= Sentry.get_trace_propagation_meta.html_safe %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,12 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<% if current_user&.trust_level == "red" %>
|
<% if current_user&.trust_level != "red" %>
|
||||||
<div class="acct-convicted">
|
<div class="text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg p-4 text-center">
|
||||||
<strong>Hold up!</strong> Your account has been flagged for suspicious activity.<br>
|
<strong>Hold up!</strong> Your account has been flagged for suspicious activity.<br>
|
||||||
This means that you are no longer included in the public leaderboards.<br>
|
This means that you are no longer included in the public leaderboards.<br>
|
||||||
If this was a mistake, please email <a href="mailto:echo@hackclub.com">echo@hackclub.com</a>.
|
If this was a mistake, please email <a href="mailto:echo@hackclub.com" class="underline text-red-600">echo@hackclub.com</a>.
|
||||||
</div>
|
</div>
|
||||||
<style>
|
|
||||||
.acct-convicted {
|
|
||||||
color: #ff6467;
|
|
||||||
background: color-mix(in oklab, rgb(251, 44, 54) 10%, transparent);
|
|
||||||
border: 2px solid color-mix(in oklab, rgb(251, 44, 54) 20%, transparent);
|
|
||||||
padding: 1em;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<p class="super">
|
<p class="italic underline mt-2">
|
||||||
<%= @flavor_text %>
|
<%= @flavor_text %>
|
||||||
</p>
|
</p>
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
|
|||||||
20
bin/dev
20
bin/dev
@@ -1,2 +1,18 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env sh
|
||||||
exec "./bin/rails", "server", *ARGV
|
|
||||||
|
if ! gem list foreman -i --silent; then
|
||||||
|
echo "Installing foreman..."
|
||||||
|
gem install foreman
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default to port 3000 if not specified
|
||||||
|
export PORT="${PORT:-3000}"
|
||||||
|
|
||||||
|
# Let the debug gem allow remote connections,
|
||||||
|
# but avoid loading until `debugger` is called
|
||||||
|
export RUBY_DEBUG_OPEN="true"
|
||||||
|
export RUBY_DEBUG_LAZY="true"
|
||||||
|
|
||||||
|
# Use Procfile.dev, ensure web process binds to 0.0.0.0
|
||||||
|
# (Procfile.dev should have: web: bin/rails server -b 0.0.0.0)
|
||||||
|
exec foreman start -f Procfile.dev "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user