Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| adb6e9e875 | |||
| 164d121992 | |||
| 6423713305 | |||
| a039bb53a4 | |||
| b2c8b35cdd | |||
| df5cc5412a | |||
| 4a70f343b7 | |||
| 73a4abc4e1 | |||
| 25095bbdc4 | |||
| 1ee91e519a | |||
| 876ec7345b | |||
| 4c04ecfa32 | |||
| 8d2c9948a7 | |||
| 9e7ca24691 | |||
| 0a36dc92a2 | |||
| a4d8d9a6af | |||
| 8d6abf8a7d | |||
| cfc5441fa6 | |||
| 2504fd24ac | |||
| 163af5426c | |||
| 6d70b92795 | |||
| bfad0e7b06 | |||
| 81c649f7d6 |
@@ -6,8 +6,99 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
trigger-deploy:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Trigger deployment webhook
|
||||
run: echo "✓ CI triggered - server will deploy via git hook"
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore TaxBaik.sln
|
||||
|
||||
- name: Build solution
|
||||
run: dotnet build TaxBaik.sln -c Release --no-restore
|
||||
|
||||
- name: Publish Web
|
||||
run: dotnet publish TaxBaik.Web/ -c Release -o ./publish/web
|
||||
|
||||
- name: Publish Admin
|
||||
run: dotnet publish TaxBaik.Admin/ -c Release -o ./publish/admin
|
||||
|
||||
- name: Copy migrations to publish
|
||||
run: |
|
||||
cp -r db/migrations ./publish/web/migrations || true
|
||||
cp -r db/migrations ./publish/admin/migrations || true
|
||||
|
||||
- name: Generate build info
|
||||
run: |
|
||||
mkdir -p ./publish/web/wwwroot ./publish/admin/wwwroot
|
||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||
BUILD_TIME=$(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
||||
echo "Version: $COMMIT_HASH" > ./publish/web/wwwroot/version.txt
|
||||
echo "Built: $BUILD_TIME" >> ./publish/web/wwwroot/version.txt
|
||||
echo "Version: $COMMIT_HASH" > ./publish/admin/wwwroot/version.txt
|
||||
echo "Built: $BUILD_TIME" >> ./publish/admin/wwwroot/version.txt
|
||||
echo "✓ Version files created:"
|
||||
cat ./publish/web/wwwroot/version.txt
|
||||
|
||||
- name: Deploy Web
|
||||
run: |
|
||||
set -e
|
||||
WEB_TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
DEPLOY_HOME="/home/kjh2064"
|
||||
WEB_DEPLOY_DIR="$DEPLOY_HOME/deployments/taxbaik_${WEB_TIMESTAMP}"
|
||||
|
||||
echo "=== Deploying Web (v$(git rev-parse --short HEAD)) ==="
|
||||
echo "Deploy dir: $WEB_DEPLOY_DIR"
|
||||
mkdir -p "$WEB_DEPLOY_DIR" || { echo "Failed to mkdir"; exit 1; }
|
||||
cp -r ./publish/web "$WEB_DEPLOY_DIR/" || { echo "Failed to copy"; exit 1; }
|
||||
ln -sfn "$WEB_DEPLOY_DIR/web" "$DEPLOY_HOME/taxbaik_active" || { echo "Failed to symlink"; exit 1; }
|
||||
echo "✓ Web deployed to $WEB_DEPLOY_DIR"
|
||||
|
||||
echo "=== Stopping TaxBaik.Web ==="
|
||||
pkill -9 -f "TaxBaik.Web" || echo "No process to kill"
|
||||
sleep 3
|
||||
|
||||
echo "=== Starting TaxBaik.Web ==="
|
||||
cd "$DEPLOY_HOME/taxbaik_active" || { echo "Failed to cd"; exit 1; }
|
||||
export ConnectionStrings__Default="Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123"
|
||||
export ASPNETCORE_ENVIRONMENT=Production
|
||||
export ASPNETCORE_URLS=http://127.0.0.1:5001
|
||||
nohup /usr/local/dotnet/dotnet TaxBaik.Web.dll > web.log 2>&1 &
|
||||
sleep 2
|
||||
echo "✓ Web process started"
|
||||
ps aux | grep TaxBaik.Web | grep -v grep || echo "Process not found"
|
||||
|
||||
- name: Deploy Admin
|
||||
run: |
|
||||
set -e
|
||||
ADMIN_TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
DEPLOY_HOME="/home/kjh2064"
|
||||
ADMIN_DEPLOY_DIR="$DEPLOY_HOME/deployments/taxbaik_admin_${ADMIN_TIMESTAMP}"
|
||||
|
||||
echo "=== Deploying Admin (v$(git rev-parse --short HEAD)) ==="
|
||||
echo "Deploy dir: $ADMIN_DEPLOY_DIR"
|
||||
mkdir -p "$ADMIN_DEPLOY_DIR" || { echo "Failed to mkdir"; exit 1; }
|
||||
cp -r ./publish/admin "$ADMIN_DEPLOY_DIR/" || { echo "Failed to copy"; exit 1; }
|
||||
ln -sfn "$ADMIN_DEPLOY_DIR/admin" "$DEPLOY_HOME/taxbaik_admin_active" || { echo "Failed to symlink"; exit 1; }
|
||||
echo "✓ Admin deployed to $ADMIN_DEPLOY_DIR"
|
||||
|
||||
echo "=== Stopping TaxBaik.Admin ==="
|
||||
pkill -9 -f "TaxBaik.Admin" || echo "No process to kill"
|
||||
sleep 3
|
||||
|
||||
echo "=== Starting TaxBaik.Admin ==="
|
||||
cd "$DEPLOY_HOME/taxbaik_admin_active" || { echo "Failed to cd"; exit 1; }
|
||||
export ConnectionStrings__Default="Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123"
|
||||
export ASPNETCORE_ENVIRONMENT=Production
|
||||
export ASPNETCORE_URLS=http://127.0.0.1:5002
|
||||
nohup /usr/local/dotnet/dotnet TaxBaik.Admin.dll > admin.log 2>&1 &
|
||||
sleep 2
|
||||
echo "✓ Admin process started"
|
||||
ps aux | grep TaxBaik.Admin | grep -v grep || echo "Process not found"
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
<title>백원숙 세무회계 - 관리자</title>
|
||||
<base href="/taxbaik/admin/" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap" rel="stylesheet" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="~/css/admin.css" />
|
||||
<component type="typeof(HeadOutlet)" render-mode="InteractiveServer" />
|
||||
</head>
|
||||
<body>
|
||||
<Routes />
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
@page "/login"
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using Microsoft.AspNetCore.Authentication
|
||||
@using Microsoft.AspNetCore.Authentication.Cookies
|
||||
@layout TaxBaik.Admin.Components.Layout.BlankLayout
|
||||
@attribute [AllowAnonymous]
|
||||
@inject AuthService AuthService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject CustomAuthenticationStateProvider AuthStateProvider
|
||||
|
||||
<PageTitle>로그인</PageTitle>
|
||||
|
||||
@@ -24,7 +25,17 @@
|
||||
}
|
||||
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
Size="Size.Large" OnClick="HandleLogin">로그인</MudButton>
|
||||
Size="Size.Large" OnClick="HandleLogin" Disabled="isLoading">
|
||||
@if (isLoading)
|
||||
{
|
||||
<MudProgressCircular Size="Size.Small" Indeterminate="true" Class="mr-2" />
|
||||
<span>로그인 중...</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>로그인</span>
|
||||
}
|
||||
</MudButton>
|
||||
</MudForm>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
@@ -32,30 +43,43 @@
|
||||
@code {
|
||||
private MudForm form;
|
||||
private bool isFormValid = false;
|
||||
private bool isLoading = false;
|
||||
private string errorMessage = "";
|
||||
|
||||
private LoginModel model = new();
|
||||
|
||||
private async Task HandleLogin()
|
||||
{
|
||||
// 기본 사용자명: admin / 비밀번호: admin123
|
||||
if (model.Username == "admin" && model.Password == "admin123")
|
||||
if (isLoading)
|
||||
return;
|
||||
|
||||
isLoading = true;
|
||||
errorMessage = "";
|
||||
|
||||
try
|
||||
{
|
||||
// 임시: 대시보드로 리다이렉트 (향후 실제 쿠키 인증으로 개선)
|
||||
NavigationManager.NavigateTo("/taxbaik/admin/dashboard", forceLoad: true);
|
||||
var token = await AuthService.AuthenticateAndGenerateTokenAsync(model.Username, model.Password);
|
||||
|
||||
if (token == null)
|
||||
{
|
||||
errorMessage = "사용자명 또는 비밀번호가 올바르지 않습니다.";
|
||||
isLoading = false;
|
||||
return;
|
||||
}
|
||||
|
||||
await AuthStateProvider.LoginAsync(token);
|
||||
NavigationManager.NavigateTo("/taxbaik/admin/dashboard", forceLoad: false);
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
errorMessage = "사용자명 또는 비밀번호가 올바르지 않습니다.";
|
||||
errorMessage = "로그인 중 오류가 발생했습니다.";
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavigationManager { get; set; }
|
||||
|
||||
private class LoginModel
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string Username { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
|
||||
<Router AppAssembly="typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>찾을 수 없음</PageTitle>
|
||||
<LayoutView Layout="typeof(MainLayout)">
|
||||
<p>요청한 페이지를 찾을 수 없습니다.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
<CascadingAuthenticationState>
|
||||
<Router AppAssembly="typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>찾을 수 없음</PageTitle>
|
||||
<LayoutView Layout="typeof(MainLayout)">
|
||||
<p>요청한 페이지를 찾을 수 없습니다.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
</CascadingAuthenticationState>
|
||||
|
||||
@@ -7,3 +7,5 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using MudBlazor
|
||||
@using TaxBaik.Admin.Services
|
||||
@attribute [Authorize]
|
||||
|
||||
+27
-15
@@ -1,22 +1,28 @@
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Unicode;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using MudBlazor.Services;
|
||||
using TaxBaik.Admin.Services;
|
||||
using TaxBaik.Application;
|
||||
using TaxBaik.Infrastructure;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
|
||||
.AddCookie(opts => {
|
||||
opts.LoginPath = "/login";
|
||||
opts.ExpireTimeSpan = TimeSpan.FromHours(8);
|
||||
opts.Cookie.SameSite = SameSiteMode.Lax;
|
||||
});
|
||||
builder.Services.AddScoped<AuthService>();
|
||||
builder.Services.AddScoped<CustomAuthenticationStateProvider>();
|
||||
builder.Services.AddScoped<AuthenticationStateProvider>(sp => sp.GetRequiredService<CustomAuthenticationStateProvider>());
|
||||
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
|
||||
builder.Services.AddCascadingAuthenticationState();
|
||||
builder.Services.AddAuthorizationCore();
|
||||
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
builder.Services.AddMudServices();
|
||||
builder.Services.AddMemoryCache();
|
||||
|
||||
// 한글 포함 다국어 문자를 유니코드 엔티티로 변환하지 않도록 설정
|
||||
builder.Services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
|
||||
|
||||
builder.Services.AddInfrastructure();
|
||||
builder.Services.AddApplication();
|
||||
|
||||
@@ -38,14 +44,21 @@ builder.Services.AddSingleton(versionInfo);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Run migrations on startup
|
||||
using (var scope = app.Services.CreateScope())
|
||||
// Run migrations on startup (non-blocking for development)
|
||||
try
|
||||
{
|
||||
var connectionFactory = scope.ServiceProvider.GetRequiredService<TaxBaik.Domain.Interfaces.IDbConnectionFactory>();
|
||||
var cs = builder.Configuration.GetConnectionString("Default")
|
||||
?? throw new InvalidOperationException("Missing connection string");
|
||||
var migrationRunner = new TaxBaik.Infrastructure.Data.MigrationRunner(cs, connectionFactory);
|
||||
await migrationRunner.RunAsync();
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var connectionFactory = scope.ServiceProvider.GetRequiredService<TaxBaik.Domain.Interfaces.IDbConnectionFactory>();
|
||||
var cs = builder.Configuration.GetConnectionString("Default")
|
||||
?? throw new InvalidOperationException("Missing connection string");
|
||||
var migrationRunner = new TaxBaik.Infrastructure.Data.MigrationRunner(cs, connectionFactory);
|
||||
await migrationRunner.RunAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"⚠️ Migration warning (non-blocking): {ex.Message}");
|
||||
}
|
||||
|
||||
if (!app.Environment.IsDevelopment())
|
||||
@@ -58,7 +71,6 @@ app.UsePathBase("/taxbaik/admin");
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseAntiforgery();
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using BCrypt.Net;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using TaxBaik.Domain.Entities;
|
||||
using TaxBaik.Domain.Interfaces;
|
||||
|
||||
namespace TaxBaik.Admin.Services;
|
||||
|
||||
public class AuthService
|
||||
{
|
||||
private readonly IAdminUserRepository _adminUserRepository;
|
||||
private readonly ILogger<AuthService> _logger;
|
||||
private readonly string _jwtSecretKey;
|
||||
private readonly int _tokenExpirationMinutes = 480; // 8시간
|
||||
|
||||
public AuthService(IAdminUserRepository adminUserRepository, ILogger<AuthService> logger, IConfiguration configuration)
|
||||
{
|
||||
_adminUserRepository = adminUserRepository;
|
||||
_logger = logger;
|
||||
_jwtSecretKey = configuration["Jwt:SecretKey"] ?? throw new InvalidOperationException("Missing 'Jwt:SecretKey' configuration.");
|
||||
}
|
||||
|
||||
public async Task<string?> AuthenticateAndGenerateTokenAsync(string username, string password)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(password))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var user = await _adminUserRepository.GetByUsernameAsync(username);
|
||||
if (user == null)
|
||||
{
|
||||
_logger.LogWarning("로그인 시도: 존재하지 않는 사용자 '{Username}'", username);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!BCrypt.Net.BCrypt.Verify(password, user.PasswordHash))
|
||||
{
|
||||
_logger.LogWarning("로그인 시도: 잘못된 비밀번호 '{Username}'", username);
|
||||
return null;
|
||||
}
|
||||
|
||||
_logger.LogInformation("로그인 성공: {Username}", username);
|
||||
return GenerateJwtToken(user);
|
||||
}
|
||||
|
||||
private string GenerateJwtToken(AdminUser user)
|
||||
{
|
||||
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_jwtSecretKey));
|
||||
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
|
||||
|
||||
var claims = new[]
|
||||
{
|
||||
new Claim(ClaimTypes.NameIdentifier, user.Id.ToString()),
|
||||
new Claim(ClaimTypes.Name, user.Username),
|
||||
new Claim("username", user.Username)
|
||||
};
|
||||
|
||||
var token = new JwtSecurityToken(
|
||||
issuer: "taxbaik-admin",
|
||||
audience: "taxbaik-admin-client",
|
||||
claims: claims,
|
||||
expires: DateTime.UtcNow.AddMinutes(_tokenExpirationMinutes),
|
||||
signingCredentials: creds);
|
||||
|
||||
return new JwtSecurityTokenHandler().WriteToken(token);
|
||||
}
|
||||
|
||||
public ClaimsPrincipal? ValidateToken(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_jwtSecretKey));
|
||||
var handler = new JwtSecurityTokenHandler();
|
||||
var principal = handler.ValidateToken(token, new TokenValidationParameters
|
||||
{
|
||||
ValidateIssuerSigningKey = true,
|
||||
IssuerSigningKey = key,
|
||||
ValidateIssuer = true,
|
||||
ValidIssuer = "taxbaik-admin",
|
||||
ValidateAudience = true,
|
||||
ValidAudience = "taxbaik-admin-client",
|
||||
ValidateLifetime = true,
|
||||
ClockSkew = TimeSpan.Zero
|
||||
}, out SecurityToken validatedToken);
|
||||
|
||||
return principal;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
|
||||
namespace TaxBaik.Admin.Services;
|
||||
|
||||
public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
private readonly ILocalStorageService _localStorage;
|
||||
private readonly AuthService _authService;
|
||||
private readonly ILogger<CustomAuthenticationStateProvider> _logger;
|
||||
|
||||
public CustomAuthenticationStateProvider(ILocalStorageService localStorage, AuthService authService, ILogger<CustomAuthenticationStateProvider> logger)
|
||||
{
|
||||
_localStorage = localStorage;
|
||||
_authService = authService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var token = await _localStorage.GetItemAsStringAsync("auth_token");
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
|
||||
}
|
||||
|
||||
if (IsTokenExpired(token))
|
||||
{
|
||||
_logger.LogWarning("토큰 만료됨");
|
||||
await _localStorage.RemoveItemAsync("auth_token");
|
||||
return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
|
||||
}
|
||||
|
||||
var principal = _authService.ValidateToken(token);
|
||||
if (principal == null)
|
||||
{
|
||||
await _localStorage.RemoveItemAsync("auth_token");
|
||||
return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
|
||||
}
|
||||
|
||||
return new AuthenticationState(principal);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "인증 상태 조회 중 오류 발생");
|
||||
return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
|
||||
}
|
||||
}
|
||||
|
||||
public async Task LoginAsync(string token)
|
||||
{
|
||||
await _localStorage.SetItemAsStringAsync("auth_token", token);
|
||||
NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
|
||||
}
|
||||
|
||||
public async Task LogoutAsync()
|
||||
{
|
||||
await _localStorage.RemoveItemAsync("auth_token");
|
||||
NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
|
||||
}
|
||||
|
||||
private bool IsTokenExpired(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
var handler = new JwtSecurityTokenHandler();
|
||||
var jwtToken = handler.ReadJwtToken(token);
|
||||
return jwtToken.ValidTo < DateTime.UtcNow;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TaxBaik.Admin.Services;
|
||||
|
||||
public interface ILocalStorageService
|
||||
{
|
||||
Task<string?> GetItemAsStringAsync(string key);
|
||||
Task SetItemAsStringAsync(string key, string value);
|
||||
Task RemoveItemAsync(string key);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace TaxBaik.Admin.Services;
|
||||
|
||||
public class LocalStorageService : ILocalStorageService
|
||||
{
|
||||
private readonly IJSRuntime _jsRuntime;
|
||||
|
||||
public LocalStorageService(IJSRuntime jsRuntime)
|
||||
{
|
||||
_jsRuntime = jsRuntime;
|
||||
}
|
||||
|
||||
public async Task<string?> GetItemAsStringAsync(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _jsRuntime.InvokeAsync<string>("localStorage.getItem", key);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SetItemAsStringAsync(string key, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _jsRuntime.InvokeVoidAsync("localStorage.setItem", key, value);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public async Task RemoveItemAsync(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _jsRuntime.InvokeVoidAsync("localStorage.removeItem", key);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,26 @@
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using TaxBaik.Admin.Services
|
||||
@inject AuthenticationStateProvider AuthStateProvider
|
||||
@inject CustomAuthenticationStateProvider CustomAuthStateProvider
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">TaxBaik.Admin</a>
|
||||
<div class="d-flex align-items-center gap-3 ms-auto">
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<div class="user-info text-light">
|
||||
<span>@context.User.FindFirst(ClaimTypes.Name)?.Value</span>
|
||||
<button class="btn btn-sm btn-outline-light ms-2" @onclick="HandleLogout">로그아웃</button>
|
||||
</div>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<a href="login" class="btn btn-sm btn-outline-light">로그인</a>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -10,18 +30,18 @@
|
||||
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="oi oi-home" aria-hidden="true"></span> Home
|
||||
<NavLink class="nav-link" href="dashboard" Match="NavLinkMatch.All">
|
||||
<span class="oi oi-home" aria-hidden="true"></span> 대시보드
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="oi oi-plus" aria-hidden="true"></span> Counter
|
||||
<NavLink class="nav-link" href="blog">
|
||||
<span class="oi oi-document" aria-hidden="true"></span> 블로그
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="fetchdata">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
|
||||
<NavLink class="nav-link" href="inquiries">
|
||||
<span class="oi oi-envelope-closed" aria-hidden="true"></span> 문의사항
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -36,4 +56,10 @@
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
private async Task HandleLogout()
|
||||
{
|
||||
await CustomAuthStateProvider.LogoutAsync();
|
||||
NavigationManager.NavigateTo("/login", forceLoad: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MudBlazor" Version="6.9.4" />
|
||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
@using Microsoft.JSInterop
|
||||
@using TaxBaik.Admin
|
||||
@using TaxBaik.Admin.Shared
|
||||
@using TaxBaik.Admin.Services
|
||||
|
||||
@@ -5,5 +5,11 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Default": "Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=password123"
|
||||
},
|
||||
"Jwt": {
|
||||
"SecretKey": "dev-secret-key-change-in-production-min-32-chars!"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
/* TaxBaik Admin — 워밍-프로페셔널 디자인 */
|
||||
|
||||
:root {
|
||||
--color-primary: #C89D6E; /* 따뜻한 골드/브론즈 */
|
||||
--color-primary-dark: #A67C52; /* 진한 브론즈 */
|
||||
--color-secondary: #2E5C4E; /* 따뜻한 초록 */
|
||||
--color-secondary-dark: #1F3A30; /* 어두운 초록 */
|
||||
--color-accent: #E8E4D8; /* 따뜻한 베이지 */
|
||||
--color-bg: #F9F7F3; /* 따뜻한 화이트 */
|
||||
--color-text: #3D2817; /* 따뜻한 갈색 */
|
||||
--color-text-light: #6B5D4F; /* 밝은 갈색 */
|
||||
--color-border: #D9D3C4; /* 경계선 */
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-bg);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
||||
color: var(--color-text);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--color-text-light);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-primary);
|
||||
text-decoration: none;
|
||||
transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
/* ===== MudBlazor 커스터마이징 ===== */
|
||||
|
||||
.mud-appbar {
|
||||
background: linear-gradient(90deg, var(--color-secondary) 0%, #1F3A30 100%) !important;
|
||||
box-shadow: 0 2px 8px rgba(61, 40, 23, 0.12) !important;
|
||||
}
|
||||
|
||||
.mud-appbar-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.mud-appbar .mud-button-root {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.mud-button-contained-primary {
|
||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
|
||||
box-shadow: 0 2px 8px rgba(61, 40, 23, 0.12) !important;
|
||||
}
|
||||
|
||||
.mud-button-contained-primary:hover {
|
||||
background: linear-gradient(135deg, var(--color-primary-dark) 0%, #8B5E3C 100%) !important;
|
||||
box-shadow: 0 4px 12px rgba(61, 40, 23, 0.2) !important;
|
||||
}
|
||||
|
||||
.mud-button-outlined-primary {
|
||||
color: var(--color-primary) !important;
|
||||
border-color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.mud-button-outlined-primary:hover {
|
||||
background-color: rgba(200, 157, 110, 0.1) !important;
|
||||
}
|
||||
|
||||
.mud-button-text-primary {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.mud-button-text-primary:hover {
|
||||
background-color: rgba(200, 157, 110, 0.1) !important;
|
||||
}
|
||||
|
||||
.mud-card {
|
||||
background-color: white !important;
|
||||
box-shadow: 0 2px 8px rgba(61, 40, 23, 0.08) !important;
|
||||
border: 1px solid var(--color-border) !important;
|
||||
border-radius: 12px !important;
|
||||
}
|
||||
|
||||
.mud-card:hover {
|
||||
box-shadow: 0 6px 16px rgba(61, 40, 23, 0.12) !important;
|
||||
}
|
||||
|
||||
.mud-card-header {
|
||||
background-color: var(--color-accent) !important;
|
||||
border-bottom: 1px solid var(--color-border) !important;
|
||||
padding: 1.5rem !important;
|
||||
}
|
||||
|
||||
.mud-card-content {
|
||||
padding: 1.5rem !important;
|
||||
}
|
||||
|
||||
/* ===== 테이블 스타일 ===== */
|
||||
|
||||
.mud-table {
|
||||
font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
||||
}
|
||||
|
||||
.mud-table-cell {
|
||||
border-color: var(--color-border) !important;
|
||||
}
|
||||
|
||||
.mud-table-head {
|
||||
background-color: var(--color-accent) !important;
|
||||
}
|
||||
|
||||
.mud-table-head .mud-table-cell {
|
||||
color: var(--color-text) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mud-table-body .mud-table-row:hover {
|
||||
background-color: rgba(200, 157, 110, 0.05) !important;
|
||||
}
|
||||
|
||||
/* ===== 폼 요소 ===== */
|
||||
|
||||
.mud-input-slot {
|
||||
font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
||||
}
|
||||
|
||||
.mud-input-outlined {
|
||||
border-color: var(--color-border) !important;
|
||||
}
|
||||
|
||||
.mud-input-outlined:hover {
|
||||
border-color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.mud-input-outlined .mud-input-slot {
|
||||
color: var(--color-text) !important;
|
||||
}
|
||||
|
||||
.mud-input-outlined .mud-input-slot input,
|
||||
.mud-input-outlined .mud-input-slot textarea {
|
||||
color: var(--color-text) !important;
|
||||
}
|
||||
|
||||
.mud-input-outlined .mud-input-slot input::placeholder {
|
||||
color: var(--color-text-light) !important;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.mud-input-outlined.mud-focused {
|
||||
border-color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 토글 & 체크박스 ===== */
|
||||
|
||||
.mud-switch-base {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.mud-checkbox-base {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 드롭다운 & 셀렉트 ===== */
|
||||
|
||||
.mud-select-input {
|
||||
border-color: var(--color-border) !important;
|
||||
color: var(--color-text) !important;
|
||||
}
|
||||
|
||||
.mud-select-popper-content {
|
||||
background-color: white !important;
|
||||
box-shadow: 0 4px 12px rgba(61, 40, 23, 0.15) !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
|
||||
.mud-list-item:hover {
|
||||
background-color: rgba(200, 157, 110, 0.1) !important;
|
||||
}
|
||||
|
||||
/* ===== 다이얼로그 ===== */
|
||||
|
||||
.mud-dialog {
|
||||
border-radius: 12px !important;
|
||||
}
|
||||
|
||||
.mud-dialog-container {
|
||||
box-shadow: 0 10px 40px rgba(61, 40, 23, 0.2) !important;
|
||||
}
|
||||
|
||||
.mud-dialog-title {
|
||||
color: var(--color-text) !important;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* ===== 배지 & 칩 ===== */
|
||||
|
||||
.mud-chip-set {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.mud-chip {
|
||||
background-color: rgba(200, 157, 110, 0.1) !important;
|
||||
color: var(--color-primary) !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.mud-chip-click:hover {
|
||||
background-color: rgba(200, 157, 110, 0.2) !important;
|
||||
}
|
||||
|
||||
/* ===== 페이지네이션 & 프로그레스 ===== */
|
||||
|
||||
.mud-pagination-item.selected {
|
||||
background-color: var(--color-primary) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.mud-pagination-item:hover:not(.selected) {
|
||||
background-color: var(--color-accent) !important;
|
||||
}
|
||||
|
||||
.mud-progress-linear {
|
||||
background-color: var(--color-accent) !important;
|
||||
}
|
||||
|
||||
.mud-progress-linear::before {
|
||||
background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%) !important;
|
||||
}
|
||||
|
||||
/* ===== 텍스트 필드 라벨 ===== */
|
||||
|
||||
.mud-field-label {
|
||||
color: var(--color-text) !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ===== 반응형 ===== */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mud-appbar-content {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.mud-card-content {
|
||||
padding: 1rem !important;
|
||||
}
|
||||
|
||||
.mud-table {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ public static class DependencyInjection
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IDbConnectionFactory, DbConnectionFactory>();
|
||||
services.AddScoped<IAdminUserRepository, AdminUserRepository>();
|
||||
services.AddScoped<ICategoryRepository, CategoryRepository>();
|
||||
services.AddScoped<IBlogPostRepository, BlogPostRepository>();
|
||||
services.AddScoped<IInquiryRepository, InquiryRepository>();
|
||||
|
||||
@@ -25,11 +25,23 @@ public class BlogIndexModel : PageModel
|
||||
|
||||
public async Task OnGetAsync(int page = 1, int? categoryId = null)
|
||||
{
|
||||
CurrentPage = page;
|
||||
SelectedCategoryId = categoryId;
|
||||
Categories = (await _categoryRepository.GetAllAsync()).ToList();
|
||||
var (posts, total) = await _blogService.GetPublishedPagedAsync(page, PageSize, categoryId);
|
||||
Posts = posts.ToList();
|
||||
TotalPages = (total + PageSize - 1) / PageSize;
|
||||
try
|
||||
{
|
||||
CurrentPage = page;
|
||||
SelectedCategoryId = categoryId;
|
||||
Categories = (await _categoryRepository.GetAllAsync()).ToList();
|
||||
var (posts, total) = await _blogService.GetPublishedPagedAsync(page, PageSize, categoryId);
|
||||
Posts = posts.ToList();
|
||||
TotalPages = (total + PageSize - 1) / PageSize;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// DB 연결 실패 시 빈 리스트로 처리
|
||||
CurrentPage = page;
|
||||
SelectedCategoryId = categoryId;
|
||||
Categories = new List<Category>();
|
||||
Posts = new List<BlogPost>();
|
||||
TotalPages = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,5 +50,12 @@ public class ContactModel : PageModel
|
||||
ModelState.AddModelError("", ex.Message);
|
||||
return Page();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// DB 연결 실패 등의 경우에도 사용자에게 성공 메시지 표시
|
||||
// 실제 환경에서는 별도의 로깅 및 이메일 알림 필요
|
||||
ModelState.AddModelError("", "시스템 오류가 발생했습니다. 잠시 후 다시 시도해주세요.");
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+191
-72
@@ -5,70 +5,130 @@
|
||||
ViewData["Description"] = "사업자 기장, 부동산 양도세·증여세, 종합소득세 전문 상담. 온라인 맞춤 상담 제공.";
|
||||
}
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero-section bg-primary text-white py-5">
|
||||
<div class="container text-center">
|
||||
<h1 class="display-4 fw-bold mb-3">세금 걱정, 한 번에 해결합니다</h1>
|
||||
<p class="lead mb-4">사업자 세무, 부동산 세금, 가족자산 맞춤 상담</p>
|
||||
<div class="gap-3 d-flex justify-content-center flex-wrap">
|
||||
<a href="/taxbaik/contact" class="btn btn-warning btn-lg">무료 상담 신청</a>
|
||||
<a href="javascript:void(0);" class="btn btn-light btn-lg" onclick="openKakao()">카카오 채널 문의</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Trust Strip -->
|
||||
<section class="bg-light py-4">
|
||||
<!-- Hero Section — 강임팩트 -->
|
||||
<section class="hero-section text-white pt-5 pb-4">
|
||||
<div class="container">
|
||||
<div class="row text-center">
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="fs-2">🎓</div>
|
||||
<p class="fw-bold">세무사</p>
|
||||
<small class="text-muted">2015년 자격취득</small>
|
||||
<div class="row align-items-center py-4">
|
||||
<div class="col-lg-7">
|
||||
<span class="badge bg-primary-badge mb-3">경험 있는 세무사의 맞춤 전략</span>
|
||||
<h1 class="mb-3">
|
||||
세금과 자산<br/>
|
||||
<span style="color: #E8E4D8;">한 번에 해결하는</span>
|
||||
</h1>
|
||||
<p class="fs-5 mb-4" style="line-height: 1.8; opacity: 0.95;">
|
||||
사업자 세무, 부동산 거래, 가족자산 관리를 위한<br/>
|
||||
통합 솔루션을 제공합니다.
|
||||
</p>
|
||||
<div class="d-flex gap-3 flex-wrap">
|
||||
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">무료 상담 신청</a>
|
||||
<a href="javascript:void(0);" class="btn btn-outline-primary btn-lg" onclick="openKakao()" style="border-color: white; color: white;">
|
||||
💬 카카오 채널 문의
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="fs-2">🏠</div>
|
||||
<p class="fw-bold">부동산중개사</p>
|
||||
<small class="text-muted">부동산 거래 전문</small>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="fs-2">📊</div>
|
||||
<p class="fw-bold">보험설계사</p>
|
||||
<small class="text-muted">자산관리 전문</small>
|
||||
<div class="col-lg-5 d-none d-lg-block text-center">
|
||||
<div style="font-size: 120px; opacity: 0.15;">📋</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Services Section -->
|
||||
<!-- 신뢰도 스트립 — 자격과 경험 -->
|
||||
<section class="trust-strip">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="trust-item">
|
||||
<div class="trust-icon">🎓</div>
|
||||
<h3>세무사</h3>
|
||||
<p>국가공인 세무사 자격<br/>2015년 취득 · 10년 경력</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="trust-item">
|
||||
<div class="trust-icon">🏢</div>
|
||||
<h3>부동산중개사</h3>
|
||||
<p>부동산 거래 전문 자격<br/>양도세·취득세 컨설팅</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="trust-item">
|
||||
<div class="trust-icon">📊</div>
|
||||
<h3>보험설계사</h3>
|
||||
<p>자산관리 전문 자격<br/>가족 자산 플래닝</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 서비스 영역 — 전문성 강조 -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<h2 class="text-center fw-bold mb-5">주요 서비스</h2>
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="section-title">전문 서비스</h2>
|
||||
<p class="fs-6 text-muted" style="max-width: 600px; margin: 0 auto;">
|
||||
각 분야의 복잡한 세무 이슈를 경험과 노하우로 해결합니다
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card h-100 border-0 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">사업자 세무</h5>
|
||||
<p class="card-text">기장, 세금계산서, 경비처리</p>
|
||||
<a href="/taxbaik/services" class="btn btn-sm btn-outline-primary">자세히보기</a>
|
||||
<!-- 사업자 세무 -->
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="card service-card h-100">
|
||||
<div class="service-icon">🏪</div>
|
||||
<div class="card-body pt-0">
|
||||
<h3 class="card-title">사업자 세무</h3>
|
||||
<ul class="list-unstyled small mb-3">
|
||||
<li class="mb-2">✓ 정확한 기장 및 결산</li>
|
||||
<li class="mb-2">✓ 세금계산서 관리</li>
|
||||
<li class="mb-2">✓ 경비처리 최적화</li>
|
||||
<li class="mb-2">✓ 절세 전략 수립</li>
|
||||
</ul>
|
||||
<p class="text-muted small">
|
||||
초기부터 세무 전략을 수립하면 연간 최대 수백만 원의 절세가 가능합니다.
|
||||
</p>
|
||||
<a href="/taxbaik/services#business-tax" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card h-100 border-0 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">부동산 세금</h5>
|
||||
<p class="card-text">양도세, 취득세, 임대소득</p>
|
||||
<a href="/taxbaik/services" class="btn btn-sm btn-outline-primary">자세히보기</a>
|
||||
|
||||
<!-- 부동산 세금 -->
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="card service-card h-100">
|
||||
<div class="service-icon">🏠</div>
|
||||
<div class="card-body pt-0">
|
||||
<h3 class="card-title">부동산 세금</h3>
|
||||
<ul class="list-unstyled small mb-3">
|
||||
<li class="mb-2">✓ 양도세 최소화</li>
|
||||
<li class="mb-2">✓ 취득세 절감</li>
|
||||
<li class="mb-2">✓ 임대소득 관리</li>
|
||||
<li class="mb-2">✓ 다주택자 세무</li>
|
||||
</ul>
|
||||
<p class="text-muted small">
|
||||
부동산 거래 시 미리 상담하면 세금 부담을 크게 줄일 수 있습니다.
|
||||
</p>
|
||||
<a href="/taxbaik/services#real-estate-tax" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card h-100 border-0 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">가족자산</h5>
|
||||
<p class="card-text">증여세, 상속세, 자산관리</p>
|
||||
<a href="/taxbaik/services" class="btn btn-sm btn-outline-primary">자세히보기</a>
|
||||
|
||||
<!-- 가족자산 & 증여 -->
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="card service-card h-100">
|
||||
<div class="service-icon">👨👩👧👦</div>
|
||||
<div class="card-body pt-0">
|
||||
<h3 class="card-title">가족자산 관리</h3>
|
||||
<ul class="list-unstyled small mb-3">
|
||||
<li class="mb-2">✓ 증여세 전략</li>
|
||||
<li class="mb-2">✓ 상속세 대비</li>
|
||||
<li class="mb-2">✓ 자산 이전 계획</li>
|
||||
<li class="mb-2">✓ 가족법인 설립</li>
|
||||
</ul>
|
||||
<p class="text-muted small">
|
||||
세대 이전 전에 사전 계획하면 세금 부담을 현저히 줄일 수 있습니다.
|
||||
</p>
|
||||
<a href="/taxbaik/services#family-asset" class="btn btn-sm btn-outline-primary mt-3">자세히 보기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,36 +136,95 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Blog Preview -->
|
||||
<section class="bg-light py-5">
|
||||
<!-- 상담 프로세스 -->
|
||||
<section class="py-5" style="background: #F9F7F3;">
|
||||
<div class="container">
|
||||
<h2 class="text-center fw-bold mb-5">최근 블로그</h2>
|
||||
<div class="row g-4">
|
||||
@foreach (var post in Model.RecentPosts)
|
||||
{
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card h-100 border-0 shadow-sm">
|
||||
<div class="card-body">
|
||||
<small class="badge bg-primary">@post.CategoryName</small>
|
||||
<h5 class="card-title mt-2">@post.Title</h5>
|
||||
<p class="card-text small text-muted">@post.CreatedAt.ToString("yyyy-MM-dd")</p>
|
||||
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-primary">읽기</a>
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="section-title">상담 과정</h2>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-3 text-center mb-4 mb-md-0">
|
||||
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
|
||||
📞
|
||||
</div>
|
||||
<h4>1단계: 무료 상담</h4>
|
||||
<p class="text-muted small">상황 파악 및<br/>현재 문제점 확인</p>
|
||||
</div>
|
||||
<div class="col-md-3 text-center mb-4 mb-md-0">
|
||||
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
|
||||
📋
|
||||
</div>
|
||||
<h4>2단계: 세무진단</h4>
|
||||
<p class="text-muted small">자료 분석 및<br/>최적 방안 도출</p>
|
||||
</div>
|
||||
<div class="col-md-3 text-center mb-4 mb-md-0">
|
||||
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
|
||||
💡
|
||||
</div>
|
||||
<h4>3단계: 맞춤제안</h4>
|
||||
<p class="text-muted small">절세 전략 및<br/>실행 계획 제시</p>
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<div style="width: 80px; height: 80px; margin: 0 auto 1rem; background: linear-gradient(135deg, #C89D6E 0%, #A67C52 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px;">
|
||||
✅
|
||||
</div>
|
||||
<h4>4단계: 실행지원</h4>
|
||||
<p class="text-muted small">지속적 관리 및<br/>추가 상담 제공</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-5">
|
||||
<p class="text-muted mb-3">상담은 온라인 또는 오프라인으로 진행되며, 완전히 비밀이 보장됩니다.</p>
|
||||
<a href="/taxbaik/contact" class="btn btn-primary btn-lg">상담 신청하기</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 최근 블로그 -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="section-title">세무 정보</h2>
|
||||
<p class="text-muted">최신 세법 변화와 실무 팁을 공유합니다</p>
|
||||
</div>
|
||||
|
||||
@if (Model.RecentPosts?.Count > 0)
|
||||
{
|
||||
<div class="row g-4">
|
||||
@foreach (var post in Model.RecentPosts.Take(3))
|
||||
{
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="card blog-card h-100">
|
||||
<div class="blog-placeholder">📝</div>
|
||||
<div class="card-body">
|
||||
<small class="badge bg-primary-badge">@post.CategoryName</small>
|
||||
<h4 class="card-title mt-3">@post.Title</h4>
|
||||
<p class="text-muted small">@post.CreatedAt.ToString("yyyy년 MM월 dd일")</p>
|
||||
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-primary">읽기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="text-center mt-4">
|
||||
<a href="/taxbaik/blog" class="btn btn-outline-primary">모든 글 보기</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="text-center mt-5">
|
||||
<a href="/taxbaik/blog" class="btn btn-outline-primary btn-lg">전체 블로그 보기</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- CTA Section -->
|
||||
<section class="bg-primary text-white py-5">
|
||||
<!-- 최종 CTA — 강렬한 다크 배경 -->
|
||||
<section class="py-5" style="background: linear-gradient(135deg, #2E5C4E 0%, #1F3A30 100%); color: white;">
|
||||
<div class="container text-center">
|
||||
<h2 class="fw-bold mb-3">지금 바로 상담 받으세요</h2>
|
||||
<p class="lead mb-4">무료로 상황을 진단받고 맞춤 솔루션을 제안받을 수 있습니다</p>
|
||||
<a href="/taxbaik/contact" class="btn btn-warning btn-lg">상담 신청하기</a>
|
||||
<h2 class="mb-3 fw-bold" style="font-size: 2.5rem;">세금 고민은 이제 끝!</h2>
|
||||
<p class="fs-5 mb-5" style="opacity: 0.95; max-width: 500px; margin-left: auto; margin-right: auto;">
|
||||
무료 상담으로 현재 상황을 진단하고<br/>
|
||||
맞춤형 절세 전략을 받아보세요.
|
||||
</p>
|
||||
<div class="d-flex gap-3 justify-content-center flex-wrap">
|
||||
<a href="/taxbaik/contact" class="btn btn-warning btn-lg">상담 신청하기</a>
|
||||
<a href="javascript:void(0);" onclick="openKakao()" class="btn btn-light btn-lg">카카오로 문의</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -17,7 +17,15 @@ public class IndexModel : PageModel
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
var (posts, _) = await _blogService.GetPublishedPagedAsync(1, 3);
|
||||
RecentPosts = posts.ToList();
|
||||
try
|
||||
{
|
||||
var (posts, _) = await _blogService.GetPublishedPagedAsync(1, 3);
|
||||
RecentPosts = posts.ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// DB 연결 실패 시 빈 리스트로 처리
|
||||
RecentPosts = new List<BlogPost>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta property="og:image" content="@ViewData["OgImage"]" />
|
||||
<meta property="og:url" content="@ViewData["OgUrl"]" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="theme-color" content="#1B4F8A" />
|
||||
<meta name="theme-color" content="#C89D6E" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net" />
|
||||
@@ -54,6 +54,12 @@
|
||||
<p>© 2026 백원숙 세무회계. All rights reserved.</p>
|
||||
<a href="/taxbaik/privacy" class="text-decoration-none text-muted me-2">개인정보처리방침</a>
|
||||
<a href="/taxbaik/terms" class="text-decoration-none text-muted">이용약관</a>
|
||||
@if (Context.RequestServices.GetService(typeof(VersionInfo)) is VersionInfo version)
|
||||
{
|
||||
<div class="mt-2 text-muted" style="font-size: 0.75rem; opacity: 0.6;">
|
||||
v@version.Version · @version.Built
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
+20
-7
@@ -1,4 +1,6 @@
|
||||
using System.IO.Compression;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Unicode;
|
||||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
using TaxBaik.Application;
|
||||
using TaxBaik.Infrastructure;
|
||||
@@ -10,6 +12,10 @@ builder.Services.AddMemoryCache();
|
||||
builder.Services.AddResponseCompression(opts => {
|
||||
opts.Providers.Add<GzipCompressionProvider>();
|
||||
});
|
||||
|
||||
// 한글 포함 다국어 문자를 유니코드 엔티티로 변환하지 않도록 설정
|
||||
builder.Services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
|
||||
|
||||
builder.Services.AddInfrastructure();
|
||||
builder.Services.AddApplication();
|
||||
|
||||
@@ -31,14 +37,21 @@ builder.Services.AddSingleton(versionInfo);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Run migrations on startup
|
||||
using (var scope = app.Services.CreateScope())
|
||||
// Run migrations on startup (non-blocking for development)
|
||||
try
|
||||
{
|
||||
var connectionFactory = scope.ServiceProvider.GetRequiredService<TaxBaik.Domain.Interfaces.IDbConnectionFactory>();
|
||||
var cs = builder.Configuration.GetConnectionString("Default")
|
||||
?? throw new InvalidOperationException("Missing connection string");
|
||||
var migrationRunner = new TaxBaik.Infrastructure.Data.MigrationRunner(cs, connectionFactory);
|
||||
await migrationRunner.RunAsync();
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var connectionFactory = scope.ServiceProvider.GetRequiredService<TaxBaik.Domain.Interfaces.IDbConnectionFactory>();
|
||||
var cs = builder.Configuration.GetConnectionString("Default")
|
||||
?? throw new InvalidOperationException("Missing connection string");
|
||||
var migrationRunner = new TaxBaik.Infrastructure.Data.MigrationRunner(cs, connectionFactory);
|
||||
await migrationRunner.RunAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"⚠️ Migration warning (non-blocking): {ex.Message}");
|
||||
}
|
||||
|
||||
app.UsePathBase("/taxbaik");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5012",
|
||||
"applicationUrl": "http://localhost:5001",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7012;http://localhost:5012",
|
||||
"applicationUrl": "https://localhost:7001;http://localhost:5001",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
+375
-306
@@ -1,14 +1,18 @@
|
||||
/* TaxBaik — 워밍-프로페셔널 디자인 시스템 */
|
||||
|
||||
:root {
|
||||
--color-primary: #1B4F8A;
|
||||
--color-primary-dark: #133970;
|
||||
--color-primary-light: #2E5FA3;
|
||||
--color-accent: #C9A227;
|
||||
--color-cta: #E05A2B;
|
||||
--color-cta-dark: #D45A1F;
|
||||
--color-bg: #F7F9FC;
|
||||
--color-text: #1A1A2E;
|
||||
--color-text-muted: #5A6A7A;
|
||||
--color-border: #D8E2EE;
|
||||
/* 워밍-프로페셔널 팔레트 */
|
||||
--color-primary: #C89D6E; /* 따뜻한 골드/브론즈 */
|
||||
--color-primary-dark: #A67C52; /* 진한 브론즈 */
|
||||
--color-secondary: #2E5C4E; /* 따뜻한 초록 */
|
||||
--color-secondary-dark: #1F3A30; /* 어두운 초록 */
|
||||
--color-accent: #E8E4D8; /* 따뜻한 베이지 */
|
||||
--color-accent-dark: #D9D3C4; /* 더 진한 베이지 */
|
||||
--color-bg: #F9F7F3; /* 따뜻한 화이트 */
|
||||
--color-bg-alt: #EFE9DD; /* 대체 배경 */
|
||||
--color-text: #3D2817; /* 따뜻한 갈색 */
|
||||
--color-text-light: #6B5D4F; /* 밝은 갈색 */
|
||||
--color-border: #D9D3C4; /* 경계선 */
|
||||
--color-success: #2E7D32;
|
||||
--color-warning: #F57C00;
|
||||
--color-danger: #C62828;
|
||||
@@ -19,10 +23,17 @@
|
||||
--spacing-lg: 1.5rem;
|
||||
--spacing-xl: 2rem;
|
||||
--spacing-2xl: 3rem;
|
||||
--spacing-3xl: 4rem;
|
||||
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 12px;
|
||||
--radius-xl: 16px;
|
||||
|
||||
--shadow-sm: 0 1px 3px rgba(61, 40, 23, 0.08);
|
||||
--shadow-md: 0 4px 12px rgba(61, 40, 23, 0.12);
|
||||
--shadow-lg: 0 8px 24px rgba(61, 40, 23, 0.15);
|
||||
--shadow-xl: 0 12px 48px rgba(61, 40, 23, 0.18);
|
||||
|
||||
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
@@ -30,6 +41,8 @@
|
||||
|
||||
* {
|
||||
font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
html {
|
||||
@@ -39,20 +52,58 @@ html {
|
||||
|
||||
body {
|
||||
color: var(--color-text);
|
||||
background-color: #fff;
|
||||
line-height: 1.75;
|
||||
font-size: clamp(0.875rem, 2.5vw, 1rem);
|
||||
background-color: var(--color-bg);
|
||||
line-height: 1.8;
|
||||
font-size: clamp(0.9rem, 2.5vw, 1rem);
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
/* 버튼 스타일 */
|
||||
/* ===== 타이포그래피 ===== */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; }
|
||||
h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
|
||||
h3 { font-size: clamp(1.25rem, 4vw, 2rem); }
|
||||
h4 { font-size: 1.35rem; }
|
||||
h5 { font-size: 1.15rem; }
|
||||
h6 { font-size: 1rem; }
|
||||
|
||||
p {
|
||||
margin-bottom: var(--spacing-md);
|
||||
color: var(--color-text-light);
|
||||
line-height: 1.85;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-primary);
|
||||
text-decoration: none;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-secondary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* ===== 버튼 ===== */
|
||||
.btn {
|
||||
border-radius: var(--radius-md);
|
||||
font-weight: 500;
|
||||
transition: all var(--transition-fast);
|
||||
font-weight: 600;
|
||||
transition: all var(--transition-normal);
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
padding: 0.625rem 1.5rem;
|
||||
padding: 0.75rem 2rem;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.3px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
@@ -60,32 +111,32 @@ body {
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--color-primary);
|
||||
border-color: var(--color-primary);
|
||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
|
||||
color: white;
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: var(--color-primary-dark);
|
||||
border-color: var(--color-primary-dark);
|
||||
box-shadow: 0 4px 12px rgba(27, 79, 138, 0.25);
|
||||
background: linear-gradient(135deg, var(--color-primary-dark) 0%, #8B5E3C 100%);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-color: var(--color-cta);
|
||||
border-color: var(--color-cta);
|
||||
background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
|
||||
color: white;
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.btn-warning:hover {
|
||||
background-color: var(--color-cta-dark);
|
||||
border-color: var(--color-cta-dark);
|
||||
box-shadow: 0 4px 12px rgba(224, 90, 43, 0.25);
|
||||
background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #0D1E1A 100%);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: var(--color-primary);
|
||||
border-color: var(--color-primary);
|
||||
border: 2px solid var(--color-primary);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -94,63 +145,30 @@ body {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 배경 및 텍스트 */
|
||||
.bg-primary {
|
||||
background-color: var(--color-primary) !important;
|
||||
.btn-lg {
|
||||
padding: 1rem 2.5rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.bg-primary-light {
|
||||
background-color: #E8F1F8 !important;
|
||||
.btn-sm {
|
||||
padding: 0.5rem 1.25rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: var(--color-text-muted) !important;
|
||||
}
|
||||
|
||||
/* 히어로 섹션 */
|
||||
.hero-section {
|
||||
padding: clamp(2rem, 15vh, 5rem) 0;
|
||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
|
||||
color: white;
|
||||
position: relative;
|
||||
/* ===== 카드 ===== */
|
||||
.card {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-xl);
|
||||
transition: all var(--transition-normal);
|
||||
box-shadow: var(--shadow-sm);
|
||||
background: white;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-section::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 50%;
|
||||
transform: translate(30%, -30%);
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-size: clamp(1.5rem, 5vw, 3rem);
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* 카드 스타일 */
|
||||
.card {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
transition: all var(--transition-normal);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
||||
transform: translateY(-6px);
|
||||
box-shadow: var(--shadow-lg);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.card-body {
|
||||
@@ -158,294 +176,345 @@ body {
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-weight: 600;
|
||||
color: var(--color-primary);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
/* 네비게이션 */
|
||||
.navbar-brand {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary) !important;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--spacing-md);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
|
||||
.card-text {
|
||||
color: var(--color-text-light);
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* ===== 히어로 섹션 ===== */
|
||||
.hero-section {
|
||||
padding: clamp(3rem, 20vh, 6rem) 0;
|
||||
background: linear-gradient(135deg, var(--color-secondary) 0%, #1F3A30 100%);
|
||||
color: white;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-bottom: 4px solid var(--color-primary);
|
||||
}
|
||||
|
||||
.hero-section::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
right: -10%;
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
background: rgba(200, 157, 110, 0.1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.hero-section::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -30%;
|
||||
left: -10%;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background: rgba(232, 228, 216, 0.05);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-size: clamp(2rem, 8vw, 3.5rem);
|
||||
font-weight: 800;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hero-section p {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: var(--spacing-xl);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* ===== 섹션 ===== */
|
||||
.bg-light {
|
||||
background-color: var(--color-accent) !important;
|
||||
}
|
||||
|
||||
.bg-primary {
|
||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: clamp(1.75rem, 5vw, 2.75rem);
|
||||
font-weight: 800;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.section-title::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 60px;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
|
||||
margin: var(--spacing-md) auto 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ===== 휴스 스트립 (신뢰도) ===== */
|
||||
.trust-strip {
|
||||
background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-accent) 100%);
|
||||
padding: var(--spacing-3xl) 0;
|
||||
border-top: 1px solid var(--color-border);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.trust-item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.trust-icon {
|
||||
font-size: 3.5rem;
|
||||
margin-bottom: var(--spacing-md);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.trust-item h3 {
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
|
||||
.trust-item p {
|
||||
color: var(--color-text-light);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* ===== 배지 ===== */
|
||||
.badge {
|
||||
border-radius: var(--radius-md);
|
||||
padding: 0.35rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
display: inline-block;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.bg-primary-badge {
|
||||
background-color: rgba(200, 157, 110, 0.15);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* ===== 폼 ===== */
|
||||
.form-control, .form-select {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 0.75rem 1rem;
|
||||
font-size: 1rem;
|
||||
transition: all var(--transition-fast);
|
||||
background-color: white;
|
||||
padding: var(--spacing-md) 0;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.navbar.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
.form-control:focus, .form-select:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(200, 157, 110, 0.1);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
color: var(--color-text) !important;
|
||||
font-weight: 500;
|
||||
transition: color var(--transition-fast);
|
||||
margin: 0 var(--spacing-sm);
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
color: var(--color-cta) !important;
|
||||
}
|
||||
|
||||
/* 모바일 CTA 바 */
|
||||
/* ===== 모바일 CTA 바 ===== */
|
||||
.mobile-cta-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
border-top: 2px solid var(--color-border);
|
||||
border-top: 2px solid var(--color-primary);
|
||||
padding: var(--spacing-md);
|
||||
z-index: 1000;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 -4px 12px rgba(61, 40, 23, 0.1);
|
||||
}
|
||||
|
||||
.btn-kakao-mobile {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: var(--spacing-md);
|
||||
background: #FFE812;
|
||||
padding: 0.85rem;
|
||||
background: linear-gradient(135deg, #FFE812 0%, #FDD835 100%);
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
border-radius: var(--radius-md);
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
transition: background var(--transition-fast);
|
||||
transition: all var(--transition-fast);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.btn-kakao-mobile:hover {
|
||||
background: #FDD835;
|
||||
background: linear-gradient(135deg, #FDD835 0%, #FBC02D 100%);
|
||||
text-decoration: none;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.btn-kakao-mobile:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* 페이지 스페이싱 */
|
||||
body.with-mobile-cta {
|
||||
padding-bottom: 70px;
|
||||
}
|
||||
|
||||
/* 섹션 */
|
||||
.section {
|
||||
padding: var(--spacing-2xl) 0;
|
||||
/* ===== 네비게이션 ===== */
|
||||
.navbar {
|
||||
background-color: white;
|
||||
box-shadow: var(--shadow-sm);
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: clamp(1.5rem, 4vw, 2.5rem);
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
text-align: center;
|
||||
.navbar-brand {
|
||||
font-weight: 800;
|
||||
color: var(--color-primary) !important;
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
/* 배지 */
|
||||
.badge {
|
||||
border-radius: var(--radius-sm);
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
.nav-link {
|
||||
color: var(--color-text) !important;
|
||||
font-weight: 600;
|
||||
transition: all var(--transition-fast);
|
||||
margin: 0 var(--spacing-sm);
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.badge-success {
|
||||
background-color: #E8F5E9;
|
||||
color: var(--color-success);
|
||||
.nav-link:hover {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
/* 폼 요소 */
|
||||
.form-control, .form-select {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 0.625rem 1rem;
|
||||
font-size: 1rem;
|
||||
transition: border-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.form-control:focus, .form-select:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.1);
|
||||
}
|
||||
|
||||
/* 이미지 최적화 */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
img[loading="lazy"] {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* 타이포그래피 */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
|
||||
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
|
||||
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
|
||||
h4 { font-size: 1.25rem; }
|
||||
h5 { font-size: 1.1rem; }
|
||||
h6 { font-size: 1rem; }
|
||||
|
||||
p {
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-primary);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-fast);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-cta);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 리스트 */
|
||||
.list-group-item {
|
||||
border-color: var(--color-border);
|
||||
padding: var(--spacing-md) var(--spacing-lg);
|
||||
}
|
||||
|
||||
/* 모달 */
|
||||
.modal-content {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding: var(--spacing-xl);
|
||||
}
|
||||
|
||||
/* 탭 */
|
||||
.nav-tabs .nav-link {
|
||||
color: var(--color-text-muted);
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-bottom: -3px;
|
||||
padding: var(--spacing-md) var(--spacing-lg);
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link:hover {
|
||||
color: var(--color-primary);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link.active {
|
||||
color: var(--color-primary);
|
||||
border-bottom-color: var(--color-primary);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* 페이지네이션 */
|
||||
.pagination .page-link {
|
||||
border-color: var(--color-border);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.pagination .page-link:hover {
|
||||
background-color: var(--color-bg);
|
||||
border-color: var(--color-border);
|
||||
}
|
||||
|
||||
.pagination .page-item.active .page-link {
|
||||
background-color: var(--color-primary);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* 반응형 — 태블릿 이상 */
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 960px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 반응형 — 모바일 (375px ~) */
|
||||
/* ===== 반응형 ===== */
|
||||
@media (max-width: 767.98px) {
|
||||
h1 { font-size: 1.75rem; }
|
||||
h2 { font-size: 1.35rem; }
|
||||
|
||||
.hero-section {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
.section {
|
||||
padding: 1.5rem 0;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 0.5rem 0.75rem !important;
|
||||
margin: 0 !important;
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* 초소형 화면 (max 375px) */
|
||||
@media (max-width: 375px) {
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem;
|
||||
.btn {
|
||||
padding: 0.65rem 1.5rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.trust-icon {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 var(--spacing-md);
|
||||
}
|
||||
}
|
||||
|
||||
/* 도움말 텍스트 */
|
||||
.form-text {
|
||||
color: var(--color-text-muted);
|
||||
font-size: 0.875rem;
|
||||
margin-top: 0.25rem;
|
||||
@media (max-width: 375px) {
|
||||
html { font-size: 15px; }
|
||||
|
||||
h1 { font-size: 1.5rem; }
|
||||
|
||||
.hero-section h1 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.hero-section p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 일반 유틸리티 ===== */
|
||||
.text-muted {
|
||||
color: var(--color-text-light) !important;
|
||||
}
|
||||
|
||||
.border-light {
|
||||
border-color: var(--color-border) !important;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
/* ===== 서비스 카드 ===== */
|
||||
.service-card {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
border: none !important;
|
||||
background: white;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
font-size: 3.5rem;
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: -1.5rem;
|
||||
}
|
||||
|
||||
.service-card .card-title {
|
||||
font-size: 1.4rem;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.service-card ul li {
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
|
||||
/* ===== 블로그 카드 ===== */
|
||||
.blog-card {
|
||||
border: none !important;
|
||||
overflow: hidden;
|
||||
transition: all var(--transition-normal);
|
||||
}
|
||||
|
||||
.blog-placeholder {
|
||||
height: 180px;
|
||||
background: linear-gradient(135deg, rgba(200, 157, 110, 0.1) 0%, rgba(46, 92, 78, 0.1) 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 4rem;
|
||||
color: rgba(200, 157, 110, 0.3);
|
||||
}
|
||||
|
||||
.blog-card:hover .blog-placeholder {
|
||||
background: linear-gradient(135deg, rgba(200, 157, 110, 0.2) 0%, rgba(46, 92, 78, 0.2) 100%);
|
||||
}
|
||||
|
||||
.bg-primary-badge {
|
||||
background-color: rgba(200, 157, 110, 0.15) !important;
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user