From 221c1c19ed093967c7a0c417b66889294d090ea6 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Tue, 5 May 2015 00:27:21 +0200 Subject: [PATCH] update spotlight output --- src/OnePeek.WebConsole/Modules/HomeModule.cs | 10 ++++-- src/OnePeek.WebConsole/Views/Index.cshtml | 37 ++++++++++++++++++-- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/OnePeek.WebConsole/Modules/HomeModule.cs b/src/OnePeek.WebConsole/Modules/HomeModule.cs index 56688ce..e219c31 100644 --- a/src/OnePeek.WebConsole/Modules/HomeModule.cs +++ b/src/OnePeek.WebConsole/Modules/HomeModule.cs @@ -16,10 +16,16 @@ namespace OnePeek.WebConsole.Modules Get["/", true] = async (ctx, token) => { - StoreSpotlightResults result = await api.GetSpotlight(StoreSpotlightType.Apps, StoreType.WindowsPhone8, StoreCultureType.EN_US); + StoreSpotlightResults apps = await api.GetSpotlight(StoreSpotlightType.Apps, StoreType.WindowsPhone8, StoreCultureType.EN_US); + StoreSpotlightResults games = await api.GetSpotlight(StoreSpotlightType.Games, StoreType.WindowsPhone8, StoreCultureType.EN_US); + + IEnumerable appIds = await api.GetSpotlightIds(StoreSpotlightType.Apps, StoreType.WindowsPhone8, StoreCultureType.EN_US); + return View["Index", new { - Spotlight = result + SpotlightIds = appIds, + Spotlight = apps, + SpotlightGames = games }]; }; diff --git a/src/OnePeek.WebConsole/Views/Index.cshtml b/src/OnePeek.WebConsole/Views/Index.cshtml index 7d68e90..97c30a2 100644 --- a/src/OnePeek.WebConsole/Views/Index.cshtml +++ b/src/OnePeek.WebConsole/Views/Index.cshtml @@ -37,7 +37,7 @@

-

SPOTLIGHT

+

APPS SPOTLIGHT

@{ var i = 0; } @foreach (var result in Model.Spotlight.Results) @@ -46,7 +46,7 @@ @result.Name @result.Name - @if (++i % 5 == 0 && i > 1) + if (++i % 10 == 0 && i > 1) {
} @@ -54,17 +54,48 @@
+
+

+
+

GAMES SPOTLIGHT

+
+ @{ i = 0; } + @foreach (var result in Model.SpotlightGames.Results) + { + + @result.Name + @result.Name + + if (++i % 10 == 0 && i > 1) + { +
+ } + } +
+
+ +
+