]> git.f4mnq.fr Git - site-web-pro.git/commitdiff
Le fichier index.html est maintenant *vraiment* du OCaml trunk
authorAmélia Coutard-Sander <git@f4mnq.fr>
Sun, 15 Feb 2026 11:15:35 +0000 (12:15 +0100)
committerAmélia Coutard-Sander <git@f4mnq.fr>
Sun, 15 Feb 2026 11:15:35 +0000 (12:15 +0100)
dune-project
f4mnq/dune
f4mnq/index.ml
guix/site-web-pro.scm

index e77f33fccffdf5f2355c4925144465ba0acb5efc..c970ded7ac3b9f14eabce540089e1b25b3fee8e9 100644 (file)
@@ -16,5 +16,5 @@
  (name site-web-pro)
  (synopsis "Site web professionnel")
  (description "Le site web professionnel d'Amélia COUTARD-SANDER, écrit en OCaml")
  (name site-web-pro)
  (synopsis "Site web professionnel")
  (description "Le site web professionnel d'Amélia COUTARD-SANDER, écrit en OCaml")
- (depends ocaml)
+ (depends ocaml tyxml)
  (tags ("site web" "ocaml")))
  (tags ("site web" "ocaml")))
index e174c5741db7aea40fa503a1290c226fdc6e11ea..fd3f727cb994f781f5f0a88b8a19d1dedd894f13 100644 (file)
@@ -1,11 +1,13 @@
 (executables
  (public_names index style)
 (executables
  (public_names index style)
- (libraries html))
+ (libraries html tyxml))
 
 (install
  (files
   (index.html as f4mnq/index.html)
   (style.css as f4mnq/style.css)
 
 (install
  (files
   (index.html as f4mnq/index.html)
   (style.css as f4mnq/style.css)
+  (glob_files
+   (COPYING-* with_prefix f4mnq))
   (glob_files
    (mpring/* with_prefix f4mnq/mpring)))
  (section share))
   (glob_files
    (mpring/* with_prefix f4mnq/mpring)))
  (section share))
index f2dd5f0e5dabbde2a887ffc65497cffe692fee58..1ac093b30bc6715137cac9e691f6303132dd50c7 100644 (file)
  * along with this website.  If not, see <https://www.gnu.org/licenses/>.
  *)
 
  * along with this website.  If not, see <https://www.gnu.org/licenses/>.
  *)
 
-Printf.printf "%s"
-  {|<!DOCTYPE html>
-<html>
-<head>
-       <meta charset="UTF-8" />
-       <link rel="stylesheet" href="/style.css" />
-</head>
-<body>
-<div id="content">
-       <p> Bonjour ! Ici Amélia Coutard-Sander, aka F4MNQ, une étudiante (et
-       future chercheuse si tout se passe bien) en informatique. </p>
+open Tyxml
 
 
-       <p> Vous pouvez trouver certains de mes projets dans les dépôts git
-       <a href="https://git.f4mnq.fr/">ci-joints</a>. </p>
+let licence statement info text =
+        let open Html in
+        [
+          txt statement; txt " ("; a ~a:[a_href info] [txt "info"]; txt " | "; a ~a:[a_href text] [txt "texte"]; txt ").";
+        ]
 
 
-       <p> Il est possible de me contacter par mail à l'adresse
-       "contact AROBASE &lt;le domaine de ce site&gt; (f4[···].fr)". </p>
+let html : Html.doc =
+        let open Html in
+        html
+          (head
+             (title (txt "F4MNQ - Amélia Coutard-Sander"))
+             [meta ~a:[a_charset "UTF-8"] (); link ~rel:[`Stylesheet] ~href:"/style.css" ()])
+          (body
+             [
+               div
+                 ~a:[a_id "content"]
+                 [
+                   p
+                     [
+                       txt
+                         "Bonjour ! Ici Amélia Coutard-Sander, aka F4MNQ, une étudiante (et future chercheuse si tout \
+                          se passe bien) en informatique.";
+                     ];
+                   p
+                     [
+                       txt "Vous pouvez trouver certains de mes projets dans les dépôts git ";
+                       a ~a:[a_href "https://git.f4mnq.fr/"] [txt "ci-joints"];
+                       txt ".";
+                     ];
+                   p
+                     [
+                       txt
+                         "Il est possible de me contacter par mail à l'adresse \"contact AROBASE <le domaine de ce \
+                          site> (f4[···].fr)\".";
+                     ];
+                   p
+                     [
+                       txt
+                         "En bas de cette page est un webring avec certain·e·s de mes ami·e·s, et mes camarades \
+                          d'informatique.";
+                     ];
+                 ];
+               p
+                 (txt "Copyright 2026 Amélia COUTARD-SANDER."
+                  :: br ()
+                  :: licence "Le code de ce site est sous la licence AGPLv3, ou une version ultérieure"
+                       "https://www.gnu.org/licenses/quick-guide-gplv3.html" "/COPYING-AGPL-3.0"
+                 @ br ()
+                   :: licence "Son contenu est sous la licence CC BY-SA 4.0, ou une version ultérieure"
+                        "https://creativecommons.org/licenses/by-sa/4.0/" "/COPYING-CC-BY-SA-4.0");
+               iframe
+                 ~a:
+                   [
+                     a_id "mpring";
+                     a_src "https://mpring.f4mnq.fr/ring.html";
+                     a_title "Webring amical";
+                     a_width 200;
+                     a_height 80;
+                   ]
+                 [];
+             ])
 
 
-       <p> En bas de cette page est un webring avec certain·e·s de mes ami·e·s
-       et mes camarades d'informatique. </p>
-</div>
-<p>
-Copyright 2026 Amélia COUTARD-SANDER. <br />
-Le code de ce site est sous la licence AGPLv3, ou une version ultérieure
-       (<a href='https://www.gnu.org/licenses/quick-guide-gplv3.html'>info</a> | <a href='/COPYING-AGPL-3.0'>texte</a>). <br />
-Son contenu est sous la licence CC BY-SA 4.0, ou une version ultérieure
-       (<a href='https://creativecommons.org/licenses/by-sa/4.0/'>info</a> | <a href='/COPYING-CC-BY-SA-4.0'>texte</a>).
-</p>
-<iframe id="mpring" src="https://mpring.f4mnq.fr/ring.html" title="Webring amical" width=200px height=80px></iframe>
-</body>
-</html>
-|}
+let () = Format.printf "%a" (Html.pp ()) html
index 03f34a091a25c99286b7a4cf32d010029bde9f32..a618643a259f47ff21cd7c8191f7cae6698909d1 100644 (file)
@@ -14,6 +14,7 @@
 ; along with this website If not, see <https://www.gnu.org/licenses/>.
 
 (define-module (site-web-pro)
 ; along with this website If not, see <https://www.gnu.org/licenses/>.
 
 (define-module (site-web-pro)
+       #:use-module (gnu packages ocaml)
        #:use-module (guix build-system dune)
        #:use-module (guix gexp)
        #:use-module (guix git-download)
        #:use-module (guix build-system dune)
        #:use-module (guix gexp)
        #:use-module (guix git-download)
@@ -30,6 +31,7 @@
        (version "1.0-git")
        (source (local-file (dirname (dirname (current-filename))) "site-web-pro-checkout" #:recursive? #t #:select? vcs-file?))
        (build-system dune-build-system)
        (version "1.0-git")
        (source (local-file (dirname (dirname (current-filename))) "site-web-pro-checkout" #:recursive? #t #:select? vcs-file?))
        (build-system dune-build-system)
+       (inputs (list ocaml-re ocaml-uutf ocaml-tyxml))
        (synopsis "Mon site web professionel")
        (description "Mon site web professionel, statique, écrit en OCaml.")
        (home-page "https://www.f4mnq.fr")
        (synopsis "Mon site web professionel")
        (description "Mon site web professionel, statique, écrit en OCaml.")
        (home-page "https://www.f4mnq.fr")