Skip to content

Commit

Permalink
bring back ESI, cleanup styles
Browse files Browse the repository at this point in the history
  • Loading branch information
msbt authored and amotl committed Oct 15, 2024
1 parent 0774278 commit 2ba305d
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 146 deletions.
259 changes: 163 additions & 96 deletions src/crate/theme/rtd/crate/sections/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,102 +10,169 @@
<img src="{{ pathto('_static', 1) }}/images/cratedb-logo.svg" alt="CrateDB Logo" width="218" height="36">
</a>
<nav class="w-nav-menu main-nav" role="navigation">
<ul id="menu-main-navigation" class="menu">
<!-- Product Menu -->
<li class="main-site-menu-item main-site-menu-item-product main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Product</a>
<ul class="main-site-sub-menu">
<li class="main-site-menu-item main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Database</a>
<ul class="main-site-sub-menu">
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/database/">Overview</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/database/sql-examples">SQL examples</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/database/integrations">Integrations</a>
</li>
</ul>
</li>
<li class="main-site-menu-item main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Data Models</a>
<ul class="main-site-sub-menu">
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/time-series">Time-series</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/json">Document/JSON</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/vector">Vector</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/full-text">Full-text</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/geospatial">Spatial</a>
</li>
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/data-model/relational">Relational</a>
</li>
</ul>
</li>
</ul>
</li>
<!-- Use Cases Menu -->
<li class="main-site-menu-item main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Use Cases</a>
<ul class="main-site-sub-menu">
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/ai-ml-database">AI/ML</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/iot-database">Internet of Things</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/digital-twins-database">Digital Twins</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/log-database">Log Analysis</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/database-consolidation">Database Consolidation</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/use-cases/chatbots">AI-Powered Chatbots</a></li>
</ul>
</li>
<!-- Industries Menu -->
<li class="main-site-menu-item main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Industries</a>
<ul class="main-site-sub-menu">
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/energy">Energy</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/fmcg">FMCG</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/logistics">Logistics</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/oil-gas-mining">Oil, Gas & Mining</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/smart-cities">Smart City Solutions</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/tech-platforms">Technology Platforms</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/telco">Telco</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/industries/transportation">Transportation</a></li>
</ul>
</li>
<!-- Resources Menu -->
<li class="main-site-menu-item main-site-menu-item-has-children">
<a class="main-site-menu-link" href="#">Resources</a>
<ul class="main-site-sub-menu">
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/stories/">User Stories</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/academy">Academy</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/library">Asset Library</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/blog">Blog</a></li>
<li><a class="main-site-menu-link" target="_blank" href="https://cratedb.com/event">Events</a></li>
</ul>
</li>
<!-- Pricing -->
<li class="main-site-menu-item">
<a class="main-site-menu-link" target="_blank" href="https://cratedb.com/pricing">Pricing</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" target="_blank" href="https://cratedb.com/community">Community</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" target="_blank" rel="noreferrer" href="https://console.cratedb.cloud/?utm_source=website&amp;utm_medium=mainnav&amp;utm_campaign=cratedbcloud">Login</a>
</li>
<li class="nav-highlight cr-menu-btn menu-item navlink w-nav-link">
<a class="menu-link" target="_blank" href="https://cratedb.com/download/">Get CrateDB</a>
</li>
</ul>
<esi:remove>
<ul id="menu-main-navigation" class="menu">
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Product</a>
<ul class="sub-menu">
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Database</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/database/">Overview</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/database/sql-examples">SQL examples</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/database/integrations">Integrations</a>
</li>
</ul>
</li>
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Data models</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/time-series">Time-series</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/json">Document/JSON</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/vector">Vector</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/full-text">Full-text</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/geospatial">Spatial</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/data-model/relational">Relational</a>
</li>
</ul>
</li>
</ul>
</li>
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Use cases</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/ai-ml-database">AI/ML integration</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/iot-database">IoT analytics</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/digital-twins-database">Digital twins</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/log-database">Log &amp; event analytics</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/database-consolidation">Database
consolidation</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/use-cases/chatbots">AI-powered chatbots</a>
</li>
</ul>
</li>
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Industries</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/energy">Energy</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/fmcg">FMCG</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/logistics">Logistics</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/manufacturing">Manufacturing</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/oil-gas-mining">Oil, gas &amp; mining</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/smart-cities">Smart city solutions</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/tech-platforms">Technology platforms</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/telco">Telco</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/industries/transportation">Transportation</a>
</li>
</ul>
</li>
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Resources</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/stories/">User stories</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/academy">Academy</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/library">Asset library</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/blog">Blog</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/event">Events</a>
</li>
</ul>
</li>
<li
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children navlink w-nav-link">
<a class="menu-link" href="javascript:;">Developer</a>
<ul class="sub-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="/docs/guide/home/">Documentation</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/database/drivers-tools">Drivers and tools</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/community">Community</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://github.com/crate/crate/" target="_blank" rel="noopener">GitHub</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/support">Support</a>
</li>
</ul>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/pricing">Pricing</a>
</li>
<li class="menu-item menu-item-type-post_type menu-item-object-page navlink w-nav-link">
<a class="menu-link" target="_blank" rel="noreferrer"
href="https://console.cratedb.cloud/?utm_source=website&amp;utm_medium=mainnav&amp;utm_campaign=cratedbcloud">Login</a>
</li>
<li class="nav-highlight cr-menu-btn menu-item navlink w-nav-link">
<a class="menu-link" href="https://cratedb.com/product/get-started/">Get Started</a>
</li>
</ul>
</esi:remove>
<!--esi
<esi:include src="https://cratedb.com/_hcms/api/navi-header" />
-->
</nav>
</div>
</div>
{% endif %}
{% endif %}
5 changes: 0 additions & 5 deletions src/crate/theme/rtd/crate/static/css/crateio.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ blockquote {
box-shadow: 0 0 18px -4px #000;
}

.navlink {
padding-right: 12px;
padding-left: 12px;
}

.navlink:hover {
color: #111;
}
Expand Down
58 changes: 13 additions & 45 deletions src/crate/theme/rtd/crate/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ header .navbar {
}

#menu-main-navigation li > ul li.w-nav-link {
padding: 0;
display: block;
}

Expand Down Expand Up @@ -1692,91 +1691,60 @@ td > :last-child {
}

/* Main menu styling */
.main-site-menu {
#menu-main-navigation {
list-style: none;
margin: 0;
padding: 0;
display: flex;
justify-content: space-around;
align-items: center;
}

.main-site-menu-link {
text-decoration: none;
color: #333;
padding: 10px 15px;
display: block;
font-weight: 400;
white-space: nowrap;
}

.main-site-sub-menu {
.sub-menu {
display: none;
position: absolute;
top: 100%;
left: 0;
background-color: #fff;
list-style: none;
padding: 0;
padding: 10px;
margin: 0;
border: 1px solid #ddd;
z-index: 999;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-site-menu-item:hover > .main-site-sub-menu {
.menu-item:hover > .sub-menu {
display: block;
}

.main-site-menu-item-product .main-site-sub-menu {
display: flex;
gap: 20px;
padding: 10px;
}

.main-site-menu-item-product .main-site-menu-item-has-children .main-site-sub-menu {
#menu-main-navigation > .menu-item:first-child > .sub-menu > .menu-item-has-children > .sub-menu {
display: none;
position: absolute;
top: 0;
left: 100%;
}

.main-site-menu-item-product .main-site-menu-item-has-children:hover > .main-site-sub-menu {
#menu-main-navigation > .menu-item:first-child > .sub-menu > .menu-item-has-children:hover > .sub-menu {
display: block;
}

.main-site-menu-item-has-children .main-site-sub-menu {
.menu-item-has-children .sub-menu {
top: 100%;
left: 0;
position: absolute;
display: none;
}

.main-site-menu-item-has-children:hover > .main-site-sub-menu {
.menu-item-has-children:hover > .sub-menu {
display: block;
}

.main-site-sub-menu li {
display: block;
width: 200px;
.sub-menu li {
width: 220px;
}

.main-site-sub-menu a {
padding: 10px;
.sub-menu a {
padding: 8px 8px;
display: block;
color: #000;
}

.main-site-menu-link:hover, .main-site-sub-menu a:hover {
color: #111;
}

.main-site-menu-item {
position: relative;
}

@media (max-width: 768px) {
.main-site-menu {
#menu-main-navigation {
display: none;
}
}

0 comments on commit 2ba305d

Please sign in to comment.