Skip to content

Home Information - Your home, your data, organized.

Python

Improved the interstitial page layout with CSS media queries. (#23)

Tony Ceb59d90871dc
diff --git a/src/hi/static/css/main.css b/src/hi/static/css/main.css
index 6da46211..115b66b6 100644
--- a/src/hi/static/css/main.css
+++ b/src/hi/static/css/main.css
@@ -168,27 +168,65 @@ a.underline:visited {
background-color: var(--muted-color) !important;
}
-.hi-interstitial-page {
- background: linear-gradient(to bottom, #f9f9f9, #ffffff);
+.interstitial-page {
display: flex;
- flex-direction: column;
+ flex-wrap: wrap;
justify-content: center;
- align-items: center;
- height: 100vh;
- text-align: center;
- position: relative;
+ gap: 1rem;
+ max-width: 1200px;
+ margin: auto;
}
-.hi-start-heading {
- position: absolute;
- top: 2rem;
+
+.interstitial-header {
+ padding: 2rem;
+ text-align: center;
}
-.hi-interstitial-page-content {
- background: white;
- border-radius: 8px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- padding: 20px;
- max-width: 400px;
- z-index: 1;
+.interstitial-body {
+ padding: 1rem;
+ text-align: center;
+ border: 1px solid #ccc;
+ background-color: #f4f4f4;
+}
+
+
+/* Phone Portrait */
+@media (max-width: 600px) {
+ .interstitial-page {
+ flex-direction: column;
+ }
+ .interstitial-header {
+ width: 75%;
+ }
+ .interstitial-body {
+ width: 100%;
+ }
+}
+
+/* Phone Landscape (Side-by-Side) */
+@media (min-aspect-ratio: 16/9) {
+ .interstitial-page {
+ flex-direction: row;
+ margin-top: 1rem;
+ }
+ .interstitial-header {
+ width: 30%;
+ }
+ .interstitial-body {
+ width: 60%;
+ }
+}
+
+/* Desktop */
+@media (min-width: 901px) and (max-aspect-ratio: 16/9) {
+ .interstitial-page {
+ flex-direction: column;
+ }
+ .interstitial-header {
+ width: 40%;
+ }
+ .interstitial-body {
+ width: 60%;
+ }
}
#hi-top-content {
diff --git a/src/hi/static/img/hi-logo-w-tagline-450x219.png b/src/hi/static/img/hi-logo-w-tagline-450x219.png
new file mode 100644
index 00000000..7ce50eb1
Binary files /dev/null and b/src/hi/static/img/hi-logo-w-tagline-450x219.png differ
diff --git a/src/hi/templates/pages/interstitial_page.html b/src/hi/templates/pages/interstitial_page.html
index 6c56555a..b9c8f154 100644
--- a/src/hi/templates/pages/interstitial_page.html
+++ b/src/hi/templates/pages/interstitial_page.html
@@ -2,16 +2,13 @@
{% load static %}
{% block content %}
-<div class="container-fluid hi-interstitial-page">
- <div class="hi-start-heading col-4">
+<div class="container-fluid interstitial-page">
+ <div class="interstitial-header mx-auto">
<div class="">
- <img class="img-fluid" src="{% static 'img/hi-logo-467x200.png' %}" alt="Home Information Logo" />
- </div>
- <div class="lead">
- <em>Your home, your data, organized.</em>
+ <img class="img-fluid" src="{% static 'img/hi-logo-w-tagline-450x219.png' %}" alt="Home Information Logo" />
</div>
</div>
- <div class="hi-interstitial-page-content">
+ <div class="interstitial-body mx-auto">
{% block interstitial_content %}
{% endblock %}
</div>