Skip to content

Commit

Permalink
Apply several changes
Browse files Browse the repository at this point in the history
  • Loading branch information
monambike committed Feb 27, 2024
1 parent 9b9c3cd commit bb7aaf2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/Monambike.Web/Models/Curiosity.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
namespace Monambike.Web.Data
namespace Monambike.Web.Models
{
public class Curiosity
{
public List<string> Curiosities { get; set; } = new List<string>();

/// <summary>
/// The curiosities file path.
/// </summary>
public StreamReader CuriositiesFile = new(@"..\Resources\Curiosities.txt");

public Curiosity()
{
// Reads every line until the end of curiosities file
while (!CuriositiesFile.EndOfStream)
{
// Getting the line
var line = CuriositiesFile.ReadLine();
// If the line is not null, add into the list
if (line is not null) Curiosities.Add(line);
}
}

private string GetRandomCuriosity()
{
var random = new Random();
return Curiosities[random.Next(1, Curiosities.Count)];
}
private string GetRandomCuriosity() => Curiosities[new Random().Next(1, Curiosities.Count)];
}
}
2 changes: 2 additions & 0 deletions src/Monambike.Web/Monambike.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Data\" />
<Folder Include="Enitities\" />
<Folder Include="Utilities\" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Monambike.Web/Pages/Home/Tour.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h2 class="site-section--title">POR ONDE COMEÇAR?</h2>
<div class="site-section--body">
<!-- Left Column -->
<a href="https://monambike.notion.site/b0d235ad21d34416be77fd03d16897e5?v=42aea01b85904c08aced01707d9f4984&pvs=4" target="_blank">
<a href="/media" target="_blank">
<div class="three-columns three-columns site-section--tour--extern-column">
<h3 class="column-title">Listas de Mídia</h3>
<p>Veja minhas listas de jogos, filmes, animes e séries preferidos que eu tô
Expand Down
7 changes: 7 additions & 0 deletions src/Monambike.Web/Redirects/Media.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@page "/media"
@using Monambike.Core.Data;
@inject NavigationManager NavManager

@code {
protected override void OnInitialized() => NavManager.NavigateTo($"https://monambike.notion.site/a4f651d1cf7143fa93dd8158e979ade4?v=1829d81a3f5f4483b7d462e729b9f2bf&pvs=74");
}
1 change: 0 additions & 1 deletion src/Monambike.Web/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@using Microsoft.Extensions.Localization;
@using Microsoft.JSInterop
@using Monambike.Web
@using Monambike.Web.Data
@using Monambike.Web.Resources
@using Monambike.Web.Services
@using Monambike.Web.Shared

0 comments on commit bb7aaf2

Please sign in to comment.