Understanding how ANTSAND template definitions, parameter files, and SCSS patterns align across all layers
ANTSAND uses a 3-layer architecture. Understanding this flow is essential for creating and modifying templates.
service_3_modern.volt is a UNIVERSAL template - it renders Hero, Footer, Features, Pricing, etc. The ONLY difference is the parent CSS class (hero-1, footer-1, features-1) which completely changes the visual style.
These are the key files that make up the ANTSAND template system. When creating or modifying templates, you'll need to understand each file's role.
These tables show how CSS classes align across all three layers. Use this as a reference when creating new templates or debugging styling issues.
| Component | outline2design.json | parameter_files.json | SASS v2 | Status |
|---|---|---|---|---|
| Section parent | hero-1 | section | .hero-1 | ✓ |
| Container | header-container container | header-container container | .container | ✓ |
| Title (h1) | header-h1 title | header-h1 title | .title | ✓ |
| Subtitle (h2) | header-h2 subtitle | header-h2 subtitle | .subtitle | ✓ |
| Description (p) | header-p description | header-p description | .description | ✓ |
| CTA container | header-cta-container cta-container | header-cta-container cta-container | .cta-container | ✓ |
| CTA | header-cta cta | header-cta cta | .cta | ✓ |
| Component | outline2design.json | parameter_files.json | SASS v2 | Status |
|---|---|---|---|---|
| Section parent | features-1 | section | .features-1 | ✓ |
| Container | data-container container | data-container container | .container | ✓ |
| Sub-container | data-sub-container sub-container | data-sub-container sub-container | .sub-container | ✓ |
| Title (h3) | data-h3 title | data-h3 title | .title | ✓ |
| Description (p) | data-p description | data-p description | .description | ✓ |
| CTA | data-cta cta | data-cta cta | .cta | ✓ |
After updating SCSS files, use these make commands to compile and sync CSS to the appropriate locations.
Important: Always run make first to compile, then sync to deploy.
makemake sync-to-docsmake sync-css-antsandmake && make sync-allFor deployed sites (e.g., shivasnotes), CSS files are in deployment/{site}/public/css/.
The ANTSAND system handles deployment automatically when users click "Save & Preview" in the Databoard -
it creates and deploys all necessary files including CSS, templates, and assets.
Manual updates to deployment folders require sudo as they are owned by www-data.
Copy this context when asking an AI assistant to create or modify ANTSAND templates. It provides all the necessary information about file locations, class naming conventions, and alignment requirements.
# ANTSAND Template Alignment Guide for AI
## Overview
ANTSAND uses a 3-layer architecture where all layers must be aligned:
1. **outline2design.json** - Template definitions for UI
2. **parameter_files.json** - Master CSS class definitions
3. **SASS v2 patterns** - Visual styling
## The "One Template" Architecture
`service_3_modern.volt` is a UNIVERSAL template that renders ALL section types:
- Hero sections
- Features sections
- Footer sections
- Pricing sections
- Blog sections
- etc.
The ONLY thing that changes between section types is the **parent CSS class**:
- `hero-1`, `hero-2`, `hero-3` for heroes
- `footer-1`, `footer-2`, `footer-3` for footers
- `features-1`, `features-2` for features
## Dual-Class System
Every element has TWO classes for backward compatibility:
```
class="[prefixed] [semantic]"
class="data-h3 title"
class="footer-social-container social-container"
```
- **Prefixed class** (`data-h3`, `footer-social-container`): Indicates which AREA
- **Semantic class** (`title`, `social-container`): Universal styling hook
## How to Create a New Template
### Step 1: Add to outline2design.json
```json
{
"name": "My New Footer",
"parameters_file": "service-3-modern",
"css": {
"section": { "container": { "css_class": "footer-1" } },
"data": {
"container": { "css_class": "data-container container" },
"h3": { "css_class": "data-h3 title" }
}
}
}
```
### Step 2: Verify parameter_files.json has the classes
The `service-3-modern` parameter set should already have all dual classes defined.
### Step 3: Ensure SASS v2 styles exist
Check that `_footer.scss` targets the semantic classes:
```scss
.footer-1 {
> .container { ... }
.sub-container { ... }
.title { ... }
}
```
## Alignment Verification Checklist
When creating/modifying templates, verify:
- [ ] outline2design.json uses dual classes
- [ ] Classes match parameter_files.json definitions
- [ ] SCSS targets semantic class within parent selector
- [ ] Parent class (footer-1, hero-1) is set at section level
## File Paths
- Template definitions: `app/antsand_bootstrap/project/common_views/outline2design.json`
- Parameter master: `app/antsand_bootstrap/project/common_views/parameter_files.json`
- SCSS patterns: `styles_antsand/sass_v2/patterns/`
- Universal template: `app/antsand_bootstrap/project/common_views/services_products/service_3_modern.volt`