Skip to content

Commit 5ab5690

Browse files
committed
Add Cards
1 parent 28680b8 commit 5ab5690

5 files changed

Lines changed: 72 additions & 41 deletions

File tree

_includes/card_grid.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="{{ include.grid_class | default: 'card-grid' }}">
2+
{% assign heading_level = include.heading_level | default: 'h3' %}
3+
{% for card in include.cards %}
4+
<div class="{{ include.card_class | default: 'card-panel' }}">
5+
<{{ heading_level }}>
6+
<a href="{{ card.url | relative_url }}">{{ card.title }}</a>
7+
</{{ heading_level }}>
8+
{% if card.description %}
9+
<p>{{ card.description }}</p>
10+
{% endif %}
11+
</div>
12+
{% endfor %}
13+
</div>

_sass/custom/custom.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
background: rgba(107, 114, 128, 0.08);
170170
}
171171

172-
.home-grid {
172+
.card-grid {
173173
display: grid;
174174
gap: 1rem;
175175
margin: 2rem 0;
@@ -218,27 +218,27 @@
218218
border-color: rgba(42, 54, 66, 0.15);
219219
}
220220

221-
.home-card {
221+
.card-panel {
222222
padding: 1.1rem 1.15rem;
223223
border: 1px solid rgba(17, 24, 39, 0.08);
224224
border-radius: 1rem;
225225
background: rgba(255, 255, 255, 0.92);
226226
transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
227227
}
228228

229-
.home-card:hover {
229+
.card-panel:hover {
230230
transform: translateY(-2px);
231231
border-color: rgba(65, 88, 111, 0.18);
232232
box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
233233
}
234234

235-
.home-card h3,
236-
.home-card h4 {
235+
.card-panel h3,
236+
.card-panel h4 {
237237
margin-top: 0;
238238
margin-bottom: 0.45rem;
239239
}
240240

241-
.home-card p:last-child {
241+
.card-panel p:last-child {
242242
margin-bottom: 0;
243243
}
244244

@@ -324,7 +324,7 @@
324324
}
325325

326326
@media (min-width: 50rem) {
327-
.home-grid {
327+
.card-grid {
328328
grid-template-columns: repeat(2, minmax(0, 1fr));
329329
}
330330
}

getting-started/index.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22
title: Getting Started
33
nav_order: 1
44
has_children: true
5+
has_toc: false
56
permalink: /getting-started/
7+
description: Start with the LiquidJava basics, from overview to installation and a first verification run.
8+
cards:
9+
- title: Overview
10+
url: /getting-started/overview/
11+
description: Learn what LiquidJava adds to Java and how the documentation is organized.
12+
- title: Installation
13+
url: /getting-started/installation/
14+
description: Set up the API, verifier, and editor tooling needed to start checking Java code.
15+
- title: Quickstart
16+
url: /getting-started/quickstart/
17+
description: Follow a short end-to-end example that introduces refinements and verification feedback.
618
---
719

820
# Getting Started
921

1022
Start here if you are new to LiquidJava.
1123

12-
- [Overview]({{ '/getting-started/overview/' | relative_url }})
13-
- [Installation]({{ '/getting-started/installation/' | relative_url }})
14-
- [Quickstart]({{ '/getting-started/quickstart/' | relative_url }})
24+
{% include card_grid.html cards=page.cards %}

index.md

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22
title: LiquidJava Docs
33
layout: default
44
nav_exclude: true
5+
has_toc: false
56
description: Start with installation, quickstart, runnable examples, and reference material for LiquidJava.
7+
cards:
8+
- title: Quickstart
9+
url: /getting-started/quickstart/
10+
description: Install the annotation API, run the verifier, and see a failing refinement in a few minutes.
11+
- title: VS Code Extension
12+
url: /tooling/vscode-extension/
13+
description: Use real-time diagnostics, syntax highlighting, and state-machine visualizations directly in the editor.
14+
- title: Command Line
15+
url: /tooling/cli/
16+
description: Run the verifier directly from the terminal for local checks, debugging, and CI workflows.
17+
- title: Reference
18+
url: /reference/
19+
description: Look up LiquidJava concepts, annotations, and protocol rules in a more formal, detailed format.
20+
- title: Examples
21+
url: /examples/
22+
description: Open runnable demo projects through Codespaces, dev containers, or a local Maven setup.
23+
- title: Resources
24+
url: /resources/
25+
description: Explore related research papers, poster material, and source repositories.
626
---
727

828
<div>
@@ -19,29 +39,4 @@ description: Start with installation, quickstart, runnable examples, and referen
1939
</div>
2040
</div>
2141

22-
<div class="home-grid">
23-
<div class="home-card">
24-
<h3><a href="{{ '/getting-started/quickstart/' | relative_url }}">Quickstart</a></h3>
25-
<p>Install the annotation API, run the verifier, and see a failing refinement in a few minutes.</p>
26-
</div>
27-
<div class="home-card">
28-
<h3><a href="{{ '/tooling/vscode-extension/' | relative_url }}">VS Code Extension</a></h3>
29-
<p>Use real-time diagnostics, syntax highlighting, and state-machine visualizations directly in the editor.</p>
30-
</div>
31-
<div class="home-card">
32-
<h3><a href="{{ '/tooling/cli/' | relative_url }}">Command Line</a></h3>
33-
<p>Run the verifier directly from the terminal for local checks, debugging, and CI workflows.</p>
34-
</div>
35-
<div class="home-card">
36-
<h3><a href="{{ '/reference/' | relative_url }}">Reference</a></h3>
37-
<p>Look up LiquidJava concepts, annotations, and protocol rules in a more formal, detailed format.</p>
38-
</div>
39-
<div class="home-card">
40-
<h3><a href="{{ '/examples/' | relative_url }}">Examples</a></h3>
41-
<p>Open runnable demo projects through Codespaces, dev containers, or a local Maven setup.</p>
42-
</div>
43-
<div class="home-card">
44-
<h3><a href="{{ '/resources/' | relative_url }}">Resources</a></h3>
45-
<p>Explore related research papers, poster material, and source repositories.</p>
46-
</div>
47-
</div>
42+
{% include card_grid.html cards=page.cards %}

reference/index.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@
22
title: Reference
33
nav_order: 2
44
has_children: true
5+
has_toc: false
56
permalink: /reference/
67
description: Browse the LiquidJava reference for refinements, typestates, aliases, ghost variables, and external refinements.
8+
cards:
9+
- title: Refinements
10+
url: /reference/refinements/
11+
description: Review refinement syntax, annotation forms, and the main rules used during verification.
12+
- title: Refinement Aliases
13+
url: /reference/refinement-aliases/
14+
description: Reuse common predicates with aliases to keep contracts shorter and easier to maintain.
15+
- title: Typestates
16+
url: /reference/typestates/
17+
description: Model protocol-oriented object states and valid method transitions.
18+
- title: Ghost Variables
19+
url: /reference/ghost-variables/
20+
description: Track logical state that helps express and verify richer object invariants.
21+
- title: External Refinements
22+
url: /reference/external-refinements/
23+
description: Attach contracts to code you cannot or do not want to annotate directly.
724
---
825

926
# LiquidJava Reference
1027

1128
LiquidJava extends Java with logical refinements and object protocol specifications. This section covers the core annotation model:
1229

13-
- [Refinements]({{ '/reference/refinements/' | relative_url }})
14-
- [Refinement Aliases]({{ '/reference/refinement-aliases/' | relative_url }})
15-
- [Typestates]({{ '/reference/typestates/' | relative_url }})
16-
- [Ghost Variables]({{ '/reference/ghost-variables/' | relative_url }})
17-
- [External Refinements]({{ '/reference/external-refinements/' | relative_url }})
30+
{% include card_grid.html cards=page.cards %}

0 commit comments

Comments
 (0)