Skip to content

Commit e859442

Browse files
committed
Improve guides page (haxeflixel style)
1 parent e8d0e7a commit e859442

22 files changed

Lines changed: 37768 additions & 6 deletions

content/_layouts/page.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<meta name="apple-mobile-web-app-capable" content="yes">
99
<meta name="apple-mobile-web-app-status-bar-style" content="black">
1010
<title><%= title %> - Ceramic</title>
11+
<link rel="stylesheet" href="/static/lucide-font/lucide.css" type="text/css" />
1112
<link rel="stylesheet" href="/static/style.css" type="text/css" />
1213
<link rel="stylesheet" href="/static/prism.css" type="text/css" />
1314
<script type="text/javascript" src="/static/script.js"></script>

content/guides.ejs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: guides
33
category: guides
4+
subCategory: index
45
title: Guides
56
---
67
<%
@@ -14,29 +15,33 @@ allGuides.sort(function(a, b) {
1415
return a.filePathStem.localeCompare(b.filePathStem);
1516
});
1617
var guideMenus = [];
18+
var guideIcons = {};
1719
for (item of allGuides) {
1820
var aMenu = item.data.menu;
1921
if (aMenu && guideMenus.indexOf(aMenu) == -1) {
2022
guideMenus.push(aMenu);
2123
}
24+
if (aMenu && item.data.hasOwnProperty('menuIcon')) {
25+
guideIcons[aMenu] = item.data.menuIcon;
26+
}
2227
}
2328
%>
2429
<h1>Guides</h1>
2530
<p>This section gathers guides to help you learn <strong>Ceramic</strong> and get up and running. If you are new to <strong>Ceramic</strong>, you may want to read the <strong>Introduction</strong> or directly start with the <strong>Getting started</strong> section if you want to practise right away.</p>
2631

32+
<div class="card-index">
2733
<% for (aMenu of guideMenus) { %>
28-
<h2><%= aMenu %></h2>
29-
<ul>
34+
<h2><i class="icon icon-<%= guideIcons[aMenu] != null ? guideIcons[aMenu] : 'book' %>"></i> <%= aMenu %></h2>
35+
<div class="card-grid">
3036
<%
3137
for (item of allGuides) {
3238
if (item.data.category == 'guides' && item.url != '/guides/' && item.data.menu == aMenu) {
3339
%>
34-
<li>
35-
<a href="<%= item.url %>"><%= item.data.title %></a>
36-
</li>
40+
<a href="<%= item.url %>" class="card-link"><%= item.data.hasOwnProperty('menuTitle') ? item.data.menuTitle : item.data.title %></a>
3741
<%
3842
}
3943
}
4044
%>
41-
</ul>
45+
</div>
4246
<% } %>
47+
</div>

content/guides/01-introduction/01-discover-ceramic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ category: guides
44
menu: Introduction
55
title: Discover Ceramic, a cross-platform and open-source 2D framework
66
menuTitle: Discover Ceramic
7+
menuIcon: telescope
78
permalink: guides/discover-ceramic/
89
---
910
# Discover Ceramic, a cross-platform and open-source 2D framework

content/guides/02-getting-started/01-install-ceramic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: guides
33
category: guides
44
menu: Getting Started
5+
menuIcon: square-play
56
title: Install Ceramic
67
permalink: guides/install-ceramic/
78
---

content/guides/04-appendices/01-inside-a-default-project.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: guides
33
category: guides
44
menu: Appendices
5+
menuIcon: library-big
56
title: Inside a default project
67
permalink: guides/inside-a-default-project/
78
---

content/guides/05-extras/01-faq.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: guides
33
category: guides
44
menu: Extras
5+
menuIcon: pickaxe
56
title: FAQ
67
permalink: guides/faq/
78
---

content/static/lucide-font/index.html

Lines changed: 138 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)