~evanj/cms

ref: 5ea155bcf5f48d777fb2e6b6d66d34e60119d24e cms/internal/v/html/_header.html -rw-r--r-- 3.4 KiB
5ea155bcEvan J Feat(dynamic): Dynamic content pages have been added (rather than 4 months ago
                                                                                
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
49
50
51
52
53
54
55
56
57
58
59
60
<header class='bg-primary'>
  <nav class='container navbar navbar-expand-lg navbar-dark'>
    <a class='navbar-brand' href='/'>
      <img width=50 height=50 src='/static/img/logo-white.svg'>
      <span class='d-none d-lg-inline'>Skipper CMS</span>
    </a>
    <button class='navbar-toggler' type='button' data-toggle='collapse' data-target='#navbarSupportedContent' aria-controls='navbarSupportedContent' aria-expanded='false' aria-label='Toggle navigation'>
      <span class='navbar-toggler-icon'></span>
    </button>
    <div class='collapse navbar-collapse' id='navbarSupportedContent'>
      <ul class='navbar-nav ml-auto'>
        {{ if .Space }}
        <li class='nav-item'><a class='nav-link' href='/'>Home</a></li>
        {{ end }}
        {{ if .ContentType }}
        <li class='nav-item'><a class='nav-link' href='/space/{{ .Space.ID }}'>{{ .Space.Name }}</a></li>
        {{ end }}
        {{ if .Hook }}
        <li class='nav-item'><a class='nav-link' href='/space/{{ .Space.ID }}'>{{ .Space.Name }}</a></li>
        {{ end }}
        {{ if .Content }}
        <li class='nav-item'><a class='nav-link' href='/contenttype/{{ .Space.ID}}/{{ .ContentType.ID }}'>{{ .ContentType.Name }}</a></li>
        {{ end }}
        {{ if and .Space (not .ContentType) (not .Hook) }}
          <li class='nav-item'><a data-toggle="modal" data-target="#copyModal" class='nav-link' href='#'>Copy</a></li>
          <li class='nav-item'><a data-toggle="modal" data-target="#updateModal" class='nav-link' href='#'>Update</a></li>
          <li class='nav-item'><a data-toggle="modal" data-target="#deleteModal" class='nav-link' href='#'>Delete</a></li>
        {{ end }}
        {{ if and .ContentType (not .Content) }}
          <li class='nav-item'><a data-toggle="modal" data-target="#updateModal" class='nav-link' href='#'>Update</a></li>
          <li class='nav-item'><a data-toggle="modal" data-target="#deleteModal" class='nav-link' href='#'>Delete</a></li>
        {{ end }}
        {{ if .Content }}
          <li class='nav-item'><input type=submit class="btn btn-link nav-link border-0" value=Save /></li>
          <li class='nav-item'><a data-toggle="modal" data-target="#deleteModal" class='nav-link' href='#'>Delete</a></li>
        {{ end }}
        {{ if .Hook }}
          <li class='nav-item'><a data-toggle="modal" data-target="#deleteModal" class='nav-link' href='#'>Delete</a></li>
        {{ end }}
        {{ if .User }}
          <li class='nav-item'>
            <form method=POST action='/user/logout' enctype='multipart/form-data'>
              <input type=submit class="btn btn-link nav-link border-0" value=Logout />
            </form>
          </li>
          {{if and .User (.User | paid)}}
            <li class='nav-item'><a data-toggle="modal" data-target="#inviteModal" class='nav-link' href='#'>Invite</a></li>
          {{end}}
          <li class='nav-item'><a class='nav-link' href='/page/billing'>Billing</a></li>
        {{ else }}
          <li class='nav-item'><a class='nav-link' href='/#signup'>Signup</a></li>
          <li class='nav-item'><a class='nav-link' href='/#login'>Login</a></li>
          <li class='nav-item'><a class='nav-link' href='/#pricing'>Pricing</a></li>
        {{ end}}
        <li class='nav-item'><a class='nav-link' href='/tour'>Tour</a></li>
        <li class='nav-item'><a class='nav-link' href='/doc'>Docs</a></li>
      </ul>
    </div>
  </nav>
</header>