Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle #24

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Adding header and GH icon
  • Loading branch information
tarrball committed Jun 26, 2023
commit c44c662d9ce8a4d3ece4de69512c96e7d7e25427
41 changes: 30 additions & 11 deletions src/app/1. features/game/game.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
<header class="flex-center">
<h1 class="w-100">Palabritas</h1>
<header>
<mat-toolbar>
<button
mat-icon-button
[matMenuTriggerFor]="menu"
class="example-icon"
aria-label="Example icon-button with menu icon"
>
<mat-icon>menu</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="clickNewGame()">New Game</button>
</mat-menu>

<!-- <span>Palabritas</span> -->
<span class="flex-grow-1 text-align-center">Palabritas</span>

<a
class="github-logo d-flex align-items-center"
target="_blank"
href="https://github.com/tarrball/palabritas"
>
<img
src="../../../assets/github-mark-white.png"
alt="GitHub logo"
aria-label="View on GitHub"
/>
</a>
</mat-toolbar>
</header>

<main class="flex-grow-1">
Expand Down Expand Up @@ -40,15 +67,7 @@ <h1 class="w-100">Palabritas</h1>
</button>
</div>

<div class="flex-center-between">
<button mat-raised-button (click)="clickNewGame()">New Game</button>
<div class="flex-center-end">
<button mat-raised-button (click)="clickEnter()">Enter</button>
</div>
</main>

<footer class="flex-center-between">
<span>andrew@tarrball.com</span>
<a href="https://github.com/tarrball/palabritas" target="_blank"
>View on GitHub</a
>
</footer>
19 changes: 6 additions & 13 deletions src/app/1. features/game/game.component.sass
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
:host
display: flex
flex-direction: column
font-variant: small-caps
max-width: 496px

header
h1
flex-grow: 1
text-align: center
.github-logo
cursor: pointer
padding: 12px

img
height: 24px

main
.letter-buttons
button
margin: 0 4px

footer
margin-top: 64px

span
text-transform: uppercase

.answers-container
height: 160px

Expand Down
6 changes: 6 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { EffectsModule } from '@ngrx/effects';
import { GameEffects } from './2. store/game/game.effects';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
import { MatToolbarModule } from '@angular/material/toolbar';

@NgModule({
declarations: [AppComponent, GameComponent],
Expand All @@ -19,6 +22,9 @@ import { MatButtonModule } from '@angular/material/button';
AppRoutingModule,
BrowserAnimationsModule,
MatButtonModule,
MatIconModule,
MatMenuModule,
MatToolbarModule,
StoreModule.forRoot(reducers, {
metaReducers,
runtimeChecks: {
Expand Down
Binary file added src/assets/github-mark-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/styles.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
.justify-content-between
justify-content: space-between !important

.justify-content-end
justify-content: flex-end !important

.h-100
height: 100% !important

Expand All @@ -33,9 +36,19 @@
@extend .flex-center
@extend .justify-content-between

.flex-center-end
@extend .flex-center
@extend .justify-content-end

.hori-scroll
overflow-x: auto

.spacer
flex: 1 1 auto

.text-align-center
text-align: center

/* Material Overrides */

app-game
Expand Down