Skip to content

Commit 8c56301

Browse files
committed
fix: simplify and explicit name of templating
1 parent dff0a57 commit 8c56301

File tree

6 files changed

+140
-126
lines changed

6 files changed

+140
-126
lines changed

site.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ main = hakyll $ do
5252
>>= loadAndApplyTemplate "templates/boilerplate.html" defaultContext
5353
>>= relativizeUrls
5454

55-
create [fromFilePath "projects/index.html"] $ do
55+
create ["projects/index.html"] $ do
5656
route idRoute
5757
compile $ do
5858
ctx <- projectsCtx . sortOn itemIdentifier <$> loadAll "projects/*.markdown"
5959

6060
makeItem ""
61-
>>= loadAndApplyTemplate "templates/project-list.html" ctx
62-
>>= loadAndApplyTemplate "templates/projects.html" ctx
61+
>>= loadAndApplyTemplate "templates/projects/list.html" ctx
6362
>>= loadAndApplyTemplate "templates/boilerplate.html" ctx
6463
>>= relativizeUrls
6564

66-
match "templates/*" $ compile templateBodyCompiler
65+
match "templates/**" $ compile templateBodyCompiler
66+
-- match "templates/**/*" $ compile templateBodyCompiler
6767

6868
-- | Partition affiliates into affiliates and pending
6969
affiliatesCtx :: [Item String] -> Context String

templates/project-list.html

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

templates/project.html

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

templates/projects.html

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

templates/projects/list.html

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Projects
3+
---
4+
<div class="max-w-screen-xl mx-auto py-16 md:py-24">
5+
<div class="sm:px-6 lg:px-16">
6+
<div class="relative">
7+
<div class="absolute top-0 left-0 border-t border-l border-purple-50 h-10 md:h-20 w-10 md:w-20">
8+
<div
9+
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">
10+
<div
11+
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">
12+
<div
13+
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">
14+
<div
15+
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">
16+
<div
17+
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">
18+
</div>
19+
</div>
20+
</div>
21+
</div>
22+
</div>
23+
</div>
24+
<div class="absolute top-0 right-0 border-t border-r border-purple-50 h-10 md:h-20 w-10 md:w-20">
25+
<div
26+
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">
27+
<div
28+
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">
29+
<div
30+
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">
31+
<div
32+
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">
33+
<div
34+
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">
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
<div class="text-center pt-12 md:pt-20 px-12 sm:px-16 md:px-24 lg:px-36 ">
44+
<h1 class="text-2xl-5xl">Projects</h1>
45+
</div>
46+
<div class="mt-16 md:mt-24">
47+
<div class="xl:max-w-screen-xl mx-auto md:px-12 lg:px-16">
48+
<div class="bg-gray-800 shadow-lg shadow-xl shadow-md shadow-sm px-6 sm:px-12 md:px-12 lg:px-16 py-16 md:py-20">
49+
<h2 class="text-gray-50 font-normal text-3xl-4xl text-center">Volunteering</h2>
50+
<p class="mt-10 lg:text-xl text-gray-300 leading-relaxed text-center">
51+
We are always looking for help on our projects. If you would like to volunteer, please reach out to us at <a
52+
href="mailto:[email protected]">[email protected]</a>, or join the <a
53+
href="https://join.slack.com/t/haskell-foundation/shared_invite/zt-mjh76fw0-CEjg2NbyVE8rVQDvR~0F4A">Haskell
54+
Foundation Slack</a>. If you have a proposal, we'd love to hear it!
55+
</p>
56+
</div>
57+
</div>
58+
</div>
59+
<div class="mt-16 md:mt-24">
60+
<div class="text-2xl-5xl text-center md:px-12">Ideation</div>
61+
<div class="max-w-screen-xl mx-auto grid gap-8 lg:grid-cols-2 md:px-12">
62+
$for(ideas)$
63+
$partial("templates/projects/tile.html")$
64+
$endfor$
65+
</div>
66+
67+
<div class="text-2xl-5xl text-center md:px-12">Proposed</div>
68+
<div class="max-w-screen-xl mx-auto grid gap-8 lg:grid-cols-2 md:px-12">
69+
$for(proposals)$
70+
$partial("templates/projects/tile.html")$
71+
$endfor$
72+
</div>
73+
74+
<div class="text-2xl-5xl text-center md:px-12">In Progress</div>
75+
<div class="max-w-screen-xl mx-auto grid gap-8 lg:grid-cols-2 md:px-12">
76+
$for(inprogress)$
77+
$partial("templates/projects/tile.html")$
78+
$endfor$
79+
</div>
80+
81+
<div class="text-2xl-5xl text-center md:px-12">Completed</div>
82+
<div class="max-w-screen-xl mx-auto grid gap-8 lg:grid-cols-2 md:px-12">
83+
$for(completed)$
84+
$partial("templates/projects/tile.html")$
85+
$endfor$
86+
</div>
87+
</div>
88+
</div>

templates/projects/tile.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<div class="bg-gray-100 px-6 sm:px-12 py-12">
2+
<div class="space-y-4">
3+
<h2 class="font-normal text-2xl-4xl">$title$</h2>
4+
<p>$body$</p>
5+
<div class="text-sm sm:text-base">
6+
<a class="arrow-link" href="$link$" target="_blank">>> $link-text$</a>
7+
</div>
8+
<div class="uppercase font-medium text-gray-500 pt-4">$subtitle$</div>
9+
</div>
10+
<div class="divide-y-2">
11+
<div class="flex items-center py-4 space-x-6">
12+
$if(leader0name)$
13+
<div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center">
14+
<img src="/assets/images/$leader0img$" alt="$leader0name$">
15+
</div>
16+
<div>
17+
<div class="font-medium">$leader0name$</div>
18+
<a class="block" href="mailto:$leader0mail$">$leader0mail$</a>
19+
</div>
20+
$else$
21+
<div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center">
22+
<div class="fas fa-user text-gray-400 text-3xl"></div>
23+
</div>
24+
<div>
25+
<div class="font-medium">In Need of a Leader!</div>
26+
<a class="block" href="mailto:[email protected]">[email protected]</a>
27+
</div>
28+
$endif$
29+
$if(leader1name)$
30+
<div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center">
31+
<img src="/assets/images/$leader1img$" alt="$leader1name$">
32+
</div>
33+
<div>
34+
<div class="font-medium">$leader1name$</div>
35+
<a class="block" href="mailto:$leader1mail$">$leader1mail$</a>
36+
</div>
37+
$endif$
38+
$if(leader2name)$
39+
<div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center">
40+
<img src="/assets/images/$leader2img$" alt="$leader2name$">
41+
</div>
42+
<div>
43+
<div class="font-medium">$leader2name$</div>
44+
<a class="block" href="mailto:$leader2mail$">$leader2mail$</a>
45+
</div>
46+
$endif$
47+
</div>
48+
</div>

0 commit comments

Comments
 (0)