mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 21:05:15 +00:00
star tailwind css migration
This commit is contained in:
parent
93a778948f
commit
c1366d00bf
10 changed files with 46 additions and 18 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -37,3 +37,6 @@
|
|||
.env
|
||||
.env.*.local
|
||||
!.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 "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)
|
||||
railties (>= 6.0.0)
|
||||
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)
|
||||
thruster (0.1.14)
|
||||
thruster (0.1.14-aarch64-linux)
|
||||
|
|
@ -587,6 +596,8 @@ DEPENDENCIES
|
|||
sqlite3 (>= 2.1)
|
||||
stackprof
|
||||
stimulus-rails
|
||||
tailwindcss-rails (~> 4.2)
|
||||
tailwindcss-ruby (~> 4.1)
|
||||
thruster
|
||||
turbo-rails
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# 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 %>
|
||||
<%= stylesheet_link_tag :app %>
|
||||
<%= 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 %>
|
||||
</head>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,12 @@
|
|||
<div class="container">
|
||||
<% if current_user&.trust_level == "red" %>
|
||||
<div class="acct-convicted">
|
||||
<% if current_user&.trust_level != "red" %>
|
||||
<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>
|
||||
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>
|
||||
<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 %>
|
||||
<p class="super">
|
||||
<p class="italic underline mt-2">
|
||||
<%= @flavor_text %>
|
||||
</p>
|
||||
<h1 class="title">
|
||||
|
|
|
|||
20
bin/dev
20
bin/dev
|
|
@ -1,2 +1,18 @@
|
|||
#!/usr/bin/env ruby
|
||||
exec "./bin/rails", "server", *ARGV
|
||||
#!/usr/bin/env sh
|
||||
|
||||
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 "$@"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue