Skip to content

Commit 0803b6e

Browse files
authored
Merge pull request #130 from Maeevick/feat/hakyll-resources-page-migration
Feat/hakyll resources page migration
2 parents 015f89e + d41ad00 commit 0803b6e

File tree

8 files changed

+112
-96
lines changed

8 files changed

+112
-96
lines changed

resources/governance.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Governance
3+
link: https://gitlab.haskell.org/hf/meta
4+
link-text: HF Governance
5+
---
6+
7+
This linked repository provides an overview of how we expect the Board to operate and its near term work and agenda.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Guidelines For Respectful Communication
3+
link: /guidelines-for-respectful-communication
4+
link-text: Guidelines for Respectful Communication
5+
---
6+
7+
The guidelines for respectful communication guide how the we aim to comport ourselves and act with respect in the community. We do not seek to impose these guidelines on members of the Haskell community generally. Rather it is a signal that we seek high standards of discourse in the Haskell community, and are willing to publicly hold ourselves to that standard, in the hope that others may voluntarily follow suit.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: More On Affiliation
3+
link: /affiliates
4+
link-text: HF Affiliates
5+
---
6+
7+
Prospective affiliates can find more information on what affiliating with the Haskell Foundation entails here.

resources/whitepaper.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Whitepaper
3+
link: /whitepaper
4+
link-text: Read the HF Whitepaper
5+
---
6+
7+
The Haskell Foundation began with a conversation about the goals and and context for HF that changed as the conversation grew ever wider. As we resolved to launch HF this whitepaper is a snapshot of that conversation.

site.hs

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ main = hakyll $ do
2525
match "index.html" $ do
2626
route idRoute
2727
compile $ do
28-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
28+
sponsors <- buildSponsorsCtx
2929
getResourceBody
3030
>>= applyAsTemplate sponsors
3131
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
@@ -39,7 +39,7 @@ main = hakyll $ do
3939
create ["affiliates/index.html"] $ do
4040
route idRoute
4141
compile $ do
42-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
42+
sponsors <- buildSponsorsCtx
4343
ctx <- affiliatesCtx . sortOn itemIdentifier <$> loadAll "affiliates/*.markdown"
4444

4545
makeItem ""
@@ -52,7 +52,7 @@ main = hakyll $ do
5252
create ["projects/index.html"] $ do
5353
route idRoute
5454
compile $ do
55-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
55+
sponsors <- buildSponsorsCtx
5656
ctx <- projectsCtx . sortOn itemIdentifier <$> loadAll "projects/*.markdown"
5757

5858
makeItem ""
@@ -78,7 +78,7 @@ main = hakyll $ do
7878
create ["news/index.html"] $ do
7979
route idRoute
8080
compile $ do
81-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
81+
sponsors <- buildSponsorsCtx
8282
newsWithCategories <- recentFirst =<< loadAll "news/categories/**.html"
8383

8484
let ctx =
@@ -95,15 +95,15 @@ main = hakyll $ do
9595
create ["news/press/index.html"] $ do
9696
route idRoute
9797
compile $ do
98-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
98+
sponsors <- buildSponsorsCtx
9999
press <- recentFirst =<< loadAll "press/*.markdown"
100100

101101
let ctx =
102102
listField "press_articles" defaultContext (return press) <>
103103
defaultContext
104104

105105
makeItem ""
106-
>>= loadAndApplyTemplate "templates/press/list.html" ctx
106+
>>= loadAndApplyTemplate "templates/press/list.html" ctx
107107
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
108108
>>= relativizeUrls
109109

@@ -112,14 +112,31 @@ main = hakyll $ do
112112
create ["faq/index.html"] $ do
113113
route idRoute
114114
compile $ do
115-
sponsors <- sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
115+
sponsors <- buildSponsorsCtx
116116
ctx <- faqCtx <$> loadAll "faq/*.markdown"
117117

118118
makeItem ""
119119
>>= loadAndApplyTemplate "templates/faq/list.html" ctx
120120
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
121121
>>= relativizeUrls
122122

123+
-- resources -------------------------------------------------------------------------------------------
124+
match "resources/*.markdown" $ compile pandocCompiler
125+
create ["resources/index.html"] $ do
126+
route idRoute
127+
compile $ do
128+
sponsors <- buildSponsorsCtx
129+
resources <- loadAll "resources/*.markdown"
130+
131+
let ctx =
132+
listField "resources" defaultContext (return resources) <>
133+
defaultContext
134+
135+
makeItem ""
136+
>>= loadAndApplyTemplate "templates/resources/list.html" ctx
137+
>>= loadAndApplyTemplate "templates/boilerplate.html" sponsors
138+
>>= relativizeUrls
139+
123140
-- templates -------------------------------------------------------------------------------------------
124141
match "templates/*" $ compile templateBodyCompiler
125142
match "templates/**" $ compile templateBodyCompiler
@@ -130,6 +147,10 @@ main = hakyll $ do
130147
--------------------------------------------------------------------------------------------------------
131148

132149
-- sponsors --------------------------------------------------------------------------------------------
150+
151+
buildSponsorsCtx :: Compiler (Context String)
152+
buildSponsorsCtx = sponsorsCtx . sortOn itemIdentifier <$> loadAll "donations/sponsors/*.markdown"
153+
133154
-- | Partition sponsors into by level: monad, applicative, and functor
134155
-- Sponsors are listed in the footer template, which means we need this
135156
-- context for most pages.

site/resources/index.html

Lines changed: 0 additions & 89 deletions
This file was deleted.

templates/resources/list.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<div class="max-w-screen-xl mx-auto py-16 md:py-24">
2+
<div class="sm:px-6 lg:px-16">
3+
<div class="relative">
4+
<div class="absolute top-0 left-0 border-t border-l border-purple-50 h-10 md:h-20 w-10 md:w-20">
5+
<div
6+
class="absolute top-1 md:top-2 left-1 md:left-2 border-t border-l border-purple-100 h-10 md:h-20 w-10 md:w-20">
7+
<div
8+
class="absolute top-1 md:top-2 left-1 md:left-2 border-t border-l border-purple-200 h-10 md:h-20 w-10 md:w-20">
9+
<div
10+
class="absolute top-1 md:top-2 left-1 md:left-2 border-t border-l border-purple-300 h-10 md:h-20 w-10 md:w-20">
11+
<div
12+
class="absolute top-1 md:top-2 left-1 md:left-2 border-t border-l border-purple-400 h-10 md:h-20 w-10 md:w-20">
13+
<div
14+
class="absolute top-1 md:top-2 left-1 md:left-2 border-t border-l border-purple-500 h-10 md:h-20 w-10 md:w-20">
15+
</div>
16+
</div>
17+
</div>
18+
</div>
19+
</div>
20+
</div>
21+
<div class="absolute top-0 right-0 border-t border-r border-purple-50 h-10 md:h-20 w-10 md:w-20">
22+
<div
23+
class="absolute top-1 md:top-2 right-1 md:right-2 border-t border-r border-purple-100 h-10 md:h-20 w-10 md:w-20">
24+
<div
25+
class="absolute top-1 md:top-2 right-1 md:right-2 border-t border-r border-purple-200 h-10 md:h-20 w-10 md:w-20">
26+
<div
27+
class="absolute top-1 md:top-2 right-1 md:right-2 border-t border-r border-purple-300 h-10 md:h-20 w-10 md:w-20">
28+
<div
29+
class="absolute top-1 md:top-2 right-1 md:right-2 border-t border-r border-purple-400 h-10 md:h-20 w-10 md:w-20">
30+
<div
31+
class="absolute top-1 md:top-2 right-1 md:right-2 border-t border-r border-purple-500 h-10 md:h-20 w-10 md:w-20">
32+
</div>
33+
</div>
34+
</div>
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
<div class="text-center pt-12 md:pt-20 px-12 sm:px-16 md:px-24 lg:px-36 ">
41+
<h1 class="text-2xl-5xl">Resources</h1>
42+
</div>
43+
</div>
44+
<div class="max-w-screen-xl mx-auto grid gap-8 lg:grid-cols-2 md:px-12">
45+
$for(resources)$
46+
$partial("templates/resources/tile.html")$
47+
$endfor$
48+
</div>

templates/resources/tile.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="bg-gray-100 px-6 sm:px-12 space-y-4 py-12">
2+
<h2 class="font-normal text-2xl-4xl">$title$</h2>
3+
<p>$body$</p>
4+
5+
<div class="text-sm sm:text-base">
6+
<a class="arrow-link" href="$link$">&gt;&gt; $link-text$</a>
7+
</div>
8+
</div>

0 commit comments

Comments
 (0)