Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOPRANO
website
Commits
14198e2e
Commit
14198e2e
authored
Feb 09, 2015
by
François Bobot
Browse files
[Style] Initial stylesheet
parent
735cb8da
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/generate.ml
View file @
14198e2e
open
Html5
.
M
open
Menu
let
page
~
title
:
t
b
=
let
internal_link
?
(
a
=
[]
)
p
text
=
Html5
.
M
.
a
~
a
:
(
a_href
(
p
.
filename
^
".html"
)
::
a_title
p
.
long_title
::
a
)
[
pcdata
text
]
let
page
p
b
=
let
header
=
div
~
a
:
[
a_id
"Header"
]
[
internal_link
~
a
:
[
a_style
"font-size: large;"
]
main
"SOPRANO"
;
pcdata
(
": "
^
p
.
long_title
)]
in
let
menu
=
(
List
.
map
(
fun
p
->
internal_link
p
p
.
menu_title
))
menu
in
let
menu
=
div
~
a
:
[
a_id
"Menu"
]
menu
in
let
content
=
div
~
a
:
[
a_id
"Content"
]
b
in
let
html
=
html
(
head
(
title
(
pcdata
t
))
[
meta
~
a
:
[
a_charset
"utf-8"
]
()
])
(
body
b
)
in
(
head
(
title
(
pcdata
(
"SOPRANO: "
^
p
.
long_title
)))
[
meta
~
a
:
[
a_charset
"utf-8"
]
()
;
link
~
rel
:
[
`Stylesheet
]
~
href
:
"css/main.css"
()
])
(
body
([
header
;
content
;
menu
]))
in
Html5
.
P
.
print
~
output
:
print_string
html
src/index.page.ml
View file @
14198e2e
open
Html5
.
M
open
Generate
open
Menu
let
()
=
Generate
.
page
~
title
:
"Toto"
[
let
()
=
Generate
.
page
main
[
p
[
pcdata
"C'est ça!"
]
]
src/menu.ml
0 → 100644
View file @
14198e2e
open
Html5
.
M
type
page
=
{
long_title
:
string
;
menu_title
:
string
;
filename
:
string
;
(** If this field is foo the page must
be defined in "foo.page.ml" *)
}
let
main
=
{
long_title
=
"Home"
;
menu_title
=
"Home"
;
filename
=
"index"
}
let
menu
=
[
main
;
]
src/utils.mllib
View file @
14198e2e
Menu
Generate
\ No newline at end of file
www/css/main.css
0 → 100644
View file @
14198e2e
/* From bluerobot layout1 */
body
{
margin
:
0px
;
padding
:
0px
;
font-family
:
verdana
,
arial
,
helvetica
,
sans-serif
;
color
:
#333
;
background-color
:
white
;
}
h1
{
margin
:
0px
0px
15px
0px
;
padding
:
0px
;
font-size
:
28px
;
line-height
:
28px
;
font-weight
:
900
;
color
:
#ccc
;
}
p
{
font
:
11px
/
20px
verdana
,
arial
,
helvetica
,
sans-serif
;
margin
:
0px
0px
16px
0px
;
padding
:
0px
;
}
#Content
>
p
{
margin
:
0px
;}
#Content
>
p
+
p
{
text-indent
:
30px
;}
a
{
color
:
#09c
;
font-size
:
11px
;
text-decoration
:
none
;
font-weight
:
600
;
font-family
:
verdana
,
arial
,
helvetica
,
sans-serif
;
}
a
:link
{
color
:
#09c
;}
a
:visited
{
color
:
#07a
;}
a
:hover
{
background-color
:
#eee
;}
#Header
{
margin
:
50px
0px
10px
0px
;
padding
:
17px
0px
0px
20px
;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
height
:
33px
;
/* 14px + 17px + 2px = 33px */
border-style
:
solid
;
border-color
:
black
;
border-width
:
1px
0px
;
/* top and bottom borders: 1px; left and right borders: 0px */
line-height
:
11px
;
background-color
:
#eee
;
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family
:
"\"}\""
;
voice-family
:
inherit
;
height
:
14px
;
/* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
length values to user agents that exhibit the parsing error exploited above yet get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body
>
#Header
{
height
:
14px
;}
#Content
{
margin
:
0px
50px
50px
200px
;
padding
:
10px
;
}
#Menu
{
position
:
absolute
;
top
:
100px
;
left
:
20px
;
width
:
172px
;
padding
:
10px
;
background-color
:
#eee
;
border
:
1px
dashed
#999
;
line-height
:
17px
;
/* Again, the ugly brilliant hack. */
voice-family
:
"\"}\""
;
voice-family
:
inherit
;
width
:
150px
;
}
/* Again, "be nice to Opera 5". */
body
>
#Menu
{
width
:
150px
;}
www/index.html
View file @
14198e2e
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
><head><title>
Toto
</title><meta
charset=
"utf-8"
/></head><body><p>
C'est ça!
</p></body></html>
\ No newline at end of file
<html
xmlns=
"http://www.w3.org/1999/xhtml"
><head><title>
SOPRANO: Home
</title><meta
charset=
"utf-8"
/><link
rel=
"stylesheet"
href=
"css/main.css"
/></head><body><div
id=
"Header"
><a
href=
"index.html"
title=
"Home"
style=
"font-size: large;"
>
SOPRANO
</a>
: Home
</div><div
id=
"Content"
><p>
C'est ça!
</p></div><div
id=
"Menu"
><a
href=
"index.html"
title=
"Home"
>
Home
</a></div></body></html>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment