Spaces:
Sleeping
Sleeping
Mohammed AL Sarraj commited on
Commit ·
6030f8d
1
Parent(s): 5bbe1c1
fix: back button inline (remove position:fixed), body flex-col height
Browse files- app/templates/base.html +11 -17
app/templates/base.html
CHANGED
|
@@ -77,8 +77,8 @@ tailwind.config = {
|
|
| 77 |
</script>
|
| 78 |
<style>
|
| 79 |
*, *::before, *::after { box-sizing: border-box; }
|
| 80 |
-
html { height: 100%; }
|
| 81 |
-
body {
|
| 82 |
body { font-family: DM Sans, sans-serif; }
|
| 83 |
.material-symbols-outlined {
|
| 84 |
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
@@ -106,17 +106,15 @@ tailwind.config = {
|
|
| 106 |
.flex-1.overflow-hidden { flex: 1 1 auto; min-width: 0; }
|
| 107 |
}
|
| 108 |
.hub-back-btn {
|
| 109 |
-
|
| 110 |
-
display: flex; align-items: center; gap: 5px;
|
| 111 |
padding: 4px 10px 4px 7px; border-radius: 100px;
|
| 112 |
background: rgba(0,217,126, .1);
|
| 113 |
-
border: 1px solid rgba(0,217,126, .
|
| 114 |
color: #00d97e; font-size: 11px; font-weight: 600;
|
| 115 |
-
text-decoration: none;
|
| 116 |
-
|
| 117 |
-
font-family: DM Sans, sans-serif; white-space: nowrap;
|
| 118 |
}
|
| 119 |
-
.hub-back-btn:hover {
|
| 120 |
.hub-back-btn-icon { font-size: 14px !important; color: #00d97e; line-height: 1; vertical-align: middle; }
|
| 121 |
</style>
|
| 122 |
{% block extra_head %}{% endblock %}
|
|
@@ -140,15 +138,11 @@ tailwind.config = {
|
|
| 140 |
lbl.textContent = "DevKit";
|
| 141 |
btn.appendChild(icon);
|
| 142 |
btn.appendChild(lbl);
|
| 143 |
-
|
| 144 |
-
var navEl = document.querySelector('header, nav');
|
| 145 |
if (navEl) {
|
| 146 |
-
var leftDiv = navEl.querySelector(
|
| 147 |
-
if (leftDiv) {
|
| 148 |
-
|
| 149 |
-
} else {
|
| 150 |
-
navEl.insertBefore(btn, navEl.firstChild);
|
| 151 |
-
}
|
| 152 |
} else {
|
| 153 |
document.body.insertBefore(btn, document.body.firstChild);
|
| 154 |
}
|
|
|
|
| 77 |
</script>
|
| 78 |
<style>
|
| 79 |
*, *::before, *::after { box-sizing: border-box; }
|
| 80 |
+
html, body { height: 100%; }
|
| 81 |
+
body { display: flex; flex-direction: column; }
|
| 82 |
body { font-family: DM Sans, sans-serif; }
|
| 83 |
.material-symbols-outlined {
|
| 84 |
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
|
|
| 106 |
.flex-1.overflow-hidden { flex: 1 1 auto; min-width: 0; }
|
| 107 |
}
|
| 108 |
.hub-back-btn {
|
| 109 |
+
display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
|
|
|
|
| 110 |
padding: 4px 10px 4px 7px; border-radius: 100px;
|
| 111 |
background: rgba(0,217,126, .1);
|
| 112 |
+
border: 1px solid rgba(0,217,126, .22);
|
| 113 |
color: #00d97e; font-size: 11px; font-weight: 600;
|
| 114 |
+
text-decoration: none; transition: background .15s;
|
| 115 |
+
font-family: DM Sans, sans-serif; white-space: nowrap; vertical-align: middle;
|
|
|
|
| 116 |
}
|
| 117 |
+
.hub-back-btn:hover { background: rgba(0,217,126, .18); }
|
| 118 |
.hub-back-btn-icon { font-size: 14px !important; color: #00d97e; line-height: 1; vertical-align: middle; }
|
| 119 |
</style>
|
| 120 |
{% block extra_head %}{% endblock %}
|
|
|
|
| 138 |
lbl.textContent = "DevKit";
|
| 139 |
btn.appendChild(icon);
|
| 140 |
btn.appendChild(lbl);
|
| 141 |
+
var navEl = document.querySelector("header, nav");
|
|
|
|
| 142 |
if (navEl) {
|
| 143 |
+
var leftDiv = navEl.querySelector("div");
|
| 144 |
+
if (leftDiv) { leftDiv.insertBefore(btn, leftDiv.firstChild); }
|
| 145 |
+
else { navEl.insertBefore(btn, navEl.firstChild); }
|
|
|
|
|
|
|
|
|
|
| 146 |
} else {
|
| 147 |
document.body.insertBefore(btn, document.body.firstChild);
|
| 148 |
}
|