nim-theNewWeb/tmpl/dashbord/dashboard.nim

108 lines
5.8 KiB
Nim
Raw Normal View History

2022-11-09 12:38:32 -05:00
#? stdtmpl | standard
#
2022-11-10 19:53:55 -05:00
# import ../snippets/snippet_icons
2022-11-09 12:38:32 -05:00
#proc dashboardHtml(columnLeftInfo: var ColomnLeftData): string =
# result = ""
<div class="panel">
<div style="overflow: auto; position: relative; zoom: 1; height: 731px;">
<div style="position: relative; zoom: 1;">
<div class="apps">
# var count: int = 1
# var i: int
# for i in 0 .. (columnLeftInfo.dashbord.position.len() - 1) :
# count += 1
<button type="button" class="glow-on-hover">
<div class="grid-container">
<div class="grid-container-title">
${columnLeftInfo.dashbord.title[i]}
</div>
# if columnLeftInfo.dashbord.ext_link[i] != "":
<a class="grid-container-logo" href="${columnLeftInfo.dashbord.ext_link[i]}">
# elif columnLeftInfo.dashbord.int_link[i] != "":
<a class="grid-container-logo" href="${columnLeftInfo.dashbord.int_link[i]}">
# else :
<a class="grid-container-logo">
# end if
<div class="grid-container-logo crossfade">
# if columnLeftInfo.dashbord.icon[i] == "":
<img src="images\svg\internet.svg" class="brands"/>
# else:
<img src="images\svg\${columnLeftInfo.dashbord.icon[i]}.svg" class="brands"/>
# end if
<img src="images\svg\bookmark.svg" class="bookmark"/>
</div>
</a>
<div class="grid-container-description">
<p class="grid-container-description">${columnLeftInfo.dashbord.description[i]}</p>
</div>
<div class="grid-container-info">
# if columnLeftInfo.dashbord.server[i] != "":
Serveur : ${columnLeftInfo.dashbord.server[i]}<br>
# end if
# if columnLeftInfo.dashbord.ip[i] != "":
IP : ${columnLeftInfo.dashbord.ip[i]}<br>
# end if
# if columnLeftInfo.dashbord.port[i] > 0:
Port : ${columnLeftInfo.dashbord.port[i]}<br>
# end if
</div>
<div class="grid-container-tags">
# if columnLeftInfo.dashbord.tag[i].len() > 0:
# var icon_tag = Tag_icon()
# for j in 0 .. (columnLeftInfo.dashbord.tag[i].len() - 1) :
# if columnLeftInfo.dashbord.tag[i][j] != "":
${icon_tag}
${columnLeftInfo.dashbord.tag[i][j]}
# end if
# end for
# end if
</div>
<div class="grid-container-status">
# if columnLeftInfo.dashbord.ssl[i] == true:
# var icon_lock = Lock_icon()
${icon_lock}
# else:
# var icon_lockopen = Lockopen_icon()
${icon_lockopen}
# end if
# if columnLeftInfo.dashbord.ext_link[i] != "":
# var icon_internet = Internet_icon()
<a href="${columnLeftInfo.dashbord.ext_link[i]}" class="status-logo" target="_blank">
${icon_internet}</a>
# end if
# if columnLeftInfo.dashbord.int_link[i] != "":
# var icon_localnetwork = LocalNetwork_icon()
<a href="${columnLeftInfo.dashbord.int_link[i]}" class="status-logo" target="_blank">
${icon_localnetwork}</a>
# end if
</div>
</div>
</button>
# end for
</div>
</div>
</div>
<div class="footer">
<hr>
</div>
<div class="footer version">
<div class="footer-Label">The NewWebJoplin V15 le 2022-10-28 10:56 par Bruno Charest.</div>
</div>
</div>
#end proc