go-skeletor/templates/base.tmpl

257 lines
10 KiB
Cheetah

<html>
<head>
<title>{{ .conf.AppName }}</title>
<link rel="shortcut icon" href="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogolight}}" />
<script src="/public/lib/jquery/jquery.min.js"></script>
<script src="/public/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/public/lib/spectrum/spectrum.min.js"></script>
<script src="/public/lib/ckeditor/ckeditor.js"></script>
<script src="/public/lib/dropzone/dropzone.min.js"></script>
<script src="/public/lib/iframeresizer/iframeResizer.min.js"></script>
<script src="/public/lib/iframeresizer/iframeResizer.contentWindow.min.js"></script>
<script src="/public/lib/cropperjs/cropper.min.js"></script>
<script src="/public/lib/datatables/datatables.min.js"></script>
<script src="/public/lib/datatables/datatables.init.js"></script>
<link href="/public/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/public/lib/fontawesome/css/all.min.css" rel="stylesheet">
<link href="/public/lib/spectrum/spectrum.min.css" rel="stylesheet">
<link href="/public/lib/dropzone/dropzone.min.css" rel="stylesheet">
<link href="/public/lib/cropperjs/cropper.min.css" rel="stylesheet">
<link href="/public/lib/datatables/datatables.min.css" rel="stylesheet">
<script src="/public/theme/style.js"></script>
<link href="/public/theme/font.css" rel="stylesheet">
<link href="/public/theme/style.css" rel="stylesheet">
<style>
:root{
--colorbgbodydark: {{ .conf.AppColorbgbodydark }};
--colorftbodydark: {{ .conf.AppColorftbodydark }};
--colorfttitledark: {{ .conf.AppColorfttitledark }};
--colorbgbodylight: {{ .conf.AppColorbgbodylight }};
--colorftbodylight: {{ .conf.AppColorftbodylight }};
--colorfttitlelight: {{ .conf.AppColorfttitlelight }};
--colorbgbodylightdarker: {{ .conf.AppColorbgbodylightdarker }};
--colorfttitlelightdarker: {{ .conf.AppColorfttitlelightdarker }};
--colorbgbodydarkdarker: {{ .conf.AppColorbgbodydarkdarker }};
--colorfttitledarkdarker: {{ .conf.AppColorfttitledarkdarker }};
--fontsizeh1: {{.conf.AppFontsizeh1}}px;
--fontsizeh2: {{.conf.AppFontsizeh2}}px;
--fontsizeh3: {{.conf.AppFontsizeh3}}px;
--fontsizeh4: {{.conf.AppFontsizeh4}}px;
--fontsizebody: {{.conf.AppFontsize}}px;
--fontbody: "{{ .conf.AppFontbody }}";
--fonttitle: "{{ .conf.AppFonttitle }}";
}
// Font
body {
font-family: var(--fontbody);
}
h1,h2,h3, .navbar-brand, .card-header, .modal-header h4 {
font-family: var(--fonttitle);
}
// Background
body {
background-color: var(--colorbgbodylight);
}
.navbar.bg-dark, #sidebar, .avatar {
background-color: var(--colorbgbodydark)!important;
}
.card {
background-color: var(--colorbgbodylight);
}
.card-header {
background-color: var(--colorbgbodylightdarker);
}
.bodydark {
background-color: var(--colorbgbodydark);
}
// Color
body, .table, .table-striped>tbody>tr:nth-of-type(odd) {
color: var(--colorftbodylight);
}
h1,h2,h3,h4 {
color: var(--colorfttitlelight);
}
a, .btn-link {
color: var(--colorfttitlelight);
}
a:hover, .btn-link:hover {
color: var(--colorfttitlelightdarker);
}
.navbar-dark .navbar-nav .nav-link {
color: var(--colorfttitledarkdarker);
}
.navbar-dark .navbar-nav .nav-link:hover {
color: var(--colorfttitledark);
}
.navbar-dark .navbar-nav .nav-section {
color: var(--colorfttitledark);
}
.card-header {
color: var(--colorfttitlelight);
}
.bodydark h1,.bodydark h2,.bodydark h3,.bodydark h4 {
color: var(--colorfttitledark);
}
// Size
body, .table {
font-size: var(--fontsizebody);
}
h1 {
font-size: var(--fontsizeh1);
}
h2 {
font-size: var(--fontsizeh2);
}
h3 {
font-size: var(--fontsizeh3);
}
h4 {
font-size: var(--fontsizeh4);
}
</style>
</head>
<body>
{{if .useheader}}
<header class="header">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand my-auto align-middle" href="{{.conf.AppRoutes.home}}">
<img id="logo" src="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogodark}}" style="height:40px; margin-right:10px;">
{{ .conf.AppName }}
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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 me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="{{.conf.AppRoutes.home}}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled">Disabled</a>
</li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0 ml-auto">
{{ if .session.Login }}
<li class="nav-item my-auto">
<a class="nav-link" href="{{.conf.AppRoutes.userprofil}}">
<img class="avatar" src="{{.conf.AppWeburl}}/uploads/avatar/{{.session.Avatar}}" style="height:40px">
</a>
</li>
{{ if eq .session.Role "10" }}
<li class="nav-item my-auto">
<a class="nav-link" href="{{.conf.AppRoutes.homeconfig}}"><i class="fas fa-cog fa-2x"></i></a>
</li>
{{ end }}
<li class="nav-item my-auto">
<a class="nav-link" href="{{.conf.AppRoutes.securitylogout}}"><i class="fas fa-sign-out-alt fa-2x"></i></a>
</li>
{{ else }}
<li class="nav-item my-auto">
<a class="nav-link" href="{{.conf.AppRoutes.securitylogin}}"><i class="fas fa-sign-in-alt fa-2x"></i></a>
</li>
{{ end }}
</ul>
</div>
</div>
</nav>
</header>
{{end}}
{{if .usesidebar}}
<div class="d-flex align-items-stretch">
<div id="sidebar" class="navbar-dark bg-dark p-3">
<ul class="navbar-nav flex-column">
<li class="nav-item nav-link nav-section">Configuration</li>
<li class="nav-item">
<a class="nav-link" href="{{.conf.AppRoutes.configlist}}" title="Générale">
<i class="fa fa-cog"></i><span class="nav-title px-2">Générale</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/bfcnature/admin/theme" title="Thème">
<i class="fa fa-paint-brush"></i><span class="nav-title px-2">Thème</span>
</a>
</li>
<li class="nav-item nav-link nav-section">Organisation</li>
<li class="nav-item">
<a class="nav-link" href="{{.conf.AppRoutes.userlist}}" title="Utilisateurs">
<i class="fa fa-user"></i><span class="nav-title px-2">Utilisateurs</span>
</a>
</li>
</ul>
</div>
<div id="sidecontent" class="m-3" style="width:100%">
{{ yield }}
</div>
</div>
{{else}}
{{if .usecontainer}}<div class="container mt-3">{{end}}
{{ yield }}
{{if .usecontainer}}</div>{{end}}
{{end}}
<div id="mymodallarge" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
<button type="button" class="btn close" data-dismiss="modal" aria-label="Close" onClick="$('#mymodallarge').modal('hide')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<iframe class="resizeframe" frameborder=0 width="100%" scrolling="no"></iframe>
</div>
</div>
</div>
</div>
</body>
</html>