Add optional navbar / menu bar
diff --git a/config.php.example b/config.php.example
index cef86ee..d708a90 100755
--- a/config.php.example
+++ b/config.php.example
@@ -24,6 +24,7 @@
$SERVICE_LOGO = "./static/Test_Logo.svg";
$SERVICE_NAME = "International Test Corpus";
$SERVICE_COLOR = "#FF973A";
+// $MENU_BAR = "menubar.html";
$REGULAR_CONFERENCE_FEE = 280;
$EARLYBIRD_CONFERENCE_FEE = 240;
diff --git a/templates/menubar.html.example b/templates/menubar.html.example
new file mode 100644
index 0000000..e35532a
--- /dev/null
+++ b/templates/menubar.html.example
@@ -0,0 +1,63 @@
+<style>
+ .btn-primary {
+ background-color: <?php echo $SERVICE_COLOR;
+ ?>;
+ border-color: <?php echo $SERVICE_COLOR;
+ ?>;
+ }
+
+ .nav,
+ ul .dropdown-menu .fg-primary,
+ .bg-primary,
+ .nav-link {
+ background-color: #2f9c97 !important;
+ color: white;
+ }
+
+ .nav-link:hover,
+ .nav-link:visited {
+ background-color: #2f9c97 !important;
+ color: white;
+ }
+
+ .nav-pills a.nav-link.active,
+ a.nav-link:hover,
+ a.nav-link.active:visited {
+ border-radius: 0%;
+ text-decoration: none;
+ background-color: #d5ebea !important;
+ color: <?php echo $SERVICE_COLOR;
+ ?>!important;
+ }
+
+ a.dropdown-item:hover {
+ text-decoration: none;
+ background: #d5ebea;
+ color: #2f9c97;
+ }
+
+ a.dropdown-item {
+ color: #d5ebea;
+ }
+</style>
+<nav class="col-12 bold navbar-expand-lg mt-5 ml-5 pl-5 bg-primary" data-bs-theme="dark">
+ <ul class="nav nav-pills justify-content-start fs-4">
+ <li class="nav-item"><a href="https://korpus.cz/icc" class="nav-link">Home</a></li>
+ <li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Sign up</a></li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+ Query
+ </a>
+ <ul class="dropdown-menu fg-primary bg-primary fs-4" aria-labelledby="navbarDropdown">
+ <li><a class="dropdown-item" href="https://korap.korpus.cz/">ICC Czech</a></li>
+ <li><a class="dropdown-item" href="//korap.ids-mannheim.de/instance/icc/eng">ICC English</a></li>
+ <li><a class="dropdown-item" href="//korap.ids-mannheim.de/instance/icc/ger">ICC German</a></li>
+ <li><a class="dropdown-item" href="//korap.ids-mannheim.de/instance/icc/nor">ICC Norwegian</a></li>
+ <li>
+ <hr class="dropdown-divider">
+ </li>
+ <li><a class="dropdown-item" href="#">QL Introduction</a></li>
+ </ul>
+ </li>
+ </ul>
+</nav>
\ No newline at end of file
diff --git a/templates/register.htm b/templates/register.htm
index d6e14b1..e92b69b 100644
--- a/templates/register.htm
+++ b/templates/register.htm
@@ -9,16 +9,14 @@
<?php echo $SERVICE_NAME; ?>
</h1>
</div>
- <!--
- <div class="col-md-12 bold navbar-expand-lg mt-5 ml-5 pl-5 bg-primary" data-bs-theme="dark">
- <ul class="nav nav-pills justify-content-start fs-4">
- <li class="nav-item"><a href="https://korpus.cz/icc" class="nav-link">Home</a></li>
- <li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Sign up</a></li>
- <li class="nav-item"><a href="#" class="nav-link">Query</a></li>
- </ul>
- </div>
- -->
- <div class="col-md-12 justify-content-start align-self-center pb-1 float-start">
+ <?php if( isset($MENU_BAR) ) {
+ $menubar_path = stream_resolve_include_path($MENU_BAR);
+ if ($menubar_path !== false) {
+ include $menubar_path;
+ }
+ }
+ ?>
+ <div class="col-12 justify-content-start align-self-center pb-1 float-start">
<h2 class="text-center fw-bold">
<?php echo $SERVICE_ACRONYM;?> Registration
</h2>
@@ -56,7 +54,8 @@
<input pattern="[^\s].{<?php echo ($VAL_USER->min_first_name - 1) . ','.$VAL_USER->max_first_name;?>}" required title="At least 2 not whitespace characters" name="first_name" type="text" id="form3Example1" class="form-control fs-4 <?php if(isset($error) && $error && !isset($_POST['first_name'])){echo 'border-danger';}?>"
placeholder="Jane" value="<?php echo isset($_POST['first_name']) ? htmlspecialchars($_POST['first_name']) : '' ?>" />
<div class="invalid-feedback">
- Please provide a first name with at least <?php echo $VAL_USER->min_first_name ?> characters, not starting with white spaces.
+ Please provide a first name with at least
+ <?php echo $VAL_USER->min_first_name ?> characters, not starting with white spaces.
</div>
</div>
</div>
@@ -66,7 +65,8 @@
<input pattern="[^\s].{<?php echo ($VAL_USER->min_last_name - 1). ','.$VAL_USER->max_last_name;?>}" required title="At least 2 not whitespace characters" name="last_name" type="text" id="form3Example2" class="form-control fs-4 <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>"
placeholder="Doe" value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : '' ?>" />
<div class="invalid-feedback">
- Please provide a last name with at least <?php echo $VAL_USER->min_last_name ?> characters, not starting with white spaces.
+ Please provide a last name with at least
+ <?php echo $VAL_USER->min_last_name ?> characters, not starting with white spaces.
</div>
</div>
</div>