Dev #2
+1
-1
@@ -11,7 +11,7 @@ class Tla extends Model
|
|||||||
|
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $fillable = ['acronym', 'hint', 'used', 'context'];
|
protected $fillable = ['acronym', 'hint', 'language', 'used', 'context'];
|
||||||
|
|
||||||
public static function GetCurrentTla( string $language ) : Tla {
|
public static function GetCurrentTla( string $language ) : Tla {
|
||||||
$tla = Tla::where('used', date("Y-m-d"))
|
$tla = Tla::where('used', date("Y-m-d"))
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class TlaSuggestion extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'tla_suggestion';
|
||||||
|
|
||||||
|
protected $fillable = ['acronym', 'hint', 'language', 'context'];
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('tla_suggestion', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('acronym');
|
||||||
|
$table->string('hint')->nullable();
|
||||||
|
$table->enum('language', ['hu', 'en']);
|
||||||
|
$table->longText('context')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tla_suggestion');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -9,6 +9,10 @@
|
|||||||
'Segoe UI Symbol', 'Noto Color Emoji';
|
'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--ui-primary: rgb(255, 200, 0);
|
||||||
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import HowToPlay from "./components/HowToPlay.vue";
|
|||||||
|
|
||||||
|
|
||||||
<template #right>
|
<template #right>
|
||||||
|
|
||||||
<HowToPlay/>
|
<HowToPlay/>
|
||||||
<UColorModeSwitch :size="xl"/>
|
<UColorModeSwitch :size="xl"/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
||||||
<template v-if="guesses.length < maxGuesses && !correct">
|
<template v-if="guesses.length < maxGuesses && !correct">
|
||||||
<div class="flex-container">
|
<div class="flex-container" v-if="guess.length > 0">
|
||||||
<template v-for="word in words">
|
<template v-for="word in words">
|
||||||
<GuessWord :correctness="words.length == 3 ? -1 : (words.length > 3 ? -2 : -3)">
|
<GuessWord :correctness="words.length == 3 ? -1 : (words.length > 3 ? -2 : -3)">
|
||||||
{{ word }}
|
{{ word }}
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<h1>TLA suggestion form</h1>
|
<h1>TLA suggestion form</h1>
|
||||||
|
<UCard>
|
||||||
|
<UForm>
|
||||||
|
<UFormField label="Acronym" required>
|
||||||
|
<UInput placeholder="Enter your TLA"></UInput>
|
||||||
|
</UFormField>
|
||||||
|
<UFormField label="Motto" required>
|
||||||
|
<UInput placeholder="Enter the motto for your TLA"></UInput>
|
||||||
|
</UFormField>
|
||||||
|
<UFormField label="Contex" required>
|
||||||
|
<UTextarea style="w-full" placeholder="Provide context for your TLA. This will be displayed upon completing the riddle of the day, either by guessing it correctly, or by running out of guesses."></UTextarea>
|
||||||
|
</UFormField>
|
||||||
|
<UButton>
|
||||||
|
salkdjf
|
||||||
|
</UButton>
|
||||||
|
</UForm>
|
||||||
|
</UCard>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
Reference in New Issue
Block a user