Skip to content
Permalink
Browse files

A Brand New wasabiwallet.io ⭐️ (#2043)

A Brand New wasabiwallet.io ⭐️
  • Loading branch information...
nopara73 committed Aug 8, 2019
2 parents 19a512c + 067d16f commit a7b99d8f8318a58078234a23ef90f4291abe0b2e
Showing with 6,287 additions and 8,453 deletions.
  1. +3 −36 WalletWasabi.Backend/InitConfigStartupTask.cs
  2. +0 −92 WalletWasabi.Backend/UnversionedWebBuilder.cs
  3. +0 −4 WalletWasabi.Backend/WalletWasabi.Backend.csproj
  4. +32 −0 WalletWasabi.Backend/WebsiteTorifier.cs
  5. +23 −0 WalletWasabi.Backend/wwwroot/css/_variables.scss
  6. +5,299 −7,987 WalletWasabi.Backend/wwwroot/css/bootstrap.css
  7. +390 −240 WalletWasabi.Backend/wwwroot/css/style.css
  8. BIN WalletWasabi.Backend/wwwroot/images/apple.png
  9. BIN WalletWasabi.Backend/wwwroot/images/chrome-browser.png
  10. +0 −1 WalletWasabi.Backend/wwwroot/images/download-black.svg
  11. +0 −1 WalletWasabi.Backend/wwwroot/images/download.svg
  12. BIN WalletWasabi.Backend/wwwroot/images/hero-off.jpg
  13. BIN WalletWasabi.Backend/wwwroot/images/hero-on.jpg
  14. +1 −0 WalletWasabi.Backend/wwwroot/images/icon-colored-finder.svg
  15. +1 −0 WalletWasabi.Backend/wwwroot/images/icon-colored-linux.svg
  16. BIN WalletWasabi.Backend/wwwroot/images/icon-colored-onion.png
  17. +1 −0 WalletWasabi.Backend/wwwroot/images/icon-colored-ubuntu.svg
  18. +1 −0 WalletWasabi.Backend/wwwroot/images/icon-colored-windows.svg
  19. +1 −0 WalletWasabi.Backend/wwwroot/images/icon-external.svg
  20. +1 −0 WalletWasabi.Backend/wwwroot/images/illustration-coinjoin.svg
  21. BIN WalletWasabi.Backend/wwwroot/images/linux.png
  22. +1 −0 WalletWasabi.Backend/wwwroot/images/shader-loop.svg
  23. +1 −0 WalletWasabi.Backend/wwwroot/images/shader-wasabi.svg
  24. BIN WalletWasabi.Backend/wwwroot/images/tor-browser.png
  25. BIN WalletWasabi.Backend/wwwroot/images/wasabi-social.jpg
  26. BIN WalletWasabi.Backend/wwwroot/images/wasabi-wallet-laptop.png
  27. +33 −0 WalletWasabi.Backend/wwwroot/images/wasabi-wallet-logo.svg
  28. BIN WalletWasabi.Backend/wwwroot/images/windows.png
  29. +499 −92 WalletWasabi.Backend/wwwroot/index.html
@@ -16,15 +16,13 @@ namespace WalletWasabi.Backend
{
public class InitConfigStartupTask : IStartupTask
{
private static List<string> Last5CoinJoins { get; set; } = new List<string>();
private static object UpdateUnversionedLock { get; } = new object();
public UnversionedWebBuilder UnversionedWebBuilder { get; }
public WebsiteTorifier WebsiteTorifier { get; }
public Global Global { get; }

public InitConfigStartupTask(Global global, IHostingEnvironment hostingEnvironment)
{
Global = global;
UnversionedWebBuilder = new UnversionedWebBuilder(global, ((HostingEnvironment)hostingEnvironment).WebRootPath);
WebsiteTorifier = new WebsiteTorifier(((HostingEnvironment)hostingEnvironment).WebRootPath);
}

public async Task ExecuteAsync(CancellationToken cancellationToken)
@@ -54,18 +52,7 @@ public async Task ExecuteAsync(CancellationToken cancellationToken)

try
{
Directory.CreateDirectory(UnversionedWebBuilder.UnversionedFolder);
UnversionedWebBuilder.CreateDownloadTextWithVersionHtml();
UnversionedWebBuilder.CloneAndUpdateOnionIndexHtml();

if (File.Exists(Global.Coordinator.CoinJoinsFilePath))
{
string[] allLines = File.ReadAllLines(Global.Coordinator.CoinJoinsFilePath);
Last5CoinJoins = allLines.TakeLast(5).Reverse().ToList();
UnversionedWebBuilder.UpdateCoinJoinsHtml(Last5CoinJoins);
}

Global.Coordinator.CoinJoinBroadcasted += Coordinator_CoinJoinBroadcasted;
WebsiteTorifier.CloneAndUpdateOnionIndexHtml();
}
catch (Exception ex)
{
@@ -82,25 +69,5 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc
{
Logger.LogWarning(e?.ExceptionObject as Exception, "UnhandledException");
}

private void Coordinator_CoinJoinBroadcasted(object sender, Transaction tx)
{
try
{
lock (UpdateUnversionedLock)
{
if (Last5CoinJoins.Count > 4)
{
Last5CoinJoins.RemoveLast();
}
Last5CoinJoins.Insert(0, tx.GetHash().ToString());
UnversionedWebBuilder.UpdateCoinJoinsHtml(Last5CoinJoins);
}
}
catch (Exception ex)
{
Logger.LogWarning(ex, nameof(Program));
}
}
}
}

This file was deleted.

@@ -37,10 +37,6 @@
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\unversioned\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
@@ -0,0 +1,32 @@
using NBitcoin;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace WalletWasabi.Backend
{
public class WebsiteTorifier
{
public string RootFolder { get; }
public string UnversionedFolder { get; }

public WebsiteTorifier(string rootFolder)
{
RootFolder = rootFolder;
UnversionedFolder = Path.GetFullPath(Path.Combine(RootFolder, "unversioned"));
}

public void CloneAndUpdateOnionIndexHtml()
{
var path = Path.Combine(RootFolder, "index.html");
var onionPath = Path.Combine(RootFolder, "onion-index.html");

var content = File.ReadAllText(path);

content = content.Replace("http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion", "https://wasabiwallet.io", StringComparison.Ordinal);

File.WriteAllText(onionPath, content);
}
}
}
@@ -0,0 +1,23 @@
// Wasabi Wallet CSS Theme
// Compile Bootstrap 4.3+ with these variables

$green: #58A567;
$dark: #211B24;
$blue: #3B83F7;
$body-color: $dark;
$headings-font-family: 'Playfair Display', serif;;
$font-family-monospace: Inconsolata, monospace;
$font-family-base: $font-family-monospace;
$headings-font-weight: 600;
$border-radius: .2rem;
$h1-font-size: $font-size-base * 4;
$h2-font-size: $font-size-base * 4;
$font-weight-bold: 600;
$text-muted: #716686;
$spacer: 3rem;
$navbar-nav-link-padding-x: 2rem;
$navbar-dark-color: $white;
$list-group-bg: $dark;
$list-group-color: $white;
$list-group-border-color: rgba($white, .125);
$input-btn-padding-y: .5rem;

0 comments on commit a7b99d8

Please sign in to comment.
You can’t perform that action at this time.