Améliorations esthétiques

This commit is contained in:
Sylvain Philip 2024-09-09 21:28:02 +02:00
parent e2875ed7d0
commit ff8fe38a19
4 changed files with 15 additions and 5 deletions

View File

@ -5,7 +5,9 @@
$user = $this->params['user']; $user = $this->params['user'];
assert($user instanceof Piko\User); assert($user instanceof Piko\User);
if (!$this->title) $this->title = 'Openai'; $headerDark = $this->params['header_dark']?? false;
if (!$this->title) $this->title = 'IA Assistant';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= $this->params['language'] ?>"> <html lang="<?= $this->params['language'] ?>">
@ -25,13 +27,13 @@ if (!$this->title) $this->title = 'Openai';
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3"> <ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Assistant</a></li> <li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Assistant</a></li>
<li class="nav-item"><a class="nav-link" href="<?= $this->getUrl('site/ia/assistants') ?>">Gérer les assistants</a></li>
<?php /*if ($user->can('access.completion')): ?> <?php /*if ($user->can('access.completion')): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?= $this->getUrl('openai/v1/completions') ?>">Completions</a> <a class="nav-link" href="<?= $this->getUrl('openai/v1/completions') ?>">Completions</a>
</li> </li>
<?php endif */ ?> <?php endif */
?>
<?php /* if ($user->can('access.edit')): ?> <?php /* if ($user->can('access.edit')): ?>
<li class="nav-item"> <li class="nav-item">
@ -56,7 +58,7 @@ if (!$this->title) $this->title = 'Openai';
</div> </div>
</nav> </nav>
<button type="button" id="navBtn" class="hamburger is-closed" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" > <button type="button" id="navBtn" class="hamburger <?= $headerDark ? 'light' : '' ?> is-closed" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" >
<span class="hamb-top"></span> <span class="hamb-top"></span>
<span class="hamb-middle"></span> <span class="hamb-middle"></span>
<span class="hamb-bottom"></span> <span class="hamb-bottom"></span>

View File

@ -21,6 +21,8 @@ JS;
$this->registerJs($script); $this->registerJs($script);
$this->params['header_dark'] = true;
?> ?>
<div id="chat-app"></div> <div id="chat-app"></div>

View File

@ -402,7 +402,7 @@
</script> </script>
<header> <header>
<h1 class="text-center">{assistant_title}</h1> <h1 class="text-center fw-lighter">{assistant_title}</h1>
<div class="toolbar"> <div class="toolbar">
<button class="btn btn-primary" on:click={createAssistant} title="Créer un assistant"><span class="icon-add"></span></button> <button class="btn btn-primary" on:click={createAssistant} title="Créer un assistant"><span class="icon-add"></span></button>

View File

@ -21,6 +21,12 @@
background-color: #1a1a1a; background-color: #1a1a1a;
} }
&.light {
.hamb-top, .hamb-middle, .hamb-bottom {
background-color: #fff;
}
}
&.is-closed { &.is-closed {
&:before { &:before {
content: ''; content: '';