Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage Modified #31

Merged
merged 3 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions app/assets/stylesheets/pages/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
background-position: center;
padding: 2.5rem 8rem;

&__header-logo {
width: 14rem;
height: 5.5rem;

@media (min-width: 380px) {
width: 20rem;
height: 8rem;
}
}

&__body {
margin-top: 22rem;
letter-spacing: -0.05rem;
Expand Down Expand Up @@ -82,23 +92,13 @@
@include media-breakpoint-down(xl) {
#home {
padding: 2.5rem 6rem;

&__header-logo {
width: 280px;
height: 120px;
}
}
}

// * 991.98px (lg)
@include media-breakpoint-down(lg) {
#home {
padding: 2.2rem 5rem;

&__header-logo {
width: 250px;
height: 100px;
}
}
}

Expand All @@ -113,10 +113,5 @@
@include media-breakpoint-down(sm) {
#home {
padding: 1.5rem 2rem;

&__header-logo {
width: 230px;
height: 90px;
}
}
}
4 changes: 2 additions & 2 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div id="home">
<div id="home__header" class="text-center">
<%= image_tag("fmb-logo-full.png", width: "320", height: "130", alt: "FMB logo", id: "home__header-logo") %>
<%= image_tag("fmb-logo-full.png", alt: "FMB logo", id: "home__header-logo") %>
</div>

<div id="home__body">
<h5 id="home__body_primary-heading" class="heading text-start text-uppercase text-primary">Thaali tracking, simplified</h5>
<h2 id="home__body_secondary-heading" class="heading text-start text-secondary">Manage your thaalis & transactions effortlessly with real-time statistics</h2>

<%= link_to "Free demo", login_path, id: "home__body_cta", class: "btn rounded-pill border border-0 fs-5 px-4 py-2" %>
<%= link_to "Free demo", login_path, id: "home__body_cta", class: "btn rounded-pill border border-0 fs-4 px-5 py-2" %>
</div>
</div>
4 changes: 3 additions & 1 deletion app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<% content_for :title, "Login" %>

<%# * Heading %>
<h2 class="heading fs-1">Faiz al-Mawaid al-Burhaniyah</h2>
<div class="text-center">
<%= image_tag("fmb-logo-full.png", alt: "FMB logo", id: "home__header-logo") %>
</div>

<%# * Login Form %>
<%= render "form" %>
4 changes: 4 additions & 0 deletions spec/features/sessions/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

it { expect(page).to have_title "Login" }

it "logo" do
expect(page).to have_css("img[src*='fmb-logo-full']")
end

it "shows footer" do
expect(page).to have_css("#footer")
end
Expand Down