Commit 625acdfd authored by Romain DELEAU's avatar Romain DELEAU

add rules sider-piece

parent c2ba6f7e
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<app-comments class="container-sider-element"></app-comments> <app-comments class="container-sider-element"></app-comments>
<app-repeat class="container-sider-element"></app-repeat> <app-repeat class="container-sider-element"></app-repeat>
<app-characters class="container-sider-element"></app-characters> <app-characters class="container-sider-element"></app-characters>
<app-rules class="container-sider-element"></app-rules>
</div> </div>
......
...@@ -20,6 +20,7 @@ import { CommentComponent } from './components/comment/comment.component'; ...@@ -20,6 +20,7 @@ import { CommentComponent } from './components/comment/comment.component';
import { RandomEventComponent } from './pieces/random-event/random-event.component'; import { RandomEventComponent } from './pieces/random-event/random-event.component';
import { CharactersComponent } from './sider-pieces/characters/characters.component'; import { CharactersComponent } from './sider-pieces/characters/characters.component';
import { CharacterComponent } from './components/character/character.component'; import { CharacterComponent } from './components/character/character.component';
import { RulesComponent } from './sider-pieces/rules/rules.component';
import { DragScrollDirective } from './directives/drag-scroll.directive'; import { DragScrollDirective } from './directives/drag-scroll.directive';
import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive'; import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive';
...@@ -41,7 +42,8 @@ import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive ...@@ -41,7 +42,8 @@ import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive
CommentComponent, CommentComponent,
RandomEventComponent, RandomEventComponent,
CharactersComponent, CharactersComponent,
CharacterComponent CharacterComponent,
RulesComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
......
<div class="piece">
<div class="piece-form">
<div class="piece-form-rules">
<div class="piece-form-title">Règles du jeu</div>
<textarea></textarea>
</div>
<div class="piece-form-ressources">
<div class="piece-form-title">Ressources / objets</div>
<div class="piece-form-ressources-object">
<div class="piece-form-ressources-object-infos">
<div class="piece-form-ressources-object-infos-name">
<label for="name">Nom</label>
<input name="name" type="text"/>
</div>
<div class="piece-form-ressources-object-infos-quantity">
<label for="quantity">Quantité</label>
<input name="quantity" type="text"/>
</div>
</div>
<div class="piece-form-ressources-object-infos">
<div class="piece-form-ressources-object-infos-name">
<label for="name">Nom</label>
<input name="name" type="text"/>
</div>
<div class="piece-form-ressources-object-infos-quantity">
<label for="quantity">Quantité</label>
<input name="quantity" type="text"/>
</div>
</div>
<button mat-button><mat-icon fontIcon="add"></mat-icon></button>
</div>
</div>
<div class="piece-form-validate">
<button mat-button>Valider</button>
</div>
</div>
</div>
\ No newline at end of file
.piece {
--piece-background-color: #c6c2bd;
width: 300px;
position: relative;
background-color: var(--piece-background-color);
border: solid black 1px;
border-radius: 10px;
&-form {
margin: 10px 5px 10px 5px;
display: flex;
flex-direction: column;
button {
border-radius: 10px;
background-color: white;
}
&-title {
font-family: "Glacial Indifference Bold";
margin-bottom: 10px;
}
&-rules {
display: flex;
flex-direction: column;
margin-bottom: 10px;
textarea {
background-image: url("../../../assets/background-images/rules.png");
background-position: center;
background-repeat: no-repeat;
background-size: 30%;
border-radius: 10px;
border: none;
resize: vertical;
min-height: 100px;
max-height: 200px;
padding: 5px 5px 5px 5px;
}
}
&-ressources {
input {
height: 30px;
border: none;
border-radius: 10px;
background-color: white;
width: 150px;
}
&-object {
display: flex;
flex-direction: column;
justify-content: space-between;
&-infos {
margin-bottom: 10px;
&-name {
display: flex;
flex-direction: row;
justify-content: space-between;
}
&-quantity {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 5px;
}
}
}
}
&-validate {
display: flex;
flex-direction: row;
justify-content: flex-end;
button {
margin-top: 10px;
}
}
}
}
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RulesComponent } from './rules.component';
describe('RulesComponent', () => {
let component: RulesComponent;
let fixture: ComponentFixture<RulesComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ RulesComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(RulesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-rules',
templateUrl: './rules.component.html',
styleUrls: ['./rules.component.scss']
})
export class RulesComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment