Skip to content

Commit

Permalink
navbar mobile issues seem fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Jun 23, 2024
1 parent 17717d7 commit 9e82e76
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
74 changes: 31 additions & 43 deletions themes/freenet/assets/css/freenet.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
/* Try to adjust break point */

@media screen and (max-width: 1117px) {
.navbar-menu {
display: none;
}

.navbar-burger {
display: block;
}
}

@media screen and (min-width: 861px) {
.navbar-menu {
display: block;
}

.navbar-burger {
display: none;
}
}

.navbar-menu.is-active .navbar-item.has-dropdown:hover .navbar-dropdown {
display: block;
}

.navbar-menu .navbar-item.has-dropdown .navbar-dropdown {
display: none;
}


/* Hover effect for navbar item */
.navbar-item:hover .logo-text {
color: #007bff; /* Preferred hover color */
Expand All @@ -22,32 +53,6 @@
color: #333;
}

/* Responsive adjustments */
@media (max-width: 639px) {
.logo-text {
font-size: 1.2rem;
margin-left: 0.3rem;
}

.navbar-menu {
display: none !important; /* Hide menu on smaller screens */
}

.navbar-burger {
display: block !important; /* Show burger menu icon */
}
}

@media (min-width: 640px) {
.navbar-menu {
display: flex !important; /* Show menu on larger screens */
}

.navbar-burger {
display: none !important; /* Hide burger menu icon */
}
}

/* Box and date styling */
.box h2 {
margin-bottom: 0.25rem; /* Reduced bottom margin */
Expand All @@ -70,23 +75,6 @@ body {
padding: 0 16px; /* Default padding for small screens */
}

@media (min-width: 768px) {
.container {
padding: 0 24px; /* Increase padding for medium screens */
}
}

@media (min-width: 1024px) {
.container {
padding: 0 40px; /* Increase padding for large screens */
}
}

@media (min-width: 1280px) {
.container {
padding: 0 80px; /* Increase padding for extra large screens */
}
}

/* Remove start element */
.rMStart {
Expand Down
2 changes: 1 addition & 1 deletion themes/freenet/layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
1 change: 1 addition & 0 deletions themes/freenet/layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<div class="navbar-start">
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</div>
<div class="navbar-end"></div>
</div>
</nav>
{{- end }}
Expand Down

0 comments on commit 9e82e76

Please sign in to comment.