Skip to content

Commit

Permalink
changes: review
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisKoether committed Aug 15, 2024
1 parent ad53e9a commit d201945
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def prepare_vars(required_vars):
globals()[var] = environ.get(var)


prepare_vars(["PROJECT", "SITE_NAME", "HOST", "FLASK_ENV"])
prepare_vars(["PROJECT", "SITE_NAME", "HOST", "ENVIRONMENT"])
project = import_module(f"projects.{PROJECT.lower()}")


@app.route("/")
def page():
return render_template('page.template',
site_name=SITE_NAME,
FLASK_ENV=FLASK_ENV,
ENVIRONMENT=environ.get("ENVIRONMENT"),
thishostname=HOST,
project=PROJECT,
projectname=project.projectname_friendly,
Expand Down
15 changes: 11 additions & 4 deletions templates/page.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

{% if FLASK_ENV == "production" %}
{% if ENVIRONMENT == "production" %}
<style>
div .modal-body{
font-size: 20px;
}
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
Expand Down Expand Up @@ -53,6 +56,9 @@
</style>
{% else %}
<style>
div .modal-body{
font-size: 20px;
}
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
Expand Down Expand Up @@ -86,7 +92,7 @@
</head>

<body class="d-flex flex-column min-vh-100">
{% if FLASK_ENV == "production" %}
{% if ENVIRONMENT == "production" %}
<nav>
<h1>Bridgehead for {{ projectname }}</h1>
<h2>in {{ site_name }}</h2>
Expand All @@ -95,7 +101,7 @@
<nav>
<h1>Bridgehead for {{ projectname }}</h1>
<h2>in {{ site_name }}</h2>
<h3 style="color:#7b241c">Development</h3>
<h3 style="color:#7b241c">Test</h3>
</nav>
{% endif %}
<div class="container py-5">
Expand Down Expand Up @@ -149,13 +155,14 @@

<!-- Modal -->
<div class="modal fade" id="contactModal" tabindex="-1" aria-labelledby="ContactModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ContactModalLabel">Contact</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Need help, contact us under:<br>
{% if project == "ccp" %}
CCP Support Mail: <a href="mailto:support-ccp@dkfz-heidelberg.de">support-ccp@dkfz-heidelberg.de</a><br>
For general Information visit our <a href="https://wiki.verbis.dkfz.de/display/CCPIT/Zentrale+CCP+Ansprechpartner*innen">Wiki</a>
Expand Down

0 comments on commit d201945

Please sign in to comment.