Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: Add header menu items from website #534

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 163 additions & 12 deletions src/crate/theme/rtd/crate/sections/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +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">
<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
61 changes: 60 additions & 1 deletion 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 @@ -1633,6 +1632,7 @@ dt:target, span.highlighted {
/* fix ul in header nav */
header#top #menu-main-navigation {
margin: 0;
list-style-type: none;
}

/* -- tables ---------------------------------------------------------------- */
Expand Down Expand Up @@ -1689,3 +1689,62 @@ th > :last-child,
td > :last-child {
margin-bottom: 0px;
}

/* Main menu styling */
#menu-main-navigation {
list-style: none;
}

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

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

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

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

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

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

.sub-menu li {
width: 220px;
}

.sub-menu a {
padding: 8px 8px;
display: block;
}

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