Skip to content

Commit

Permalink
Design tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
alopezo committed Feb 21, 2024
1 parent cf7b67d commit d7881a9
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
gtag('config', 'G-7SK998GPMX', { 'page_path': '/home' });
}
</script>
<style>*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif}</style><link rel="stylesheet" href="styles.9cc7c15e6c247577.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.9cc7c15e6c247577.css"></noscript></head>
<style>*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif}</style><link rel="stylesheet" href="styles.028844e98e9ad6e5.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.028844e98e9ad6e5.css"></noscript></head>
<body class="mat-typography">
<app-root></app-root>
<script src="runtime.c2d2548033d65b02.js" type="module"></script><script src="polyfills.75186c7b7fc1d123.js" type="module"></script><script src="scripts.a1e2309b4257c7b3.js" defer></script><script src="main.4a0f3020ab299853.js" type="module"></script>
<script src="runtime.c2d2548033d65b02.js" type="module"></script><script src="polyfills.75186c7b7fc1d123.js" type="module"></script><script src="scripts.a1e2309b4257c7b3.js" defer></script><script src="main.01281c93c7fe0847.js" type="module"></script>

</body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/app/game/snoguess-main/snoguess-main.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
}

.term-display span {
padding: 0 2px; /* Optional: add padding to each character if you want more space */
padding: 0 0px; /* Optional: add padding to each character if you want more space */
}

/* Styles for the hit points display */
.hit-points {
font-weight: bold;
color: #d9534f; /* Red color to indicate the importance of hit points */
text-align: center;
margin-bottom: 2rem;;
}

/* Input and button styling */
Expand Down Expand Up @@ -116,7 +117,7 @@
}

.score {
font-size: 1.6rem; /* Adjust the font size as needed */
font-size: 1.4rem; /* Adjust the font size as needed */
font-weight: bold;
}

Expand Down
34 changes: 17 additions & 17 deletions src/app/game/snoguess-main/snoguess-main.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,13 @@

<div class="flex justify-center mt-8 mb-8">
<div class="relative w-1/4"> <!-- Set a width and position relative -->
<img src="assets/img/snoguess-logo.png" alt="Game Logo">
<img src="assets/img/snoguess-logo.png" alt="Game Logo" [@popIn]>
<div class="diff-label absolute -bottom-3 right-5 italic text-gray-500"> <!-- Absolutely position the difficulty level -->
{{ gameState.difficultyLevel }}
</div>
</div>
</div>

<div class="term-display flex flex-row flex-wrap justify-center gap-4" *ngIf="gameState.state == 'playing'">
<span *ngFor="let segment of gameState.displayTerm.join('').split(' ')" class="whitespace-nowrap">
<span *ngFor="let char of segment.split('')">{{ char }}</span>
</span>
</div>

<div *ngIf="gameState.state === 'choosingTerm'" class="loading-container">
<div class="progress-bar-message">
Choosing a random SNOMED CT concept using the FHIR API
</div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>

<div class="hit-points">
<span class="score">
Round: {{ gameState.round }} &nbsp;&nbsp;&nbsp;&nbsp; Score: {{ gameState.score }} &nbsp;&nbsp;&nbsp;&nbsp; Life:
Expand All @@ -45,6 +32,19 @@
</span>
</div>

<div class="term-display flex flex-row flex-wrap justify-center gap-8" *ngIf="gameState.state == 'playing'">
<span *ngFor="let segment of gameState.displayTerm.join('').split(' ')" class="whitespace-nowrap">
<span *ngFor="let char of segment.split('')">{{ char }}</span>
</span>
</div>

<div *ngIf="gameState.state === 'choosingTerm'" class="loading-container">
<div class="progress-bar-message">
Choosing a random SNOMED CT concept using the FHIR API
</div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>

<p class="guess-message">Click the keys to guess the letters of the term!</p>
<div [@shake]="shakeState">
<app-keyboard #keyboard (letterGuessed)="guessLetter($event)"></app-keyboard>
Expand Down Expand Up @@ -94,7 +94,7 @@ <h3>Score Progression</h3>

<div *ngIf="gameState.state === 'menu' && !chooseDifficulty && !showInstructions && !loadingAssets" class="flex flex-col items-center gap-4">
<img src="assets/img/SI_CT_w_tagline.png" alt="SNOMED CT Logo" class="w-1/6">
<img src="assets/img/snoguess-logo.png" alt="Game Logo" class="w-1/4 mt-8" [@popIn]>
<img src="assets/img/snoguess-logo.png" alt="Game Logo" class="w-1/3 mt-8" [@popIn]>
<p class="text-center font-light text-lg">
<b>Welcome to SnoGuess!</b>
</p>
Expand Down Expand Up @@ -192,7 +192,7 @@ <h3>Score Progression</h3>
<div> The term was: </div>
<div class="font-bold"> {{ gameState.term }}</div>
<div class="mt-12">{{ gameState.round }} {{ (gameState.round == 1) ? 'round' : 'rounds' }}</div>
<div class="mt-4">Final Score: {{ gameState.score }} points</div>
<div class="mt-4">Final Score: {{ gameState.score }} points - Difficulty: {{ gameState.difficultyLevel }}</div>
<div *ngIf="getMaxTrophyObtained(gameState.score)">
Trophy: {{ getMaxTrophyObtained(gameState.score) }}
</div>
Expand Down Expand Up @@ -225,7 +225,7 @@ <h3>Score Progression</h3>
<mat-icon class="large-icon diamond shadow-local">emoji_events</mat-icon>
<mat-icon class="large-icon diamond shadow-local">grade</mat-icon>
</div>
<div class="reveal won">Final score: {{ gameState.score }}</div>
<div class="reveal won">Final score: {{ gameState.score }} - Difficulty: {{ gameState.difficultyLevel }}</div>

<div (click)="loadMenu(); chooseDifficultyLevel();" [@scrollUp]
class="bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-4 border-black
Expand Down

0 comments on commit d7881a9

Please sign in to comment.