Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
guru
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
guru
Commits
ce82bd26
Commit
ce82bd26
authored
Oct 17, 2018
by
Clint Mourlevat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding 24 hours last change
parent
4cae27e3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
HomeController.cs
Controllers/HomeController.cs
+2
-1
Ticker.cs
Models/Ticker.cs
+1
-0
Index.cshtml
Views/Home/Index.cshtml
+4
-3
No files found.
Controllers/HomeController.cs
View file @
ce82bd26
...
@@ -34,7 +34,8 @@ namespace Stratis.Guru.Controllers
...
@@ -34,7 +34,8 @@ namespace Stratis.Guru.Controllers
dynamic
coinmarketcap
=
JsonConvert
.
DeserializeObject
(
_memoryCache
.
Get
(
"Coinmarketcap"
).
ToString
());
dynamic
coinmarketcap
=
JsonConvert
.
DeserializeObject
(
_memoryCache
.
Get
(
"Coinmarketcap"
).
ToString
());
return
View
(
new
Ticker
return
View
(
new
Ticker
{
{
UsdPrice
=
coinmarketcap
.
data
.
quotes
.
USD
.
price
UsdPrice
=
coinmarketcap
.
data
.
quotes
.
USD
.
price
,
Last24Change
=
coinmarketcap
.
data
.
quotes
.
USD
.
percent_change_24h
/
100
});
});
}
}
...
...
Models/Ticker.cs
View file @
ce82bd26
...
@@ -3,5 +3,6 @@ namespace Stratis.Guru.Models
...
@@ -3,5 +3,6 @@ namespace Stratis.Guru.Models
public
class
Ticker
public
class
Ticker
{
{
public
double
UsdPrice
{
get
;
set
;
}
public
double
UsdPrice
{
get
;
set
;
}
public
double
Last24Change
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Views/Home/Index.cshtml
View file @
ce82bd26
...
@@ -8,12 +8,13 @@
...
@@ -8,12 +8,13 @@
<div class="container">
<div class="container">
<div class="row">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 align-self-center text-center">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 align-self-center text-center">
<h1>The <strong>$STRAT</strong> price in realtime.</h1>
<h1
class="m-0"
>The <strong>$STRAT</strong> price in realtime.</h1>
<h1 class="align-middle">
<h1 class="align-middle">
<div class="d-
block
">
<div class="d-
inline-block align-middle
">
<span class="click-edit">1 STRAT</span> =
<span class="click-edit">1 STRAT</span> =
</div>
</div>
<span class="display-1 font-weight-bold">@(Model.UsdPrice.ToString("C2"))</span>
<span class="align-middle display-1 font-weight-bold">@(Model.UsdPrice.ToString("C2"))</span>
<span class="text-@(Model.Last24Change > 0 ? "success":"danger") font-weight-bold"><sup> @((Model.Last24Change > 0 ? "+":"-")) @(Model.Last24Change.ToString("P2"))</sup></span>
</h1>
</h1>
<a asp-controller="Home" asp-action="Generator" class="btn-secondary-box"><i class="fa fa-paper-plane"></i> Get a Stratis Address</a>
<a asp-controller="Home" asp-action="Generator" class="btn-secondary-box"><i class="fa fa-paper-plane"></i> Get a Stratis Address</a>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment