Commit 8e1aa96a authored by Sondre Bjellås's avatar Sondre Bjellås

Make Stratis.Guru more configureable and adaptable

- Nako supports many different chains, and returns the CoinType from API calls. Use that to show current currency in explorer.
- Enable the configuration of features, enable all by default.
parent f00137e6
...@@ -61,6 +61,22 @@ To run the Stratis.Guru, you need a appsettings.json. This is currently not incl ...@@ -61,6 +61,22 @@ To run the Stratis.Guru, you need a appsettings.json. This is currently not incl
"Logging": { "Logging": {
"MinimumBreadcrumbLevel": "Information" "MinimumBreadcrumbLevel": "Information"
} }
},
"Setup": {
"Title": "Stratis.guru",
"Chain": "Stratis",
"Footer": ""
},
"Features": {
"Home": true,
"Ticker": false,
"Lottery": false,
"Explorer": true,
"Vanity": false,
"Generator": false,
"API": true,
"About": true,
"Footer": false
} }
} }
``` ```
......
...@@ -20,17 +20,29 @@ namespace Stratis.Guru.Controllers ...@@ -20,17 +20,29 @@ namespace Stratis.Guru.Controllers
private readonly IMemoryCache _memoryCache; private readonly IMemoryCache _memoryCache;
private readonly dynamic _stats; private readonly dynamic _stats;
private readonly BlockIndexService _indexService; private readonly BlockIndexService _indexService;
private readonly SetupSettings _setupSettings;
public BlockExplorerController(IMemoryCache memoryCache, IOptions<NakoApiSettings> nakoApiSettings, BlockIndexService indexService) private readonly FeaturesSettings _featuresSettings;
public BlockExplorerController(IMemoryCache memoryCache,
BlockIndexService indexService,
IOptions<NakoApiSettings> nakoApiSettings,
IOptions<SetupSettings> setupSettings,
IOptions<FeaturesSettings> featuresSettings)
{ {
_nakoApiSettings = nakoApiSettings.Value;
_memoryCache = memoryCache; _memoryCache = memoryCache;
_stats = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString()); _stats = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString());
_indexService = indexService; _indexService = indexService;
_nakoApiSettings = nakoApiSettings.Value;
_setupSettings = setupSettings.Value;
_featuresSettings = featuresSettings.Value;
} }
public IActionResult Index() public IActionResult Index()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
var latestBlock = _indexService.GetLatestBlock(); var latestBlock = _indexService.GetLatestBlock();
ViewBag.LatestBlock = latestBlock; ViewBag.LatestBlock = latestBlock;
...@@ -53,6 +65,9 @@ namespace Stratis.Guru.Controllers ...@@ -53,6 +65,9 @@ namespace Stratis.Guru.Controllers
[Route("search")] [Route("search")]
public IActionResult Search(SearchBlockExplorer searchBlockExplorer) public IActionResult Search(SearchBlockExplorer searchBlockExplorer)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
if (searchBlockExplorer.Query.Length == 34) if (searchBlockExplorer.Query.Length == 34)
{ {
return RedirectToAction("Address", new {address = searchBlockExplorer.Query}); return RedirectToAction("Address", new {address = searchBlockExplorer.Query});
...@@ -71,6 +86,8 @@ namespace Stratis.Guru.Controllers ...@@ -71,6 +86,8 @@ namespace Stratis.Guru.Controllers
[Route("block/{block}")] [Route("block/{block}")]
public IActionResult Block(string block) public IActionResult Block(string block)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.BlockchainHeight = _stats.SyncBlockIndex; ViewBag.BlockchainHeight = _stats.SyncBlockIndex;
var result = (block.ToLower() == "latest") ? _indexService.GetLatestBlock() : _indexService.GetBlockByHeight(int.Parse(block)); var result = (block.ToLower() == "latest") ? _indexService.GetLatestBlock() : _indexService.GetBlockByHeight(int.Parse(block));
...@@ -80,6 +97,8 @@ namespace Stratis.Guru.Controllers ...@@ -80,6 +97,8 @@ namespace Stratis.Guru.Controllers
[Route("block/hash/{hash}")] [Route("block/hash/{hash}")]
public IActionResult BlockHash(string hash) public IActionResult BlockHash(string hash)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.BlockchainHeight = _stats.SyncBlockIndex; ViewBag.BlockchainHeight = _stats.SyncBlockIndex;
return View("Block", _indexService.GetBlockByHash(hash)); return View("Block", _indexService.GetBlockByHash(hash));
...@@ -88,6 +107,8 @@ namespace Stratis.Guru.Controllers ...@@ -88,6 +107,8 @@ namespace Stratis.Guru.Controllers
[Route("address/{address}")] [Route("address/{address}")]
public IActionResult Address(string address) public IActionResult Address(string address)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.BlockchainHeight = _stats.SyncBlockIndex; ViewBag.BlockchainHeight = _stats.SyncBlockIndex;
return View(_indexService.GetTransactionsByAddress(address)); return View(_indexService.GetTransactionsByAddress(address));
...@@ -96,6 +117,8 @@ namespace Stratis.Guru.Controllers ...@@ -96,6 +117,8 @@ namespace Stratis.Guru.Controllers
[Route("transaction/{transactionId}")] [Route("transaction/{transactionId}")]
public IActionResult Transaction(string transactionId) public IActionResult Transaction(string transactionId)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.BlockchainHeight = _stats.SyncBlockIndex; ViewBag.BlockchainHeight = _stats.SyncBlockIndex;
return View(_indexService.GetTransaction(transactionId)); return View(_indexService.GetTransaction(transactionId));
......
...@@ -35,8 +35,17 @@ namespace Stratis.Guru.Controllers ...@@ -35,8 +35,17 @@ namespace Stratis.Guru.Controllers
private readonly IParticipation _participation; private readonly IParticipation _participation;
private readonly IDraws _draws; private readonly IDraws _draws;
private readonly DrawSettings _drawSettings; private readonly DrawSettings _drawSettings;
private readonly SetupSettings _setupSettings;
private readonly FeaturesSettings _featuresSettings;
public HomeController(IMemoryCache memoryCache, IAsk ask, ISettings settings, IParticipation participation, IDraws draws, IOptions<DrawSettings> drawSettings) public HomeController(IMemoryCache memoryCache,
IAsk ask,
ISettings settings,
IParticipation participation,
IDraws draws,
IOptions<DrawSettings> drawSettings,
IOptions<SetupSettings> setupSettings,
IOptions<FeaturesSettings> featuresSettings)
{ {
_memoryCache = memoryCache; _memoryCache = memoryCache;
_ask = ask; _ask = ask;
...@@ -44,10 +53,15 @@ namespace Stratis.Guru.Controllers ...@@ -44,10 +53,15 @@ namespace Stratis.Guru.Controllers
_participation = participation; _participation = participation;
_draws = draws; _draws = draws;
_drawSettings = drawSettings.Value; _drawSettings = drawSettings.Value;
_setupSettings = setupSettings.Value;
_featuresSettings = featuresSettings.Value;
} }
public IActionResult Index() public IActionResult Index()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
double displayPrice = 0; double displayPrice = 0;
var rqf = Request.HttpContext.Features.Get<IRequestCultureFeature>(); var rqf = Request.HttpContext.Features.Get<IRequestCultureFeature>();
dynamic coinmarketcap = JsonConvert.DeserializeObject(_memoryCache.Get("Coinmarketcap").ToString()); dynamic coinmarketcap = JsonConvert.DeserializeObject(_memoryCache.Get("Coinmarketcap").ToString());
...@@ -83,6 +97,9 @@ namespace Stratis.Guru.Controllers ...@@ -83,6 +97,9 @@ namespace Stratis.Guru.Controllers
[Route("lottery")] [Route("lottery")]
public IActionResult Lottery() public IActionResult Lottery()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString()); ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString());
ViewBag.Jackpot = _memoryCache.Get("Jackpot"); ViewBag.Jackpot = _memoryCache.Get("Jackpot");
ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw()); ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw());
...@@ -94,6 +111,9 @@ namespace Stratis.Guru.Controllers ...@@ -94,6 +111,9 @@ namespace Stratis.Guru.Controllers
[Route("lottery/participate")] [Route("lottery/participate")]
public IActionResult Participate() public IActionResult Participate()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
var lastDraw = _draws.GetLastDraw(); var lastDraw = _draws.GetLastDraw();
...@@ -111,7 +131,10 @@ namespace Stratis.Guru.Controllers ...@@ -111,7 +131,10 @@ namespace Stratis.Guru.Controllers
[Route("lottery/participate/{id}")] [Route("lottery/participate/{id}")]
public IActionResult Participate(string id) public IActionResult Participate(string id)
{ {
if(HttpContext.Session.GetString("HaveBeginParticipation") == null) ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
if (HttpContext.Session.GetString("HaveBeginParticipation") == null)
{ {
return RedirectToAction("Lottery"); return RedirectToAction("Lottery");
} }
...@@ -130,6 +153,9 @@ namespace Stratis.Guru.Controllers ...@@ -130,6 +153,9 @@ namespace Stratis.Guru.Controllers
[Route("lottery/check-payment")] [Route("lottery/check-payment")]
public IActionResult CheckPayment() public IActionResult CheckPayment()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
var pubkey = ExtPubKey.Parse(_drawSettings.PublicKey); var pubkey = ExtPubKey.Parse(_drawSettings.PublicKey);
var depositAddress = pubkey.Derive(0).Derive(_settings.GetIterator()).PubKey.GetAddress(Network.StratisMain).ToString(); var depositAddress = pubkey.Derive(0).Derive(_settings.GetIterator()).PubKey.GetAddress(Network.StratisMain).ToString();
ViewBag.DepositAddress = depositAddress; ViewBag.DepositAddress = depositAddress;
...@@ -150,6 +176,9 @@ namespace Stratis.Guru.Controllers ...@@ -150,6 +176,9 @@ namespace Stratis.Guru.Controllers
[Route("lottery/new-participation")] [Route("lottery/new-participation")]
public IActionResult NewParticipation() public IActionResult NewParticipation()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
var ticket = Guid.NewGuid().ToString(); var ticket = Guid.NewGuid().ToString();
HttpContext.Session.SetString("Ticket", ticket); HttpContext.Session.SetString("Ticket", ticket);
ViewBag.Ticket = ticket; ViewBag.Ticket = ticket;
...@@ -168,6 +197,9 @@ namespace Stratis.Guru.Controllers ...@@ -168,6 +197,9 @@ namespace Stratis.Guru.Controllers
[Route("lottery/participated")] [Route("lottery/participated")]
public IActionResult Participated() public IActionResult Participated()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString()); ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString());
ViewBag.Jackpot = _memoryCache.Get("Jackpot"); ViewBag.Jackpot = _memoryCache.Get("Jackpot");
ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw()); ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw());
...@@ -178,12 +210,18 @@ namespace Stratis.Guru.Controllers ...@@ -178,12 +210,18 @@ namespace Stratis.Guru.Controllers
[Route("about")] [Route("about")]
public IActionResult About() public IActionResult About()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
return View(); return View();
} }
[Route("vanity")] [Route("vanity")]
public IActionResult Vanity() public IActionResult Vanity()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
return View(); return View();
} }
...@@ -191,6 +229,9 @@ namespace Stratis.Guru.Controllers ...@@ -191,6 +229,9 @@ namespace Stratis.Guru.Controllers
[Route("vanity")] [Route("vanity")]
public IActionResult Vanity(Vanity vanity) public IActionResult Vanity(Vanity vanity)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
_ask.NewVanity(vanity); _ask.NewVanity(vanity);
...@@ -202,6 +243,9 @@ namespace Stratis.Guru.Controllers ...@@ -202,6 +243,9 @@ namespace Stratis.Guru.Controllers
[Route("generator")] [Route("generator")]
public IActionResult Generator() public IActionResult Generator()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
var stratisAddress = new Key(); var stratisAddress = new Key();
return View(new StratisAddressPayload return View(new StratisAddressPayload
{ {
...@@ -213,6 +257,9 @@ namespace Stratis.Guru.Controllers ...@@ -213,6 +257,9 @@ namespace Stratis.Guru.Controllers
[Route("qr/{value}")] [Route("qr/{value}")]
public IActionResult Qr(string value) public IActionResult Qr(string value)
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
var memoryStream = new MemoryStream(); var memoryStream = new MemoryStream();
var qrGenerator = new QRCodeGenerator(); var qrGenerator = new QRCodeGenerator();
var qrCodeData = qrGenerator.CreateQrCode(value, QRCodeGenerator.ECCLevel.L); var qrCodeData = qrGenerator.CreateQrCode(value, QRCodeGenerator.ECCLevel.L);
...@@ -223,6 +270,9 @@ namespace Stratis.Guru.Controllers ...@@ -223,6 +270,9 @@ namespace Stratis.Guru.Controllers
public IActionResult Documentation() public IActionResult Documentation()
{ {
ViewBag.Features = _featuresSettings;
ViewBag.Setup = _setupSettings;
return Redirect("/documentation"); return Redirect("/documentation");
} }
} }
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Stratis.Guru.Settings
{
public class FeaturesSettings
{
public bool Home { get; set; } = true;
public bool Ticker { get; set; } = true;
public bool Lottery { get; set; } = true;
public bool Explorer { get; set; } = true;
public bool Vanity { get; set; } = true;
public bool Generator { get; set; } = true;
public bool API { get; set; } = true;
public bool About { get; set; } = true;
public bool Footer { get; set; } = true;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Stratis.Guru.Settings
{
public class SetupSettings
{
public SetupSettings()
{
Title = "Stratis.guru";
Chain = "Stratis";
}
public string Title { get; set; }
public string Chain { get; set; }
public string Footer { get; set; }
}
}
...@@ -53,6 +53,8 @@ namespace Stratis.Guru ...@@ -53,6 +53,8 @@ namespace Stratis.Guru
services.Configure<FixerApiSettings>(Configuration.GetSection("FixerApi")); services.Configure<FixerApiSettings>(Configuration.GetSection("FixerApi"));
services.Configure<DrawSettings>(Configuration.GetSection("Draw")); services.Configure<DrawSettings>(Configuration.GetSection("Draw"));
services.Configure<TickerSettings>(Configuration.GetSection("Ticker")); services.Configure<TickerSettings>(Configuration.GetSection("Ticker"));
services.Configure<SetupSettings>(Configuration.GetSection("Setup"));
services.Configure<FeaturesSettings>(Configuration.GetSection("Features"));
services.AddMemoryCache(); services.AddMemoryCache();
......
...@@ -41,20 +41,20 @@ ...@@ -41,20 +41,20 @@
</tr> </tr>
<tr> <tr>
<td><strong>Balance</strong></td> <td><strong>Balance</strong></td>
<td>@Model.Balance.ToString("N8") STRAT</td> <td>@Model.Balance.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
<tr> <tr>
<td><strong>Unconfirmed Balance</strong></td> <td><strong>Unconfirmed Balance</strong></td>
<td>@Model.UnconfirmedBalance.ToString("N8") STRAT</td> <td>@Model.UnconfirmedBalance.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
<tr> <tr>
<td><strong>Total Received</strong></td> <td><strong>Total Received</strong></td>
<td>@Model.TotalReceived.ToString("N8") STRAT</td> <td>@Model.TotalReceived.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
<tr> <tr>
<td><strong>Total Sent</strong></td> <td><strong>Total Sent</strong></td>
<td>@Model.TotalSent.ToString("N8") STRAT</td> <td>@Model.TotalSent.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
<td><a asp-controller="BlockExplorer" asp-action="Transaction" asp-route-transactionId="@transaction.TransactionHash">@transaction.TransactionHash.ToString().Substring(0, 25)...</a></td> <td><a asp-controller="BlockExplorer" asp-action="Transaction" asp-route-transactionId="@transaction.TransactionHash">@transaction.TransactionHash.ToString().Substring(0, 25)...</a></td>
<td><a asp-controller="BlockExplorer" asp-action="Block" asp-route-block="@transaction.BlockIndex">@transaction.BlockIndex</a></td> <td><a asp-controller="BlockExplorer" asp-action="Block" asp-route-block="@transaction.BlockIndex">@transaction.BlockIndex</a></td>
<td>-</td> <td>-</td>
<td><span class="@(transaction.Value > 0 ? "green" : "red")">@transaction.Value.ToString("N8") STRAT</span></td> <td><span class="@(transaction.Value > 0 ? "green" : "red")">@transaction.Value.ToString("N8") @Model.CoinTag</span></td>
<td>@total.ToString("N8") STRAT</td> <td>@total.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
} }
</tbody> </tbody>
......
@model dynamic @model dynamic
@{ @{
ViewBag.Title = "Stratis Block Explorer"; ViewBag.Title = ViewBag.Setup.Chain + " Block Explorer";
Layout = "_Layout"; Layout = "_Layout";
} }
@section Style @section Style
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<div class="container text-center"> <div class="container text-center">
<div class="row"> <div class="row">
<div class="col-lg-12 align-self-center"> <div class="col-lg-12 align-self-center">
<h1>Stratis Blockchain Explorer</h1> <h1>@ViewBag.Setup.Chain Block Explorer</h1>
</div> </div>
<div class="offset-lg-3 col-lg-6"> <div class="offset-lg-3 col-lg-6">
<p>Actual Stratis Blocks Height: @(ViewBag.BlockchainHeight??"Loading...") @*<i class="fa help fa-info-circle" data-toggle="tooltip" data-placement="right" title="Last Stratis Block Height, updated every 10 min."></i>*@</p> <p>Actual Blocks Height: @(ViewBag.BlockchainHeight ?? "Loading...") @*<i class="fa help fa-info-circle" data-toggle="tooltip" data-placement="right" title="Last Stratis Block Height, updated every 10 min."></i>*@</p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
} }
@foreach (var t in Model.Outputs) @foreach (var t in Model.Outputs)
{ {
totalOutpus += (double) t.Balance; totalOutpus += (double)t.Balance;
} }
@totalOutpus.ToString("N8") STRAT @totalOutpus.ToString("N8") @Model.CoinTag
</td> </td>
</tr> </tr>
} }
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<td>@output.Index</td> <td>@output.Index</td>
<td><a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="@output.Address">@output.Address</a></td> <td><a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="@output.Address">@output.Address</a></td>
<td>@output.OutputType</td> <td>@output.OutputType</td>
<td>@output.Balance.ToString("N8") STRAT</td> <td>@output.Balance.ToString("N8") @Model.CoinTag</td>
</tr> </tr>
} }
</tbody> </tbody>
......
...@@ -8,14 +8,19 @@ ...@@ -8,14 +8,19 @@
<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">
@if (ViewBag.Features.Ticker)
{
<h1 class="m-0">The <strong>$STRAT</strong> price in real time.</h1> <h1 class="m-0">The <strong>$STRAT</strong> price in real time.</h1>
<h1 class="align-middle"> <h1 class="align-middle">
<div class="d-lg-inline-block d-md-block align-middle"> <div class="d-lg-inline-block d-md-block align-middle">
<span class="click-edit" spellcheck="false">1</span> STRAT <span class="d-none d-lg-inline-block">=</span> <span class="click-edit" spellcheck="false">1</span> STRAT <span class="d-none d-lg-inline-block">=</span>
</div> </div>
<span class="align-middle display-1 font-weight-bold" id="amount">@(Model.DisplayPrice.ToString("C2"))</span> <span class="align-middle display-1 font-weight-bold" id="amount">@(Model.DisplayPrice.ToString("C2"))</span>
<span id="lastchange" class="d-block d-lg-inline-block change-@(Model.Last24Change > 0 ? "success":"danger") font-weight-bold"><sup> <span class="d-none d-lg-inline-block">@((Model.Last24Change > 0 ? "+":""))</span> <span class="inner">@(Model.Last24Change.ToString("P2"))</span></sup></span> <span id="lastchange" class="d-block d-lg-inline-block change-@(Model.Last24Change > 0 ? "success":"danger") font-weight-bold"><sup> <span class="d-none d-lg-inline-block">@((Model.Last24Change > 0 ? "+" : ""))</span> <span class="inner">@(Model.Last24Change.ToString("P2"))</span></sup></span>
</h1> </h1>
}
<a asp-controller="BlockExplorer" asp-action="Index" class="btn-secondary-box"><i class="fa fa-cube"></i> Go to Block Explorer</a> <a asp-controller="BlockExplorer" asp-action="Index" class="btn-secondary-box"><i class="fa fa-cube"></i> Go to Block Explorer</a>
</div> </div>
</div> </div>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stratis.Guru | @ViewBag.Title</title> <title>@ViewBag.Setup.Title | @ViewBag.Title</title>
<meta name="Content-Language" content="en"> <meta name="Content-Language" content="en">
<meta name="Description" content="@(ViewBag.Description ?? "Stratis.Guru is a Simple and Free $STRAT ticker, an Stratis Address Generator and a Vanity Address service.")"> <meta name="Description" content="@(ViewBag.Description ?? "Stratis.Guru is a Simple and Free $STRAT ticker, an Stratis Address Generator and a Vanity Address service.")">
<meta name="Keywords" content="stratis,bitcoin,cryptos,cryptocurrencies,coins,$STRAT,ticker,explorer,block explorer,vanity address,stratis block explorer,$strat block explorer,stratis generator,stratis price ticker,stratis preev,stratis vanity address,clint.network,SR2ZXnhRnMqJNoeDiCFUnaug7TKHJocwDd,"> <meta name="Keywords" content="stratis,bitcoin,cryptos,cryptocurrencies,coins,$STRAT,ticker,explorer,block explorer,vanity address,stratis block explorer,$strat block explorer,stratis generator,stratis price ticker,stratis preev,stratis vanity address,clint.network,SR2ZXnhRnMqJNoeDiCFUnaug7TKHJocwDd,">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<meta name="Revisit-After" content="1 day"> <meta name="Revisit-After" content="1 day">
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="clint_network"> <meta name="twitter:site" content="clint_network">
<meta name="twitter:title" content="Stratis.Guru | Online Stratis ($STRAT) price ticker"> <meta name="twitter:title" content="@ViewBag.Setup.Title | Online Stratis ($STRAT) price ticker">
<meta name="twitter:description" content="Stratis.Guru is a Simple and Free $STRAT ticker, an Stratis Address Generator and a Vanity Address service."> <meta name="twitter:description" content="Stratis.Guru is a Simple and Free $STRAT ticker, an Stratis Address Generator and a Vanity Address service.">
<link rel="icon" href="~/favicon.ico" /> <link rel="icon" href="~/favicon.ico" />
<link href="~/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="~/css/bootstrap.min.css" rel="stylesheet" type="text/css">
...@@ -31,22 +31,49 @@ ...@@ -31,22 +31,49 @@
@RenderSection("Style", false) @RenderSection("Style", false)
</head> </head>
<body> <body>
<header class="header-area"> <header class="header-area">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<nav class="main-nav"> <nav class="main-nav">
<a asp-controller="Home" asp-action="Index" class="logo "> <a asp-controller="Home" asp-action="Index" class="logo ">
<img src="~/images/logo.png" class="" alt="Stratis.guru"/> <span class="text-white">Stratis</span><span class="text-muted">.guru</span> <span class="text-info text-hide">v2</span> <img src="~/images/logo.png" class="" alt="Stratis.guru" /> <span class="text-white">@ViewBag.Setup.Title</span> <span class="text-info text-hide">v2</span>
</a> </a>
<ul class="nav"> <ul class="nav">
@if (ViewBag.Features.Home)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Index", "Home")) ? "active":"")"><a asp-action="Index" asp-controller="Home"><i class="fa fa-home"></i> HOME</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Index", "Home")) ? "active":"")"><a asp-action="Index" asp-controller="Home"><i class="fa fa-home"></i> HOME</a></li>
}
@if (ViewBag.Features.Lottery)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Lottery", "Home")) ? "active":"")"><a asp-action="Lottery" asp-controller="Home"><i class="fa fa-trophy"></i> LOTTERY</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Lottery", "Home")) ? "active":"")"><a asp-action="Lottery" asp-controller="Home"><i class="fa fa-trophy"></i> LOTTERY</a></li>
}
@if (ViewBag.Features.Explorer)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Index", "BlockExplorer")) ? "active":"")"><a asp-action="Index" asp-controller="BlockExplorer"><i class="fa fa-cube"></i> BLOCK EXPLORER</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Index", "BlockExplorer")) ? "active":"")"><a asp-action="Index" asp-controller="BlockExplorer"><i class="fa fa-cube"></i> BLOCK EXPLORER</a></li>
}
@if (ViewBag.Features.Vanity)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Vanity", "Home")) ? "active":"")"><a asp-action="Vanity" asp-controller="Home"><i class="fa fa-at"></i> VANITY</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Vanity", "Home")) ? "active":"")"><a asp-action="Vanity" asp-controller="Home"><i class="fa fa-at"></i> VANITY</a></li>
}
@if (ViewBag.Features.Generator)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Generator", "Home")) ? "active":"")"><a asp-action="Generator" asp-controller="Home"><i class="fa fa-qrcode"></i> GENERATOR</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Generator", "Home")) ? "active":"")"><a asp-action="Generator" asp-controller="Home"><i class="fa fa-qrcode"></i> GENERATOR</a></li>
}
@if (ViewBag.Features.API)
{
<li class="@(Context.Request.Path.Equals(Url.Action("Documentation", "Home")) ? "active":"")"><a asp-action="Documentation" asp-controller="Home"><i class="fa fa-book"></i> API</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("Documentation", "Home")) ? "active":"")"><a asp-action="Documentation" asp-controller="Home"><i class="fa fa-book"></i> API</a></li>
}
@if (ViewBag.Features.About)
{
<li class="@(Context.Request.Path.Equals(Url.Action("About", "Home")) ? "active":"")"><a asp-action="About" asp-controller="Home"><i class="fa fa-info-circle"></i> ABOUT</a></li> <li class="@(Context.Request.Path.Equals(Url.Action("About", "Home")) ? "active":"")"><a asp-action="About" asp-controller="Home"><i class="fa fa-info-circle"></i> ABOUT</a></li>
}
</ul> </ul>
<a class='menu-trigger'> <a class='menu-trigger'>
<span>Menu</span> <span>Menu</span>
...@@ -55,28 +82,34 @@ ...@@ -55,28 +82,34 @@
</div> </div>
</div> </div>
</div> </div>
</header> </header>
@RenderBody() @RenderBody()
<div id="crafted">
@if (ViewBag.Features.Footer)
{
<div id="crafted">
<p class="text-center small">Proudly Crafted with 💖 by <a href="https://twitter.com/clint_network" target="_blank">Clint.Network</a> — Help me to maintain by sending some $STRAT at <a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="SXDaQGs56aC9ZjFzTdbhudNXTbyxU5aNXJ">SXDaQGs56aC9ZjFzTdbhudNXTbyxU5aNXJ</a>.</p> <p class="text-center small">Proudly Crafted with 💖 by <a href="https://twitter.com/clint_network" target="_blank">Clint.Network</a> — Help me to maintain by sending some $STRAT at <a asp-controller="BlockExplorer" asp-action="Address" asp-route-address="SXDaQGs56aC9ZjFzTdbhudNXTbyxU5aNXJ">SXDaQGs56aC9ZjFzTdbhudNXTbyxU5aNXJ</a>.</p>
</div> </div>
<script src="~/js/jquery-2.1.0.min.js"></script> }
<script src="~/js/popper.js"></script>
<script src="~/js/bootstrap.min.js"></script> <script src="~/js/jquery-2.1.0.min.js"></script>
<script src="~/js/particles.min.js"></script> <script src="~/js/popper.js"></script>
<script src="~/js/scrollreveal.min.js"></script> <script src="~/js/bootstrap.min.js"></script>
<script src="~/js/jquery.downCount.js"></script> <script src="~/js/particles.min.js"></script>
<script src="~/js/parallax.min.js"></script> <script src="~/js/scrollreveal.min.js"></script>
<script src="~/js/owl.carousel.min.js"></script> <script src="~/js/jquery.downCount.js"></script>
<script src="~/js/particle-green.js"></script> <script src="~/js/parallax.min.js"></script>
<script src="~/lib/nprogress/nprogress.js"></script> <script src="~/js/owl.carousel.min.js"></script>
<environment include="Development"> <script src="~/js/particle-green.js"></script>
<script src="~/lib/nprogress/nprogress.js"></script>
<environment include="Development">
<script src="~/js/default.js"></script> <script src="~/js/default.js"></script>
</environment> </environment>
<environment exclude="Development"> <environment exclude="Development">
<script src="~/js/default.min.js"></script> <script src="~/js/default.min.js"></script>
</environment> </environment>
@RenderSection("Scripts", false) @RenderSection("Scripts", false)
</body> </body>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111742056-1"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-111742056-1"></script>
<script> <script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment