Skip to content

Commit

Permalink
Create new links project for links subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
monambike committed Mar 14, 2024
1 parent fc39637 commit 3bfe6de
Show file tree
Hide file tree
Showing 26 changed files with 570 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.2" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/Monambike.Links/Monambike.Links.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

var builder = WebAssemblyHostBuilder.CreateDefault(args);

await builder.Build().RunAsync();
9 changes: 9 additions & 0 deletions src/Monambike.Links/Monambike.Links.Client/_Imports.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Monambike.Links.Client
27 changes: 27 additions & 0 deletions src/Monambike.Links/Monambike.Links/Components/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">

<head>
<!-- Meta Tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<!-- Head Outlet -->
<HeadOutlet />
<!--My Information-->
<meta name="author" content="Vinícius Gabriel Marques de Melo">
<meta name="application-name" content="Monambike Website">
<meta name="description" content="Welcome to my link hub! Check my social medias and ways to contact me from gamer to professional!">
<meta name="keywords" content="monambike, vinicius-gabriel, personal website, programming, web development, developer, portfolio, projects, coding, software engineer">
<!-- CSS Stylesheets -->
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="Monambike.Links.styles.css" />
<link rel="stylesheet" href="main.css" />
</head>

<body>
<Routes />
<script src="_framework/blazor.web.js"></script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@inherits LayoutComponentBase

@Body

<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}

#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
36 changes: 36 additions & 0 deletions src/Monambike.Links/Monambike.Links/Components/Pages/Error.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@page "/Error"
@using System.Diagnostics

<PageTitle>Error</PageTitle>

<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>

@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}

<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>

@code{
[CascadingParameter]
private HttpContext? HttpContext { get; set; }

private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);

protected override void OnInitialized() =>
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
}
125 changes: 125 additions & 0 deletions src/Monambike.Links/Monambike.Links/Components/Pages/Home.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
@page "/"
@using Monambike.Core.Data;
<PageTitle>Links | Monambike</PageTitle>

<div>
<header class="acrylic shadow">
<img class="profile-picture" src="images/profile-picture.jpg" alt="Photo from Vinicius Gabriel." />
<h1>Vinícius Gabriel</h1>
<span>Hello :) I'm a Software Developer now willing to be a Game Designer and 3D model animator.</span>
<h2>@@monambike</h2>
</header>
<section class="acrylic shadow">
<h3>Links Gamers</h3>
<ul>
<li>
<a target="_blank" rel="nofollow" href="@Links.YouTubeMonambike">
<div class="container">
<img class="social-image" src="images/social/youtube.svg" alt="YouTube logo." />
<div class="text-container">
<span>Canal de Vídeos Editados</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.YouTubeMonambikeLive">
<div class="container">
<img class="social-image" src="images/social/youtube.svg" alt="YouTube logo." />
<div class="text-container">
<span>Canal de Lives e Shorts</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.InstagramMonambike">
<div class="container">
<img class="social-image" src="images/social/instagram.svg" alt="Instagram logo." />
<div class="text-container">
<span>Instagram Principal</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.Steam">
<div class="container">
<img class="social-image" src="images/social/steam.svg" alt="Steam logo." />
<div class="text-container">
<span>Conta da Steam</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.Steam">
<div class="container">
<img class="social-image" src="images/social/discord.svg" alt="Discord logo." />
<div class="text-container">
<span>Discord: @@monambike</span>
</div>
</div>
</a>
</li>
@* <li><a target="_blank" rel="nofollow" href="@Links.Facebook">Conta da Facebook</a></li> *@
</ul>
</section>
<hr />
<section class="acrylic shadow">
<h3>Links Profissionais</h3>
<ul>
<li>
<a target="_blank" rel="nofollow" href="@Links.LinkedIn">
<div class="container">
<img class="social-image" src="images/social/linkedin.svg" alt="LinkedIn logo." />
<div class="text-container">
<span>LinkedIn</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.GitHub">
<div class="container">
<img class="social-image" src="images/social/github.svg" alt="GitHub logo." />
<div class="text-container">
<span>GitHub</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.InstagramMonambikePortfolio">
<div class="container">
<img class="social-image" src="images/social/instagram.svg" alt="Instagram logo." />
<div class="text-container">
<span>Instagram (Portfolio)</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.YouTubeMonambikePortfolio">
<div class="container">
<img class="social-image" src="images/social/youtube.svg" alt="YouTube logo." />
<div class="text-container">
<span>YouTube (Portfolio)</span>
</div>
</div>
</a>
</li>
<li>
<a target="_blank" rel="nofollow" href="@Links.ItchIo">
<div class="container">
<img class="social-image" src="images/social/itch-io.svg" alt="Itch.Io logo." />
<div class="text-container">
<span>Itch.Io</span>
</div>
</div>
</a>
</li>
</ul>
</section>
<hr />
</div>
6 changes: 6 additions & 0 deletions src/Monambike.Links/Monambike.Links/Components/Routes.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(Client._Imports).Assembly }">
<Found Context="routeData">
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
11 changes: 11 additions & 0 deletions src/Monambike.Links/Monambike.Links/Components/_Imports.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Monambike.Links
@using Monambike.Links.Client
@using Monambike.Links.Components
19 changes: 19 additions & 0 deletions src/Monambike.Links/Monambike.Links/Monambike.Links.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Content Remove="C:\Users\vinic\.nuget\packages\monambike.core\1.4.0\contentFiles\any\net8.0\Resources\Phrases.txt" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Monambike.Links.Client\Monambike.Links.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.2" />
<PackageReference Include="Monambike.Core" Version="1.4.0" />
</ItemGroup>

</Project>
32 changes: 32 additions & 0 deletions src/Monambike.Links/Monambike.Links/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Monambike.Links.Components;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveWebAssemblyComponents();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseWebAssemblyDebugging();
}
else
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

app.UseHttpsRedirection();

app.UseStaticFiles();
app.UseAntiforgery();

app.MapRazorComponents<App>()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Monambike.Links.Client._Imports).Assembly);

app.Run();
41 changes: 41 additions & 0 deletions src/Monambike.Links/Monambike.Links/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:10431",
"sslPort": 44363
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5299",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7035;http://localhost:5299",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions src/Monambike.Links/Monambike.Links/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
Loading

0 comments on commit 3bfe6de

Please sign in to comment.