Skip to content

Commit

Permalink
First ever package version
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Mar 2, 2024
1 parent d6ec99f commit 04ad9d3
Show file tree
Hide file tree
Showing 32 changed files with 876 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Blazor.Cookies

on:
repository_dispatch:
push:
tags:
- "Cookies-v[0-9]+.[0-9]+.[0-9]+*"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY}}

jobs:

Cookies:
name: Cookies
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Verify commit
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/Cookies-v/}" >> $GITHUB_ENV

- name: Build
run: |
dotnet build BitzArt.Blazor.Cookies.sln --configuration Release /p:Version=${VERSION}
dotnet pack BitzArt.Blazor.Cookies.sln --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: |
dotnet nuget push BitzArt.Blazor.Cookies.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_APIKEY}
25 changes: 25 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tests

on:
push:
branches:
- main
tags-ignore:
- '*'

jobs:
tests:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal
64 changes: 64 additions & 0 deletions Blazor.Cookies.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34525.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F0AC2847-ADDF-4D66-B1FA-2D6B34F206CF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{2E5D89F5-108F-4E1D-B9D7-D86A531130CE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BitzArt.Blazor.Cookies", "src\BitzArt.Blazor.Cookies\BitzArt.Blazor.Cookies.csproj", "{879DF7E1-E2C3-4315-8FE4-FD700330F28D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FE7AAF4D-63E3-41CA-8E4F-D16CC839D8DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BitzArt.Blazor.Cookies.Tests", "tests\BitzArt.Blazor.Cookies.Tests\BitzArt.Blazor.Cookies.Tests.csproj", "{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BitzArt.Blazor.Cookies.SampleApp", "sample\BitzArt.Blazor.Cookies.SampleApp\BitzArt.Blazor.Cookies.SampleApp\BitzArt.Blazor.Cookies.SampleApp.csproj", "{F7D5FB57-A0A9-4C95-917C-2122244107CF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BitzArt.Blazor.Cookies.SampleApp.Client", "sample\BitzArt.Blazor.Cookies.SampleApp\BitzArt.Blazor.Cookies.SampleApp.Client\BitzArt.Blazor.Cookies.SampleApp.Client.csproj", "{440A5264-6418-489D-9DFB-E434029AC8C9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{53C2EA4F-8EA8-41FE-A091-D85B0314B1F7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{890E8E99-1FCA-4A48-8189-92FF199211D8}"
ProjectSection(SolutionItems) = preProject
.github\workflows\Publish.yml = .github\workflows\Publish.yml
.github\workflows\Tests.yml = .github\workflows\Tests.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{879DF7E1-E2C3-4315-8FE4-FD700330F28D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{879DF7E1-E2C3-4315-8FE4-FD700330F28D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{879DF7E1-E2C3-4315-8FE4-FD700330F28D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{879DF7E1-E2C3-4315-8FE4-FD700330F28D}.Release|Any CPU.Build.0 = Release|Any CPU
{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8}.Release|Any CPU.Build.0 = Release|Any CPU
{F7D5FB57-A0A9-4C95-917C-2122244107CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7D5FB57-A0A9-4C95-917C-2122244107CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7D5FB57-A0A9-4C95-917C-2122244107CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7D5FB57-A0A9-4C95-917C-2122244107CF}.Release|Any CPU.Build.0 = Release|Any CPU
{440A5264-6418-489D-9DFB-E434029AC8C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{440A5264-6418-489D-9DFB-E434029AC8C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{440A5264-6418-489D-9DFB-E434029AC8C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{440A5264-6418-489D-9DFB-E434029AC8C9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{879DF7E1-E2C3-4315-8FE4-FD700330F28D} = {F0AC2847-ADDF-4D66-B1FA-2D6B34F206CF}
{5C41CFD6-7636-4536-8EF6-7FFE7DBA9BC8} = {FE7AAF4D-63E3-41CA-8E4F-D16CC839D8DA}
{F7D5FB57-A0A9-4C95-917C-2122244107CF} = {2E5D89F5-108F-4E1D-B9D7-D86A531130CE}
{440A5264-6418-489D-9DFB-E434029AC8C9} = {2E5D89F5-108F-4E1D-B9D7-D86A531130CE}
{890E8E99-1FCA-4A48-8189-92FF199211D8} = {53C2EA4F-8EA8-41FE-A091-D85B0314B1F7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {43738754-874B-41F7-8B6C-087023E2CD94}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<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.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\BitzArt.Blazor.Cookies\BitzArt.Blazor.Cookies.csproj" />
</ItemGroup>

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

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
BitzArt.Blazor.Cookies.SampleApp
</div>

<article class="content px-4">
@Body
</article>
</main>
</div>

<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,96 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}

main {
flex: 1;
}

.sidebar {
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;
}

.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 {
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: 1;
}

.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;
}
}

#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;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">SampleBlazorApp</a>
</div>
</div>

<input type="checkbox" title="Navigation menu" class="navbar-toggler" />

<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>

<div class="nav-item px-3">
<NavLink class="nav-link" href="cookies">
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Cookies
</NavLink>
</div>

</nav>
</div>

Loading

0 comments on commit 04ad9d3

Please sign in to comment.