From 8255df16d9d3f89cb388ca6a58fb24d879a60abb Mon Sep 17 00:00:00 2001 From: Andrew Njoo Date: Sat, 19 Oct 2024 01:51:54 -0500 Subject: [PATCH] layout --- .github/workflows/ci.yml | 94 +++++++++++++------------- app/views/layouts/_footer.html.erb | 6 ++ app/views/layouts/_navbar.html.erb | 13 ++++ app/views/layouts/application.html.erb | 5 +- app/views/pages/about.erb | 20 ++++++ app/views/pages/home.html.erb | 26 +------ config/routes.rb | 2 + 7 files changed, 93 insertions(+), 73 deletions(-) create mode 100644 app/views/layouts/_footer.html.erb create mode 100644 app/views/layouts/_navbar.html.erb create mode 100644 app/views/pages/about.erb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39274a4..b3d68df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,50 +53,50 @@ jobs: - name: Lint code for consistent style run: bin/rubocop -f github - test: - runs-on: ubuntu-latest - skip: true - - services: - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 - - # redis: - # image: redis - # ports: - # - 6379:6379 - # options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Install packages - run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libjemalloc2 libvips postgresql-client - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true - - - name: Run tests - env: - RAILS_ENV: test - DATABASE_URL: postgres://postgres:postgres@localhost:5432 - # REDIS_URL: redis://localhost:6379/0 - run: bin/rails db:test:prepare test test:system - - - name: Keep screenshots from failed system tests - uses: actions/upload-artifact@v4 - if: failure() - with: - name: screenshots - path: ${{ github.workspace }}/tmp/screenshots - if-no-files-found: ignore + # test: + # runs-on: ubuntu-latest + # skip: true + + # services: + # postgres: + # image: postgres + # env: + # POSTGRES_USER: postgres + # POSTGRES_PASSWORD: postgres + # ports: + # - 5432:5432 + # options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 + + # # redis: + # # image: redis + # # ports: + # # - 6379:6379 + # # options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 + + # steps: + # - name: Install packages + # run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libjemalloc2 libvips postgresql-client + + # - name: Checkout code + # uses: actions/checkout@v4 + + # - name: Set up Ruby + # uses: ruby/setup-ruby@v1 + # with: + # ruby-version: .ruby-version + # bundler-cache: true + + # - name: Run tests + # env: + # RAILS_ENV: test + # DATABASE_URL: postgres://postgres:postgres@localhost:5432 + # # REDIS_URL: redis://localhost:6379/0 + # run: bin/rails db:test:prepare test test:system + + # - name: Keep screenshots from failed system tests + # uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: screenshots + # path: ${{ github.workspace }}/tmp/screenshots + # if-no-files-found: ignore diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb new file mode 100644 index 0000000..78ae335 --- /dev/null +++ b/app/views/layouts/_footer.html.erb @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb new file mode 100644 index 0000000..4d2f081 --- /dev/null +++ b/app/views/layouts/_navbar.html.erb @@ -0,0 +1,13 @@ + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 29d8c40..94affef 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -19,8 +19,11 @@ -
+ <%= render "layouts/navbar" %> +
<%= yield %> +
+ <%= render "layouts/footer" %> diff --git a/app/views/pages/about.erb b/app/views/pages/about.erb new file mode 100644 index 0000000..3dd3043 --- /dev/null +++ b/app/views/pages/about.erb @@ -0,0 +1,20 @@ +
+

About Us

+

We are a dedicated team committed to delivering the best services to our customers. Our mission is to create innovative solutions that enhance user experiences.

+

Our Mission

+

To provide high-quality products that improve the lives of our customers and foster a culture of innovation and excellence.

+

Our Values

+
    +
  • Integrity
  • +
  • Innovation
  • +
  • Customer Satisfaction
  • +
  • Teamwork
  • +
+

Meet the Team

+
+
+

Drew Njoo

+

CEO

+
+
+
diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb index e2072ee..9fa1aea 100644 --- a/app/views/pages/home.html.erb +++ b/app/views/pages/home.html.erb @@ -1,21 +1,4 @@ -
- -
-
-
- XBrand -
- -
-
- +
@@ -50,12 +33,5 @@
- - -
diff --git a/config/routes.rb b/config/routes.rb index 264f281..8b32481 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html root to: "pages#home" + get "about" => "pages#about" + namespace :api do get "/hello", to: proc { [ 200, { "Content-Type" => "application/json" }, [ '{"message":"Hello, World!"}' ] ] } end