푸터: 오류 처리 개선 및 간소화
This commit is contained in:
@@ -2,30 +2,17 @@
|
||||
string versionText = "unknown";
|
||||
try
|
||||
{
|
||||
// 여러 위치에서 version.txt를 찾음
|
||||
var possiblePaths = new[]
|
||||
var versionFile = System.IO.Path.Combine(AppContext.BaseDirectory, "wwwroot", "version.txt");
|
||||
if (System.IO.File.Exists(versionFile))
|
||||
{
|
||||
System.IO.Path.Combine(AppContext.BaseDirectory, "wwwroot", "version.txt"),
|
||||
System.IO.Path.Combine(AppContext.BaseDirectory, "version.txt"),
|
||||
"/home/kjh2064/taxbaik_active/wwwroot/version.txt"
|
||||
};
|
||||
|
||||
foreach (var path in possiblePaths)
|
||||
{
|
||||
if (System.IO.File.Exists(path))
|
||||
{
|
||||
var lines = System.IO.File.ReadAllLines(path);
|
||||
var versionLine = lines.FirstOrDefault(l => l.StartsWith("Version:"));
|
||||
var builtLine = lines.FirstOrDefault(l => l.StartsWith("Built:"));
|
||||
if (versionLine != null && builtLine != null)
|
||||
{
|
||||
versionText = $"{versionLine.Replace("Version:", "").Trim()} | {builtLine.Replace("Built:", "").Trim()}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
var content = System.IO.File.ReadAllText(versionFile).Trim();
|
||||
versionText = content;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex)
|
||||
{
|
||||
versionText = $"error: {ex.GetType().Name}";
|
||||
}
|
||||
}
|
||||
|
||||
<footer class="bg-light border-top mt-5 py-4">
|
||||
|
||||
@@ -24,7 +24,18 @@
|
||||
<main role="main" class="pb-5">
|
||||
@RenderBody()
|
||||
</main>
|
||||
<partial name="_Footer" />
|
||||
@try
|
||||
{
|
||||
@await Html.PartialAsync("_Footer");
|
||||
}
|
||||
catch
|
||||
{
|
||||
<footer class="bg-light border-top mt-5 py-4">
|
||||
<div class="container text-center small text-muted">
|
||||
<p>© 2026 백원숙 세무회계</p>
|
||||
</div>
|
||||
</footer>
|
||||
}
|
||||
|
||||
<!-- Mobile Fixed CTA -->
|
||||
<div class="mobile-cta-bar d-lg-none">
|
||||
|
||||
Reference in New Issue
Block a user