nim-theNewWeb/tmpl/snippets/snippet_html.nim

72 lines
2.5 KiB
Nim

import templates
# import ../../nim-lib/outils/web/web_utils
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : HTML title H2
# --==--==--==--==--==--==--==--==--==--==-- #
proc templ_title* (title: string): string = tmpli html"""
<h2>$title</h2>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# HTML : Show notification Bell
# --==--==--==--==--==--==--==--==--==--==-- #
proc show_notification_bell* (nb_notif: int): string = tmpli html"""
<div class="notification-box">
<span class="notification-count">$nb_notif</span>
<div class="notification-bell">
<span class="bell-top"></span>
<span class="bell-middle"></span>
<span class="bell-bottom"></span>
<span class="bell-rad"></span>
</div>
</div>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Status Joplin green icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc status_joplin_green* (): string = tmpli html"""
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="#3bed18" class="bi bi-caret-right-square-fill" viewBox="0 0 16 16">
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z"/>
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Status Joplin red icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc status_joplin_red* (): string = tmpli html"""
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="#C9404D" class="bi bi-caret-right-square-fill" viewBox="0 0 16 16">
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z"/>
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : OK Joplin syncro icon
# [TODO] OK Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc OK_joplinSyncro_icon* (): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : NEED Joplin syncro icon
# [TODO] NEED Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc NEED_joplinSyncro_icon* (): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : In Progress Joplin syncro icon
# [TODO] In Progress Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc InProgress_joplinSyncro_icon* (): string = tmpli html"""
"""