-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
136998e
commit c36c9c9
Showing
57 changed files
with
3,661 additions
and
147 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/*! | ||
* Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.4/customize/) | ||
*/ | ||
/*! | ||
* Bootstrap v3.4.1 (https://getbootstrap.com/) | ||
* Copyright 2011-2019 Twitter, Inc. | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
*/ | ||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | ||
|
||
.badge { | ||
display: inline-block; | ||
min-width: 10px; | ||
padding: 3px 7px; | ||
font-size: 12px; | ||
font-weight: bold; | ||
line-height: 1; | ||
color: #ffffff; | ||
text-align: center; | ||
white-space: nowrap; | ||
vertical-align: middle; | ||
background-color: #777777; | ||
border-radius: 10px; | ||
} | ||
.badge:empty { | ||
display: none; | ||
} | ||
.btn .badge { | ||
position: relative; | ||
top: -1px; | ||
} | ||
.btn-xs .badge, | ||
.btn-group-xs > .btn .badge { | ||
top: 0; | ||
padding: 1px 5px; | ||
} | ||
a.badge:hover, | ||
a.badge:focus { | ||
color: #ffffff; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
.list-group-item.active > .badge, | ||
.nav-pills > .active > a > .badge { | ||
color: #337ab7; | ||
background-color: #ffffff; | ||
} | ||
.list-group-item > .badge { | ||
float: right; | ||
} | ||
.list-group-item > .badge + .badge { | ||
margin-right: 5px; | ||
} | ||
.nav-pills > li > a > .badge { | ||
margin-left: 3px; | ||
} | ||
|
||
.tooltip { | ||
position: absolute; | ||
z-index: 1070; | ||
display: block; | ||
font-family: inherit; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 1.42857143; | ||
line-break: auto; | ||
text-align: left; | ||
text-align: start; | ||
text-decoration: none; | ||
text-shadow: none; | ||
text-transform: none; | ||
letter-spacing: normal; | ||
word-break: normal; | ||
word-spacing: normal; | ||
word-wrap: normal; | ||
white-space: normal; | ||
font-size: 12px; | ||
filter: alpha(opacity=0); | ||
opacity: 0; | ||
} | ||
.tooltip.in { | ||
filter: alpha(opacity=90); | ||
opacity: 0.9; | ||
} | ||
.tooltip.top { | ||
padding: 5px 0; | ||
margin-top: -3px; | ||
} | ||
.tooltip.right { | ||
padding: 0 5px; | ||
margin-left: 3px; | ||
} | ||
.tooltip.bottom { | ||
padding: 5px 0; | ||
margin-top: 3px; | ||
} | ||
.tooltip.left { | ||
padding: 0 5px; | ||
margin-left: -3px; | ||
} | ||
.tooltip.top .tooltip-arrow { | ||
bottom: 0; | ||
left: 50%; | ||
margin-left: -5px; | ||
border-width: 5px 5px 0; | ||
border-top-color: #000000; | ||
} | ||
.tooltip.top-left .tooltip-arrow { | ||
right: 5px; | ||
bottom: 0; | ||
margin-bottom: -5px; | ||
border-width: 5px 5px 0; | ||
border-top-color: #000000; | ||
} | ||
.tooltip.top-right .tooltip-arrow { | ||
bottom: 0; | ||
left: 5px; | ||
margin-bottom: -5px; | ||
border-width: 5px 5px 0; | ||
border-top-color: #000000; | ||
} | ||
.tooltip.right .tooltip-arrow { | ||
top: 50%; | ||
left: 0; | ||
margin-top: -5px; | ||
border-width: 5px 5px 5px 0; | ||
border-right-color: #000000; | ||
} | ||
.tooltip.left .tooltip-arrow { | ||
top: 50%; | ||
right: 0; | ||
margin-top: -5px; | ||
border-width: 5px 0 5px 5px; | ||
border-left-color: #000000; | ||
} | ||
.tooltip.bottom .tooltip-arrow { | ||
top: 0; | ||
left: 50%; | ||
margin-left: -5px; | ||
border-width: 0 5px 5px; | ||
border-bottom-color: #000000; | ||
} | ||
.tooltip.bottom-left .tooltip-arrow { | ||
top: 0; | ||
right: 5px; | ||
margin-top: -5px; | ||
border-width: 0 5px 5px; | ||
border-bottom-color: #000000; | ||
} | ||
.tooltip.bottom-right .tooltip-arrow { | ||
top: 0; | ||
left: 5px; | ||
margin-top: -5px; | ||
border-width: 0 5px 5px; | ||
border-bottom-color: #000000; | ||
} | ||
.tooltip-inner { | ||
max-width: 200px; | ||
padding: 3px 8px; | ||
color: #ffffff; | ||
text-align: center; | ||
background-color: #000000; | ||
border-radius: 4px; | ||
} | ||
.tooltip-arrow { | ||
position: absolute; | ||
width: 0; | ||
height: 0; | ||
border-color: transparent; | ||
border-style: solid; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
<div class="tile is-child" hx-ext="sse" sse-connect="/events/connection"> | ||
<div id="places_parent" class="tile is-child"> | ||
<div hx-ext="sse" sse-connect="/events/connection"> | ||
<div id="places_parent"> | ||
{% capture totalCount %}{{directiveModel.totalCount}} {% endcapture %} | ||
{%if totalCount > 0 %} | ||
{% include "place/directive.html" %} | ||
{% include "place/list_lazy.html" %} | ||
{%else%} | ||
{% include "place/directive_1_get_started.html" %} | ||
{%endif%} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<nav class="navbar"> | ||
<div class="navbar-branding" id="logo"> | ||
<a href="/"><img src="{{ logo }}" /></a> | ||
</div> | ||
<div class="navbar-branding"><a>User Management</a></div> | ||
<ul> | ||
<li class="dropdown"> | ||
<div id="dropdown-btn"> | ||
<img src="/public/icons/cloud.svg" alt="dropdown-button"> | ||
<i>{{ session.authInfo.friendly }}</i> | ||
</div> | ||
<div class="hamburger-icon"> | ||
<span></span> | ||
<span></span> | ||
<span></span> | ||
</div> | ||
<ul class="dropdown-menu" id="dd-menu"> | ||
<a href="/logout"> | ||
<li><img src="/public/icons/logout.svg">Logout</li> | ||
</a> | ||
<li><i>Logged in as {{ session.username }}</i></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</nav> | ||
|
||
<script> | ||
document.addEventListener('click', function () { | ||
const dropDownMenu = document.getElementById('dd-menu'); | ||
if(dropDownMenu.classList.contains('active-dropdown')) { | ||
document.querySelector('.dropdown-menu').classList.toggle('active-dropdown'); | ||
document.querySelector('.hamburger-icon').classList.toggle('open'); | ||
} | ||
}); | ||
|
||
document.querySelector('.hamburger-icon') | ||
.addEventListener('click', function(event){ | ||
event.stopPropagation(); | ||
document.querySelector('.dropdown-menu').classList.toggle('active-dropdown'); | ||
document.querySelector('.hamburger-icon').classList.toggle('open'); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>CHT User Management Tool</title> | ||
<script src="/public/htmx.min.js"></script> | ||
<script src="/public/sse.js"></script> | ||
<script src="/public/bulma-calendar.min.js"></script> | ||
|
||
<link rel="stylesheet" href="/public/bulma.min.css" /> | ||
<link rel="stylesheet" href="/public/bulma-tooltip.min.css" /> | ||
<link rel="stylesheet" href="/public/bulma-calendar.min.css" /> | ||
<link rel="stylesheet" href="/public/material-symbols.css" /> | ||
|
||
<style> | ||
.material-symbols-outlined { | ||
margin-right: 5px; | ||
}; | ||
</style> | ||
<script src="/public/scripts/htmx.min.js"></script> | ||
<script src="/public/scripts/sse.js"></script> | ||
<script src="/public/scripts/bulma-calendar.min.js"></script> | ||
<script src="/public/scripts/jquery-3.7.1.slim.min.js"></script> | ||
<script src="/public/scripts/bootstrap.min.js"></script> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="/public/css/custom-bootstrap.min.css" /> | ||
<link rel="stylesheet" href="/public/css/styles.css" /> | ||
</head> | ||
|
||
<body> | ||
{% include "app/nav.html" %} | ||
|
||
<div id="app" class="" style="min-height: 100vh"> | ||
<div id="workflow-content" class="container tile is-parent"> | ||
{% if view == "list" %} | ||
{% include "app/fragment_home.html" %} | ||
{% else %} | ||
{% include "app/form_switch.html" %} | ||
{% endif %} | ||
<div class="container"> | ||
{% include "app/header.html" %} | ||
<div class="content"> | ||
<div id="app"> | ||
<div id="workflow-content" class="container tile is-parent"> | ||
{% if view == "list" %} | ||
{% include "app/fragment_home.html" %} | ||
{% else %} | ||
{% include "app/form_switch.html" %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
bulmaCalendar.attach('input[type="date"]', { | ||
lang: 'en-US', | ||
dateFormat: 'yyyy-MM-dd', | ||
maxDate: new Date(), | ||
}); | ||
</script> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<div class="pagination" id="pagination"> | ||
<button | ||
{%assign prevPage = include.contactType.places.page | minus: 1 %} | ||
{% if prevPage == 0 %} disabled {%endif%} | ||
hx-trigger="click" hx-get="/app/list/{{prevPage}}/{{include.contactType.places.pageSize}}" hx-target="#place_list" hx-swap="outerHTML" | ||
id="prevbtn">«</button> | ||
<span id="pager"> | ||
{% for pageNumber in (1..contactType.places.totalPages) %} | ||
{% assign collapseRightLimit = include.contactType.places.totalPages | minus: 3 %} | ||
{%assign collapseLeft = include.contactType.places.page >= 6 and pageNumber == 6 %} | ||
{%assign collapseRight = include.contactType.places.page < collapseRightLimit and pageNumber == collapseRightLimit %} | ||
{% if collapseLeft or collapseRight %} | ||
<a class="collapse">...</a> | ||
{%endif%} | ||
<a | ||
{% if pageNumber == include.contactType.places.page %} | ||
class = "active" | ||
{%else%} | ||
hx-trigger="click" hx-get="/app/list/{{pageNumber}}/{{include.contactType.places.pageSize}}" hx-target="#place_list" hx-swap="outerHTML" | ||
{%endif%} | ||
>{{pageNumber}}</a> | ||
{%endfor%} | ||
</span> | ||
<button id="nextbtn_{{ contactType.name }}" | ||
{%assign nextPage = include.contactType.places.page | plus: 1 %} | ||
{% if nextPage > include.contactType.places.totalPages %} disabled {%endif%} | ||
hx-trigger="click" hx-get="/app/list/{{nextPage}}/{{include.contactType.places.pageSize}}" hx-target="#place_list" hx-swap="outerHTML" | ||
>»</button> | ||
<div class="pager-control"> | ||
<span>Rows per page</span> | ||
<select id="rows-per-page_{{ contactType.name }}" | ||
hx-trigger="change" hx-target="#place_list" hx-swap="outerHTML" | ||
> | ||
<option hx-get="/app/list/1/10" value="10" {%if include.contactType.places.pageSize == 10 %}selected {%endif%}>10</option> | ||
<option hx-get="/app/list/1/20" value="20" {%if include.contactType.places.pageSize == 20 %}selected {%endif%}>20</option> | ||
<option hx-get="/app/list/1/50" value="50" {%if include.contactType.places.pageSize == 50 %}selected {%endif%}>50</option> | ||
<option hx-get="/app/list/1/100" value="100" {%if include.contactType.places.pageSize == 100 %}selected {%endif%}>100</option> | ||
</select> | ||
</div> | ||
</div> |
Oops, something went wrong.