Skip to content

Commit

Permalink
Restore root element font size
Browse files Browse the repository at this point in the history
- Restore root element font size for consistent scaling across elements
- Add temporary font size and padding for dropdown menu to maintain readability until default base font size is restored
- Move `.dropdown-doc` class to doc dropdown container
- Update dropdown classes to target specific dropdown instead of its items
- Remove extra closing `</a>` tag
  • Loading branch information
moisseev committed Nov 11, 2024
1 parent 296e03b commit 7a02f7a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 47 deletions.
75 changes: 37 additions & 38 deletions _includes/top.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,66 +77,66 @@
<li class="nav-item">
<a class="nav-link d-flex align-items-center" href="{{ site.baseurl }}/downloads.html">Downloads&nbsp;<i class="fa-solid fa-lg fa-download"></i></a>
</li>
<li class="nav-item dropdown position-static">
<li class="nav-item dropdown dropdown-doc position-static">
<a href="#" class="nav-link d-flex align-items-center dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Documentation
<span class="caret"></span></a>
<ul class="dropdown-menu w-100 mt-0 p-4 border-top rounded-0">
<li class="d-table-row">
<a class="dropdown-item dropdown-doc text-nowrap fw-bold px-3" href="{{ site.baseurl }}/doc/index.html">
<a class="dropdown-item text-nowrap fw-bold px-3" href="{{ site.baseurl }}/doc/index.html">
Documentation index <small><i class="fa-solid fa-chevron-right"></i></small>
</a>
</li>
<li>Installation and Administration
<ul>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/quickstart.html">Quick start</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/faq.html">FAQ</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/integration.html">MTA integration</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/migration.html">Upgrading notes</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/webui/">Rspamd WebUI</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/other/gtube_patterns.html">GTUBE-like test patterns</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/migrate_sa.html">Migrating from SA</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/site_contributing.html">Contributing to rspamd.com website</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/redis.html">Using Redis in Rspamd</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/redis_replication.html">Replication in Redis</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/scanning_outbound.html">How to scan outbound emails</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/stunnel_setup.html">Setup stunnel to protect Redis</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/quickstart.html">Quick start</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/faq.html">FAQ</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/integration.html">MTA integration</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/migration.html">Upgrading notes</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/webui/">Rspamd WebUI</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/other/gtube_patterns.html">GTUBE-like test patterns</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/migrate_sa.html">Migrating from SA</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/site_contributing.html">Contributing to rspamd.com website</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/redis.html">Using Redis in Rspamd</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/redis_replication.html">Replication in Redis</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/scanning_outbound.html">How to scan outbound emails</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/stunnel_setup.html">Setup stunnel to protect Redis</a></li>
</ul>
</li>
<li>Configuration guide
<ul>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/">Configuration structure <small><i class="fa-solid fa-chevron-right"></i></small></a>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/">Configuration structure <small><i class="fa-solid fa-chevron-right"></i></small></a>
<ul style="padding-left: 30px; list-style-type: circle;">
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/settings.html">Users settings description</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/options.html">Top-level options</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/logging.html">Logging setup</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/metrics.html">Metrics, actions and symbols</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/composites.html">Composite symbols</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/statistic.html">Statistical module</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/selectors.html">Using selectors</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/settings.html">Users settings description</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/options.html">Top-level options</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/logging.html">Logging setup</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/metrics.html">Metrics, actions and symbols</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/composites.html">Composite symbols</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/statistic.html">Statistical module</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/selectors.html">Using selectors</a></li>
</ul>
</li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/modules/">Modules documentation</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/workers/">Workers documentation</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/other/rspamadm.html">Rspamadm utilities</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/other/usage_policy.html">Rspamd data usage policies</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/configuration/upstream.html">Upstreams article</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/modules/">Modules documentation</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/workers/">Workers documentation</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/other/rspamadm.html">Rspamadm utilities</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/other/usage_policy.html">Rspamd data usage policies</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/configuration/upstream.html">Upstreams article</a></li>
</ul>
</li>
<li>Developers documentation
<ul>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/lua/">Lua API reference</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/developers/examples.html">Lua rules examples</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/developers/writing_rules.html">Writing Rspamd rules</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/tutorials/fuzzy_storage.html">Creating your fuzzy storage</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/developers/architecture.html">Architecture information</a></li>
<li><a class="dropdown-item dropdown-doc" href="{{ site.baseurl }}/doc/developers/protocol.html">Protocol documentation</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/lua/">Lua API reference</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/examples.html">Lua rules examples</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/writing_rules.html">Writing Rspamd rules</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/fuzzy_storage.html">Creating your fuzzy storage</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/architecture.html">Architecture information</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/protocol.html">Protocol documentation</a></li>
</ul>
</li>
<li>External resources
<ul>
<li><a class="dropdown-item dropdown-doc" href="https://thomas-leister.de/en/mailserver-debian-stretch/">Own mail server based on Dovecot, Postfix, MySQL, Rspamd and Debian Stretch</a></li>
<li><a class="dropdown-item dropdown-doc" href="https://web.archive.org/web/20240914211825/www.c0ffee.net/blog/mail-server-guide">Mail self-hosting on FreeBSD using Postfix, Dovecot, Rspamd, and LDAP</a></li>
<li><a class="dropdown-item dropdown-doc" href="http://www.0xf8.org/2018/05/an-alternative-introduction-to-rspamd-configuration-introduction/">An alternative introduction to rspamd configuration</a></li>
<li><a class="dropdown-item" href="https://thomas-leister.de/en/mailserver-debian-stretch/">Own mail server based on Dovecot, Postfix, MySQL, Rspamd and Debian Stretch</a></li>
<li><a class="dropdown-item" href="https://web.archive.org/web/20240914211825/www.c0ffee.net/blog/mail-server-guide">Mail self-hosting on FreeBSD using Postfix, Dovecot, Rspamd, and LDAP</a></li>
<li><a class="dropdown-item" href="http://www.0xf8.org/2018/05/an-alternative-introduction-to-rspamd-configuration-introduction/">An alternative introduction to rspamd configuration</a></li>
</ul>
</li>
</ul>
Expand All @@ -148,8 +148,7 @@
<a class="nav-link d-flex align-items-center" href="{{ site.baseurl }}/doc/other/usage_policy.html">Usage policies</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link d-flex align-items-center dropdown-toggle" id="services-dropdown" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extra services</a>
<span class="caret"></span></a>
<a href="#" class="nav-link d-flex align-items-center dropdown-toggle" id="services-dropdown" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extra services<span class="caret"></span></a>
<div class="dropdown-menu" aria-labelledby="services-dropdown">
<h6 class="dropdown-header">Services we offer</h6>
<button class="dropdown-item" type="button">
Expand Down
37 changes: 28 additions & 9 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
}

/* Override bootstrap 4 and 5 changes */
html {
font-size: 10px;
}
body {
font-size: 14px;
line-height: 1.4286;
Expand All @@ -19,8 +22,8 @@ body {
a, .btn:hover, .btn:focus {
text-decoration: none;
}
.dropdown-doc {
color:#dd4814;
.dropdown-doc .dropdown-item {
color: rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));
white-space: unset;
padding: 0;
}
Expand Down Expand Up @@ -207,23 +210,41 @@ h6:hover .header-link {
}
}

.dropdown-menu { background-color: #E8E8E8; }
.dropdown-menu > li {
.site-map > div > ul { padding-left: 1.5rem; }

.dropdown-menu {
background-color: #E8E8E8;

/* To be removed after default base font size is restored */
font-size: 16px;
}

/* To be removed after default base font size is restored */
.dropdown-menu,
h6.dropdown-header {
padding-top: 8px;
padding-bottom: 8px;
}
h6.dropdown-header { font-size: 14px; }
.dropdown-menu[data-bs-popper] { margin-top: 2px; }
.dropdown-menu > * { padding: 4px 16px; }

.dropdown-doc .dropdown-menu > li {
display: table-cell;
font-weight: bold;
font-size: 18px;
padding: 1rem 1rem 0;
line-height: 150%;
}
@media screen and (max-width: 767px) {
.dropdown-menu > li { display: block; }
.dropdown-doc .dropdown-menu > li { display: block; }
}
.dropdown-menu ul {
.dropdown-doc .dropdown-menu ul {
list-style: none;
padding-left: 0;
font-size: 14px;
}
.dropdown-menu.show {
.dropdown-doc .dropdown-menu.show {
display: table;
table-layout: fixed;
}
Expand Down Expand Up @@ -352,5 +373,3 @@ div#toc {
.btn-social-icon.btn-xs :first-child {
font-size: 1em;
}

.site-map > div > ul { padding-left: 1.5rem; }

0 comments on commit 7a02f7a

Please sign in to comment.