Unverified Commit 23811fd4 authored by zapashcanon's avatar zapashcanon
Browse files

first commit

parents
version=0.19.0
align-cases=false
align-constructors-decl=false
align-variants-decl=false
assignment-operator=end-line
break-before-in=fit-or-vertical
break-cases=all
break-collection-expressions=fit-or-vertical
break-fun-decl=wrap
break-fun-sig=wrap
break-infix=wrap
break-infix-before-func=false
break-separators=before
break-sequences=true
break-string-literals=auto
break-struct=force
cases-exp-indent=2
cases-matching-exp-indent=normal
disambiguate-non-breaking-match=false
doc-comments=before
doc-comments-padding=2
doc-comments-tag-only=default
dock-collection-brackets=false
exp-grouping=preserve
extension-indent=2
field-space=loose
function-indent=2
function-indent-nested=never
if-then-else=k-r
indent-after-in=0
indicate-multiline-delimiters=space
indicate-nested-or-patterns=unsafe-no
infix-precedence=indent
leading-nested-match-parens=false
let-and=sparse
let-binding-indent=2
let-binding-spacing=compact
let-module=compact
margin=80
match-indent=0
match-indent-nested=never
max-indent=68
module-item-spacing=sparse
nested-match=wrap
ocp-indent-compat=false
parens-ite=false
parens-tuple=always
parens-tuple-patterns=multi-line-only
parse-docstrings=true
sequence-blank-line=preserve-one
sequence-style=terminator
single-case=compact
space-around-arrays=true
space-around-lists=true
space-around-records=true
space-around-variants=true
stritem-extension-indent=0
type-decl=sparse
type-decl-indent=2
wrap-comments=false
wrap-fun-args=true
(lang dune 2.0)
This diff is collapsed.
.icon-list {
padding-left: 0;
list-style: none;
}
.icon-list li {
display: flex;
align-items: flex-start;
margin-bottom: .25rem;
}
.icon-list li::before {
display: block;
flex-shrink: 0;
width: 1.5em;
height: 1.5em;
margin-right: .5rem;
content: "";
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23212529' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z'/%3E%3C/svg%3E") no-repeat center center / 100% auto;
}
body {
color: #444;
background-color: #EEEEEE;
line-height: 1.6;
font-size: 18px;
}
This diff is collapsed.
(executable
(name hello)
(modules assets hello template)
(libraries dream))
(rule
(targets template.ml)
(deps template.eml.html)
(action
(run dream_eml %{deps} --workspace %{workspace_root})))
(rule
(target assets.ml)
(deps
(source_tree assets))
(action
(with-stdout-to
%{null}
(run ocaml-crunch -m plain assets -o %{target}))))
let asset_loader _root path _request =
match Assets.read path with
| None -> assert false
| Some asset -> Dream.respond asset
let () =
Dream.run @@ Dream.logger
@@ Dream.router
[ Dream.get "/assets/**" (Dream.static ~loader:asset_loader "")
; Dream.get "/" (fun _request ->
Dream.html
(Template.render ~lang:"en"
~title:"Harnessing Cutting-Edge Technologies" ~content:"Hi !" ) )
; Dream.get "/research-and-development" (fun _request ->
Dream.html
(Template.render ~lang:"en" ~title:"Research and Development"
~content:"We research and we develop" ) )
; Dream.get "/expertise" (fun _request ->
Dream.html
(Template.render ~lang:"en" ~title:"Expertise"
~content:"We are experts in expertise" ) )
; Dream.get "/trainings" (fun _request ->
Dream.html
(Template.render ~lang:"en" ~title:"Trainings"
~content:"Do you know rust ?" ) )
; Dream.get "/team" (fun _request ->
Dream.html
(Template.render ~lang:"en" ~title:"Team"
~content:"The team hihi" ) )
; Dream.get "/blog" (fun _request ->
Dream.html
(Template.render ~lang:"en" ~title:"Blog"
~content:"This is an amazing blog !" ) )
]
@@ Dream.not_found
let render ~lang ~title ~content =
<!DOCTYPE html>
<html lang="<%s lang %>">
<head>
<title><%s title %> | OCamlPro</title>
<link href="/assets/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/assets/css/starter-template.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
</head>
<body>
<header>
<ul>
<li><a href="/">OCamlPro</a></li>
<li><a href="/research-and-development">Research and Development</a></li>
<li><a href="/expertise">Expertise</a></li>
<li><a href="/trainings">Trainings</a></li>
<li><a href="/team">Team</a></li>
<li><a href="/blog">Blog</a></li>
</ul>
</header>
<main>
<h1><%s title %></h1>
<%s content %>
<footer class="container">
<p class="float-end"><a href="#">Back to top</a></p>
<p>&copy; 2011–2021 OCamlPro &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
</main>
<script src="/assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment