-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from BackToBasicsEpita/lcd/landing
landing page
- Loading branch information
Showing
22 changed files
with
666 additions
and
98 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
weight: 999 | ||
title: "Example" | ||
description: "Sujet d'exemple pour faire un sujet" | ||
icon: "function" | ||
date: "2023-08-26T20:43:23+01:00" | ||
lastmod: "2023-08-26T20:43:23+01:00" | ||
draft: false | ||
toc: true | ||
katex: false | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
weight: 500 | ||
title: "Ecrire un sujet" | ||
description: "Comment les sujets sont écrits ?" | ||
icon: "fluid_med" | ||
date: "2023-08-26T20:43:23+01:00" | ||
lastmod: "2023-08-26T20:43:23+01:00" | ||
draft: false | ||
toc: true | ||
katex: true | ||
--- | ||
|
||
### Markdown ? | ||
|
||
Le LaTeX c'est bien beau mais si on doit faire tous nos cours comme ça, ça nous prendrait une éternité pour couvrir tous les chapitres :c. | ||
|
||
C'est pour ça que les sujets sont écrits en `Markdown`. | ||
Enfin, on écrit un fichier en Markdown et `Hugo` nous permet de le transformer en page `Html` automatiquement. | ||
|
||
Le `Markdown` est un langage de balisage (un peu comme le `Html`) créer avec comme objectif d'offrire une syntaxe facile à lire et à écrire. | ||
|
||
#### Pourquoi faire du Markdown ? | ||
|
||
Si vous utilisez **Discord** alors vous avez peut-être déjà entendu parlé de `Markdown`, sinon vous allez voir que c'est vraiment très simple à prendre en main :) | ||
|
||
Voici un exemple montrant la simplicité du `Markdown` par rapport au `Html` et `LaTex` | ||
|
||
{{< tabs tabTotal="3">}} | ||
{{% tab title="Html" %}} | ||
|
||
**Html demo** | ||
|
||
```html | ||
<p>Ce<b>Mot</b> en gras et celui-là <strong>aussi</strong>.</p> | ||
``` | ||
|
||
<p>Ce<b>Mot</b> en gras et celui-là <strong>aussi</strong>.</p> | ||
|
||
{{% /tab %}} | ||
{{% tab title="LaTex" %}} | ||
|
||
**LaTeX demo** | ||
|
||
```latex | ||
Ce \textbf{Mot} en gras et celui-là \textbf{aussi}. | ||
``` | ||
|
||
{{< katex >}} | ||
$$ | ||
Ce\ \textbf{Mot}\ en\ gras\ et\ celui-là\ \textbf{aussi}. | ||
$$ | ||
{{< /katex >}} | ||
|
||
{{% /tab %}} | ||
{{% tab title="Markdown" %}} | ||
|
||
**MarkDown demo** | ||
|
||
```markdown | ||
Ce **Mot** en gras et celui-là **aussi**. | ||
``` | ||
|
||
Ce **Mot** en gras et celui-là **aussi**. | ||
|
||
{{% /tab %}} | ||
{{< /tabs >}} | ||
|
||
#### Comment faire du Markdown ? | ||
|
||
|format|Markdown|Résultat| | ||
|--------|--------|--------| | ||
| Italique | `*lorem*` | *lorem ipsum* | | ||
| C | D || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
weight: 500 | ||
title: "Aperçu" | ||
description: "Comment faire un sujet" | ||
icon: "local_library" | ||
date: "2023-08-26T20:43:23+01:00" | ||
lastmod: "2023-08-26T20:43:23+01:00" | ||
draft: false | ||
toc: true | ||
katex: false | ||
--- | ||
|
||
### Hugo ? Kesako ?? | ||
|
||
`Hugo` est un framework pour fabriquer des sites web. | ||
C'est l'un des framework les plus populaires pour créer des sites statiques ; | ||
c'est à dire des sites qui n'ont pas de traitement côté serveur et donc pas de base de données. | ||
|
||
Le site est donc uniquement composé de `HTML`, `CSS` et `Javascript`, | ||
les pages sont "fixes"et toute fonctionnalité *dynamique* est executé sur le navigateur de l'utilisateur grâce au *javascript*. | ||
|
||
De plus, `Hugo` est très simple d'utilisation et a une documentation complète et propose une large sélection de thèmes et | ||
vous permet également de créer votre propre thème (nous avons assemblé plusieurs thèmes pour obtenir le thème qui fait fonctionner le site). | ||
|
||
Vous pourrez retrouver le documentation et les comment installer `Hugo` sur leur [site web](https://gohugo.io/). | ||
|
||
#### Le thème Hugo | ||
|
||
Vous pourrez retrouver le thème Hugo B2B sur [github](https://github.com/BackToBasicsEpita/b2b-theme) ainsi que la documentation pour pour l'utiliser pour faire votre propre site :) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
themes/lotusdocs/layouts/spe/_markup/render-codeblock-mermaid.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<pre class="mermaid"> | ||
{{- .Inner }} | ||
</pre> | ||
{{ .Page.Store.Set "hasMermaid" true }} |
85 changes: 85 additions & 0 deletions
85
themes/lotusdocs/layouts/spe/_markup/render-codeblock.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- Prism Render Hook --> | ||
{{ if eq .Page.Site.Params.docs.prism true }} | ||
{{- $attributes := .Attributes }} | ||
{{- $ordinal := .Ordinal }} | ||
|
||
<!-- Create SHA1 Hash of Code Block--> | ||
{{ $innerRemoveLB := replaceRE "\r\n?|\n" "" .Inner | string }} | ||
{{ $innerHash := substr (sha1 (printf "%s%s" $innerRemoveLB $ordinal)) 0 7 }} | ||
|
||
{{- $classes := slice (printf "language-%s" .Type) .Attributes.class }} | ||
|
||
<!-- Options List --> | ||
{{- $options := .Options }} | ||
{{ $optionslist := newScratch }} | ||
{{ range $k, $v := $options }} | ||
{{ $optionslist.Add "options" (printf " %s" $k) }} | ||
{{ end }} | ||
{{ $optionsclasslist := $optionslist.Get "options" }} | ||
|
||
<!-- Line Number Highlight --> | ||
{{- if isset .Options "hl_lines" }} | ||
{{ $lines := .Options.hl_lines }} | ||
|
||
{{ $offset := 0 }} | ||
{{- if isset .Options "linenostart" }} | ||
{{ $offset = .Options.linenostart }} | ||
{{ else }} | ||
{{ $offset = 1 }} | ||
{{ end }} | ||
|
||
{{ $data := newScratch }} | ||
{{ range $value := $lines }} | ||
{{ $value = uniq $value }} | ||
{{ if lt (len $value) 2 }} | ||
{{ $value = slice (add $offset (index $value 0)) }} | ||
{{ else }} | ||
{{ $value = slice (delimit (slice (add $offset (index $value 0)) (add $offset (index $value 1))) "-") }} | ||
{{ end }} | ||
{{ $data.Add "lines" $value }} | ||
{{ end }} | ||
{{ $lines = delimit ($data.Get "lines") "," }} | ||
|
||
{{- $attributes = merge $attributes (dict "data-line" $lines) }} | ||
|
||
<!-- https://github.com/PrismJS/prism/issues/2714 --> | ||
{{- if and (isset .Options "linenos") (ne .Options.linenos false) }} | ||
{{- $attributes = merge $attributes (dict "data-line-offset" (string $offset)) }} | ||
{{ else }} | ||
{{- $attributes = merge $attributes (dict "data-line-offset" (string (sub $offset 1))) }} | ||
{{ end }} | ||
|
||
{{ end -}} | ||
|
||
<!-- Line Numbers --> | ||
{{- if and (isset .Options "linenos") (ne .Options.linenos false) }} | ||
{{- $classes = $classes | append "line-numbers" }} <!-- https://discourse.gohugo.io/t/scope-issue-inside-conditional-block-i-think/29273/4 --> | ||
{{ end -}} | ||
|
||
<!-- Line Number Start --> | ||
{{- if isset .Options "linenostart" }} | ||
{{- $attributes = merge $attributes (dict "data-start" (string .Options.linenostart)) }} | ||
{{ end -}} | ||
|
||
<!-- Linkable Line Numbers --> | ||
{{- if and (isset .Options "anchorlinenos") (ne .Options.anchorlinenos false) }} | ||
{{- $classes = $classes | append "linkable-line-numbers" }} | ||
{{ end -}} | ||
|
||
{{- $attributes = merge $attributes (dict "class" (delimit $classes " ")) }} | ||
|
||
<div class="prism-codeblock {{ $optionsclasslist }}"> | ||
<pre id="{{ $innerHash }}" | ||
{{- range $k, $v := $attributes }} | ||
{{- printf " %s=%q" $k $v | safeHTMLAttr }} | ||
{{- end -}} | ||
> | ||
<code> | ||
{{- .Inner -}} | ||
</code> | ||
</pre> | ||
</div> | ||
{{ else }} | ||
{{ $result := transform.HighlightCodeBlock . }} | ||
{{ $result.Wrapped }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-hidden="true"><i class="material-icons align-middle">link</i></a></h{{ .Level }}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ $dest := .Destination }} | ||
{{ $text := .PlainText }} | ||
{{ $url := urls.Parse $dest }} | ||
|
||
{{ $image := newScratch }} | ||
{{ with $url.Scheme }} | ||
{{ $image.Set "resource" (resources.GetRemote $dest) }} | ||
{{ else }} | ||
{{ $image.Set "resource" (resources.Get $dest) }} | ||
{{ end }} | ||
|
||
{{ if .Title }} | ||
<figure> | ||
{{ with ($image.Get "resource") }} | ||
{{ if eq .MediaType.SubType "svg" }} | ||
{{ .Content | safeHTML }} | ||
{{ else }} | ||
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
{{ else }} | ||
<img src="{{ .Destination | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
<figcaption>{{ .Title | markdownify }}</figcaption> | ||
</figure> | ||
{{ else }} | ||
{{ with ($image.Get "resource") }} | ||
{{ if eq .MediaType.SubType "svg" }} | ||
{{ .Content | safeHTML }} | ||
{{ else }} | ||
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy"> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} |
Oops, something went wrong.