diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-04-18 19:37:51 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-04-18 19:37:51 +0200 |
commit | 37b769491028a86d697e8d18be09b6e0c1046046 (patch) | |
tree | 04c874f3b82afd81f2c9b27fd4b164e46711ce98 /templates | |
parent | 02670ba6a60af8db1818d6d3adaafc7810d14689 (diff) | |
download | guichet-37b769491028a86d697e8d18be09b6e0c1046046.tar.gz guichet-37b769491028a86d697e8d18be09b6e0c1046046.zip |
WIP templates
Diffstat (limited to 'templates')
-rw-r--r-- | templates/garage_key.html | 234 | ||||
-rw-r--r-- | templates/garage_website_list.html | 25 | ||||
-rw-r--r-- | templates/home.html | 33 | ||||
-rw-r--r-- | templates/layout.html | 2 |
4 files changed, 284 insertions, 10 deletions
diff --git a/templates/garage_key.html b/templates/garage_key.html new file mode 100644 index 0000000..d1c6864 --- /dev/null +++ b/templates/garage_key.html @@ -0,0 +1,234 @@ +{{define "title"}}Profile |{{end}} + +{{define "body"}} +<div class="d-flex"> + <h4>Mes identifiants</h4> + <a class="ml-auto btn btn-success" href="/garage/website">Mes sites webs</a> + <a class="ml-4 btn btn-info" href="/">Menu principal</a> +</div> + +<ul class="nav nav-tabs" id="proto" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" id="s3-tab" data-toggle="tab" href="#s3" role="tab" aria-controls="s3" aria-selected="true">S3</a> + </li> + <li class="nav-item"> + <a class="nav-link" id="sftp-tab" data-toggle="tab" href="#sftp" role="tab" aria-controls="sftp" aria-selected="false">SFTP</a> + </li> +</ul> + +<div class="tab-content" id="protocols"> + <div class="tab-pane fade show active" id="s3" role="tabpanel" aria-labelledby="s3-tab"> + <table class="table mt-4"> + <tbody> + <tr> + <th scope="row">Identifiant de clé</th> + <td>GKxxx</td> + </tr> + <tr> + <th scope="row">Clé secrète</th> + <td>...</td> + </tr> + <tr> + <th scope="row">Région</th> + <td>garage</td> + </tr> + <tr> + <th scope="row">Endpoint URL</th> + <td>https://garage.deuxfleurs.fr</td> + </tr> + <tr> + <th scope="row">Type d'URL</th> + <td>DNS et chemin (préférer chemin)</td> + </tr> + <tr> + <th scope="row">Signature</th> + <td>Version 4</td> + </tr> + </tbody> + </table> + + <p>Configurer votre logiciel :</p> + + <div class="accordion" id="softconfig"> + <div class="card"> + <div class="card-header" id="awscli-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#awscli" aria-expanded="false" aria-controls="awscli"> + awscli + </button> + </h2> + </div> + <div id="awscli" class="collapse show" aria-labelledby="awscli-title" data-parent="#softconfig"> + <div class="card-body"> + <p>Créez un fichier nommé <code>~/.awsrc</code> :</p> + <pre> +export AWS_ACCESS_KEY_ID=GK... +export AWS_SECRET_ACCESS_KEY=... +export AWS_DEFAULT_REGION='garage' + +function aws { command aws --endpoint-url https://garage.deuxfleurs.fr $@ ; } +aws --version + </pre> + <p>Ensuite vous pouvez utiliser awscli :</p> + <pre> +source ~/.awsrc +aws s3 ls +aws s3 ls s3://my-bucket +aws s3 cp /tmp/a.txt s3://my-bucket +... + </pre> + </div> + </div> + </div> + + <div class="card"> + <div class="card-header" id="minio-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#minio" aria-expanded="true" aria-controls="minio"> + Minio CLI + </button> + </h2> + </div> + + <div id="minio" class="collapse" aria-labelledby="minio-title" data-parent="#softconfig"> + <div class="card-body"> + <p>Vous pouvez configurer Minio CLI avec cette commande :</p> + <pre> +mc alias set \ + garage \ + https://garage.deuxfleurs.fr \ + GK... \ + ... \ + --api S3v4 + </pre> + <p>Et ensuite pour utiliser Minio CLI avec :</p> + <pre> +mc ls garage/ +mc cp /tmp/a.txt garage/my-bucket/a.txt +... + </pre> + </div> + </div> + </div> + + <div class="card"> + <div class="card-header" id="winscp-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#winscp" aria-expanded="true" aria-controls="winscp"> + WinSCP + </button> + </h2> + </div> + + <div id="winscp" class="collapse" aria-labelledby="winscp-title" data-parent="#softconfig"> + <div class="card-body"> + Reportez vous <a href="">au guide</a> + </div> + </div> + </div> + + <div class="card"> + <div class="card-header" id="hugo-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#hugo" aria-expanded="false" aria-controls="hugo"> + Hugo + </button> + </h2> + </div> + <div id="hugo" class="collapse" aria-labelledby="hugo-title" data-parent="#softconfig"> + <div class="card-body"> + <p>Dans votre fichier <code>config.toml</code>, rajoutez :</p> + <pre> +[[deployment.targets]] + URL = "s3://bucket?endpoint=garage.deuxfleurs.fr&s3ForcePathStyle=true&region=garage" + </pre> + <p>Assurez-vous d'avoir un fichier dans lequel les variables <code>AWS_ACCESS_KEY_ID</code> et <code>AWS_SECRET_ACCESS_KEY</code> sont définies, + ici on suppose que vous avez suivi les instructions de l'outil awscli (ci-dessus) et que vous avez un fichier <code>~/.awsrc</code> qui défini ces variables. + Ensuite : </p> + <pre> +source ~/.awsrc +hugo deploy + </pre> + </div> + </div> + </div> + + <div class="card"> + <div class="card-header" id="publii-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#publii" aria-expanded="false" aria-controls="publii"> + Publii + </button> + </h2> + </div> + <div id="publii" class="collapse" aria-labelledby="publii-title" data-parent="#softconfig"> + <div class="card-body"> + <em>Bientôt...</em> + </div> + </div> + </div> + </div> + </div> + + <!-- sftp --> + <div class="tab-pane fade" id="sftp" role="tabpanel" aria-labelledby="sftp-tab"> + <table class="table mt-4"> + <tbody> + <tr> + <th scope="row">Nom d'utilisateur-ice</th> + <td>(votre username guichet)</td> + </tr> + <tr> + <th scope="row">Mot de passe</th> + <td>(votre mot de passe guichet)</td> + </tr> + <tr> + <th scope="row">Hôte</th> + <td>sftp://bagage.deuxfleurs.fr</td> + </tr> + <tr> + <th scope="row">Port</th> + <td>2222</td> + </tr> + </tbody> + </table> + <p>Configurer votre logiciel :</p> + + <div class="accordion" id="softconfig2"> + <div class="card"> + <div class="card-header" id="filezilla-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#filezilla" aria-expanded="false" aria-controls="filezilla"> + scp + </button> + </h2> + </div> + <div id="filezilla" class="collapse show" aria-labelledby="filezilla-title" data-parent="#softconfig"> + <div class="card-body"> + <p>Un exemple avec SCP :</p> + <pre> +scp -oHostKeyAlgorithms=+ssh-rsa -P2222 -r ./public bagage.deuxfleurs.fr:mon_bucket/ + </pre> + </div> + </div> + </div> + <div class="card"> + <div class="card-header" id="filezilla-title"> + <h2 class="mb-0"> + <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#filezilla" aria-expanded="false" aria-controls="filezilla"> + Filezilla + </button> + </h2> + </div> + <div id="filezilla" class="collapse" aria-labelledby="filezilla-title" data-parent="#softconfig"> + <div class="card-body"> + <em>Bientôt</em> + </div> + </div> + </div> + </div> + + </div> +</div> + +{{end}} diff --git a/templates/garage_website_list.html b/templates/garage_website_list.html new file mode 100644 index 0000000..0931daf --- /dev/null +++ b/templates/garage_website_list.html @@ -0,0 +1,25 @@ +{{define "title"}}Sites webs |{{end}} + +{{define "body"}} + +<div class="d-flex"> + <h4>Sites webs</h4> + <a class="ml-auto btn btn-success" href="/garage/website/new">Nouveau site web</a> + <a class="ml-4 btn btn-info" href="/">Menu principal</a> +</div> + +<table class="table mt-4"> + <thead> + <th scope="col">ID</th> + <th scope="col">URLs</th> + </thead> + <tbody> + <tr> + <td> + <a href="/garage/website/b/aa">aa</a> + </td> + <td>aa</td> + </tr> + </tbody> +</table> +{{end}} diff --git a/templates/home.html b/templates/home.html index afa282f..241a59d 100644 --- a/templates/home.html +++ b/templates/home.html @@ -7,17 +7,30 @@ <div class="d-flex"> <a class="ml-auto btn btn-sm btn-dark" href="/logout">Se déconnecter</a> </div> -<div class="mt-3"></div> -<div class="card"> - <div class="card-header"> - Mon compte - </div> - <div class="list-group list-group-flush"> - <a class="list-group-item list-group-item-action" href="/profile">Modifier mon profil</a> - <a class="list-group-item list-group-item-action" href="/passwd">Modifier mon mot de passe</a> - <a class="list-group-item list-group-item-action" href="/directory">Annuaire</a> - </div> +<div class="mt-3"> + <div class="card"> + <div class="card-header"> + Mon compte + </div> + <div class="list-group list-group-flush"> + <a class="list-group-item list-group-item-action" href="/profile">Modifier mon profil</a> + <a class="list-group-item list-group-item-action" href="/passwd">Modifier mon mot de passe</a> + <a class="list-group-item list-group-item-action" href="/directory">Annuaire</a> + </div> + </div> +</div> + +<div class="mt-3"> + <div class="card"> + <div class="card-header"> + Garage + </div> + <div class="list-group list-group-flush"> + <a class="list-group-item list-group-item-action" href="/garage/key">Mes identifiants</a> + <a class="list-group-item list-group-item-action" href="/garage/website">Mes sites webs</a> + </div> + </div> </div> {{if .Login.CanInvite}} diff --git a/templates/layout.html b/templates/layout.html index 0a887ce..3f9851d 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -14,5 +14,7 @@ <hr /> {{template "body" .}} </div> + <script src="/static/javascript/jquery.slim.min.js"></script> + <script src="/static/javascript/bootstrap.bundle.min.js"></script> </body> </html> |