diff --git a/.gitignore b/.gitignore index 5b46630..0f64734 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ **/obj **/bin -**.db -**.db-wal -**.db-shm diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 45b4bdb..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Core Server", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/Interlinked.User/bin/Debug/net7.0/Interlinked.User.dll", - "args": [], - "cwd": "${workspaceFolder}/src/Interlinked.User", - "stopAtEntry": false, - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - }, - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "sourceFileMap": { - "/Views": "${workspaceFolder}/Views" - }, - "pipeTransport": { - "pipeCwd": "${workspaceFolder}", - "pipeProgram": "/usr/bin/bash", - "pipeArgs": ["-c"], - "debuggerPath": "/usr/bin/netcoredbg" - } - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ba66cc5..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dotnet.defaultSolution": "Interlinked.sln" -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index f163be0..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/Interlinked.sln", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "${workspaceFolder}/Interlinked.sln", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "watch", - "command": "dotnet", - "type": "process", - "args": [ - "watch", - "run", - "--project", - "${workspaceFolder}/Interlinked.sln" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index f8a3e62..0000000 --- a/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build - -WORKDIR /source - -COPY Interlinked.sln ./ - -COPY src/Interlinked.Core/*.csproj src/Interlinked.Core/ -COPY src/Interlinked.Shared/*.csproj src/Interlinked.Shared/ -COPY src/Interlinked.User/*.csproj src/Interlinked.User/ -copy test/Interlinked.Test/*.csproj test/Interlinked.Test/ - -RUN dotnet restore - -COPY . . - -RUN dotnet publish ./src/Interlinked.User -c Release -o /build/interlinked - -FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS runtime - - -COPY --from=build /build/interlinked /srv/interlinked - -VOLUME [ "/data", "/srv/log" ] - -WORKDIR /srv/interlinked - -ENV ASPNETCORE_ENVIRONMENT=Production - -# Net - -EXPOSE 80/tcp - -STOPSIGNAL SIGTERM - -ENTRYPOINT [ "dotnet", "/srv/interlinked/Interlinked.User.dll" ] diff --git a/Interlinked.sln b/Interlinked.sln index 0f9d76e..fac0aee 100644 --- a/Interlinked.sln +++ b/Interlinked.sln @@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{59D8D1A8-D9F EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlinked.Core", "src\Interlinked.Core\Interlinked.Core.csproj", "{21F768D4-54BA-4B55-8A03-399F697394FD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlinked.Locator", "src\Interlinked.Locator\Interlinked.Locator.csproj", "{069E0BCC-F019-4EDB-83F2-698EE5C33825}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlinked.Shared", "src\Interlinked.Shared\Interlinked.Shared.csproj", "{0EF4026C-3675-4BBB-B352-26FBB7C96FA3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interlinked.User", "src\Interlinked.User\Interlinked.User.csproj", "{5B94DC1F-170E-458C-BC5B-513C5ADB3F0A}" @@ -47,6 +49,7 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {21F768D4-54BA-4B55-8A03-399F697394FD} = {59D8D1A8-D9F0-464D-8654-D513FDC1A17F} + {069E0BCC-F019-4EDB-83F2-698EE5C33825} = {59D8D1A8-D9F0-464D-8654-D513FDC1A17F} {0EF4026C-3675-4BBB-B352-26FBB7C96FA3} = {59D8D1A8-D9F0-464D-8654-D513FDC1A17F} {5B94DC1F-170E-458C-BC5B-513C5ADB3F0A} = {59D8D1A8-D9F0-464D-8654-D513FDC1A17F} {A8E7D5AA-DB9D-44CC-B2A0-767C9D568B96} = {3A0C257D-5E1E-4FCE-A55D-8990F6F2F6B0} diff --git a/README.md b/README.md index bc6f82d..cca5cf5 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,8 @@ meow ### Health & Wellbeing This solution addresses the issue of social isolation that many developers face, by encouraging socialization with other developers and in-person collaboration. Contact with others is an elemental human need and social isolation may be detrimental to mental health. Encouraging socially active form of software development contributes to a healthy lifestyle. + +## Open Fintech + +Interlinked fosters local development and enables developers to discover and collaborate on local projects. It also enables financial sponsorship of the projects, thus being capable of investing both work and fund for the project. This combined, may increase the success rate of projects, which become community investments. + diff --git a/src/Interlinked.Core/App.razor b/src/Interlinked.Core/App.razor index 1910217..6fd3ed1 100644 --- a/src/Interlinked.Core/App.razor +++ b/src/Interlinked.Core/App.razor @@ -1,6 +1,5 @@  - diff --git a/src/Interlinked.Core/Interlinked.Core.csproj b/src/Interlinked.Core/Interlinked.Core.csproj index dcbd29b..ea70444 100644 --- a/src/Interlinked.Core/Interlinked.Core.csproj +++ b/src/Interlinked.Core/Interlinked.Core.csproj @@ -9,13 +9,6 @@ - - - - - - - diff --git a/src/Interlinked.Core/Pages/About.razor b/src/Interlinked.Core/Pages/About.razor index fa9ca84..e5bc462 100644 --- a/src/Interlinked.Core/Pages/About.razor +++ b/src/Interlinked.Core/Pages/About.razor @@ -2,9 +2,9 @@ About -

About this app

+

Abut this app

We made this app to provide a reliable platform for social working environments. To create a renowned network where great minds can communicate their great ideas. -Innovation, teamwork, diversity, sommunity engagement, social connection are +Innovation, teamwork, diversity, sommunity engagement, social connection are all words that describe perfectly our desire to create that app. diff --git a/src/Interlinked.Core/Pages/Dashboard.razor b/src/Interlinked.Core/Pages/Dashboard.razor deleted file mode 100644 index ac386f1..0000000 --- a/src/Interlinked.Core/Pages/Dashboard.razor +++ /dev/null @@ -1,125 +0,0 @@ -@page "/dashboard" -@using System.ComponentModel.DataAnnotations; -@using System.Net -@inject HttpClient req -@inject UserManager usr - -Dashboard - -

Your profile

- -@if (!string.IsNullOrWhiteSpace(_err)) -{ -

@_err

-} - -
-

Profile settings

- -
- - -
-
- - -
-
- - -
- -
-
- -
-

Security settings

- - -
- - -
-
- - -
- -
- - -
- - -
- -
-
- -@code { - private string _err = ""; - private PasswordChangeRequest _pwc = new(); - private EmailChangeRequest _emc = new(); - private ProfileRequest _pdr = new(); - - public record PasswordChangeRequest - { - [Required] - public string PasswordOld { get; set; } = default!; - [Required] - public string PasswordNew { get; set; } = default!; - }; - - public record EmailChangeRequest - { - [Required] - [EmailAddress] - public string Email { get; set; } = default!; - } - - public record ProfileRequest - { - public string? Bio { get; set; } - public string? CC { get; set; } - public string? City { get; set; } - public ICollection Interests { get; set; } = new List(); - } - - protected async override Task OnInitializedAsync() - { - - } - - private async Task ChangePassword() - { - var resp = await req.PostAsJsonAsync("/api/auth/changepass", _pwc); - if (!resp.IsSuccessStatusCode) - { - _err = await resp.Content.ReadAsStringAsync(); - } - this._pwc = new(); - this.StateHasChanged(); - } - - private async Task ChangeEmail() - { - var resp = await req.PostAsJsonAsync("/api/auth/changemail", _emc); - if (!resp.IsSuccessStatusCode) - { - _err = await resp.Content.ReadAsStringAsync(); - } - this._emc = new(); - this.StateHasChanged(); - } - - private async Task UpdateProfile() - { - var resp = await req.PostAsJsonAsync("/api/auth/profile/update", _pdr); - if (!resp.IsSuccessStatusCode) - { - _err = await resp.Content.ReadAsStringAsync(); - } - this._pdr = new(); - this.StateHasChanged(); - } -} diff --git a/src/Interlinked.Core/Pages/FetchData.razor b/src/Interlinked.Core/Pages/FetchData.razor new file mode 100644 index 0000000..783a026 --- /dev/null +++ b/src/Interlinked.Core/Pages/FetchData.razor @@ -0,0 +1,57 @@ +@page "/fetchdata" +@inject HttpClient Http + +Weather forecast + +

Weather forecast

+ +

This component demonstrates fetching data from the server.

+ +@if (forecasts == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + @foreach (var forecast in forecasts) + { + + + + + + + } + +
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
+} + +@code { + private WeatherForecast[]? forecasts; + + protected override async Task OnInitializedAsync() + { + forecasts = await Http.GetFromJsonAsync("sample-data/weather.json"); + } + + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public string? Summary { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } +} diff --git a/src/Interlinked.Core/Pages/Index.razor b/src/Interlinked.Core/Pages/Index.razor index 11e8c58..6085c4a 100644 --- a/src/Interlinked.Core/Pages/Index.razor +++ b/src/Interlinked.Core/Pages/Index.razor @@ -1,24 +1,9 @@ @page "/" -@using Syncfusion.Blazor.Maps +Index - - - - - - @* Add marker *@ - - - - - - - +

Hello, world!

-@code { - private List Cities = new List { - new City { Latitude = 34.060620, Longitude = -118.330491, Name="California" }, - new City{ Latitude = 40.724546, Longitude = -73.850344, Name="New York"} - }; -} +Welcome to your new app. + + diff --git a/src/Interlinked.Core/Pages/Login.razor b/src/Interlinked.Core/Pages/Login.razor deleted file mode 100644 index a72492f..0000000 --- a/src/Interlinked.Core/Pages/Login.razor +++ /dev/null @@ -1,85 +0,0 @@ -@page "/login" -@using System.ComponentModel.DataAnnotations; -@using System.Net -@inject HttpClient req -@inject UserManager usr -@inject NavigationManager nav - -Login - -

Log in

- - - - -
- - -
-
- - -
- -
- -@if (!string.IsNullOrWhiteSpace(ValidationMsg)) -{ -

@ValidationMsg

-} - -@code { - public record LoginModel - { - [Required] - [EmailAddress] - public string Email { get; set; } = default!; - [Required] - public string Password { get; set; } = default!; - }; - public LoginModel Model { get; set; } = new(); - public string ValidationMsg = string.Empty; - - protected async override Task OnInitializedAsync() - { - if (await usr.GetUser() != null) - { - nav.NavigateTo("/"); - return; - } - Model ??= new(); - } - - private async Task Submit() - { - var resp = await req.PostAsJsonAsync("/api/auth/login", Model); - if (resp.StatusCode == HttpStatusCode.OK) - { - Model = new(); - ValidationMsg = "Successful login <3"; - var user = await resp.Content.ReadFromJsonAsync(); - if (user == null) - { - ValidationMsg = "Unknown authentication error"; - this.StateHasChanged(); - return; - } - usr.SetUser(user); - this.StateHasChanged(); - nav.NavigateTo("/", true); - return; - } - - if (resp.StatusCode == HttpStatusCode.Unauthorized) - { - Model = new(); - ValidationMsg = "Invalid username or password."; - this.StateHasChanged(); - return; - } - - Model = new(); - ValidationMsg = "Authorization error..."; - this.StateHasChanged(); - } -} diff --git a/src/Interlinked.Core/Pages/Logout.razor b/src/Interlinked.Core/Pages/Logout.razor deleted file mode 100644 index 86a6d19..0000000 --- a/src/Interlinked.Core/Pages/Logout.razor +++ /dev/null @@ -1,18 +0,0 @@ -@page "/logout" -@inject HttpClient req -@inject UserManager usr -@inject NavigationManager nav -@using System.Net - -@code { - protected override async Task OnInitializedAsync() - { - var resp = await req.GetAsync("/api/auth/logout"); - if (resp.StatusCode == HttpStatusCode.NoContent) - { - usr.SetUser(null!); - } - this.StateHasChanged(); - nav.NavigateTo("/login", true); - } -} diff --git a/src/Interlinked.Core/Pages/PeopleTable.razor b/src/Interlinked.Core/Pages/PeopleTable.razor deleted file mode 100644 index 007fdab..0000000 --- a/src/Interlinked.Core/Pages/PeopleTable.razor +++ /dev/null @@ -1,34 +0,0 @@ -@page "/peopletable" - -

Employee Information

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameSurnameCityCountryProficiencies
JohnDoeNew YorkUSAWeb Development
JaneSmithLos AngelesUSAGraphic Design
MariaGarciaMadridSpainData Analysis
\ No newline at end of file diff --git a/src/Interlinked.Core/Pages/Project.razor b/src/Interlinked.Core/Pages/Project.razor deleted file mode 100644 index ec10d9c..0000000 --- a/src/Interlinked.Core/Pages/Project.razor +++ /dev/null @@ -1,32 +0,0 @@ -@page "/project" - -@code { - private string UserName = "John Doe"; - private string project = "Building a computer from a scrap"; - private string description = "In this project we're going to build computer from a scrap."; - private List tags = new List { "hardware", "embedded" }; @*choosen from the list*@ - private List persons = new List { "Jan Kowalski", "Kamil Ślimak" }; @*got from database*@ -} - -
- Project -

@project

-

Tags

-
    - @foreach (var tag in tags) - { -
  • @tag
  • - } -
-

Description

-

@description

-

Owner

-

@UserName

-

Other persons working on project

-
    - @foreach (var person in persons) - { -
  • @person
  • - } -
-
\ No newline at end of file diff --git a/src/Interlinked.Core/Pages/Register.razor b/src/Interlinked.Core/Pages/Register.razor deleted file mode 100644 index 435b3da..0000000 --- a/src/Interlinked.Core/Pages/Register.razor +++ /dev/null @@ -1,96 +0,0 @@ -@page "/register" -@using System.ComponentModel.DataAnnotations; -@using System.Net -@inject HttpClient req -@inject UserManager usr -@inject NavigationManager nav - -Register - -

Register

- - - - -
- - -
- -
- - -
-
- - -
-
- - -
- -
- -@if (!string.IsNullOrWhiteSpace(ValidationMsg)) -{ -

@ValidationMsg

-} - -@code { - public record LoginModel - { - [Required] - public string Username { get; set; } = default!; - public string? Name { get; set; } - [Required] - [EmailAddress] - public string Email { get; set; } = default!; - [Required] - public string Password { get; set; } = default!; - }; - public LoginModel Model { get; set; } = new(); - public string ValidationMsg = string.Empty; - - protected override async Task OnInitializedAsync() - { - if (await usr.GetUser() != null) - { - nav.NavigateTo("/", true); - return; - } - Model ??= new(); - } - - private async Task Submit() - { - var resp = await req.PostAsJsonAsync("/api/auth/register", Model); - if (resp.StatusCode == HttpStatusCode.OK) - { - Model = new(); - ValidationMsg = "Successful register <3"; var user = await resp.Content.ReadFromJsonAsync(); - if (user == null) - { - ValidationMsg = "Unknown authentication error"; - this.StateHasChanged(); - return; - } - usr.SetUser(user); - this.StateHasChanged(); - nav.NavigateTo("/", true); - return; - } - - if (resp.StatusCode == HttpStatusCode.Conflict) - { - Model = new(); - ValidationMsg = "User already registered."; - this.StateHasChanged(); - return; - } - - Model = new(); - ValidationMsg = "Registration error..."; - this.StateHasChanged(); - } -} diff --git a/src/Interlinked.Core/Pages/UserProfile.razor b/src/Interlinked.Core/Pages/UserProfile.razor index f5556de..4abfa97 100644 --- a/src/Interlinked.Core/Pages/UserProfile.razor +++ b/src/Interlinked.Core/Pages/UserProfile.razor @@ -1,66 +1,26 @@ -@page "/profile/{username}" -@inject HttpClient cli +@page "/user/{username}" @code { [Parameter] public string Username { get; set; } = "johndoeUwU"; - private UserModel _user = null!; - private bool _valid = true; + private string FullName = "meow uwu"; + private string Bio = "Software Developer"; + private List Skills = new List { "C#", "ASP.NET Core", "Blazor" }; } -@if (!_valid) -{ -

User not found @(":<")

-} -else -{ - if (_user != null) - { - +

@Bio

+

Skills

+
    + @foreach (var skill in Skills) { - _valid = false; - return; +
  • @skill
  • } - - _user = (await resp.Content.ReadFromJsonAsync())!; - this.StateHasChanged(); - } -} +
+ diff --git a/src/Interlinked.Core/Program.cs b/src/Interlinked.Core/Program.cs index 4375fb2..495e939 100644 --- a/src/Interlinked.Core/Program.cs +++ b/src/Interlinked.Core/Program.cs @@ -1,32 +1,11 @@ using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Interlinked.Core; -using Syncfusion.Blazor; -using Microsoft.AspNetCore.ResponseCompression; -using Microsoft.AspNetCore.Builder; -using Interlinked.Core.Services; -internal class Program -{ - private static async Task Main(string[] args) - { - var builder = WebAssemblyHostBuilder.CreateDefault(args); - builder.RootComponents.Add("#app"); - builder.RootComponents.Add("head::after"); - IServiceCollection serviceCollection = builder.Services.AddSyncfusionBlazor(); +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); - builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); - builder.Services.AddResponseCompression(opts => - { - opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( - new[] { "application/octet-stream" }); - }); - - builder.Services.AddSingleton(); - - var app = builder.Build(); - - await builder.Build().RunAsync(); - } -} +await builder.Build().RunAsync(); diff --git a/src/Interlinked.Core/Services/UserManager.cs b/src/Interlinked.Core/Services/UserManager.cs deleted file mode 100644 index 16dfc69..0000000 --- a/src/Interlinked.Core/Services/UserManager.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http.Json; -using System.Threading.Tasks; -using Interlinked.Shared.Model; - -namespace Interlinked.Core.Services; - -public class UserManager -{ - public UserManager(IServiceProvider serv) - { - _serv = serv; - } - - private readonly IServiceProvider _serv; - private bool _init = false; - static SemaphoreSlim sem = new SemaphoreSlim(1, 1); - - - public async Task InitAsync() - { - await sem.WaitAsync(); - if (_init) - { - sem.Release(); - return; - } - - using var scope = _serv.CreateAsyncScope(); - var resp = await scope.ServiceProvider.GetRequiredService().GetAsync("/api/auth/userdata"); - if (resp.StatusCode == HttpStatusCode.OK) - { - this.User = (await resp.Content.ReadFromJsonAsync())!; - Console.WriteLine($"User: {User.Id}"); - } - - _init = true; - - sem.Release(); - } - - private UserModel User { get; set; } = default!; - public async Task GetUser() - { - if (User == null) - { - if (!_init) - { - await InitAsync(); - } - } - - return User; - } - - public void SetUser(UserModel u) - { - User = u; - } - public bool IsAuthorized => User != null; -} diff --git a/src/Interlinked.Core/Shared/AuthenticateUser.razor b/src/Interlinked.Core/Shared/AuthenticateUser.razor deleted file mode 100644 index ed02d34..0000000 --- a/src/Interlinked.Core/Shared/AuthenticateUser.razor +++ /dev/null @@ -1,10 +0,0 @@ -@inject UserManager usr - -@code { - protected override async Task OnInitializedAsync() - { - await Task.Yield(); - await usr.InitAsync(); - this.StateHasChanged(); - } -} diff --git a/src/Interlinked.Core/Shared/MainLayout.razor b/src/Interlinked.Core/Shared/MainLayout.razor index ae76f24..839b8fe 100644 --- a/src/Interlinked.Core/Shared/MainLayout.razor +++ b/src/Interlinked.Core/Shared/MainLayout.razor @@ -1,5 +1,4 @@ @inherits LayoutComponentBase -@inject UserManager usr
- -@code { - private UserModel u = null!; - protected override async Task OnInitializedAsync() - { - await Task.Yield(); - u = (await usr.GetUser())!; - } -} diff --git a/src/Interlinked.Core/Shared/MainLayout.razor.css b/src/Interlinked.Core/Shared/MainLayout.razor.css index deec2fe..c182629 100644 --- a/src/Interlinked.Core/Shared/MainLayout.razor.css +++ b/src/Interlinked.Core/Shared/MainLayout.razor.css @@ -1,85 +1,83 @@ .page { - position: relative; - display: flex; - flex-direction: column; + position: relative; + display: flex; + flex-direction: column; } main { - flex: 1; + flex: 1; } .sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); + background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); } + + .top-row { - background-color: #f7f7f7; - border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; - height: 3.5rem; - display: flex; - align-items: center; + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + justify-content: flex-end; + height: 3.5rem; + display: flex; + align-items: center; } -.top-row ::deep a, -.top-row ::deep .btn-link { - white-space: nowrap; - margin-left: 1.5rem; - text-decoration: none; -} + .top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; + } -.top-row ::deep a:hover, -.top-row ::deep .btn-link:hover { - text-decoration: underline; -} + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } -.top-row ::deep a:first-child { - overflow: hidden; - text-overflow: ellipsis; -} + .top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } @media (max-width: 640.98px) { - .top-row:not(.auth) { - display: none; - } + .top-row:not(.auth) { + display: none; + } - .top-row.auth { - justify-content: space-between; - } + .top-row.auth { + justify-content: space-between; + } - .top-row ::deep a, - .top-row ::deep .btn-link { - margin-left: 0; - } + .top-row ::deep a, .top-row ::deep .btn-link { + margin-left: 0; + } } @media (min-width: 641px) { - .page { - flex-direction: row; - } + .page { + flex-direction: row; + } - .sidebar { - width: 250px; - height: 100vh; - position: sticky; - top: 0; - } + .sidebar { + width: 250px; + height: 100vh; + position: sticky; + top: 0; + } - .top-row { - position: sticky; - top: 0; - z-index: 20; - } + .top-row { + position: sticky; + top: 0; + z-index: 1; + } - .top-row.auth ::deep a:first-child { - flex: 1; - text-align: right; - width: 0; - } + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } - .top-row, - article { - padding-left: 2rem !important; - padding-right: 1.5rem !important; - } + .top-row, article { + padding-left: 2rem !important; + padding-right: 1.5rem !important; + } } diff --git a/src/Interlinked.Core/Shared/MainLayoutLanding.razor b/src/Interlinked.Core/Shared/MainLayoutLanding.razor deleted file mode 100644 index c5f2682..0000000 --- a/src/Interlinked.Core/Shared/MainLayoutLanding.razor +++ /dev/null @@ -1,23 +0,0 @@ -@inherits LayoutComponentBase -@inject UserManager usr - -
- -
-
- @if (!usr.IsAuthorized) - { - Log in - Register - } - else - { - Log out (async () => (await @usr.GetUser()).Username) - } -
- -
- @Body -
-
-
diff --git a/src/Interlinked.Core/Shared/MainLayoutLanding.razor.css b/src/Interlinked.Core/Shared/MainLayoutLanding.razor.css deleted file mode 100644 index ff95d37..0000000 --- a/src/Interlinked.Core/Shared/MainLayoutLanding.razor.css +++ /dev/null @@ -1,89 +0,0 @@ -.page { - position: relative; - display: flex; - flex-direction: column; -} - -main { - flex: 1; -} - -.top-row { - z-index: 20; - background-color: #f7f7f7; - border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; - height: 3.5rem; - display: flex; - align-items: center; -} - -.top-row ::deep a, -.top-row ::deep .btn-link { - white-space: nowrap; - margin-left: 1.5rem; - text-decoration: none; -} - -.top-row ::deep a:hover, -.top-row ::deep .btn-link:hover { - text-decoration: underline; -} - -.top-row ::deep a:first-child { - overflow: hidden; - text-overflow: ellipsis; -} - -@media (max-width: 640.98px) { - .top-row:not(.auth) { - display: none; - } - - .top-row.auth { - justify-content: space-between; - } - - .top-row ::deep a, - .top-row ::deep .btn-link { - margin-left: 0; - } -} - -@media (min-width: 641px) { - .page { - flex-direction: row; - } - - .sidebar { - width: 250px; - height: 100vh; - position: sticky; - top: 0; - } - - .top-row { - position: sticky; - top: 0; - z-index: 20; - } - - .top-row.auth ::deep a:first-child { - flex: 1; - text-align: right; - width: 0; - } - - .top-row, - article { - padding-left: 2rem !important; - padding-right: 1.5rem !important; - } -} - -.form { - min-width: 100%; - min-height: 100%; - flex-wrap: wrap; - flex-direction: column; -} diff --git a/src/Interlinked.Core/Shared/NavMenu.razor b/src/Interlinked.Core/Shared/NavMenu.razor index 508b931..2c519f1 100644 --- a/src/Interlinked.Core/Shared/NavMenu.razor +++ b/src/Interlinked.Core/Shared/NavMenu.razor @@ -1,9 +1,6 @@ -@inject UserManager usr - -