Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Test

# Run on PRs and pushes to any branch
on:
push:
branches: [ '**' ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Restore dependencies
run: dotnet restore

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

- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release

- name: Publish
run: dotnet publish InGeorgianLari.csproj -c Release -o artifacts --nologo

# Upload build artifacts for inspection
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ github.sha }}
path: artifacts/
retention-days: 7

# Add build status comment to PR
- name: Comment PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ Build succeeded! The Blazor WASM app compiled successfully.'
})
87 changes: 87 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Deploy Preview to GitHub Pages

# Allow manual trigger from any branch
on:
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment name'
required: false
default: 'preview'
type: string

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages-preview"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Restore dependencies
run: dotnet restore

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

- name: Publish
run: dotnet publish InGeorgianLari.csproj -c Release -o release --nologo

# Change base tag in index.html to match GitHub Pages subdirectory
- name: Change base tag
run: sed -i 's/<base href="\/" \/>/<base href="\/InGeorgianLari\/" \/>/g' release/wwwroot/index.html

# Copy index.html to 404.html to handle SPA routing
- name: Copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html

# Add .nojekyll file to tell GitHub Pages to not process files
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll

# Add branch info file for preview identification
- name: Add branch info
run: |
echo "Branch: ${{ github.ref_name }}" > release/wwwroot/branch-info.txt
echo "Commit: ${{ github.sha }}" >> release/wwwroot/branch-info.txt
echo "Deployed: $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> release/wwwroot/branch-info.txt

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: release/wwwroot

# Deployment job
deploy:
environment:
name: ${{ inputs.environment || 'preview' }}
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Print deployment info
run: |
echo "🚀 Preview deployed!"
echo "📍 URL: ${{ steps.deployment.outputs.page_url }}"
echo "🌿 Branch: ${{ github.ref_name }}"
echo "📝 Commit: ${{ github.sha }}"
77 changes: 77 additions & 0 deletions .github/workflows/deploy-to-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deploy to GitHub Pages

# Run workflow on every push to main branch
on:
push:
branches: [ main ]
# Allow manual trigger
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Restore dependencies
run: dotnet restore

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

- name: Publish
run: dotnet publish InGeorgianLari.csproj -c Release -o release --nologo

# Change base tag in index.html to match GitHub Pages subdirectory
- name: Change base tag
run: |
# Check if custom domain exists
if [ -f "wwwroot/CNAME" ]; then
echo "Custom domain detected, keeping base href as /"
else
echo "No custom domain, updating base href for GitHub Pages subdirectory"
sed -i 's/<base href="\/" \/>/<base href="\/InGeorgianLari\/" \/>/g' release/wwwroot/index.html
fi

# Copy index.html to 404.html to handle SPA routing
- name: Copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html

# Add .nojekyll file to tell GitHub Pages to not process files
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: release/wwwroot

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
119 changes: 115 additions & 4 deletions Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,16 +1,127 @@
@inherits LayoutComponentBase
@inject IJSRuntime JSRuntime

<div class="animated-bg"></div>
<div class="particles" id="global-particles"></div>

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

<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>

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

@code {
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JSRuntime.InvokeVoidAsync("createParticles", "global-particles");
}
}
}

<style>
.animated-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -2;
background: #0A0A0A;
overflow: hidden;
}

.animated-bg::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background:
radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
radial-gradient(circle at 40% 20%, rgba(34, 197, 94, 0.06) 0%, transparent 50%),
radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
animation: bgFloat 30s ease-in-out infinite;
}

.animated-bg::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
repeating-linear-gradient(
90deg,
transparent,
transparent 2px,
rgba(139, 92, 246, 0.03) 2px,
rgba(139, 92, 246, 0.03) 4px
),
repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(236, 72, 153, 0.03) 2px,
rgba(236, 72, 153, 0.03) 4px
);
}

.particles {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
pointer-events: none;
}

.page {
position: relative;
z-index: 1;
display: flex;
min-height: 100vh;
background: transparent;
}

.sidebar {
background: var(--card) !important;
border-right: 1px solid var(--border);
min-height: 100vh;
}

main {
flex: 1;
background: transparent;
}

.content {
background: transparent;
}

@@keyframes bgFloat {
0%, 100% {
transform: translate(0, 0) rotate(0deg) scale(1);
}
25% {
transform: translate(-30px, -30px) rotate(1deg) scale(1.1);
}
50% {
transform: translate(20px, -40px) rotate(-1deg) scale(1.05);
}
75% {
transform: translate(-20px, 20px) rotate(2deg) scale(1.15);
}
}
</style>
16 changes: 13 additions & 3 deletions Layout/NavMenu.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">InGeorgianLari</a>
<a class="navbar-brand" href="">₾ ლარის კურსი</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
Expand All @@ -11,7 +11,17 @@
<nav class="nav 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> კონვერტორი
<span class="bi bi-currency-exchange" aria-hidden="true"></span> კონვერტორი
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="historical">
<span class="bi bi-graph-up" aria-hidden="true"></span> ისტორიული კურსები
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="purchasing-power">
<span class="bi bi-cash-coin" aria-hidden="true"></span> მსყიდველუნარიანობა
</NavLink>
</div>
</nav>
Expand All @@ -26,4 +36,4 @@
{
collapseNavMenu = !collapseNavMenu;
}
}
}
Loading