Del our-story + translate work + button editor work + work
continuous-integration/drone/push Build is passing Details

pull/15/head
Matis MAZINGUE 11 months ago
parent 0e97f37bff
commit dfaf146cd5

21
package-lock.json generated

@ -30,6 +30,7 @@
"rxjs": "~7.8.1",
"sse.js": "^2.4.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1",
"zone.js": "~0.14.5"
},
"devDependencies": {
@ -13050,6 +13051,15 @@
"websocket-driver": "^0.7.4"
}
},
"node_modules/sockjs/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/socks": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz",
@ -14007,10 +14017,13 @@
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"uuid": "dist/bin/uuid"
}

@ -34,6 +34,7 @@
"rxjs": "~7.8.1",
"sse.js": "^2.4.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1",
"zone.js": "~0.14.5"
},
"devDependencies": {

@ -1,24 +1,22 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {EditorComponent} from './components/editor/editor.component';
import {LandingPageComponent} from './components/landing-page/landing-page.component';
import {DocumentationComponent} from './components/documentation/documentation.component';
import {FormComponent} from './components/form/form.component';
import {TermsOfServiceComponent} from './components/terms-of-service/terms-of-service.component';
import {OurStoryComponent} from './components/our-story/our-story.component';
import {PrivacyPolicyComponent} from './components/privacy-policy/privacy-policy.component';
import {WorksListComponent} from "./components/works-list/works-list.component";
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { WorkComponent } from './components/work/work.component';
import { EditorComponent } from './components/editor/editor.component';
import { LandingPageComponent } from './components/landing-page/landing-page.component';
import { DocumentationComponent } from './components/documentation/documentation.component';
import { FormComponent } from './components/form/form.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
// Toutes les routes de l'application sont définies ici
const routes: Routes = [
{path: '', component: LandingPageComponent},
{path: 'editor', component: EditorComponent},
{path: 'documentation', component: DocumentationComponent},
{path: 'contact', component: FormComponent},
{path: 'our-story', component: OurStoryComponent},
{path: 'terms-of-service', component: TermsOfServiceComponent},
{path: 'privacy-policy', component: PrivacyPolicyComponent},
{path: 'works', component: WorksListComponent},
{ path: '', component: LandingPageComponent },
{ path: 'work', component: WorkComponent },
{ path: 'editor', component: EditorComponent },
{ path: 'documentation', component: DocumentationComponent },
{ path: 'contact', component: FormComponent },
{ path: 'terms-of-service', component: TermsOfServiceComponent },
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
];
@NgModule({

@ -1,112 +1,133 @@
<div id="editor">
<div id="editor-bar-header">
<div class="editor-section-bar-header">
<div class="param-editor">
<label for="fileInput">
<svg
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M1 5C1 3.34315 2.34315 2 4 2H8.55848C9.84977 2 10.9962 2.82629 11.4045 4.05132L11.7208 5H20C21.1046 5 22 5.89543 22 7V9.00961C23.1475 9.12163 23.9808 10.196 23.7695 11.3578L22.1332 20.3578C21.9603 21.3087 21.132 22 20.1654 22H3C1.89543 22 1 21.1046 1 20V5ZM20 9V7H11.7208C10.8599 7 10.0956 6.44914 9.82339 5.63246L9.50716 4.68377C9.37105 4.27543 8.98891 4 8.55848 4H4C3.44772 4 3 4.44772 3 5V12.2709L3.35429 10.588C3.54913 9.66249 4.36562 9 5.31139 9H20ZM3.36634 20C3.41777 19.9109 3.4562 19.8122 3.47855 19.706L5.31139 11L21 11H21.8018L20.1654 20L3.36634 20Z"
fill="#000000"></path>
</g>
</svg>
</label>
<input
style="display: none"
type="file"
id="fileInput"
(change)="loadFromFile($event)"/>
</div>
<div id="editor-bar-header">
<div class="editor-section-bar-header">
<div class="param-editor">
<label for="fileInput">
<svg
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M1 5C1 3.34315 2.34315 2 4 2H8.55848C9.84977 2 10.9962 2.82629 11.4045 4.05132L11.7208 5H20C21.1046 5 22 5.89543 22 7V9.00961C23.1475 9.12163 23.9808 10.196 23.7695 11.3578L22.1332 20.3578C21.9603 21.3087 21.132 22 20.1654 22H3C1.89543 22 1 21.1046 1 20V5ZM20 9V7H11.7208C10.8599 7 10.0956 6.44914 9.82339 5.63246L9.50716 4.68377C9.37105 4.27543 8.98891 4 8.55848 4H4C3.44772 4 3 4.44772 3 5V12.2709L3.35429 10.588C3.54913 9.66249 4.36562 9 5.31139 9H20ZM3.36634 20C3.41777 19.9109 3.4562 19.8122 3.47855 19.706L5.31139 11L21 11H21.8018L20.1654 20L3.36634 20Z"
fill="#000000"></path>
</g>
</svg>
</label>
<input
style="display: none"
type="file"
id="fileInput"
(change)="loadFromFile($event)" />
</div>
<div class="param-editor">
<button class="button-icon" type="button" (click)="saveToFile()">
<svg
width="800px"
height="800px"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M3 15C3 17.8284 3 19.2426 3.87868 20.1213C4.75736 21 6.17157 21 9 21H15C17.8284 21 19.2426 21 20.1213 20.1213C21 19.2426 21 17.8284 21 15"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"/>
<path
d="M12 3V16M12 16L16 11.625M12 16L8 11.625"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"/>
</svg>
</button>
</div>
<div class="param-editor">
<button class="button-icon" type="button" (click)="addToDatabase()">
ADD BDD
</button>
</div>
</div>
<div class="editor-section-bar-header">
@if (errorMessage) {
<div class="param-editor">
<p style="color: red">{{ errorMessage }}</p>
</div>
}
<div class="param-editor">
<button class="button-icon" type="button" (click)="saveToFile()">
<svg
width="800px"
height="800px"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M3 15C3 17.8284 3 19.2426 3.87868 20.1213C4.75736 21 6.17157 21 9 21H15C17.8284 21 19.2426 21 20.1213 20.1213C21 19.2426 21 17.8284 21 15"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round" />
<path
d="M12 3V16M12 16L16 11.625M12 16L8 11.625"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round" />
</svg>
</button>
</div>
<div class="param-editor">
<button class="button-icon" type="button" (click)="addToDatabase()">
ADD BDD
</button>
</div>
<div class="param-editor">
<button
class="btn-share"
type="button"
(click)="shareButtonClicked()"
[disabled]="isLoaded">
{{ 'Work.Share' | translate }}
</button>
</div>
<select id="language" [(ngModel)]="selectedLanguage">
@for (language of languages; track language.name) {
<option [ngValue]="language">{{ language.name }}</option>
}
</select>
<!--TODO if userID de la session =! userID du work then btn-save.style(display : none) else btn-save.style(display : block)-->
<div class="param-editor">
<button
class="btn-save"
type="button"
(click)="saveButtonClicked()"
[disabled]="isLoaded">
{{ 'Work.Save' | translate }}
</button>
</div>
</div>
<div class="editor-section-bar-header">
@if (errorMessage) {
<div class="param-editor">
<p style="color: red">{{ errorMessage }}</p>
</div>
}
<div class="param-editor">
<button
class="button-icon button-run"
type="button"
(click)="onRunButtonClicked()"
[disabled]="isLoaded">
<div>RUN</div>
<svg
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
fill="#000000">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path
d="M2.78 2L2 2.41v12l.78.42 9-6V8l-9-6zM3 13.48V3.35l7.6 5.07L3 13.48z"></path>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6 14.683l8.78-5.853V8L6 2.147V3.35l7.6 5.07L6 13.48v1.203z"></path>
</g>
</svg>
</button>
</div>
</div>
</div>
<select id="language" [(ngModel)]="selectedLanguage">
@for (language of languages; track language.name) {
<option [ngValue]="language">{{ language.name }}</option>
}
</select>
<div class="editor-center">
<div class="editor-child-element">
<codemirror6-editor [(ngModel)]="editorContent" [extensions]="extensions">
</codemirror6-editor>
</div>
<div class="editor-child-element">
<pre id="resultDiv" [innerHTML]="resultContent | safeHTML"></pre>
</div>
</div>
<div class="param-editor">
<button
class="button-icon button-run"
type="button"
(click)="onRunButtonClicked()"
[disabled]="isLoaded">
<div>RUN</div>
<svg
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
fill="#000000">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<path
d="M2.78 2L2 2.41v12l.78.42 9-6V8l-9-6zM3 13.48V3.35l7.6 5.07L3 13.48z"></path>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6 14.683l8.78-5.853V8L6 2.147V3.35l7.6 5.07L6 13.48v1.203z"></path>
</g>
</svg>
</button>
</div>
</div>
</div>
<div class="editor-center">
<div class="editor-child-element">
<codemirror6-editor [(ngModel)]="editorContent" [extensions]="extensions">
</codemirror6-editor>
</div>
<div class="editor-child-element">
<pre id="resultDiv" [innerHTML]="resultContent | safeHTML"></pre>
</div>
</div>
</div>
Propulsé par Gitea Version: 1.18.0 Page: 34ms Modèle: 1ms Licences API

@ -72,3 +72,26 @@ select {
::ng-deep .codemirror6-editor {
height: 100%;
}
// @mixin btn-styles($bg-color, $font-color) {
// background-color: $bg-color;
// color: $font-color;
// border: none;
// color: white;
// padding: 12px 16px;
// font-size: 16px;
// width: 100px;
// cursor: pointer;
// border-radius: 10px;
// }
// .btn-save {
// @include btn-styles(green, white);
// }
// .btn-save {
// @include btn-styles(red, white);
// }

@ -5,6 +5,7 @@ import {CodeMirrorComponent} from '@sandkasten/codemirror6-editor';
import {LanguageDescription} from '@codemirror/language';
import {CODE_DEFAULTS, LANGUAGES} from '../languages';
import {SafeHTMLPipe} from '../../safe-html.pipe';
import { TranslateModule } from '@ngx-translate/core';
import {ReactiveFormsModule, FormsModule} from '@angular/forms';
import {
keymap,
@ -36,7 +37,7 @@ import {
closeBracketsKeymap,
} from '@codemirror/autocomplete';
import {lintKeymap} from '@codemirror/lint';
import {WorksService} from "../../services/works.service";
import {WorkService} from "../../services/work.service";
const basicSetup: Extension = (() => [
highlightActiveLineGutter(),
@ -76,6 +77,7 @@ const basicSetup: Extension = (() => [
ReactiveFormsModule,
FormsModule,
SafeHTMLPipe,
TranslateModule
],
})
export class EditorComponent {
@ -135,7 +137,7 @@ export class EditorComponent {
this.languageCompartment.of(this.selectedLanguage.support!),
];
constructor(private codeExecutionService: CodeExecutionService, protected workService: WorksService) {
constructor(private codeExecutionService: CodeExecutionService, protected workService: WorkService) {
}
// Efface le contenu de l'éditeur
@ -173,7 +175,7 @@ export class EditorComponent {
this.errorMessage = `Unsupported language. Please select one of the following languages: ${extensions.join(', ')}.`;
console.error(this.errorMessage);
}
saveToFile() {
const blob = new Blob([this.editorContent], {type: 'text/plain'});
const a = document.createElement('a');
@ -186,5 +188,8 @@ export class EditorComponent {
this.workService.postWorkCode(this.editorContent);
}
shareButtonClicked(){}
saveButtonClicked(){}
protected readonly console = console;
}

@ -5,11 +5,27 @@
</head>
<div class="footer">
<span class="footer--rights"
>Copyright © 2024 Sandcasten. All rights reserved.</span
>
<span class="footer--rights">{{ 'FooterPage.Rights' | translate }}</span>
<span class="footer__links">
<a>Mentions légales</a> - <a>Politique de confidentialité</a> -
<a>Conditions générales d'utilisation</a>
<a
routerLink="terms-of-service"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
>{{ 'FooterPage.Legal' | translate }}</a
>
-
<a
routerLink="privacy-policy"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
>{{ 'FooterPage.Privacy' | translate }}</a
>
-
<a
routerLink="terms-of-service"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
>{{ 'FooterPage.Terms' | translate }}</a
>
</span>
</div>

@ -19,6 +19,8 @@
a {
cursor: pointer;
text-decoration: none;
color: $color-gray;
}
}
}

@ -27,6 +27,14 @@
</div>
<nav class="right_part--menu">
<!--[routerLink]="getLastWorkLink()"-->
<a
routerLink="work"
routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
>{{ 'HeaderPage.Work' | translate }}</a
>
<a
routerLink="editor"
routerLinkActive="active"

@ -11,6 +11,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { NgClass, NgOptimizedImage } from '@angular/common';
import { WorkService } from '../../services/work.service';
@Component({
selector: 'app-header',
@ -36,7 +37,7 @@ export class HeaderComponent {
@Input() themeService!: ThemeService;
// Instanciation du service pour les actions de traduction
constructor(private translationService: TranslationService) {}
constructor(private translationService: TranslationService, private workService: WorkService) { }
// Méthode pour changer la langue
onLanguageChange(event: Event) {
@ -63,4 +64,9 @@ export class HeaderComponent {
document.body.classList.remove('no-scroll');
}
}
getLastWorkLink() : string {
return 'work/'.concat(this.workService.getIdLastWorkByUserId(""))
}
}

@ -17,8 +17,7 @@
class="landing-page__hero_left__buttons--editor--image"
src="assets/img/logo.png"
alt="editor icon" />
<!--TODO - Add trad-->
<span>Editeur de code</span>
<span>{{ 'LandingPage.Bouton1' | translate }}</span>
</button>
<a href="https://codefirst.iut.uca.fr/git/sandkasten">
<button class="landing-page__hero_left__buttons--git">
@ -26,8 +25,7 @@
class="landing-page__hero_left__buttons--git--image"
src="assets/img/landing-page/gitea.png"
alt="editor icon" />
<!--TODO - Add trad-->
<span>Dépôt Git</span>
<span>{{ 'LandingPage.Bouton2' | translate }}</span>
</button>
</a>
</div>
@ -35,8 +33,8 @@
<div class="landing-page__hero_right">
<img
class="landing-page__hero_right--image"
src="assets/img/landing-page/cross.png"
alt="landing page" />
src="assets/img/logo.png"
alt="Sandkasten Logo" />
</div>
</div>
<!--endregion-->
@ -45,12 +43,11 @@
<div class="landing-page__informations">
<div class="landing-page__informations_top">
<h2 class="landing-page__informations_top--title">
Ce dont vous avez besoin de savoir sur notre éditeur
{{ 'LandingPage.Top.Tittle' | translate }}
</h2>
<span class="landing-page__informations_top--description"
>Astro comes batteries included. It takes the best parts of
state-of-the-art tools and adds its own innovations.</span
>
<span class="landing-page__informations_top--description">{{
'LandingPage.Top.Description' | translate
}}</span>
</div>
<div class="landing-page__informations--lists">
<!--SECURITE-->
@ -73,12 +70,11 @@
</g>
</svg>
</div>
<div class="landing-page__informations__list--title">Sécurisé</div>
<div class="landing-page__informations__list--title">
{{ 'LandingPage.List.Tittle1' | translate }}
</div>
<div class="landing-page__informations__list--description">
Pour garantir la solidité de notre outil nous exécutons votre code
sur un environnement fermé et limitant les requêtes trop coûteuse.
Ce procédé nous protège ainsi des tentatives de mauvaise utilisation
du système.
{{ 'LandingPage.List.Text1' | translate }}
</div>
</div>
<!--Import-->
@ -98,12 +94,10 @@
</svg>
</div>
<div class="landing-page__informations__list--title">
Import / Export
{{ 'LandingPage.List.Tittle2' | translate }}
</div>
<div class="landing-page__informations__list--description">
Vous pouvez importez des fichiers et l'éditeur va reconnaître le
langage à partir de son extension. Vous pouvez aussi exporter le
code que vous avez fait en seulement un clic.
{{ 'LandingPage.List.Text2' | translate }}
</div>
</div>
<!--Options-->
@ -139,11 +133,11 @@
</g>
</svg>
</div>
<div class="landing-page__informations__list--title">Options</div>
<div class="landing-page__informations__list--title">
{{ 'LandingPage.List.Tittle3' | translate }}
</div>
<div class="landing-page__informations__list--description">
Vous disposez de nombreuses options vous permettant de personnalisé
et d'optimiser votre utilisation de Sandkasten. Ces options sont
directement disponible depuis l'éditeur.
{{ 'LandingPage.List.Text3' | translate }}
</div>
</div>
<!--Multi-language-->
@ -172,13 +166,10 @@
</svg>
</div>
<div class="landing-page__informations__list--title">
Multi-language
{{ 'LandingPage.List.Tittle4' | translate }}
</div>
<div class="landing-page__informations__list--description">
De nombreux langages de codes sont reconnus dans Sandkasten. Lorsque
vous taper du code ou en importer un fichier l'éditeur reconnaît
automatiquement le langage. Vous pouvez aussi directement le
sélectionner dans l'éditeur.
{{ 'LandingPage.List.Text4' | translate }}
</div>
</div>
<!--TODO-->
@ -197,11 +188,11 @@
</g>
</svg>
</div>
<div class="landing-page__informations__list--title">Lorem ipsum</div>
<div class="landing-page__informations__list--title">
{{ 'LandingPage.List.Tittle5' | translate }}
</div>
<div class="landing-page__informations__list--description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam,
{{ 'LandingPage.List.Text5' | translate }}
</div>
</div>
<!--TODO-->
@ -220,11 +211,11 @@
</g>
</svg>
</div>
<div class="landing-page__informations__list--title">Lorem ipsum</div>
<div class="landing-page__informations__list--title">
{{ 'LandingPage.List.Tittle6' | translate }}
</div>
<div class="landing-page__informations__list--description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam,
{{ 'LandingPage.List.Text6' | translate }}
</div>
</div>
</div>
@ -233,9 +224,9 @@
<!--region Technologies-->
<div class="landing-page__technologies">
<span class="landing-page__technologies--title"
>Languages disponibles dès maintenant</span
>
<span class="landing-page__technologies--title">{{
'LandingPage.Technologie.Tittle' | translate
}}</span>
<div class="landing-page__technologies__list">
<!--C-->
<a href="https://www.open-std.org/jtc1/sc22/wg14/">
@ -313,12 +304,10 @@
<div class="landing-page__about">
<div class="landing-page__about__titles">
<h2 class="landing-page__about--title">
Empowering the world with Astro.
{{ 'LandingPage.About.Tittle' | translate }}
</h2>
<div class="landing-page__about--description">
We're a multi-cultural team from around the world! We come from
diverse backgrounds, bringing different personalities, experiences and
skills to the job. This is what makes our team so special.
{{ 'LandingPage.About.Text' | translate }}
</div>
</div>
<div class="landing-page__about__members">
@ -330,7 +319,7 @@
<div class="landing-page__about__member--texts">
<div class="landing-page__about__member--texts--name">Bastien</div>
<div class="landing-page__about__member--texts--role">
Développeur
{{ 'LandingPage.MemberRole' | translate }}
</div>
</div>
</div>
@ -342,7 +331,7 @@
<div class="landing-page__about__member--texts">
<div class="landing-page__about__member--texts--name">Clément</div>
<div class="landing-page__about__member--texts--role">
Développeur
{{ 'LandingPage.MemberRole' | translate }}
</div>
</div>
</div>
@ -354,7 +343,7 @@
<div class="landing-page__about__member--texts">
<div class="landing-page__about__member--texts--name">Colin</div>
<div class="landing-page__about__member--texts--role">
Développeur
{{ 'LandingPage.MemberRole' | translate }}
</div>
</div>
</div>
@ -366,7 +355,7 @@
<div class="landing-page__about__member--texts">
<div class="landing-page__about__member--texts--name">Hugo</div>
<div class="landing-page__about__member--texts--role">
Développeur
{{ 'LandingPage.MemberRole' | translate }}
</div>
</div>
</div>
@ -378,7 +367,7 @@
<div class="landing-page__about__member--texts">
<div class="landing-page__about__member--texts--name">Matis</div>
<div class="landing-page__about__member--texts--role">
Développeur
{{ 'LandingPage.MemberRole' | translate }}
</div>
</div>
</div>
@ -388,9 +377,9 @@
<!--region Socials-->
<div class="landing-page__socials">
<span class="landing-page__socials--title"
>Rejoinez-nous sur nos réseaux</span
>
<span class="landing-page__socials--title">{{
'LandingPage.SocialTittle' | translate
}}</span>
<div class="landing-page__socials__list">
<!--Twitter-->
<a href="https://twitter.com/Sandkasten3a">
@ -454,13 +443,14 @@
<!--region Get Started-->
<div class="landing-page__get_started">
<h3 class="landing-page__get_started--title">Allez essayer Sandkasten</h3>
<h3 class="landing-page__get_started--title">
{{ 'LandingPage.GetStarted.Tittle' | translate }}
</h3>
<div class="landing-page__get_started--description">
Rejoignez dès maintenant la communauté Sandkasten en testant notre
éditeur !
{{ 'LandingPage.GetStarted.Description' | translate }}
</div>
<button class="landing-page__get_started--button" routerLink="/editor">
Get Started
{{ 'LandingPage.GetStarted.Button' | translate }}
</button>
</div>
<!--endregion-->

@ -1,36 +0,0 @@
<body>
<main>
<div>
<img class="colin" [src]="colin" alt="Photo-Colin" />
<h1>COLIN FRIZOT</h1>
<p>Bonjour, je suis Colin, un poisson développeur. (fraude)</p>
<img class="hugo" [src]="hugo" alt="Photo-Hugo" />
<h1>HUGO PRADIER</h1>
<p>
Bonjour, je suis Hugo, un développeur bientôt chauve. (suit tous les
tutos en ligne, mais ça marche jamais)
</p>
<img class="bastien" [src]="bastien" alt="Photo-Bastien" />
<h1>BASTIEN OLLIER</h1>
<p>
Bonjour, je suis Bastien, un développeur visuellement parlant, très
puant. (connaît l'adresse de la grand-mère de Colin)
</p>
<img class="clement" [src]="clement" alt="Photo-Clement" />
<h1>CLÉMENT FRÉVILLE</h1>
<p>
Bonjour, je suis Clément, un développeur meilleur que tes profs. (dieu)
</p>
<img class="matis" [src]="matis" alt="Photo-Matis" />
<h1>MATIS MAZINGUE</h1>
<p>
Bonjour, je suis Matis, un "développeur". (est là que pour l'argent,
mais il est nul)
</p>
</div>
</main>
</body>

@ -1,22 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OurStoryComponent } from './our-story.component';
describe('OurStoryComponent', () => {
let component: OurStoryComponent;
let fixture: ComponentFixture<OurStoryComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [OurStoryComponent],
}).compileComponents();
fixture = TestBed.createComponent(OurStoryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -1,22 +0,0 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-our-story',
templateUrl: './our-story.component.html',
styleUrl: './our-story.component.scss',
standalone: true,
})
export class OurStoryComponent {
constructor(private router: Router) {}
colin: string = 'assets/img/colin.png';
hugo: string = 'assets/img/hugo.png';
bastien: string = 'assets/img/bastien.png';
clement: string = 'assets/img/clement.png';
matis: string = 'assets/img/matis.png';
// Si click sur "Run", on redirige vers la page de notre histoire
onContinue(): void {
this.router.navigateByUrl('/our-story');
}
}

@ -0,0 +1,37 @@
<div>
<h2>Works</h2>
<ul>
<li *ngFor="let work of works">
{{ work.id_work }} - {{ work.link }} - {{ work.content }}
</li>
</ul>
<form #addBookForm="ngForm" (ngSubmit)="onSubmit(addBookForm)">
<div class="form-group">
<label for="link">Link</label>
<input
type="text"
class="form-control"
id="link"
name="link"
ngModel
required />
</div>
<div class="form-group">
<label for="content">Content</label>
<input
type="text"
class="form-control"
id="content"
name="content"
ngModel
required />
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<!--<app-editor></app-editor>-->
</div>

@ -1,18 +1,18 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { WorksListComponent } from './works-list.component';
import { WorkComponent } from './work.component';
describe('WorksListComponent', () => {
let component: WorksListComponent;
let fixture: ComponentFixture<WorksListComponent>;
describe('WorkComponent', () => {
let component: WorkComponent;
let fixture: ComponentFixture<WorkComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [WorksListComponent]
imports: [WorkComponent]
})
.compileComponents();
fixture = TestBed.createComponent(WorksListComponent);
fixture = TestBed.createComponent(WorkComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
@ -21,3 +21,5 @@ describe('WorksListComponent', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,56 @@
import { Component, OnInit } from '@angular/core';
import { Router, RouterLink } from '@angular/router';
import { ThemeService } from '../../services/theme.service';
import { NgClass } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import {Work} from "../../models/work.model";
import {WorkService} from "../../services/work.service";
import {NgForOf} from "@angular/common";
import {FormsModule, NgForm} from "@angular/forms";
@Component({
selector: 'app-work',
templateUrl: './work.component.html',
styleUrl: './work.component.scss',
standalone: true,
imports: [NgClass,
TranslateModule,
RouterLink,
NgForOf,
FormsModule
],
})
export class WorkComponent implements OnInit {
// à retirer quand les boutons seront dans editor.component
isLoaded: boolean = false; // Pour vérifier si le chargement est terminé
themeClass!: string;
works: Work[] = [];
constructor(
private router: Router,
private themeService: ThemeService,
protected workService: WorkService
) {}
ngOnInit() {
this.themeService.isDarkTheme.subscribe((value) => {
value
? (this.themeClass = 'dark-theme')
: (this.themeClass = 'light-theme');
});
this.workService.getWorks().subscribe((response: Work[]) => this.works = response);
}
// Si click sur "Work", on redirige vers la page des travaux
onContinue(): void {
this.router.navigateByUrl('/work');
}
onSubmit(form: NgForm) {
this.workService.postWork(form);
}
}

@ -1,21 +0,0 @@
<h2>Works</h2>
<ul>
<li *ngFor="let work of works">
{{ work.id_work }} - {{ work.link }} - {{ work.content }}
</li>
</ul>
<form #addBookForm="ngForm" (ngSubmit)="onSubmit(addBookForm)">
<div class="form-group">
<label for="link">Link</label>
<input type="text" class="form-control" id="link" name="link" ngModel required>
</div>
<div class="form-group">
<label for="content">Content</label>
<input type="text" class="form-control" id="content" name="content" ngModel required>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>

@ -1,30 +0,0 @@
import {Component} from '@angular/core';
import {Work} from "../../models/work.model";
import {WorksService} from "../../services/works.service";
import {NgForOf} from "@angular/common";
import {FormsModule, NgForm} from "@angular/forms";
@Component({
selector: 'app-works-list',
standalone: true,
imports: [
NgForOf,
FormsModule
],
templateUrl: './works-list.component.html',
styleUrl: './works-list.component.css'
})
export class WorksListComponent {
works: Work[] = [];
constructor(protected workService: WorksService) {
}
ngOnInit() {
this.workService.getWorks().subscribe((response: Work[]) => this.works = response)
}
onSubmit(form: NgForm) {
this.workService.postWork(form);
}
}

@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { WorkService } from './work.service';
describe('WorkService', () => {
let service: WorkService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(WorkService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

@ -0,0 +1,34 @@
import {Injectable} from '@angular/core';
import {Work} from "../models/work.model";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {NgForm} from "@angular/forms";
@Injectable({
providedIn: 'root'
})
export class WorkService {
API_URL = 'http://127.0.0.1:3000'
private works: Work[] = [];
constructor(private http: HttpClient) {
}
getWorks(): Observable<any> {
return this.http.get(`${this.API_URL}/works`);
}
postWork(form: NgForm): void {
let body = {link: crypto.randomUUID(), id_user: 1, id_language: 1, code: form.value.content, saveDate: new Date()}
this.http.post<any>(`${this.API_URL}/works`, body).subscribe();
}
postWorkCode(code: string): void {
let body = {link: crypto.randomUUID(), id_user: 1, id_language: 1, code: code}
this.http.post<any>(`${this.API_URL}/works`, body).subscribe();
}
getIdLastWorkByUserId(id_user: string): string { return ""}
}

@ -2,21 +2,53 @@
"LandingPage": {
"Welcome": "Welcome to Sandkasten",
"Description": "You've arrived at the best code testing sandbox site! We let you test all your programs in your favorite languages. Thanks to the Code Mirror editor and our personalized management of execution on containers, your code becomes completely harmless, so you can have as much fun as you like!",
"Try": "Try it now !"
"Try": "Try it now !",
"Bouton1": "Code editor",
"Bouton2": "Git repository",
"Top": {
"Tittle": "What you need to know about our editor",
"Description": "Sandkasten, the editor with all the options you need. With these advantages, you can test your code and see the results."
},
"List": {
"Tittle1": "Security",
"Text1": "To guarantee the robustness of our tool, we run your code in a closed environment, limiting costly requests. This protects us from attempts to misuse the system.",
"Tittle2": "Import / Export",
"Text2": "You can import files and the editor will recognize the language by its extension. You can also export the code you've made with just one click.",
"Tittle3": "Options",
"Text3": "You have numerous options for customizing and optimizing your use of Sandkasten. These options are available directly from the editor.",
"Tittle4": "Multi-langues",
"Text4": "Sandkasten supports a wide range of code languages. When you type code or import a file, the editor automatically recognizes the language. You can also select it directly in the editor.",
"Tittle5": "Lorem Ipsum",
"Text5": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam",
"Tittle6": "Lorem Ipsum",
"Text6": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"
},
"Technologie": {
"Tittle": "Languages disponibles dès maintenant"
},
"About": {
"Tittle": "Empowering the world with Sandkasten.",
"Text": "We're a team professionally engaged in the world of technology! We bring different personalities, experiences and skills to the table. That's what makes our team so special."
},
"MemberRole": "Developper",
"SocialTittle": "Join us on our networks",
"GetStarted": {
"Tittle": "Try Sandkasten",
"Description":"Join the Sandkasten community now by testing our editor!",
"Button": "Get Started !"
}
},
"HeaderPage": {
"Work": "Work",
"Editor": "Editor",
"Documentation": "Documentation",
"Contact": "Contact us"
},
"FooterPage": {
"About": "About Sandkasten",
"Contact": "Contact us",
"Story": "Our story",
"Legal": "Legal mentions",
"Terms": "Terms of use",
"Privacy": "Privacy policy",
"Rights": "©2024 Sandkasten, Inc. All rights reserved."
"Rights": "Copyright © 2024 Sandkasten. All rights reserved."
},
"TermsOfServicePage": {
"Mentions": "LEGALS MENTIONS",
@ -115,5 +147,9 @@
"Text2": "We will attempt to resolve complaints and disputes and make every reasonable effort to honor your wish to exercise your rights as quickly as possible and in any event, within the timescales provided by applicable data protection laws."
},
"Date": "This document was last updated on January 10, 2024"
},
"Work": {
"Share": "Share",
"Save": "Save"
}
}

@ -2,21 +2,53 @@
"LandingPage": {
"Welcome": "Bienvenue sur Sandkasten",
"Description": "Vous voici arrivé sur le meilleur site bac à sable de test de code ! Nous vous permettons de tester tous vos programmes sur vos langages préférés. Grâce à léditeur Code Mirror et à notre gestion personalisée de lexécution sur des conteneurs, votre code devient complétement inoffensif et vous pouvez donc vous amusez autant que vous le souhaitez !",
"Try": "Essayez maintenant !"
"Try": "Essayez maintenant !",
"Bouton1": "Editeur de code",
"Bouton2": "Dépôt Git",
"Top": {
"Tittle": "Ce dont vous avez besoin de savoir sur notre éditeur",
"Description": "Sandkasten, l'éditeur qui possède toutes les options dont vous avez besoin. Avec ces avantages vous pourrez tester votre code et en voir le résultat."
},
"List": {
"Tittle1": "Sécurité",
"Text1": "Pour garantir la solidité de notre outil nous exécutons votre code sur un environnement fermé et limitant les requêtes trop coûteuse. Ce procédé nous protège ainsi des tentatives de mauvaise utilisation du système.",
"Tittle2": "Importer / Exporter",
"Text2": "Vous pouvez importez des fichiers et l'éditeur va reconnaître le langage à partir de son extension. Vous pouvez aussi exporter le code que vous avez fait en seulement un clic.",
"Tittle3": "Options",
"Text3": "Vous disposez de nombreuses options vous permettant de personnalisé et d'optimiser votre utilisation de Sandkasten. Ces options sont directement disponible depuis l'éditeur.",
"Tittle4": "Multi-languages",
"Text4": "De nombreux langages de codes sont reconnus dans Sandkasten. Lorsque vous taper du code ou en importer un fichier l'éditeur reconnaît automatiquement le langage. Vous pouvez aussi directement le sélectionner dans l'éditeur.",
"Tittle5": "Lorem Ipsum",
"Text5": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam",
"Tittle6": "Lorem Ipsum",
"Text6": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"
},
"Technologie": {
"Tittle": "Languages disponibles dès maintenant"
},
"About": {
"Tittle": "Renforcer le monde avec Sandkasten.",
"Text": "Nous sommes une équipe se professionalisant dans le monde des technologies ! Nous apportons des personnalités, des expériences et des compétences différentes. C'est ce qui rend notre équipe si spéciale."
},
"MemberRole": "Développeur",
"SocialTittle": "Rejoinez-nous sur nos réseaux",
"GetStarted": {
"Tittle": "Allez essayer Sandkasten",
"Description":"Rejoignez dès maintenant la communauté Sandkasten en testant notre éditeur !",
"Button": "Commencez !"
}
},
"HeaderPage": {
"Work": "Travail",
"Editor": "Éditeur",
"Documentation": "Documentation",
"Contact": "Nous contacter"
},
"FooterPage": {
"About": "À propos de Sandkasten",
"Contact": "Nous contacter",
"Story": "Notre histoire",
"Legal": "Mentions légales",
"Terms": "Conditions d'utilisation",
"Privacy": "Politique de confidentialité",
"Rights": "©2024 Sandkasten, Inc. Tous droits réservés"
"Rights": "Copyright © 2024 Sandkasten. Tous droits réservés"
},
"TermsOfServicePage": {
"Mentions": "MENTIONS LÉGALES",
@ -115,5 +147,9 @@
"Text2": "Nous nous efforcerons de résoudre les plaintes et les litiges et ferons tous les efforts raisonnables pour répondre à votre souhait d'exercer vos droits le plus rapidement possible et, en tout état de cause, dans les délais prévus par les lois applicables en matière de protection des données."
},
"Date": "Ce document a été mis à jour pour la dernière fois le 10 janvier 2024."
},
"Work": {
"Share": "Partager",
"Save": "Sauvergarder"
}
}

Loading…
Cancel
Save