Skip to content

Commit 0a3a5c3

Browse files
tmattiodra27
andauthored
Update homepage for OCaml 5.0 beta release (ocaml#598)
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
1 parent a9b3d29 commit 0a3a5c3

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

src/dream_dashboard/template/layout_template.eml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ let render ~prefix ~title ~nav inner =
198198
<div class="sticky top-0 z-10 md:hidden pl-1 pt-1 sm:pl-3 sm:pt-3 bg-gray-800">
199199
<button
200200
type="button"
201-
class="-ml-0.5 -mt-0.5 h-12 w-12 inline-flex items-center justify-center rounded-md focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500"
201+
class="-ml-0.5 -mt-0.5 h-12 w-12 inline-flex items-center justify-center rounded-md focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary-600"
202202
@click="open = true"
203203
>
204204
<span class="sr-only">Open sidebar</span>

src/ocamlorg_frontend/layouts/layout.eml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let render ?(use_swiper=false) ?(wide=false) ?description ?styles ~title ?canonical inner =
1+
let render ?(use_swiper=false) ?(banner = false) ?(wide=false) ?description ?styles ~title ?canonical inner =
22
<!DOCTYPE html>
33
<html lang="en">
44
<head>
@@ -39,6 +39,25 @@ let render ?(use_swiper=false) ?(wide=false) ?description ?styles ~title ?canoni
3939
</head>
4040

4141
<body class="light">
42+
<% if banner then ( %>
43+
<div class="relative bg-primary-600">
44+
<div class="mx-auto max-w-7xl py-3 px-3 sm:px-6 lg:px-8">
45+
<div class="pr-16 sm:px-16 sm:text-center">
46+
<p class="font-medium text-white">
47+
<span class="md:hidden">OCaml 5.0 is in beta!</span>
48+
<span class="hidden md:inline">OCaml 5.0 is beta! OCaml 5.0 is the next major release of OCaml, which comes with support for shared-memory parallelism through domains and direct-style concurrency through algebraic effects!</span>
49+
<span class="block sm:ml-2 sm:inline-block">
50+
<a href="<%s Url.news_post "ocaml-5.0.beta1" %>" class="font-bold text-white underline">
51+
Try it now
52+
<span aria-hidden="true"> &rarr;</span>
53+
</a>
54+
</span>
55+
</p>
56+
</div>
57+
</div>
58+
</div>
59+
<% ); %>
60+
4261
<%s! Header.render ~wide () %>
4362

4463
<main><%s! inner %></main>

src/ocamlorg_frontend/pages/home.eml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
let render () =
22
Layout.render
33
~use_swiper:true
4+
~banner:true
45
~title:"Welcome to a World of OCaml"
56
~description:"OCaml is a general-purpose, industrial-strength programming language with an emphasis on expressiveness and safety."
67
~canonical:"" @@
@@ -36,17 +37,17 @@ Layout.render
3637
<div style="flex: 1 1 50%" class="py-2 px-6 text-white text-opacity-50 overflow-auto">
3738
<div class="text-left overflow-auto">
3839
<pre id="output" class="flex flex-col w-full code-preview text-white text-sm space-y-1 font-medium">
39-
<span><span class="text-blue-500 ">let</span> <span class="text-code-yellow ">square</span> x = x * x</span>
40-
<span><i class="text-gray-400 ">val square : int -> int = < fun ></i></span>
41-
<span>square 3</span>
42-
<span><i class="text-gray-400 ">- : int = 9</i></span>
43-
<span><span class="text-blue-500 ">let rec</span> <span class="text-code-yellow ">fac</span> x =</span>
44-
<span><span class="text-blue-500 ml-4">if</span> x <= 1 <span class="text-blue-500 ">then</span> 1 <span class="text-blue-500">else</span> x * fac (x - 1)</span></span>
45-
<span><i class="text-gray-400">val fac : int -> int = < fun ></i></span>
46-
<span>fac 5</span>
47-
<span><i class="text-gray-400 ">- : int = 120</i></span>
48-
<span>square 120</span>
49-
<span><i class="text-gray-400">- : int = 14400</i></span>
40+
<code><span><span class="text-blue-500 ">let</span> <span class="text-code-yellow ">square</span> x = x * x</span>
41+
<span><i class="text-gray-400 ">val square : int -> int = < fun ></i></span>
42+
<span>square 3</span>
43+
<span><i class="text-gray-400 ">- : int = 9</i></span>
44+
<span><span class="text-blue-500 ">let rec</span> <span class="text-code-yellow ">fac</span> x =</span>
45+
<span><span class="text-blue-500 ml-4">if</span> x <= 1 <span class="text-blue-500 ">then</span> 1 <span class="text-blue-500">else</span> x * fac (x - 1)</span></span>
46+
<span><i class="text-gray-400">val fac : int -> int = < fun ></i></span>
47+
<span>fac 5</span>
48+
<span><i class="text-gray-400 ">- : int = 120</i></span>
49+
<span>square 120</span>
50+
<span><i class="text-gray-400">- : int = 14400</i></span></code>
5051
</pre>
5152
</div>
5253
</div>

0 commit comments

Comments
 (0)