Skip to content

Commit 89315d4

Browse files
authored
feat: add grid support and improve relative link handling in directives (#1437)
1 parent e0534af commit 89315d4

18 files changed

Lines changed: 2004 additions & 1663 deletions

File tree

docs/source/examples/grid.rst

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
Grid
2+
====
3+
4+
A custom directive that creates responsive grid layouts using Foundation's grid system.
5+
Perfect for organizing topic boxes in rows and columns.
6+
7+
.. note::
8+
The grid directive currently supports only :doc:`topic-box` directives as content.
9+
Other content types are not supported within grids.
10+
11+
Syntax
12+
------
13+
14+
.. code-block:: rst
15+
16+
.. grid::
17+
<options>
18+
19+
.. topic-box::
20+
<topic-box options>
21+
22+
<content>
23+
24+
Options
25+
-------
26+
27+
The ``grid`` directive supports the following options:
28+
29+
.. list-table::
30+
:widths: 20 20 10 20 30
31+
:header-rows: 1
32+
33+
* - Option
34+
- Type
35+
- Required
36+
- Example Value
37+
- Description
38+
* - ``class``
39+
- string
40+
-
41+
- large-3
42+
- Custom CSS class.
43+
* - ``type``
44+
- string
45+
-
46+
- scrollable
47+
- Grid type. Available values: ``default``, ``scrollable``, ``products``.
48+
* - ``title``
49+
- string
50+
-
51+
- Lorem Ipsum
52+
- Grid title.
53+
* - ``text``
54+
- string
55+
-
56+
- Lorem ipsum dolor sit amet
57+
- Grid description.
58+
59+
Supported Content
60+
-----------------
61+
62+
The grid directive works exclusively with **topic-box** directives. Each topic-box within a grid should include Foundation grid classes in its ``:class:`` option to control layout:
63+
64+
- ``large-3`` - 4 columns per row on desktop
65+
- ``large-4`` - 3 columns per row on desktop
66+
- ``large-6`` - 2 columns per row on desktop
67+
- ``large-12`` - 1 column per row (full width)
68+
- ``small-6`` - 2 columns per row on mobile
69+
70+
For more information about topic-box options and usage, see :doc:`topic-box`.
71+
72+
Usage
73+
-----
74+
75+
Basic grid
76+
..........
77+
78+
Using:
79+
80+
.. code-block:: rst
81+
82+
.. grid::
83+
:type: default
84+
85+
.. topic-box::
86+
:title: Quick Start
87+
:link: #
88+
:class: large-6
89+
:anchor: Get Started
90+
91+
Learn how to get started with ScyllaDB.
92+
93+
.. topic-box::
94+
:title: Architecture
95+
:link: #
96+
:class: large-6
97+
:anchor: Learn More
98+
99+
Understand ScyllaDB's architecture and design principles.
100+
101+
Results in:
102+
103+
.. grid::
104+
:type: default
105+
106+
.. topic-box::
107+
:title: Quick Start
108+
:link: /getting-started
109+
:class: large-6
110+
:anchor: Get Started
111+
112+
Learn how to get started with ScyllaDB.
113+
114+
.. topic-box::
115+
:title: Architecture
116+
:link: /architecture
117+
:class: large-6
118+
:anchor: Learn More
119+
120+
Understand ScyllaDB's architecture and design principles.
121+
122+
Scrollable grid
123+
.................
124+
125+
Using:
126+
127+
.. code-block:: rst
128+
129+
.. grid::
130+
:type: scrollable
131+
132+
.. topic-box::
133+
:title: Installation
134+
:link: #
135+
:class: large-3
136+
:anchor: Install
137+
138+
Install ScyllaDB on your system.
139+
140+
.. topic-box::
141+
:title: Configuration
142+
:link: #
143+
:class: large-3
144+
:anchor: Configure
145+
146+
Configure ScyllaDB for your needs.
147+
148+
.. topic-box::
149+
:title: Security
150+
:link: #
151+
:class: large-3
152+
:anchor: Secure
153+
154+
Secure your ScyllaDB deployment.
155+
156+
.. topic-box::
157+
:title: Monitoring
158+
:link: #
159+
:class: large-3
160+
:anchor: Monitor
161+
162+
Monitor your ScyllaDB cluster.
163+
164+
Results in:
165+
166+
.. grid::
167+
:type: scrollable
168+
169+
.. topic-box::
170+
:title: Installation
171+
:link: #
172+
:class: large-3
173+
:anchor: Install
174+
175+
Install ScyllaDB on your system.
176+
177+
.. topic-box::
178+
:title: Configuration
179+
:link: #
180+
:class: large-3
181+
:anchor: Configure
182+
183+
Configure ScyllaDB for your needs.
184+
185+
.. topic-box::
186+
:title: Security
187+
:link: #
188+
:class: large-3
189+
:anchor: Secure
190+
191+
Secure your ScyllaDB deployment.
192+
193+
.. topic-box::
194+
:title: Monitoring
195+
:link: /monitoring
196+
:class: large-3
197+
:anchor: Monitor
198+
199+
Monitor your ScyllaDB cluster.
200+
201+
Products grid
202+
.............
203+
204+
Using:
205+
206+
.. code-block:: rst
207+
208+
.. grid::
209+
:type: products
210+
:title: ScyllaDB Products
211+
:text: Choose the right ScyllaDB product for your needs
212+
213+
.. topic-box::
214+
:title: ScyllaDB Enterprise
215+
:link: #
216+
:image: /_static/img/mascots-2/enterprise.svg
217+
:class: topic-box--product,large-4,small-6
218+
219+
Enterprise-grade NoSQL database with advanced features and support.
220+
221+
.. topic-box::
222+
:title: ScyllaDB Cloud
223+
:link: #
224+
:image: /_static/img/mascots-2/cloud.svg
225+
:class: topic-box--product,large-4,small-6
226+
227+
Fully managed NoSQL database as a service.
228+
229+
.. topic-box::
230+
:title: ScyllaDB Open Source
231+
:link: #
232+
:image: /_static/img/mascots-2/opensource.svg
233+
:class: topic-box--product,large-4,small-6
234+
235+
Free and open-source NoSQL database.
236+
237+
Results in:
238+
239+
.. grid::
240+
:type: products
241+
:title: ScyllaDB Products
242+
:text: Choose the right ScyllaDB product for your needs
243+
244+
.. topic-box::
245+
:title: ScyllaDB Enterprise
246+
:link: #
247+
:image: /_static/img/mascots-2/enterprise.svg
248+
:class: topic-box--product,large-4,small-6
249+
250+
Enterprise-grade NoSQL database with advanced features and support.
251+
252+
.. topic-box::
253+
:title: ScyllaDB Cloud
254+
:link: #
255+
:image: /_static/img/mascots-2/cloud.svg
256+
:class: topic-box--product,large-4,small-6
257+
258+
Fully managed NoSQL database as a service.
259+
260+
.. topic-box::
261+
:title: ScyllaDB Docs
262+
:link: #
263+
:image: /_static/img/mascots-2/docs.svg
264+
:class: topic-box--product,large-4,small-6
265+
266+
Documentation for ScyllaDB.
267+

0 commit comments

Comments
 (0)