This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.fsx
executable file
·180 lines (174 loc) · 6.78 KB
/
index.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#r "../_lib/Fornax.Core.dll"
#load "layout.fsx"
open Html
let generate' (ctx : SiteContents) (_: string) =
let posts = ctx.TryGetValues<Postloader.Post> () |> Option.defaultValue Seq.empty
let siteInfo = ctx.TryGetValue<Globalloader.SiteInfo> ()
let desc =
siteInfo
|> Option.map (fun si -> si.description)
|> Option.defaultValue ""
let psts =
posts
|> Seq.sortByDescending Layout.published
|> Seq.toList
|> List.map (Layout.postLayout true)
// Anything passed here will go to layout.fsx to be generated in the middle of the page.
Layout.layout ctx "Home" [
div [Class "container"] [
section [Class "articles"] [
div [Class "column is-8 is-offset-2"] [
div [Class "mature"] [
div [Class "container"] [
div [Class "mature-in"] [
div [Class "mature-blk"] [
p [] [ !!"F# is a mature, open source, cross-platform,"; br []; !!"functional-first programming language" ]
]
]
]
]
div [Class "cross"] [
div [Class "container"] [
div [Class "cross-in"] [
div [Class "cross-lft"] [
p [] [
!!"F# runs on Linux, Mac OS X, Android, iOS,"
br []
!!"Windows, GPUs, and browsers. It is free to use and is"
br []
!!"open sourceunder an OSI-approved"
br []
!! "license."
]
p [] [
!!"F# is used in a wide range of application areas and is"
br []
!!"supported by both an active open"
br []
!!"community and industry-leading companies"
br []
!!"providing professional tools."
]
ul [] [
li [] [ a [Href "#"] [!! "Getting Started"] ]
li [] [ a [Href "#"] [!! "Install F#"] ]
]
]
div [Class "cross-rgt"] [
div [Class "cross-main"] [
p [] [
!!"// Declare a local value (inferred type is string)"
br []
!!"let world = \"world\""
br []
!!"// Using '%s' format specifier to include string"
br []
!!"parameter"
br []
!!"printfn \"Hello %s!\" world"
]
div [Class "cross-txt"] [
a [Href "#"] [!!"RUN"]
]
]
]
div [Class "clear"] []
]
]
]
div [Class "high"] [
div [Class "container"] [
div [Class "high-in"] [
ul [] [
li [] [
div [Class "high-blk"] [
h3 [] [ !!"highlight #1" ]
p [] [!!"Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]
]
]
li [] [
div [Class "high-blk"] [
h3 [] [ !!"highlight #2" ]
p [] [!!"Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]
]
]
li [] [
div [Class "high-blk"] [
h3 [] [ !!"highlight #3" ]
p [] [!!"Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]
]
]
]
]
]
]
div [Class "case"] [
div [Class "container"] [
div [Class "case-in"] [
h4 [] [!!"case studies"]
]
]
]
div [Class "studies"] [
ul [] [
li [] [
figure [] [
img [Src "images/small-img1.jpg"; Alt "img"; Width "500"; Height "236"]
]
]
li [] [
figure [] [
img [Src "images/small-img2.png"; Alt "img"; Width "500"; Height "236"]
]
]
li [] [
figure [] [
img [Src "images/shap-img3.png"; Alt "img"; Width "500"; Height "236"]
]
]
]
]
div [Class "slider"] [
div [Class "louvre"] [
div [Class "container"] [
div [Class "louvre-in"] [
h3 [] [!!"LouVRe - abu dhabi"]
p [] [!!"Goswin Rothenthal used F# and Rhinoceros3D to construct an associative digital 3D model for the manufacturing of the Cladding of the Louvre Abu Dhabi Dome"]
a [Href "#"] [!!"READ testimonials"]
]
]
]
div [Class "louvre"] [
div [Class "container"] [
div [Class "louvre-in"] [
h3 [] [!!"LouVRe - abu dhabi"]
p [] [!!"Goswin Rothenthal used F# and Rhinoceros3D to construct an associative digital 3D model for the manufacturing of the Cladding of the Louvre Abu Dhabi Dome"]
a [Href "#"] [!!"READ testimonials"]
]
]
]
]
div [Class "sponsors"] [
div [Class "container"] [
div [Class "sponsors-in"] [
h4 [] [!!"SPONSORS"]
]
ul [] [
li [] [a [Href "#"] [img [Src "images/icon1.png"; Alt "img"; Width "183"; Height "74"] ]]
li [] [a [Href "#"] [img [Src "images/icon2.png"; Alt "img"; Width "183"; Height "74"] ]]
li [] [a [Href "#"] [img [Src "images/icon3.png"; Alt "img"; Width "183"; Height "74"] ]]
li [] [a [Href "#"] [img [Src "images/icon4.png"; Alt "img"; Width "183"; Height "74"] ]]
li [] [a [Href "#"] [img [Src "images/icon5.png"; Alt "img"; Width "183"; Height "74"] ]]
]
]
div [Class "back-to-top"] [
a [Href "#"; Class "scrollToTop"] [i [Class "fas fa-angle-up"] []]
]
]
]
]
]
]
let generate (ctx : SiteContents) (projectRoot: string) (page: string) =
generate' ctx page
|> Layout.render ctx