aboutsummaryrefslogtreecommitdiff
path: root/templates/gititem.qtpl
blob: 156325fbd57ebd0af7e29796862108bb9d178e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% code
type GitItemPage struct {
}
%}


{% func insertIfEqual(s, d Selection) %}{% if s == d %} selected{% endif %}{% endfunc %}


{% func Navbar (s Selection) %}
        <nav class="container navbar navbar-expand">
          <div class="navbar-nav">
            <a class="nav-link{%= insertIfEqual(s, Git) %}" href="/">git</a>
            <a class="nav-link{%= insertIfEqual(s, List) %}" href="/list">list</a>
            <a class="nav-link{%= insertIfEqual(s, About) %}" href="/about">about</a>
            <a class="nav-link{%= insertIfEqual(s, Config) %}" href="/config">config</a>
          </div>
        </nav>
{% endfunc %}

{% func (p *GitItemPage) Title() %}Git | List{% endfunc %}

{% func (p *GitItemPage) Navbar() %}{%= Navbar(Git) %}{% endfunc %}

{% func (p *GitItemPage) Content() %}
<div class="row">
    <h3>AoC2022.git</h3>
</div>
<div class="row">
  <ul class="nav">
    <li class="nav-item">
      <a class="nav-link" aria-current="page" href="#">about</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" aria-current="page" href="#">summary</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" aria-current="page" href="#">refs</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" aria-current="page" href="#">tree</a>
    </li>
  </ul>
</div>
{% endfunc %}

{% func (p *GitItemPage) Script() %}
{% endfunc %}