aboutsummaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/app/sprinkles/core/assets/SiteAssets/js/main.js2
-rw-r--r--main/app/sprinkles/core/src/Controller/CoreController.php13
-rw-r--r--main/app/sprinkles/core/templates/pages/index.html.twig9
3 files changed, 23 insertions, 1 deletions
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/main.js b/main/app/sprinkles/core/assets/SiteAssets/js/main.js
index 8341cbf..dbbfc5b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/js/main.js
+++ b/main/app/sprinkles/core/assets/SiteAssets/js/main.js
@@ -120,6 +120,8 @@ UserSearchBar.keyup(function () {
error: function () {
console.log("[SEARCH LOGGER] 404s are not a bug - they're a feature!");
console.log("[SEARCH LOGGER] " + RequestedUser + " not found...");
+
+ SearchResults.empty();
}
});
}); \ No newline at end of file
diff --git a/main/app/sprinkles/core/src/Controller/CoreController.php b/main/app/sprinkles/core/src/Controller/CoreController.php
index b5f6e3c..9a73e66 100644
--- a/main/app/sprinkles/core/src/Controller/CoreController.php
+++ b/main/app/sprinkles/core/src/Controller/CoreController.php
@@ -27,8 +27,19 @@ class CoreController extends SimpleController
* By default, this is the page that non-authenticated users will first see when they navigate to your website's root.
* Request type: GET
*/
+
public function pageIndex($request, $response, $args) {
- return $this->ci->view->render($response, 'pages/index.html.twig');
+ /** @var UserFrosting\Sprinkle\Core\Util\ClassMapper $classMapper */
+ $classMapper = $this->ci->classMapper;
+
+ // Probably a better way to do this
+ $users = $classMapper->staticMethod('user', 'orderBy', 'created_at', 'desc')
+ //->take(8)
+ ->get();
+
+ return $this->ci->view->render($response, 'pages/index.html.twig', [
+ 'users' => $users
+ ]);
}
/**
diff --git a/main/app/sprinkles/core/templates/pages/index.html.twig b/main/app/sprinkles/core/templates/pages/index.html.twig
index e560fd9..b40b958 100644
--- a/main/app/sprinkles/core/templates/pages/index.html.twig
+++ b/main/app/sprinkles/core/templates/pages/index.html.twig
@@ -78,6 +78,15 @@
</div>
<hr>
</div>
+ <div class="MainInTab">
+ {% for user in users %}
+ <li>
+ <img src="{{ user.avatar }}" alt="User Image">
+ <a class="users-list-name" href="{{site.uri.public}}/users/u/{{user.user_name}}">{{user.first_name}} {{user.last_name}}</a>
+ <span class="users-list-date">{{ user.registered }}</span>
+ </li>
+ {% endfor %}
+ </div>
</div>
<div class="carousel-cell PersonalTab">