mirror of
https://github.com/django-components/django-components.git
synced 2025-08-04 06:18:17 +00:00
refactor: use .nav.yml to define page order instead of nav weights (#1000)
This commit is contained in:
parent
f36581ed86
commit
d5e45125dc
57 changed files with 95 additions and 231 deletions
7
docs/getting_started/.nav.yml
Normal file
7
docs/getting_started/.nav.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
# `.nav.yml` is provided by https://lukasgeiter.github.io/mkdocs-awesome-nav
|
||||
nav:
|
||||
- Create your first component: your_first_component.md
|
||||
- Adding JS and CSS: adding_js_and_css.md
|
||||
- Components in templates: components_in_templates.md
|
||||
- Parametrising components: parametrising_components.md
|
||||
- Adding slots: adding_slots.md
|
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
title: Adding JS and CSS
|
||||
weight: 2
|
||||
---
|
||||
|
||||
Next we will add CSS and JavaScript to our template.
|
||||
|
||||
!!! info
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
title: Adding slots
|
||||
weight: 5
|
||||
---
|
||||
|
||||
Our calendar component's looking great! But we just got a new assignment from
|
||||
our colleague - The calendar date needs to be shown on 3 different pages:
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
title: Components in templates
|
||||
weight: 3
|
||||
---
|
||||
|
||||
By the end of this section, we want to be able to use our components in Django templates like so:
|
||||
|
||||
```htmldjango
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
title: Parametrising components
|
||||
weight: 4
|
||||
---
|
||||
|
||||
So far, our Calendar component will always render the date `1970-01-01`. Let's make it more useful and flexible
|
||||
by being able to pass in custom date.
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
title: Create your first component
|
||||
weight: 1
|
||||
---
|
||||
|
||||
A component in django-components can be as simple as a Django template and Python code to declare the component:
|
||||
|
||||
```htmldjango title="calendar.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue