Starter Page
A template demonstrating available components. Copy this file to create new pages.
Starter Pages
Focused starter templates you can copy as a starting point for new pages.
Card Component
Cards are the primary content containers. They have a header and body section.
Use cards to group related content and create visual hierarchy on the page.
Left Column
Use CSS Grid for multi-column layouts.
Right Column
Columns automatically stack on mobile.
Form Components
Button Styles
Quick Links Pattern
Message Styles
Use Django's messages framework. Messages auto-dismiss after 5 seconds.
View & URL Setup
1. Create a view in config/views.py or your app's views.py:
def my_page_view(request):
context = {'items': Item.objects.all()}
return render(request, 'my_page.html', context)
2. Add URL pattern in config/urls.py or your app's urls.py:
from .views import my_page_view
urlpatterns = [
path('my-page/', my_page_view, name='my_page'),
# ... other urls
]
3. Add to the sidebar (optional) from your app's apps.py, so SmallStack's own templates stay untouched:
from django.apps import AppConfig
class MyAppConfig(AppConfig):
name = "apps.myapp"
def ready(self):
from apps.smallstack.navigation import nav
nav.register(section="main", label="My Page", url_name="my_page", order=10)