From 1f0078446debd129e2bf927e9907b0be17afcf2f Mon Sep 17 00:00:00 2001 From: iou1name Date: Thu, 20 Jun 2019 07:48:11 -0400 Subject: [PATCH] added nav bar --- static/fontawesome-webfont.woff2 | Bin 2596 -> 2688 bytes static/juice.css | 24 +++++++++++++++++++++++- static/juice.js | 4 ++-- templates/index.html | 12 +++++++++--- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/static/fontawesome-webfont.woff2 b/static/fontawesome-webfont.woff2 index d2a3f9905d29978e97b80c7c54a8ecf9e4123886..082ba3725124e715784df65ca73712506e52eb71 100644 GIT binary patch literal 2688 zcmV-`3V-!?Pew8T0RR9101AKr4*&oF02Y`4017Gq0RR9100000000000000000000 z0000SR0dW6gA52D36^jX2nvTBhCd4m00A}vBm)oxAO(d@2R;me1{)_8QB;irWM3Wc zFrGWvs%Pax#Q7f)G0b7Jbx~wDc%J_@{a^dcnPC_r3axWXLc}1Z6R|2yNdk3Z%2o5^ z%5(ct{p6W_zLM2d=?M_f0RNA+Z&sAxX>NEcmXFxVVEG2VPJ(9EikhOHt~wb!|6>cy zoZ2zBPR`I1)V}~!6lOaKBlZ8A>$Ug2&3@pV3Oywh28F9L-3fGOl7(z3DI)o@`$8eR z0xNQWwx_PL$G1xJ0-ioqN(@Sk1Ntcuz#*cS8X7qqCvPov*#^6406;+5P}Y_gQ`k5c zjRvyQ7SX2hpge>L>KgSW;J)C?%O8oRKw%n~O~w|6=WsJ*lrfQA;iNi|CyJW_2%1b( z3q4U1q?#Z+!5#*VsR^4Jy_k&3@)+4z_wvpJ`L#2PawuuG%zzA%Kp-PfkU293<3DqU zDkn^`pDEM|Cet`eZ~l>Y{0-LcQ=<7wWmzuNO(vAK|LxX@>eNo0_mG4^8}$e*F(4r5 zF9HfW6JOg!yH9;(+u`_hy#G0Q^R7#X*lzN;*@^b`vi35o#+conQF-X>jg8`njwHg@ zR?&sJd)f^gRgQF!*3Oz+(fS&coU=nLXM&ijn`fQEVV zI;&=kQtgtZ7b0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icN{Cl6ZE$DHs|} znQDcpOVoR7L%5@m(9{47;D%xnS5A|0G+QJnn=BkM=ise#P%A+G!>of;(D2V=jY&^Q>tEx-q`B9u@6A}dw&!eA zZ8bG`TZw-TV2z;O87eS}AU0t&`q7I%tc58~1>%`9q)C_0)PY8uMmcWWj}Zhg1XBR( zuoiuwtifVo=`m#lkZx6mI@PD>#3+U#smFz0tiwkQU^Qj!y`^S!dmr{g)tl0#NaLWI zaD*!i0QFtbF08?NLo%?j7CogNtd7vpOx0$|6oh49Ksuo?MIy2`n=g=BTEC=~7@#5R zu(T8-i8%Nn)`yjQhDL+IO#tRSg}3Tk$B7QMjnNimIXDinO_4}wPM_2nsd@_smXvSL zu$MqI6G}^1XO~bp9!0wsw~kr6TTOIv%xur7n?bX`*xA@hmbT*cCvA*u2~SZ7{J=Ov GB>`XooatWx diff --git a/static/juice.css b/static/juice.css index 510818c..9fdb417 100644 --- a/static/juice.css +++ b/static/juice.css @@ -4,6 +4,29 @@ body { margin: 0; } +.font-awesome { + font-family: FontAwesome; +} + +nav { + background-color: whitesmoke; + border-bottom: 1px solid darkgray; + display: flex; +} + +nav span { + color: dimgrey; + cursor: pointer; + transition: 0.1s; + padding: 0.5em; + margin-left: 0.5em; + margin-right: 0.5em; +} + +nav span:hover { + background-color: lightgray; +} + #devices { padding: 5%; display: flex; @@ -53,7 +76,6 @@ body { } .edit, .save { - font-family: FontAwesome; font-size: 0.8em; color: dimgrey; } diff --git a/static/juice.js b/static/juice.js index edd17cb..a89f260 100644 --- a/static/juice.js +++ b/static/juice.js @@ -55,7 +55,7 @@ function edit_field(field) { let save = document.createElement('span'); save.innerHTML = ''; - save.className = 'save'; + save.className = 'save font-awesome'; save.setAttribute('onclick', 'save_field(this.parentElement)'); field.children[1].replaceWith(save); } @@ -93,7 +93,7 @@ function save_field(field) { let edit = document.createElement('span'); edit.innerHTML = ''; - edit.className = 'edit'; + edit.className = 'edit font-awesome'; edit.setAttribute('onclick', 'edit_field(this.parentElement)'); field.children[1].replaceWith(edit); }); diff --git a/templates/index.html b/templates/index.html index 8e035d7..03eabf5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,20 +8,26 @@ +
+ +
{% for device in network %}
{{ device.id }}
-
{{ device.description }}
-
{{ device.location }}
+
{{ device.description }}
+
{{ device.location }}
{{ device.ip_address }}
{% for sub_dev in device.sub_devices %}
{{ sub_dev.id }}
-
{{ sub_dev.description }}
+
{{ sub_dev.description }}
{% endfor %}