Skip to content

Commit

Permalink
IP-310: In the problem page, the user sees a 'submit your solution' b…
Browse files Browse the repository at this point in the history
…utton. Upon clicking, they see the form or they are taken to the login page. After login they should be redirected.
  • Loading branch information
papandrk committed Dec 16, 2024
1 parent ed96279 commit 13bfb60
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions resources/assets/sass/problem/show-page.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import "bootstrap_4point6_custom_xxl"; // this page uses custom styles to support one more bootstrap size: xxl from 1260px and UP

#single-problem-page {
position: relative;

#single-problem-overview,
.row.problem-description {
padding-bottom: 3.25rem;
Expand Down Expand Up @@ -63,6 +65,35 @@
padding: unset;
}
}

#propose-solution-cta-sticky-container {
&.sticky-container-outer-column {
position: absolute;
top: 30px;
right: 60px;
height: 100%;
z-index: 10;
}

.sticky-container-inner-div {
position: sticky;
top: 8rem;

.propose-solution-cta {
padding: 1.25rem 1.5rem;
width: 19rem;
background-color: var(--clr-primary-white);
border: none;
-webkit-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1), 0 4px 4px rgba(0, 0, 0, 0.25);
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1), 0 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 20px;
}
}

h3 {
font-size: 1.5rem;
}
}
}

// from "sm" and UP
Expand Down
11 changes: 11 additions & 0 deletions resources/views/problem/partials/propose-solution-cta.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="propose-solution-cta">
<h3 class="mb-3 text-center">
Have a solution to suggest?
</h3>
<div class="d-flex justify-content-center">
<button type="button" title="Propose a Solution" class="btn btn-primary call-to-action align"
onclick="let currentUrl = window.location.href; if (!currentUrl.endsWith('/')) {currentUrl += '/';} window.location.href = currentUrl + 'solutions/propose';">
Propose a Solution
</button>
</div>
</div>
6 changes: 6 additions & 0 deletions resources/views/problem/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
@include('problem.partials.solutions-list')
</section>

<section id="propose-solution-cta-sticky-container" class="sticky-container-outer-column d-none d-sm-block">
<div class="sticky-container-inner-div">
@include('problem.partials.propose-solution-cta')
</div>
</section>

</div>

@if (App::environment('local'))
Expand Down

0 comments on commit 13bfb60

Please sign in to comment.