-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
main UI - directives and table views #168
base: main
Are you sure you want to change the base?
Changes from 13 commits
c36c9c9
91eb75f
b989819
5e5759d
029b853
42e64da
defce26
aa9f60a
6a156fa
f5d0624
de6905c
0e9bdd8
fcb1d52
91f774f
9dea8f8
deca6c0
6ba45f0
5601185
b00cd6c
3e74c80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
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; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
<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/place_navbar.html" %} | ||
{% include "place/list_lazy.html" %} | ||
{%else%} | ||
{% include "place/directive_1_get_started.html" %} | ||
{%endif%} | ||
</div> | ||
</div> |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see we removed most of the actions from the nav but i don't see any alternatives introduced for clearing the place list, refreshing the place list, creating places etc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was following this for design thats why options moved away from then header bar must have missed the clear option though will add that nice catch There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there's no alternative for the actions in the |
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" id="title"><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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be great to keep scripts like this in an |
||
document.addEventListener('click', function () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this listener is added to the document and not the element being targeted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aah i see, to hide the drop down menu when we click anywhere on the page, correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I'm confused, since the drop down disappears when it's not hovered on, why is this needed? |
||
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> |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. renamed to header.html to distinguish between header and nav bar |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that you still rely on bootstrap. Did bulma not provide this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can customized bootstrap to get only the elements i want for this its tooltips, badges and breadcrumbs keeping the file very small
not sure you can do that with bulma