| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en" data-theme="light"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| gio | 18d5c68 | 2024-05-02 10:30:57 +0400 | [diff] [blame] | 6 | <title>dodo: Launcher</title> |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 7 | <link rel="stylesheet" type="text/css" href="/static/pico.2.0.6.min.css"> |
| 8 | <link rel="stylesheet" type="text/css" href="/static/launcher.css"> |
| 9 | </head> |
| 10 | <body class="container-fluid"> |
| 11 | <div id="left-panel"> |
| 12 | <div class="user-circle"> |
| 13 | <div class="circle"> |
| 14 | <p>{{ GetUserInitials .LoggedInUsername }}</p> |
| 15 | <div class="tooltip-user" id="tooltip-user"> |
| 16 | <p>{{ .LoggedInUsername }}</p> |
| 17 | <button id="logout-button">Log out</button> |
| 18 | </div> |
| 19 | </div> |
| 20 | </div> |
| 21 | <hr class="separator"> |
| 22 | <div class="app-list"> |
| 23 | {{range .AllAppsInfo}} |
| 24 | <div class="app-icon-tooltip" data-app-url="{{ .Url }}"> |
| 25 | <div class="icon"> |
| 26 | {{.Icon}} |
| 27 | </div> |
| 28 | <div class="tooltip"> |
| 29 | <p>{{ .Name }}</p> |
| Davit Tabidze | 9671846 | 2024-05-22 14:06:02 +0400 | [diff] [blame^] | 30 | {{ if .Url }} |
| 31 | <p>{{ .Url }}</p> |
| 32 | {{ end }} |
| 33 | {{ if .Help }} |
| 34 | <button class="help-button" id="help-button-{{ CleanAppName .Name }}">Help</button> |
| 35 | {{ end }} |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 36 | </div> |
| 37 | </div> |
| 38 | <dialog class="app-help-modal" id="modal-{{ CleanAppName .Name }}" close> |
| 39 | <article class="modal-article"> |
| 40 | <header> |
| 41 | <h4>{{ .Name }}</h4> |
| 42 | <button class="close-button" id="close-help-{{ CleanAppName .Name }}"> |
| 43 | <svg xmlns="http://www.w3.org/2000/svg" width="1.5em" height="1.5em" viewBox="0 0 32 32"><path fill="black" d="M16 2C8.2 2 2 8.2 2 16s6.2 14 14 14s14-6.2 14-14S23.8 2 16 2m5.4 21L16 17.6L10.6 23L9 21.4l5.4-5.4L9 10.6L10.6 9l5.4 5.4L21.4 9l1.6 1.6l-5.4 5.4l5.4 5.4z"/></svg> |
| 44 | </button> |
| 45 | </header> |
| 46 | <div class="app-help-modal-article"> |
| 47 | <div class="modal-left"> |
| gio | 106b024 | 2024-05-21 12:17:03 +0400 | [diff] [blame] | 48 | {{ template "help-menu-template" (dict "Help" .Help "First" true) }} |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 49 | </div> |
| 50 | <div class="modal-right" id="modal-right-help-content-{{ CleanAppName .Name }}"> |
| gio | 106b024 | 2024-05-21 12:17:03 +0400 | [diff] [blame] | 51 | <aside> |
| 52 | <nav> |
| 53 | {{ template "help-content-template" (dict "Help" .Help "First" true) }} |
| 54 | </nav> |
| 55 | </aside> |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 56 | </div> |
| 57 | </div> |
| 58 | </article> |
| 59 | </dialog> |
| 60 | {{end}} |
| 61 | </div> |
| 62 | </div> |
| 63 | <div id="right-panel"> |
| 64 | <iframe id="appFrame" width="100%" height="100%" frameborder="0"></iframe> |
| 65 | </div> |
| 66 | {{ define "help-menu-template" }} |
| gio | 106b024 | 2024-05-21 12:17:03 +0400 | [diff] [blame] | 67 | {{ $first := .First }} |
| 68 | <ul> |
| 69 | {{ range $i, $h := .Help }} |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 70 | <li> |
| gio | 106b024 | 2024-05-21 12:17:03 +0400 | [diff] [blame] | 71 | <a class="title-menu secondary" id="title-{{ CleanAppName $h.Title }}" {{ if (and $first (eq 0 $i)) }}aria-current="page"{{ end }}>{{ $h.Title }}</a> |
| 72 | {{ template "help-menu-template" (dict "Help" $h.Children "First" false) }} |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 73 | </li> |
| 74 | {{ end }} |
| 75 | </ul> |
| 76 | {{ end }} |
| gio | be7b724 | 2024-05-20 18:13:55 +0400 | [diff] [blame] | 77 | {{ define "help-content-template" }} |
| 78 | {{ $first := .First }} |
| 79 | {{ range $i, $h := .Help }} |
| 80 | <div class="help-content" id="help-content-{{ CleanAppName $h.Title }}" {{ if (and $first (eq 0 $i)) }}style="display: block;"{{ end }}> {{ $h.Contents }}</div> |
| 81 | {{ template "help-content-template" (dict "Help" $h.Children "First" false) }} |
| Davit Tabidze | 207ce08 | 2024-04-09 19:15:25 +0400 | [diff] [blame] | 82 | {{ end }} |
| 83 | {{ end }} |
| 84 | <script src="/static/launcher.js"></script> |
| 85 | </body> |
| 86 | </html> |