[gnome-web-www: 1/2] Add basic Circle page
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www: 1/2] Add basic Circle page
- Date: Tue, 14 Jul 2020 18:57:04 +0000 (UTC)
commit 009ec0a52b7ce15e46b1ec44a3efcdd02aa14b90
Author: Martin Abente Lahaye <malahaye gnome org>
Date: Tue Jul 7 20:08:04 2020 -0400
Add basic Circle page
This mimics the same functionality seen in the foundation membership page.
The idea is to maintain apps and libs page as a separate JSON file to make
this more easily maintainable.
Closes #59
theme/page-circle.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
---
diff --git a/theme/page-circle.php b/theme/page-circle.php
new file mode 100644
index 0000000..4094815
--- /dev/null
+++ b/theme/page-circle.php
@@ -0,0 +1,51 @@
+<?php
+
+$apps_url = 'https://gitlab.gnome.org/Teams/Circle/-/raw/master/data/apps.json';
+$apps = json_decode(file_get_contents($apps_url));
+
+$libs_url = 'https://gitlab.gnome.org/Teams/Circle/-/raw/master/data/libs.json';
+$libs = json_decode(file_get_contents($libs_url));
+
+?>
+
+<?php get_header(); ?>
+
+ <!-- container -->
+ <div class="container">
+ <div class="content without_sidebar">
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+
+ <?php
+
+ if (isset($apps)) {
+ echo '<ul class="circle_apps_list">'."\n";
+ foreach ($apps as $app) {
+ echo '<li>' . $app->name . '</li>';
+ }
+ echo '</ul>'."\n";
+ } else {
+ echo '<p>Oops! The list cannot be loaded at the moment.</p>';
+ }
+
+ if (isset($libs)) {
+ echo '<ul class="circle_libs_list">'."\n";
+ foreach ($libs as $lib) {
+ echo '<li>' . $lib->name . '</li>';
+ }
+ echo '</ul>'."\n";
+ } else {
+ echo '<p>Oops! The list cannot be loaded at the moment.</p>';
+ }
+
+ ?>
+
+ <?php endwhile; // End the loop. Whew. ?>
+ <br />
+ <div class="clear"></div>
+ </div>
+ </div>
+
+ <div class="clearfix"></div>
+
+<?php get_footer(); ?>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]