Skip to content

Commit 35b00c9

Browse files
Home Page Layout (#135)
* home page prototype WIP * home layout changes * hide mobile nav button on home layout * add option to disable img zoom
1 parent 1c82089 commit 35b00c9

File tree

12 files changed

+278
-5
lines changed

12 files changed

+278
-5
lines changed

preview-src/img/vector-ui-dark.png

55.4 KB
Loading
55.4 KB
Loading
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
= DataStax Docs
2+
:page-layout: home
3+
4+
[.[&>h2]:!hidden]
5+
== {empty}
6+
7+
[subs="macros,attributes"]
8+
++++
9+
<div class="flex rounded bg-level1 gap-6 mt-6 py-6 px-2 -mx-2 lg:px-4 lg:-mx-4">
10+
<div class="flex flex-col gap-6">
11+
12+
<h2 class="discrete !m-0">Astra DB Serverless</h2>
13+
14+
<p>Astra DB Serverless by DataStax provides the tools developers need to create robust AI applications, featuring strong APIs, real-time data processing, and easy integration with other systems.</p>
15+
16+
<div class="flex gap-6">
17+
<span class="text-secondary text-caption font-display flex gap-2 items-center"><i class="icon material-icons text-2xl">handyman</i> Vector Search</span>
18+
<span class="text-secondary text-caption font-display flex gap-2 items-center"><i class="icon material-icons text-2xl">handyman</i> Modern APIs</span>
19+
<span class="text-secondary text-caption font-display flex gap-2 items-center"><i class="icon material-icons text-2xl">handyman</i> Enterprise Ready</span>
20+
</div>
21+
22+
<div class="flex gap-4">
23+
xref:astra-db-serverless:get-started:quickstart.adoc[Quickstart <i class="material-icons icon ml-1">arrow_forward</i>,role="btn btn-primary btn-solid"]
24+
https://astra.datastax.com[Try Astra^,role="btn btn-neutral btn-outlined"]
25+
</div>
26+
27+
</div>
28+
<div class="hidden lg:flex relative pl-10">
29+
++++
30+
31+
image::../img/vector-ui-dark.png["Vector Database UI", role="absolute -bottom-12 !m-0 rounded w-[31rem] h-[17.5rem] [&_img]:rounded drop-shadow-md for-dark no-zoom"]
32+
image::../img/vector-ui-light.png["Vector Database UI", role="absolute -bottom-12 !m-0 rounded w-[31rem] h-[17.5rem] [&_img]:rounded drop-shadow-md for-light no-zoom"]
33+
34+
[source,python,subs="verbatim,quotes",role="nolang inverse-theme [&_.source-toolbox]:hidden rounded w-[31rem] h-[17.5rem] relative !-mt-0 !-mb-12 -top-12 right-10"]
35+
----
36+
from astrapy import DataAPIClient
37+
38+
# connect to a database
39+
database = DataAPIClient(*TOKEN*).get_database_by_api_endpoint(*URL*)
40+
41+
# Ingest vectors into your collection
42+
collection = database.test_collection
43+
collection.insert_many(documents=*DOCUMENTS*)
44+
45+
# Find the closest vectors
46+
collection.find(vector=[0.15, 0.1, 0.1, 0.35, 0.55])
47+
----
48+
49+
[subs="macros,attributes"]
50+
++++
51+
</div>
52+
</div>
53+
54+
<h3 class="discrete !my-12">Popular Products</h3>
55+
56+
<div class="grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
57+
58+
xref:astra-db-serverless::index.adoc[
59+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
60+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
61+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">handyman</i></div>
62+
<div>
63+
<h4 class="discrete !m-0 !text-primary">Astra DB Serverless</h4>
64+
<p class="text-tertiary">Scale with cloud-native databases</p>
65+
</div>
66+
</div>
67+
,role="!no-underline relative group"]
68+
69+
xref:ragstack::index.adoc[
70+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
71+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
72+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">timer</i></div>
73+
<div>
74+
<h4 class="discrete !m-0 !text-primary">RAGStack</h4>
75+
<p class="text-tertiary">Build AI apps faster</p>
76+
</div>
77+
</div>
78+
,role="!no-underline relative group"]
79+
80+
xref:dse:getting-started:get-started-dse.adoc[
81+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
82+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
83+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">business</i></div>
84+
<div>
85+
<h4 class="discrete !m-0 !text-primary">DSE</h4>
86+
<p class="text-tertiary">Enterprise scalability and performance</p>
87+
</div>
88+
</div>
89+
,role="!no-underline relative group"]
90+
91+
xref:mission-control::index.adoc[
92+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
93+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
94+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">space_dashboard</i></div>
95+
<div>
96+
<h4 class="discrete !m-0 !text-primary">Mission Control</h4>
97+
<p class="text-tertiary">Manage your data ecosystem</p>
98+
</div>
99+
</div>
100+
,role="!no-underline relative group"]
101+
102+
xref:astra-streaming:getting-started:index.adoc[
103+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
104+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
105+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">air</i></div>
106+
<div>
107+
<h4 class="discrete !m-0 !text-primary">Streaming</h4>
108+
<p class="text-tertiary">Efficient data streaming</p>
109+
</div>
110+
</div>
111+
,role="!no-underline relative group"]
112+
113+
xref:luna-cassandra::index.adoc[
114+
<div class="w-full h-full absolute rounded bg-gradient-to-r from-[#6B1C96\] via-[#D90036\] to-[#FFCA0B\] blur opacity-0 group-hover:opacity-30 dark:group-hover:opacity-50 transition-opacity duration-300"></div>
115+
<div class="relative h-full p-2 md:p-4 text-primary rounded border flex items-center gap-3 bg-body transition-colors group-hover:border-[var(--ds-primary-outlined-hover-border)\] duration-300">
116+
<div class="w-10 h-10 p-3 rounded bg-level1 flex items-center justify-center"><i class="icon material-icons">nights_stay</i></div>
117+
<div>
118+
<h4 class="discrete !m-0 !text-primary">Luna</h4>
119+
<p class="text-tertiary">Expertise and support for DataStax products</p>
120+
</div>
121+
</div>
122+
,role="!no-underline relative group"]
123+
124+
</div>
125+
126+
<div class="mt-12 grid gap-12 md:grid-cols-2 md:grid-rows-[min-content_repeat(3,1fr)] md:grid-flow-col">
127+
128+
<h3 class="pb-4 border-b !m-0">Latest Additions<i class="material-icons icon text-2xl mr-2">new_label</i></h3>
129+
130+
xref:astra-db-serverless:databases:load-data.adoc[
131+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
132+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
133+
Loading data into Astra DB databases
134+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
135+
Astra DB
136+
</span>
137+
</h4>
138+
<p class="text-tertiary">++Use the Astra DB Data Loader to load data in your database from a variety of sources, including CSV files, sample datasets, and Amazon DynamoDB.++</p>
139+
<p class="!text-link !mt-auto">Read Loading data into Astra DB databases <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
140+
</div>
141+
,role="!no-underline group flex flex-col"]
142+
143+
xref:ragstack:intro-to-rag:evaluation.adoc[
144+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
145+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
146+
Optimizing Query Performance
147+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
148+
RAGStack
149+
</span>
150+
</h4>
151+
<p class="text-tertiary">++Improve the efficiency of your queries on AI-ready cloud databases with best practices for indexing and query tuning.++</p>
152+
<p class="!text-link !mt-auto">Read Optimizing Query Performance <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
153+
</div>
154+
,role="!no-underline group flex flex-col"]
155+
156+
xref:astra-db-serverless::index.adoc[
157+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
158+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
159+
Securing Database Connections
160+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
161+
Astra DB
162+
</span>
163+
</h4>
164+
<p class="text-tertiary">++Learn how to secure connections to your AI-ready cloud database using SSL encryption and access control methods.++</p>
165+
<p class="!text-link !mt-auto">Read Securing Database Connections <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
166+
</div>
167+
,role="!no-underline group flex flex-col"]
168+
169+
<h3 class="pb-4 border-b !m-0">Working with AI/ML <i class="material-icons icon text-2xl mr-2">smart_toy</i></h3>
170+
171+
xref:astra-db-serverless::index.adoc[
172+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
173+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
174+
Automating Backups and Recovery
175+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
176+
Astra DB
177+
</span>
178+
</h4>
179+
<p class="text-tertiary">++Set up automated backups for your cloud database and learn how to quickly recover your data in case of loss or corruption.++</p>
180+
<p class="!text-link !mt-auto">Read Automating Backups and Recovery <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
181+
</div>
182+
,role="!no-underline group flex flex-col"]
183+
184+
xref:astra-db-serverless::index.adoc[
185+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
186+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
187+
Monitoring and Alerts
188+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
189+
Mission Control
190+
</span>
191+
</h4>
192+
<p class="text-tertiary">++Monitor the health and performance of your cloud database with real-time analytics and set up alerts for potential issues.++</p>
193+
<p class="!text-link !mt-auto">Read Monitoring and Alerts <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
194+
</div>
195+
,role="!no-underline group flex flex-col"]
196+
197+
xref:astra-db-serverless::index.adoc[
198+
<div class="py-4 px-2 -mx-2 lg:px-4 lg:-mx-4 rounded flex flex-col grow gap-3 transition-colors group-hover:bg-level1">
199+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
200+
Scaling Your Database
201+
<span class="ml-1 py-1 px-2 bg-level1 text-nowrap rounded color-primary text-caption font-sans border border-transparent group-hover:border-[var(--ds-divider)\] transition-colors">
202+
Astra DB
203+
</span>
204+
</h4>
205+
<p class="text-tertiary">++Scale your AI-ready cloud database vertically or horizontally to meet changing workload demands and optimize performance.++</p>
206+
<p class="!text-link !mt-auto">Read Scaling Your Database <i class="material-icons icon group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i></p>
207+
</div>
208+
,role="!no-underline group flex flex-col"]
209+
</div>
210+
211+
<div class="p-8 rounded grid gap-10 grid-cols-1 md:grid-cols-2 lg:grid-cols-4 bg-level1 mt-12">
212+
213+
https://www.datastax.com/[
214+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
215+
<i class="material-icons icon text-2xl mr-2">home</i>
216+
DataStax Home
217+
</h4>
218+
<span class="!text-link mr-1 break-words">Go to the DataStax website</span>
219+
<i class="material-icons icon absolute group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i>
220+
,role="!no-underline group after:hidden"]
221+
222+
xref:glossary::index.adoc[
223+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
224+
<i class="material-icons icon text-2xl mr-2">menu_book</i>
225+
Glossary
226+
</h4>
227+
<span class="!text-link mr-1 break-words">Learn terminology used in DataStax products</span>
228+
<i class="material-icons icon absolute group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i>
229+
,role="!no-underline group after:hidden"]
230+
231+
https://support.datastax.com/s/[
232+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
233+
<i class="material-icons icon text-2xl mr-2">support</i>
234+
Support
235+
</h4>
236+
<span class="!text-link mr-1 break-words">Access support resources</span>
237+
<i class="material-icons icon absolute group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i>
238+
,role="!no-underline group after:hidden"]
239+
240+
https://downloads.datastax.com/#enterprise[
241+
<h4 class="discrete !m-0 !text-primary text-display pb-2">
242+
<i class="material-icons icon text-2xl mr-2">downloading</i>
243+
Downloads
244+
</h4>
245+
<span class="!text-link mr-1 break-words">Download installation files and drivers</span>
246+
<i class="material-icons icon absolute group-hover:translate-x-1 transition-transform duration-300">arrow_forward</i>
247+
,role="!no-underline group after:hidden"]
248+
249+
</div>
250+
++++

preview-src/ui-model.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ page:
113113
- content: Landing
114114
url: /page-templates/landing.html
115115
urlType: internal
116+
- content: Home
117+
url: /page-templates/home.html
118+
urlType: internal
116119
- content: Tutorial
117120
url: /page-templates/tutorial.html
118121
urlType: internal

src/css/asciidoc/ds-layout.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/* Extend .doc max-width */
88
@layer base {
99
html[data-layout="landing"],
10-
html[data-layout="full"] {
10+
html[data-layout="full"],
11+
html[data-layout="home"] {
1112
main {
1213
max-width: calc(1280 / var(--rem-base) * 1rem);
1314
width: auto;
@@ -33,6 +34,12 @@
3334
}
3435
}
3536

37+
html[data-layout="home"] {
38+
.doc > h1.page {
39+
display: none;
40+
}
41+
}
42+
3643
.sect1.text-h1 {
3744
font-size: 1rem;
3845
font-weight: 400;

src/js/vendor/zooming.bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
transitionDuration: prefersReducedMotion ? 0.01 : 0.3,
1313
})
1414

15-
zooming.listen('.doc .imageblock img, .doc .image img')
15+
zooming.listen('.doc .imageblock:not(.no-zoom) img, .doc .image:not(.no-zoom) img')
1616
})()

src/layouts/home.hbs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html lang="en" data-layout="home">
3+
<head>
4+
{{> head defaultPageTitle='Untitled'}}
5+
</head>
6+
<body class="{{#with (or page.attributes.role page.role)}} {{{this}}}{{/with}}">
7+
{{> body}}
8+
</body>
9+
</html>

src/partials/body.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
<div class="grid drawer-content {{#if site.keys.globalNav}}pt-32{{else}}pt-20{{/if}}">
66
{{> main}}
77
</div>
8+
{{#unless (eq page.layout 'home')}}
89
<div class="z-30 drawer-side {{#if site.keys.globalNav}}pt-32{{else}}pt-20{{/if}}">
910
<label for="nav-drawer-input" aria-label="close sidebar" class="drawer-overlay"></label>
1011
{{> nav}}
1112
</div>
13+
{{/unless}}
1214
</div>
1315
{{> body-end-scripts}}

src/partials/breadcrumbs.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full'))}}
1+
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full') (eq page.layout 'home'))}}
22
<nav class="flex" aria-label="breadcrumbs">
33
{{#if page.breadcrumbs}}
44
<ul class="flex flex-wrap !list-none !m-0 !p-0">

src/partials/navbar.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<div class="navbar bg-body border-b z-40 fixed top-0 flex flex-col w-full {{#if site.keys.globalNav}}h-32{{else}}h-20{{/if}}">
22
<nav class="flex flex-auto items-center gap-2 lg:gap-4 p-4">
3+
{{#unless (eq page.layout 'home')}}
34
<label
45
for="nav-drawer-input"
56
class="btn btn-neutral btn-plain btn-icon drawer-button lg:hidden"
67
>
78
<i class="icon material-icons">menu_open</i>
89
</label>
10+
{{/unless}}
911
<a href="{{#> logo-url}}{{{or site.url siteRootPath}}}{{/logo-url}}">
1012
{{> logo}}
1113
</a>

0 commit comments

Comments
 (0)