This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.create-container { | |
@apply px-2 py-2 flex flex-col items-center; | |
} | |
form { | |
@apply w-full pt-6 pb-8 mb-4; | |
max-width: 768px; | |
} | |
.img-title-area { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.contact-container { | |
@apply px-2 py-2 flex flex-col items-center; | |
} | |
@screen sm { | |
.contact-container { | |
@apply px-4 py-6; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.main-content { | |
@apply flex flex-col; | |
} | |
.ads { | |
@apply flex-auto; | |
min-width: 120px; | |
min-height: 100px; | |
max-width: 100%; | |
max-height: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#if serverRes} | |
{#if serverRes.successful} | |
<Alert type="success" message="Your game has been successfully saved and it's awaiting review!" /> | |
{:else} | |
<Alert | |
type="error" | |
message={serverRes.errorMsg ? serverRes.errorMsg : 'There was a problem sending your game entry. Please, try again.'} | |
/> | |
{/if} | |
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
export let type: 'success' | 'error'; | |
export let message: string; | |
const CHECK = 'M0.5,8 L4,11.5 L11.5,3'; | |
const CROSS = 'M0.5,0.5 L11.5,11.5 M11.5,0.5 L0.5,11.5'; | |
</script> | |
<div class="alert {type}" role="alert"> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function post(req: Request, res: Response, next: NextFunction) { | |
const { name, altNames, image, vote, comment } = req.body; | |
let game: IGameDocument; | |
try { | |
game = new models.Game({ | |
name, | |
altNames, | |
image, | |
positiveVotes: vote === 'positive' ? 1 : 0, | |
negativeVotes: vote === 'negative' ? 1 : 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#if serverRes} | |
<div class="alert success" role="alert"> | |
<img | |
src={serverRes.successful ? 'check.svg' : 'cross.svg'} | |
alt={serverRes.successful ? 'success icon' : 'error icon'} | |
/> | |
<p> | |
{ | |
serverRes.successful | |
? 'Your contact request was successfully received!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#if serverRes} | |
{#if serverRes.successful} | |
<div class="alert success" role="alert"> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"> | |
<path stroke-width="2" stroke="white" fill="none" d="M0.5,8 L4,11.5 L11.5,3" /> | |
</svg> | |
<p>Your contact request was successfully received!</p> | |
</div> | |
{:else} | |
<div class="alert error" role="alert"> |
NewerOlder