-
Notifications
You must be signed in to change notification settings - Fork 4
Migration guide: V3 V4
This guide will help you to migrate your theme V3 to V4.
V4 Introduce lot of breaking changes!
Due to a new build, you have to now import sfeir-school-theme from dist directory and not directly from sfeir-school-theme directory
<!doctype html>
<html lang="en">
<head>
...
<link
rel="stylesheet"
type="text/css"
href="./web_modules/sfeir-school-theme/sfeir-school-theme.css"
id="theme" />
</head>
...to replace by
<!doctype html>
<html lang="en">
<head>
...
<link
rel="stylesheet"
type="text/css"
href="./web_modules/sfeir-school-theme/dist/sfeir-school-theme.css"
id="theme" />
</head>
...import { SfeirThemeInitializer } from '../web_modules/sfeir-school-theme/sfeir-school-theme.mjs';to replace by
import { SfeirThemeInitializer } from '../web_modules/sfeir-school-theme/dist/sfeir-school-theme.mjs';Due to support for accessibilty, the previous syntax that let you specify classes in the alt field of image is now forbidden. You will have to use what is define in Markdown.
Have to be replace by:
Previously, the two-column layout was done by playing verticals slides syntax. Now a new syntax is introduce and let you have "multiples columns". To do the migration pay attention to thoses elements:
- Wrap each column in the new syntax
- If you use data-state on a sub column, you have to migrate it on the main slide
- No "main title" is available (as it was for two-column)
- If you use speakers notes on each column, you have to migrate all of them at the end of the slide
- If you use data-background on the column, you have to integrate them in the new syntax.
- The text color of the column is by default the same as normal slides, and if you have to deal with a negative slide, you should use the class
contrast-opposite. This mean that the class "text-dark" is now useless - Change
two-columnortwo-column-layoutby `tc-multiplie-columns'
The new syntax is something like that :
##++##
The content of a column
##++##Old slide (two-column-layout)
<!-- .slide: class="two-column-layout"-->
# A title (deprecated)
##--##
content left
##--##
content rightReplace it by
<!-- .slide: class="tc-multiple-columns"-->
##++##
# A title (deprecated)
content left
##++##
##++##
content right
##++##Old slides (two-column)
<!-- .slide: class="two-column" data-state="test" -->
## Slide 1 with notes
A paragraph with some text and a [link](http://hakim.se).
Press 'S'
Notes:
Notes for slide left
##--##
<!-- .slide: data-state="test2" -->
## Slide 2 with notes
- Item 2
- Item 3
<!-- .element: class="list-fragment" -->
Notes:
Notes for slide right
##==##
<!-- .slide: class="two-column" data-background="./assets/images/dark_background.jpeg" -->
# Some text
##--##
## Slide 2
- Item 2
- Item 3
<!-- .element: class="list-fragment" -->Replace it by:
<!-- .slide: class="tc-multiple-columns" data-state="test test2" -->
##++##
## Slide 1 with notes
A paragraph with some text and a [link](http://hakim.se).
Press 'S'
##++##
##++##
## Slide 2 with notes
- Item 2
- Item 3
<!-- .element: class="list-fragment" -->
##++##
Notes:
Notes for slide left
Notes for slide right
##==##
<!-- .slide: class="tc-multiple-columns" -->
##++## data-background="./assets/images/dark_background.jpeg" class="contrast-opposite"
# Some Text
##++##
##++##
## Slide 2
- Item 2
- Item 3
<!-- .element: class="list-fragment" -->
##++##- You should have to wrap the actual content of a speaker slide in a
divwith the class.speaker-slide - You don't need anymore 'icon-rule', 'icon-*' classes
- Badge like
first-badge... are not necessary now, simply indicatebadge
<!-- .slide: class="speaker-slide" -->
# Votre hôte pour la journée





<h2>Jean-François<span> Garreau</span></h2>
### CTO front
<!-- .element: class="icon-rule icon-first" -->
### @jefbinomed
<!-- .element: class="icon-twitter icon-second" -->
### [email protected]
<!-- .element: class="icon-mail icon-third" -->To replace by:
<!-- .slide: class="speaker-slide" -->
<div class="speaker-slide">
# Hello ! @SFEIR
## Jean-François <b>Garreau</b>
### CTO Front
### [email protected]
### @jefbinomed





</div>To support more libraries (now support, feather, font-awesome, material-symbols), you have to change the way you declare and icon. This guide will show you how to migrate feather icons due to the fact it was the only support icons library in V3
 basic icon
 small icon
 big icon
<!-- .element: style="--icon-size:96px; --icon-color:orange;" --> custom icon and custom colorTo replace by:
 basic icon
 small icon
 big icon
<!-- .element: style="--tc-icon-size:96px; --tc-icon-color:orange;" --> custom icon and custom color-
data-theme-slidein html becomedata-themeandthemein url becomedata-theme -
data-type-showin html becomedata-typeabdtypein url becomedata-type -
langin url becomedata-lang
- Update .nvmrc to version 20
- Update docker-compose.yaml to node version 20.2
Just update sfeir-school-theme to 4.X.X version
To helps you with this, a migration tools exists in the last release to do the main expected tasks here. This script is not perfect so please be careful when you run it, take times to review all the problems and fix thems manually. To launch the migration script
- Install the last version of the theme (4.X.X)
- run
npx sfeir-school-theme-migrate-> This will modify all the elements specified above - run (optionnal)
npx sfeir-school-theme-cleanup-> This will clean a litle bit you markdown with removing previous classes unused
As the new version of node supported is 20, you will have to update your node_modules with npm i.