From 564a8df61ce36489f3b4ade0605fc2c5e310c4b2 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Thu, 2 Feb 2023 13:06:08 +0100 Subject: [PATCH] Create card components and add them to dashboard Refactor the Releases, Modules and Projects cards into reusable templates. Now they are used in the non-logged-in landing homepage and in the logged-in dashboard. --- .../blender_components/card_modules.tmpl | 39 +++++++ .../blender_components/card_projects.tmpl | 20 ++++ .../blender_components/card_releases.tmpl | 21 ++++ templates/custom/header.tmpl | 20 ++++ templates/home.tmpl | 105 ++---------------- templates/user/dashboard/dashboard.tmpl | 26 +++++ 6 files changed, 133 insertions(+), 98 deletions(-) create mode 100644 templates/blender_components/card_modules.tmpl create mode 100644 templates/blender_components/card_projects.tmpl create mode 100644 templates/blender_components/card_releases.tmpl create mode 100644 templates/custom/header.tmpl create mode 100644 templates/user/dashboard/dashboard.tmpl diff --git a/templates/blender_components/card_modules.tmpl b/templates/blender_components/card_modules.tmpl new file mode 100644 index 0000000..8c9e8e6 --- /dev/null +++ b/templates/blender_components/card_modules.tmpl @@ -0,0 +1,39 @@ +
+ +
diff --git a/templates/blender_components/card_projects.tmpl b/templates/blender_components/card_projects.tmpl new file mode 100644 index 0000000..c2a5934 --- /dev/null +++ b/templates/blender_components/card_projects.tmpl @@ -0,0 +1,20 @@ +
+
+ Ongoing Projects +
+ Focused activities to advance Blender +
+
+
    +
  • Animation 25 — Next generation animation system
  • +
  • Simulation Nodes — Everything with nodes
  • +
  • Brush Assets — The asset system and browser
  • +
+
+
+ +
diff --git a/templates/blender_components/card_releases.tmpl b/templates/blender_components/card_releases.tmpl new file mode 100644 index 0000000..4a00d5f --- /dev/null +++ b/templates/blender_components/card_releases.tmpl @@ -0,0 +1,21 @@ +
+
+ Release Status +
+ Current and upcoming versions +
+
+ +
+
+ +
diff --git a/templates/custom/header.tmpl b/templates/custom/header.tmpl new file mode 100644 index 0000000..138dfb1 --- /dev/null +++ b/templates/custom/header.tmpl @@ -0,0 +1,20 @@ + diff --git a/templates/home.tmpl b/templates/home.tmpl index 89cce71..851e6df 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -1,19 +1,5 @@ {{template "base/head" .}} -
@@ -30,91 +16,14 @@
-
-
-
- Release Status -
- Current and upcoming versions -
-
- -
-
- -
-
-
- Ongoing Projects -
- Focused activities to advance Blender -
-
-
    -
  • Animation 25 — Next generation animation system
  • -
  • Simulation Nodes — Everything with nodes
  • -
  • Brush Assets — The asset system and browser
  • -
-
-
- -
-
- +
+ {{template "blender_components/card_releases" .}} + {{template "blender_components/card_projects" .}}
+
+ {{template "blender_components/card_modules" .}} +
+

Featured Repositories

The portal hosts more that just the Blender sources, bug and patch tracker. Explore the other repositories and get involved!

diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..8f5fad9 --- /dev/null +++ b/templates/user/dashboard/dashboard.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} +
+ {{template "user/dashboard/navbar" .}} +
+ {{if not .Feeds}} +
+
+ {{template "blender_components/card_projects" .}} + {{template "blender_components/card_releases" .}} +
+
+ {{template "blender_components/card_modules" .}} +
+
+ {{end}} + {{template "base/alert" .}} +
+
+ {{template "user/heatmap" .}} + {{template "user/dashboard/feeds" .}} +
+ {{template "user/dashboard/repolist" .}} +
+
+
+{{template "base/footer" .}}