Add favicon and fix version display and navbar spacing
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
This commit is contained in:
parent
b9a33344c4
commit
feab8c2ca0
|
@ -14,10 +14,16 @@ RUN apt-get update && apt-get install -y \
|
|||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy VERSION file
|
||||
COPY ../VERSION ./VERSION
|
||||
ARG APP_VERSION=unknown
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
|
||||
# Copy application code
|
||||
COPY app.py .
|
||||
COPY schema.sql .
|
||||
COPY templates/ ./templates/
|
||||
COPY static/ ./static/
|
||||
# Tests directory is empty or doesn't contain required files
|
||||
# COPY tests/ ./tests/
|
||||
|
||||
|
|
|
@ -18,8 +18,14 @@ logger = logging.getLogger('ploughshares')
|
|||
VERSION = os.environ.get('APP_VERSION')
|
||||
if not VERSION:
|
||||
try:
|
||||
with open(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'VERSION'), 'r') as f:
|
||||
VERSION = f.read().strip()
|
||||
# Try to read from VERSION file in the current directory first
|
||||
if os.path.exists('VERSION'):
|
||||
with open('VERSION', 'r') as f:
|
||||
VERSION = f.read().strip()
|
||||
# Fall back to the project root VERSION file
|
||||
else:
|
||||
with open(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'VERSION'), 'r') as f:
|
||||
VERSION = f.read().strip()
|
||||
except:
|
||||
VERSION = "unknown"
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx</center>
|
||||
</body>
|
||||
</html>
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Project Ploughshares - Transaction Management System{% endblock %}</title>
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
|
||||
<style>
|
||||
|
@ -54,6 +55,12 @@
|
|||
font-size: 0.8em;
|
||||
color: #999;
|
||||
}
|
||||
.navbar-nav {
|
||||
gap: 1rem;
|
||||
}
|
||||
.nav-item {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -68,7 +75,7 @@
|
|||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('index') }}">Home</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue