Skip to content

Commit

Permalink
fix: adjusts footer positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
abxsantos committed Jul 8, 2023
1 parent eac4331 commit 6d9cc3d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 17 deletions.
7 changes: 4 additions & 3 deletions eiger/templates/components/footer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<style>
footer {
position: fixed;
#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 2.5rem; /* Footer height */
}
</style>
<footer class="bg-light py-3">
<footer id="footer" class="bg-light py-3">
<div class="container">
<div class="row">
<div class="col-lg-12">
Expand Down
28 changes: 20 additions & 8 deletions eiger/templates/pages/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,30 @@
{% block title %}
{% endblock title %}
</title>
<style>
#page-container {
position: relative;
min-height: 100vh;
}

#content-wrap {
padding-bottom: 2.5rem; /* Footer height */
}
</style>
{% block style %}
{% endblock style %}
</head>
<body>
{% include 'components/navbar.html' %}
<main class="bg-white">
<div class="container my-4">
{% block content %}
{% endblock content %}
</div>
</main>
{% include 'components/footer.html' %}
<div id="page-container">
{% include 'components/navbar.html' %}
<main id="content-wrap" class="bg-white">
<div class="container my-4">
{% block content %}
{% endblock content %}
</div>
</main>
{% include 'components/footer.html' %}
</div>
<!-- Optional JavaScript -->
<!-- Popper.js first, then Bootstrap JS -->
<script src="https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion scripts/functional-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fi
# Remove any cache before the script:
pyclean

pytest -p no:cacheprovider tests/functional --cov=. \
pytest -p no:cacheprovider tests/functional \
--cov=. \
--cov=tests --cov-branch \
--cov-report=term-missing:skip-covered
2 changes: 1 addition & 1 deletion scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
pyclean

pytest tests/test_eiger \
-n auto --dist loadscope \
-n auto --dist worksteal \
--cov=. \
--cov=tests --cov-branch \
--cov-report=term-missing:skip-covered \
Expand Down
9 changes: 5 additions & 4 deletions tests/functional/test_trainer_update_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def fill_in_exercise_input(

def click_on_save_button(authenticated_browser: webdriver.Remote) -> None:
save_button = authenticated_browser.find_element(
by=By.CSS_SELECTOR, value='body > main > div > div > form > button'
by=By.CSS_SELECTOR,
value='body > div > main > div > div > form > button',
)
save_button.click()

Expand Down Expand Up @@ -117,7 +118,7 @@ def assert_pending_review_exercise_must_be_updated(
name_text = authenticated_browser.find_element(
by=By.CSS_SELECTOR,
value=(
'body > main > div > div > div > div:nth-child(1) >'
'body > div > main > div > div > div > div:nth-child(1) >'
' div:nth-child(2) > div.exercise-header > h4'
),
).text
Expand All @@ -127,7 +128,7 @@ def assert_pending_review_exercise_must_be_updated(
exercise_type_text = authenticated_browser.find_element(
by=By.CSS_SELECTOR,
value=(
'body > main > div > div > div > div:nth-child(1) >'
'body > div > main > div > div > div > div:nth-child(1) >'
' div:nth-child(2) > div.exercise-tags > span'
),
).text
Expand All @@ -137,7 +138,7 @@ def assert_pending_review_exercise_must_be_updated(
description_text = authenticated_browser.find_element(
by=By.CSS_SELECTOR,
value=(
'body > main > div > div > div > div:nth-child(1) >'
'body > div > main > div > div > div > div:nth-child(1) >'
' div:nth-child(2) > p.exercise-description'
),
).text
Expand Down

0 comments on commit 6d9cc3d

Please sign in to comment.