diff --git a/.github/workflows/rails.yml b/.github/workflows/rails.yml index 7636a9d..b081cb1 100644 --- a/.github/workflows/rails.yml +++ b/.github/workflows/rails.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby 2.6 uses: ruby/setup-ruby@v1 with: @@ -20,7 +20,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential libpq-dev nodejs \ libsqlite3-dev default-libmysqlclient-dev libxml2-dev - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-v2-${{ hashFiles('**/Gemfile.lock') }} @@ -30,7 +30,7 @@ jobs: env: RAILS_ENV: test run: | - gem install bundler + gem install bundler -v 2.4.21 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 RUBYOPT=-W0 bundle exec rake db:create diff --git a/Dockerfile b/Dockerfile index 7f69bd6..e5b1af1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ -FROM ruby:2.6.2-slim -RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libsqlite3-dev default-libmysqlclient-dev libxml2-dev +FROM ruby:2.6.8-slim-bullseye + +RUN apt-get update -y && \ + apt-get install -y build-essential libpq-dev nodejs libsqlite3-dev default-libmysqlclient-dev libxml2-dev WORKDIR /app diff --git a/app/assets/stylesheets/application.css.erb b/app/assets/stylesheets/application.css.erb index 1953999..ee553d8 100644 --- a/app/assets/stylesheets/application.css.erb +++ b/app/assets/stylesheets/application.css.erb @@ -69,9 +69,154 @@ body { margin-bottom:4rem!important; } +/*go to top button css */ +#back-to-top { + position: fixed; + bottom: 20px; + right: 20px; + background-color: #333; + color: #fff; + border-radius: 50%; + width: 40px; + height: 40px; + text-decoration : none; + text-align: center; + line-height: 40px; + cursor: pointer; + opacity: 0; + transition: opacity 0.5s; +} + +#back-to-top.show { + opacity: 1; +} + +#back-to-top:hover { + background-color: #555; +} + +#back-to-top:before { + content: "\f077"; + font-family: "FontAwesome"; +} + +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap'); + +.search-container { + display: flex; + justify-content: flex-end; + padding: 20px; +} + +.search-wrapper { + position: relative; + width: 250px; +} + +#searchInput { + width: 100%; + padding: 10px 15px 10px 40px; + font-size: 16px; + border: none; + border-bottom: 2px solid #3498db; + background-color: transparent; + outline: none; + transition: border-color 0.3s ease; +} + +#searchInput:focus { + border-color: #2980b9; +} + +.search-icon { + position: absolute; + left: 10px; + top: 50%; + transform: translateY(-50%); + color: #7f8c8d; +} + +.chapters-row { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 30px; + padding: 30px; +} + .chapter-card { - border: 1px solid #dee2e6 !important; - margin-bottom:3rem!important; + background-color: #ffffff; + border-radius: 12px; + overflow: hidden; + box-shadow: 0 10px 20px rgba(0,0,0,0.05); + transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); + height: 100%; + display: flex; + flex-direction: column; + font-family: 'Poppins', sans-serif; + position: relative; +} + +.chapter-card:hover { + transform: translateY(-5px); + box-shadow: 0 15px 30px rgba(0,0,0,0.1); +} + +.chapter-img-container { + position: relative; + overflow: hidden; + height: 200px; +} + +.chapter-img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.5s ease; +} + +.chapter-card:hover .chapter-img { + transform: scale(1.1); +} + +.card-body { + padding: 20px; + flex-grow: 1; + display: flex; + flex-direction: column; +} + +.card-title { + font-family: 'Montserrat', sans-serif; + font-size: 20px; + font-weight: 600; + margin: 0 0 10px; + color: #2c3e50; + letter-spacing: 0.5px; +} + +.card-text { + font-size: 14px; + font-family: 'Poppins', sans-serif; + font-weight: 400; + line-height: 1.5; + color: #34495e; + margin-bottom: 15px; +} + +.text-muted { + font-size: 13px; + color: #7f8c8d; +} + +.chapter-status { + position: absolute; + top: 15px; + right: 15px; + padding: 5px 10px; + border-radius: 20px; + font-size: 12px; + font-weight: 600; + text-transform: uppercase; } .chapter-active { @@ -82,27 +227,62 @@ body { background-image: radial-gradient(circle, rgba(255,102,102,0.1), rgba(255,102,102,0.6)); } -.chapter-zoom { - transform: scale(1.1); +.chapter-active .chapter-status { + background-color: #2ecc71; + color: white; } -.chapter-fixed-content { - position: fixed; +.chapter-inactive .chapter-status { + background-color: #e74c3c; + color: white; } -.chapter-img { - opacity: 0.9; +.chapter-details { + margin-top: auto; + display: flex; + justify-content: space-between; + align-items: center; + padding-top: 15px; + border-top: 1px solid #ecf0f1; +} + +.event-count { + display: flex; + align-items: center; +} + +.event-icon { + margin-right: 5px; + font-size: 16px; } -.chapter-hover figure { - opacity: 1; - -webkit-transition: .3s ease-in-out; - transition: .3s ease-in-out; +.learn-more { + background-color: #3498db; + color: white; + padding: 8px 15px; + border-radius: 20px; + text-decoration: none; + font-size: 13px; + font-weight: 600; + transition: background-color 0.3s ease; } -.chapter-hover figure:hover { - opacity: .6; + +.learn-more:hover { + background-color: #2980b9; } +.upcoming-events { + display: flex; + margin-top: 10px; + margin-bottom: 10px; +} + +.upcoming-events .event-icon { + margin-right: 8px; +} +.upcoming-events .text-muted { + color: #6c757d; +} /* Autocomplete JS */ .autocomplete-suggestions { border: 1px solid #999; background: #FFF; cursor: default; overflow: auto; -webkit-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64); -moz-box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64); box-shadow: 1px 4px 3px rgba(50, 50, 50, 0.64); } diff --git a/app/views/chapters/index.html.erb b/app/views/chapters/index.html.erb index f983107..eb5a949 100644 --- a/app/views/chapters/index.html.erb +++ b/app/views/chapters/index.html.erb @@ -1,43 +1,80 @@
<%= chapter.city %>,<% if chapter.state.present? && chapter.state!=chapter.city %> <%= chapter.state %>,<% end %> <%= chapter.country %>
-<%= pluralize(chapter.past_events.count, "Past event") %>
-<%= pluralize(chapter.upcoming_events.count, "Upcoming event") %>
- <%= link_to '', chapter_path(chapter), class:'stretched-link' %> -<%= chapter.city %>,<% if chapter.state.present? && chapter.state!=chapter.city %> <%= chapter.state %>,<% end %> <%= chapter.country %>
+