Skip to content

Commit

Permalink
fix: clean some slides
Browse files Browse the repository at this point in the history
  • Loading branch information
arichard-info committed Sep 3, 2024
1 parent d57831f commit 65e43e3
Show file tree
Hide file tree
Showing 90 changed files with 404 additions and 203 deletions.
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/01-intro.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- .slide: class="two-column with-code" -->

# Introduction
# Routing

**Key features :**

Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/10-naming.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="with-code title-margin-sm" -->
<!-- .slide: class="with-code" -->

# Naming convention
# Routing

## Conventions

(.tsx | .js | .jsx)

Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/11-hierarchy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="two-column with-code title-margin-sm " -->
<!-- .slide: class="two-column with-code" -->

# Hierarchy
# Routing

## File hierarchy

File components are rendered and nested in a specific order :

Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/12-nesting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="two-column with-code title-margin-sm " -->
<!-- .slide: class="two-column with-code" -->

# Hierarchy
# Routing

## Nested file hierarchy

Nested routes = nested components

Expand Down
4 changes: 3 additions & 1 deletion docs/markdown/02-routing/13-with-pages-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
}
</style>

# Pages router
# Routing

## With pages router

The app router always has priority over the page router

Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/20-colocation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="two-column with-code title-margin-sm" -->
<!-- .slide: class="two-column with-code" -->

<style>
.routing-colocation-img {
Expand All @@ -7,7 +7,9 @@
}
</style>

# Colocation
# Routing

## Colocation

You can collocate files alongside specific files.

Expand Down
12 changes: 9 additions & 3 deletions docs/markdown/02-routing/21-colocation-private.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="two-column with-code title-margin-sm" -->
<!-- .slide: class="two-column with-code" -->

<style>
.routing-colocation-private-img {
Expand All @@ -7,8 +7,14 @@
}
</style>

# Colocation
# Routing

You can also make an entire subfolder private with an underscore prefix to exclude it from routing :
## Colocation

You can also make an entire subfolder private with an underscore prefix to exclude it from routing

##--##

<br/> <br/>

<img src="./assets/images/02-routing/colocation_folder.png" class="routing-colocation-private-img" />
4 changes: 3 additions & 1 deletion docs/markdown/02-routing/30-pages.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="two-column with-code" -->

# Page declaration
# Routing

## Page declaration

Create a _page.tsx_ file in nested directories :

Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/31-pages-dynamic.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="two-column with-code title-margin-sm" -->
<!-- .slide: class="two-column with-code" -->

# Dynamic routing
# Routing

## Page declaration : dynamic routing

```
/app/post/[id]/page.tsx website.com/post/123
Expand Down
6 changes: 4 additions & 2 deletions docs/markdown/02-routing/40-layout.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="two-column with-code title-margin-sm" -->
<!-- .slide: class="two-column with-code" -->

<style>
.layout-schema-img {
Expand All @@ -7,7 +7,9 @@
}
</style>

# Layouts
# Routing

## Shared layouts

Layouts can be used to define a UI that is shared between several sub-segments.

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/02-routing/41-root-layout.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Layouts
# Routing

## Root Layout
## Root layout

This layout is **required**

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/42-nested-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
</style>

# Layouts
# Routing

## Nested layouts

Expand Down
8 changes: 6 additions & 2 deletions docs/markdown/02-routing/43-template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="two-column with-code title-margin-sm" -->
<!-- .slide: class="two-column with-code" -->

<style>
.template-schema-img {
Expand All @@ -9,7 +9,9 @@
}
</style>

# Templates
# Routing

## Templates

Templates are layouts, but when navigating :

Expand Down Expand Up @@ -42,3 +44,5 @@ const Wrapper = () => {
);
};
```

<!-- .element: class="fragment" data-fragment-index="1"-->
10 changes: 9 additions & 1 deletion docs/markdown/02-routing/44-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
}
</style>

# Groups
# Routing

## Groups

Groups are directories that do not affect URLs

Expand All @@ -17,9 +19,15 @@ Groups are directories that do not affect URLs

<br/> <br/> <br/>

<div>

They can be used for :

- Organizing /app directory (by section / feature)
- Creating multiple nested layouts for the same segment
- Creating multiple root layouts
- Applying different layouts without affecting URLs

</div>

<!-- .element: class="fragment" data-fragment-index="1"-->
4 changes: 3 additions & 1 deletion docs/markdown/02-routing/50-advanced.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Advanced routing
# Routing

## Advanced features

- Parallel routing
- Intercepting routes
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/51-advanced-parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
</style>

# Advanced routing
# Routing

## Parallel routing

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/52-advanced-intercept.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
</style>

# Advanced routing
# Routing

## Intercepting routes

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/53-advanced-intercept-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
</style>

# Advanced routing
# Routing

## Intercepting routes

Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/02-routing/54-advanced-intercept-modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
</style>

# Advanced routing
# Routing

## Intercepting routes + Parallel routing

Expand Down
22 changes: 15 additions & 7 deletions docs/markdown/02-routing/60-lab.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- .slide: class="exercice" -->

# Pages
<h1 id="routing" style="margin-bottom: 30px;">Routing</h1>

## Lab

Expand All @@ -9,14 +9,22 @@
**1. Create the application pages**

- Homepage
- Employees list page
- Employees single page
- Expenses page
- Login page
- Employees pages (List, Detail, Edit, Create)
- Expenses page (List, Single)

**2. Create the application layouts**
**2. Add some metadatas (title, description)**

- Dashboard layout
- Authentication layout
**3. Create the application layouts**

- Authentication layout for the login page
- Dashboard layout for all the rest

<br/>
<br/>

_Styling isn't important. You can help yourself to these components :_<br/>
_DashboardLayout, AuthLayout, PageTitle, PersonCard, ExpensesTable, ExpenseDetails_ <br/><br/>
_You can also use mocked data from **/src/data**_

</small>
19 changes: 12 additions & 7 deletions docs/markdown/02-routing/80-lab.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<!-- .slide: class="exercice" -->

# Navigating
<h1 id="navigating" style="margin-bottom: 30px;">Navigating</h1>

## Lab

<small>

**1. Navigating between pages**
**1. next/link component**

- Implement the card Links
- Implement the navigation menu
- Show the active menu links
- Update the navigation menu to use client-side navigation
- On the employees list view, add two links per card to go on the details page, or on the edit page

**2. Use router methods**
**2. Programmatic navigation**

- Implement a "Search" component
- Modify the ExpensesTable component to navigate to the expense detail on click

**3. Navigation state**

- Implement a "Search" component (you can use the TextField component, or the \<input /\> element directly)
- Update the URL when typing to add a query parameter containing the user search
- Update the employees list view to filter depending on the URL query parameter

</small>
2 changes: 1 addition & 1 deletion docs/markdown/03-server-components/01-intro.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- .slide: class="two-column with-code" -->

# React Server Component : Why ?
# Server Components : Why ?

- Reduce JavaScript bundle size
- Better initial performances
Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/10-csr.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Client-Side applications
## Client-side applications

index.html

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/11-csr-workflow.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Client-Side applications
## Client-side applications

<br/>

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/13-ssr.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Server-Side Rendering
## Server-side Rendering

index.html

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/14-ssr2.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Server-Side Rendering
## Server-side Rendering

index.html

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/15-ssr3.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Server-Side Rendering
## Server-side Rendering

index.html

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/16-ssr-next.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Server-Side Rendering
## Server-side Rendering

Next.js : Page router

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/03-server-components/17-ssr-workflow.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- .slide: class="two-column with-code " -->

# Rendering methods
# Server Components : Why ?

## Server-Side Rendering
## Server-side Rendering

<br/>

Expand Down
Loading

0 comments on commit 65e43e3

Please sign in to comment.