This commit is contained in:
stefan
2025-06-05 18:20:43 +02:00
parent ab1f5d0f7f
commit 05108d389c
14 changed files with 190 additions and 103 deletions
Binary file not shown.
@@ -56,7 +56,7 @@ class EmailService private constructor(
} }
/** /**
* Creates email session with the configured properties. * Creates an email session with the configured properties.
* *
* @param debug Whether to enable debug mode for the mail session * @param debug Whether to enable debug mode for the mail session
* @return The configured mail session * @return The configured mail session
@@ -93,7 +93,7 @@ class EmailService private constructor(
/** /**
* Sends an email notification with the form submission data. * Sends an email notification with the form submission data.
* Includes retry mechanism for transient failures. * Includes a retry mechanism for transient failures.
* *
* @param nennung The form submission data * @param nennung The form submission data
* @return true if the email was sent successfully, false otherwise * @return true if the email was sent successfully, false otherwise
@@ -123,7 +123,7 @@ class EmailService private constructor(
subject = nennung.turnier?.let { "Neue Nennung für ${it.name}: ${nennung.riderName} mit ${nennung.horseName}" } subject = nennung.turnier?.let { "Neue Nennung für ${it.name}: ${nennung.riderName} mit ${nennung.horseName}" }
?: "Neue Nennung: ${nennung.riderName} mit ${nennung.horseName}" ?: "Neue Nennung: ${nennung.riderName} mit ${nennung.horseName}"
// Create multipart message with both plain text and HTML versions // Create a multipart message with both plain text and HTML versions
val multipart = MimeMultipart("alternative") val multipart = MimeMultipart("alternative")
// Plain text part // Plain text part
@@ -8,7 +8,7 @@ import kotlinx.serialization.Serializable
*/ */
@Serializable @Serializable
data class Bewerb( data class Bewerb(
/** Competition number, e.g. 1, 2, etc. */ /** Competition number, e.g., 1, 2, etc. */
val nummer: Int, val nummer: Int,
/** Title of the competition, e.g. "Stilspringprüfung" or "Dressurprüfung" */ /** Title of the competition, e.g. "Stilspringprüfung" or "Dressurprüfung" */
@@ -38,7 +38,7 @@ fun configureDatabase() {
} }
} else { } else {
// Check if we should use SQLite (either in IDEA or in Docker with SQLite) // Check if we should use SQLite (either in IDEA or in Docker with SQLite)
// First check for explicit SQLite flag // First check for an explicit SQLite flag
val useSqlite = System.getenv("USE_SQLITE")?.toBoolean() ?: false val useSqlite = System.getenv("USE_SQLITE")?.toBoolean() ?: false
// Then check if we're in IDEA (no Docker environment variables set) // Then check if we're in IDEA (no Docker environment variables set)
@@ -59,7 +59,7 @@ fun configureDatabase() {
connectionSuccessful = true connectionSuccessful = true
} catch (e: Exception) { } catch (e: Exception) {
log.error("Failed to connect to SQLite (dev)!", e) log.error("Failed to connect to SQLite (dev)!", e)
// Maybe don't throw here so the app starts in IDE anyway? Currently it throws. // Maybe don't throw here so the app starts in IDE anyway? Currently, it throws.
throw e throw e
} }
} else { } else {
@@ -76,7 +76,7 @@ fun configureDatabase() {
val maxPoolSize = System.getenv("DB_POOL_SIZE")?.toIntOrNull() ?: 10 val maxPoolSize = System.getenv("DB_POOL_SIZE")?.toIntOrNull() ?: 10
val jdbcURL = "jdbc:postgresql://$dbHost:$dbPort/$dbName" val jdbcURL = "jdbc:postgresql://$dbHost:$dbPort/$dbName"
log.info("Attempting to connect to PostgreSQL at URL: {}", jdbcURL) log.info("Attempting to connect to PostgresQL at URL: {}", jdbcURL)
val hikariConfig = HikariConfig().apply { val hikariConfig = HikariConfig().apply {
this.driverClassName = driverClassName this.driverClassName = driverClassName
@@ -88,7 +88,7 @@ fun configureDatabase() {
} }
val dataSource = HikariDataSource(hikariConfig) val dataSource = HikariDataSource(hikariConfig)
Database.connect(dataSource) Database.connect(dataSource)
log.info("PostgreSQL connection pool initialized successfully!") log.info("PostgresQL connection pool initialized successfully!")
connectionSuccessful = true connectionSuccessful = true
} catch (e: Exception) { } catch (e: Exception) {
log.error("Failed to initialize PostgreSQL connection pool!", e) log.error("Failed to initialize PostgreSQL connection pool!", e)
@@ -109,7 +109,7 @@ fun configureDatabase() {
} catch (e: Exception) { } catch (e: Exception) {
log.error("Failed to initialize database schema!", e) log.error("Failed to initialize database schema!", e)
// Here you could decide if a schema error is critical // Here you could decide if a schema error is critical
// throw e // Commented out: App might start anyway, even if schema is missing/wrong // throw e // Commented out: App might start anyway, even if the schema is missing/wrong
} }
} }
} }
@@ -27,7 +27,7 @@ class TurnierRepository {
fun createTurnier(number: Int, name: String, datum: String, bewerbe: List<Bewerb>): Turnier? = transaction { fun createTurnier(number: Int, name: String, datum: String, bewerbe: List<Bewerb>): Turnier? = transaction {
try { try {
// Check if a tournament with this number already exists // Check if a tournament with this number already exists
val existingTurnier = TurniereTable.select { TurniereTable.number eq number }.singleOrNull() val existingTurnier = TurniereTable.selectAll().where { TurniereTable.number eq number }.singleOrNull()
if (existingTurnier != null) { if (existingTurnier != null) {
log.error("Tournament with number $number already exists") log.error("Tournament with number $number already exists")
return@transaction null return@transaction null
@@ -75,7 +75,7 @@ class TurnierRepository {
fun updateTurnier(number: Int, name: String, datum: String, bewerbe: List<Bewerb>): Turnier? = transaction { fun updateTurnier(number: Int, name: String, datum: String, bewerbe: List<Bewerb>): Turnier? = transaction {
try { try {
// Check if the tournament exists // Check if the tournament exists
val existingTurnier = TurniereTable.select { TurniereTable.number eq number }.singleOrNull() val existingTurnier = TurniereTable.selectAll().where { TurniereTable.number eq number }.singleOrNull()
if (existingTurnier == null) { if (existingTurnier == null) {
log.error("Tournament with number $number not found") log.error("Tournament with number $number not found")
return@transaction null return@transaction null
@@ -1,8 +1,7 @@
package at.mocode.routes package at.mocode.routes
import at.mocode.model.Bewerb
import at.mocode.config.DependencyInjection import at.mocode.config.DependencyInjection
import at.mocode.repository.TurnierRepository import at.mocode.model.Bewerb
import at.mocode.views.AdminView import at.mocode.views.AdminView
import io.ktor.http.* import io.ktor.http.*
import io.ktor.server.application.* import io.ktor.server.application.*
@@ -75,7 +74,7 @@ fun Route.adminRoutes() {
log.info("Received competitions for creation: ${bewerbNummern.size} numbers, ${bewerbTitel.size} titles, ${bewerbKlasse.size} classes, ${bewerbTask.size} tasks") log.info("Received competitions for creation: ${bewerbNummern.size} numbers, ${bewerbTitel.size} titles, ${bewerbKlasse.size} classes, ${bewerbTask.size} tasks")
// Create list of competitions // Create a list of competitions
val bewerbe = mutableListOf<Bewerb>() val bewerbe = mutableListOf<Bewerb>()
for (i in bewerbNummern.indices) { for (i in bewerbNummern.indices) {
val titel = if (i < bewerbTitel.size) bewerbTitel[i] else "Unbenannter Bewerb" val titel = if (i < bewerbTitel.size) bewerbTitel[i] else "Unbenannter Bewerb"
@@ -133,7 +132,7 @@ fun Route.adminRoutes() {
log.info("Received competitions for update: ${bewerbNummern.size} numbers, ${bewerbTitel.size} titles, ${bewerbKlasse.size} classes, ${bewerbTask.size} tasks") log.info("Received competitions for update: ${bewerbNummern.size} numbers, ${bewerbTitel.size} titles, ${bewerbKlasse.size} classes, ${bewerbTask.size} tasks")
// Create list of competitions // Create a list of competitions
val bewerbe = mutableListOf<Bewerb>() val bewerbe = mutableListOf<Bewerb>()
for (i in bewerbNummern.indices) { for (i in bewerbNummern.indices) {
val titel = if (i < bewerbTitel.size) bewerbTitel[i] else "Unbenannter Bewerb" val titel = if (i < bewerbTitel.size) bewerbTitel[i] else "Unbenannter Bewerb"
@@ -77,6 +77,12 @@ fun Route.nennungRoutes() {
return@post return@post
} }
// Validate that at least one competition is selected
if (selectedEvents.isEmpty()) {
call.respond(HttpStatusCode.BadRequest, "Bitte wählen Sie mindestens einen Bewerb aus")
return@post
}
// Create Nennung object using repository // Create Nennung object using repository
val nennung = nennungRepository.createNennung( val nennung = nennungRepository.createNennung(
riderName = riderName, riderName = riderName,
@@ -105,7 +111,7 @@ fun Route.nennungRoutes() {
} }
// Render confirmation page // Render confirmation page
nennungView.renderConfirmationPage(call, turnier, riderName, horseName) nennungView.renderConfirmationPage(call, turnier, riderName, horseName, selectedEvents)
} }
} }
@@ -8,7 +8,7 @@ import org.jetbrains.exposed.sql.Column
*/ */
object TurniereTable : Table("turniere") { object TurniereTable : Table("turniere") {
/** /**
* Unique number for the tournament, used as primary key. * Unique number for the tournament, used as a primary key.
*/ */
val number: Column<Int> = integer("number").uniqueIndex() val number: Column<Int> = integer("number").uniqueIndex()
@@ -36,7 +36,7 @@ object BewerbeTable : Table("bewerbe") {
val id: Column<Int> = integer("id").autoIncrement() val id: Column<Int> = integer("id").autoIncrement()
/** /**
* Number of the competition. * Amount of the competition.
*/ */
val nummer: Column<Int> = integer("nummer") val nummer: Column<Int> = integer("nummer")
@@ -131,7 +131,7 @@ object NennungEventsTable : Table("nennung_events") {
val nennungId: Column<Int> = integer("nennung_id") val nennungId: Column<Int> = integer("nennung_id")
/** /**
* Number of the selected competition. * Amount of the selected competition.
*/ */
val eventNumber: Column<String> = varchar("event_number", 100) val eventNumber: Column<String> = varchar("event_number", 100)
@@ -18,6 +18,7 @@ class LayoutTemplate {
title: String, title: String,
showNavbar: Boolean = true, showNavbar: Boolean = true,
showAdminLink: Boolean = true, showAdminLink: Boolean = true,
showFooter: Boolean = true,
content: FlowContent.() -> Unit content: FlowContent.() -> Unit
) { ) {
head { head {
@@ -152,61 +153,63 @@ class LayoutTemplate {
} }
} }
} }
footer(classes = "footer mt-5") { if (showFooter) {
attributes["data-aos"] = "fade-up" footer(classes = "footer mt-5") {
attributes["data-aos-delay"] = "200" attributes["data-aos"] = "fade-up"
div("container") { attributes["data-aos-delay"] = "200"
div("footer-content") { div("container") {
div("row gy-4") { div("footer-content") {
div("col-lg-4 col-md-6") { div("row gy-4") {
div("footer-info") { div("col-lg-4 col-md-6") {
h3(classes = "gradient-text") { +"Meldestelle Portal" } div("footer-info") {
p { h3(classes = "gradient-text") { +"Meldestelle Portal" }
+"Ihre zentrale Plattform für Turnierorganisation und Anmeldungen." p {
} +"Ihre zentrale Plattform für Turnierorganisation und Anmeldungen."
div("social-links mt-3") { }
a(href = "#", classes = "facebook") { i("fab fa-facebook-f") {} } div("social-links mt-3") {
a(href = "#", classes = "twitter") { i("fab fa-twitter") {} } a(href = "#", classes = "facebook") { i("fab fa-facebook-f") {} }
a(href = "#", classes = "instagram") { i("fab fa-instagram") {} } a(href = "#", classes = "twitter") { i("fab fa-twitter") {} }
a(href = "#", classes = "linkedin") { i("fab fa-linkedin-in") {} } a(href = "#", classes = "instagram") { i("fab fa-instagram") {} }
a(href = "#", classes = "linkedin") { i("fab fa-linkedin-in") {} }
}
} }
} }
} div("col-lg-4 col-md-6") {
div("col-lg-4 col-md-6") { div("footer-links") {
div("footer-links") { h4 { +"Nützliche Links" }
h4 { +"Nützliche Links" } ul {
ul { li { a(href = "/") { +"Home" } }
li { a(href = "/") { +"Home" } } li { a(href = "#") { +"Über uns" } }
li { a(href = "#") { +"Über uns" } } li { a(href = "#") { +"Turniere" } }
li { a(href = "#") { +"Turniere" } } li { a(href = "#") { +"Kontakt" } }
li { a(href = "#") { +"Kontakt" } } }
} }
} }
} div("col-lg-4 col-md-6") {
div("col-lg-4 col-md-6") { div("footer-contact") {
div("footer-contact") { h4 { +"Kontakt" }
h4 { +"Kontakt" } p {
p { i("fas fa-envelope me-2") {}
i("fas fa-envelope me-2") {} +"info@meldestelle-portal.at"
+"info@meldestelle-portal.at" }
} p {
p { i("fas fa-phone me-2") {}
i("fas fa-phone me-2") {} +"+43 123 456 789"
+"+43 123 456 789" }
} }
} }
} }
} }
} div("footer-legal text-center") {
div("footer-legal text-center") { div("copyright") {
div("copyright") { +"© ${java.time.Year.now().value} "
+"© ${java.time.Year.now().value} " strong { +"Meldestelle Portal" }
strong { +"Meldestelle Portal" } +". Alle Rechte vorbehalten."
+". Alle Rechte vorbehalten." }
} div("credits") {
div("credits") { +"Entwickelt von "
+"Entwickelt von " a(href = "#") { +"mocode" }
a(href = "#") { +"mocode" } }
} }
} }
} }
@@ -23,7 +23,8 @@ class NennungView {
applyLayout( applyLayout(
title = "Online-Nennen - ${turnier.name}", title = "Online-Nennen - ${turnier.name}",
showNavbar = false, showNavbar = false,
showAdminLink = false showAdminLink = false,
showFooter = false
) { ) {
h1 { +"Online-Nennen" } h1 { +"Online-Nennen" }
@@ -44,7 +45,7 @@ class NennungView {
div(classes = "competition-item") { div(classes = "competition-item") {
div(classes = "participant-details") { div(classes = "participant-details") {
label(classes = "required") { +"Reiter-Name" } label(classes = "required") { +"Reiter-Name" }
input(type = InputType.text, name = "riderName") { input(type = InputType.text, name = "riderName", classes = "form-control") {
attributes["required"] = "required" attributes["required"] = "required"
attributes["placeholder"] = "Vor- und Nachname" attributes["placeholder"] = "Vor- und Nachname"
} }
@@ -55,7 +56,7 @@ class NennungView {
div(classes = "competition-item") { div(classes = "competition-item") {
div(classes = "participant-details") { div(classes = "participant-details") {
label(classes = "required") { +"Kopf-Nr./Pferd" } label(classes = "required") { +"Kopf-Nr./Pferd" }
input(type = InputType.text, name = "horseName") { input(type = InputType.text, name = "horseName", classes = "form-control") {
attributes["required"] = "required" attributes["required"] = "required"
attributes["placeholder"] = "Name des Pferdes" attributes["placeholder"] = "Name des Pferdes"
} }
@@ -65,12 +66,11 @@ class NennungView {
// Contact information // Contact information
div(classes = "competition-item") { div(classes = "competition-item") {
div(classes = "participant-details") { div(classes = "participant-details") {
div(classes = "form-row") { div(classes = "form-group") {
div(classes = "form-group form-group-half") { label { +"E-Mail" }
label { +"E-Mail" } input(type = InputType.email, name = "email") {
input(type = InputType.email, name = "email") { attributes["placeholder"] = "ihre@email.com"
attributes["placeholder"] = "ihre@email.com" attributes["class"] = "form-control"
}
} }
} }
} }
@@ -79,12 +79,11 @@ class NennungView {
// Contact information // Contact information
div(classes = "competition-item") { div(classes = "competition-item") {
div(classes = "participant-details") { div(classes = "participant-details") {
div(classes = "form-row") { div(classes = "form-group") {
div(classes = "form-group form-group-half") { label { +"Telefon-Nr." }
label { +"Telefon-Nr." } input(type = InputType.tel, name = "phone") {
input(type = InputType.tel, name = "phone") { attributes["placeholder"] = "Ihre Telefonnummer"
attributes["placeholder"] = "Ihre Telefonnummer" attributes["class"] = "form-control"
}
} }
} }
} }
@@ -104,8 +103,8 @@ class NennungView {
div(classes = "competitions-list") { div(classes = "competitions-list") {
turnier.bewerbe.forEach { bewerb -> turnier.bewerbe.forEach { bewerb ->
div(classes = "competition-item") { div(classes = "competition-item") {
label { label(classes = "form-check") {
input(type = InputType.checkBox, name = "selectedEvents") { input(type = InputType.checkBox, name = "selectedEvents", classes = "form-check-input") {
attributes["value"] = bewerb.nummer.toString() attributes["value"] = bewerb.nummer.toString()
} }
span(classes = "competition-details") { span(classes = "competition-details") {
@@ -128,7 +127,7 @@ class NennungView {
div(classes = "form-group") { div(classes = "form-group") {
label { +"Wünsche/Bemerkungen" } label { +"Wünsche/Bemerkungen" }
textArea { textArea(classes = "form-control") {
attributes["rows"] = "4" attributes["rows"] = "4"
attributes["name"] = "comments" attributes["name"] = "comments"
attributes["placeholder"] = "Ihre Wünsche oder Bemerkungen zur Nennung..." attributes["placeholder"] = "Ihre Wünsche oder Bemerkungen zur Nennung..."
@@ -137,7 +136,8 @@ class NennungView {
} }
// Submit button // Submit button
div(classes = "form-actions text-center mt-4") { div(classes = "form-actions mt-4") {
attributes["style"] = "justify-content: center;"
button(type = ButtonType.submit, classes = "button") { button(type = ButtonType.submit, classes = "button") {
+"Jetzt Nennen" +"Jetzt Nennen"
} }
@@ -155,16 +155,17 @@ class NennungView {
* @param turnier The tournament the registration was for * @param turnier The tournament the registration was for
* @param riderName The name of the rider * @param riderName The name of the rider
* @param horseName The name of the horse * @param horseName The name of the horse
* @param selectedEvents The list of selected competition IDs
*/ */
suspend fun renderConfirmationPage(call: ApplicationCall, turnier: Turnier, riderName: String, horseName: String) { suspend fun renderConfirmationPage(call: ApplicationCall, turnier: Turnier, riderName: String, horseName: String, selectedEvents: List<String>) {
call.respondHtml(HttpStatusCode.OK) { call.respondHtml(HttpStatusCode.OK) {
layoutTemplate.apply { layoutTemplate.apply {
applyLayout( applyLayout(
title = "Nennung bestätigt - ${turnier.name}", title = "Nennung bestätigt - ${turnier.name}",
showNavbar = false, showNavbar = false,
showAdminLink = false showAdminLink = false,
showFooter = false
) { ) {
h1 { +"Nennung bestätigt" }
div(classes = "confirmation-box") { div(classes = "confirmation-box") {
div(classes = "confirmation-icon") { div(classes = "confirmation-icon") {
@@ -189,6 +190,28 @@ class NennungView {
span(classes = "detail-label") { +"Pferd:" } span(classes = "detail-label") { +"Pferd:" }
span(classes = "detail-value") { +horseName } span(classes = "detail-value") { +horseName }
} }
// Display selected competitions
if (selectedEvents.isNotEmpty()) {
div(classes = "detail-item mt-3") {
span(classes = "detail-label") { +"Ausgewählte Bewerbe:" }
div(classes = "selected-competitions") {
ul(classes = "competition-list") {
selectedEvents.forEach { eventId ->
val bewerb = turnier.bewerbe.find { it.nummer.toString() == eventId }
if (bewerb != null) {
li {
+"${bewerb.nummer}. ${bewerb.titel} - ${bewerb.klasse}"
if (bewerb.task != null) {
+" - ${bewerb.task}"
}
}
}
}
}
}
}
}
} }
p(classes = "confirmation-message") { p(classes = "confirmation-message") {
@@ -15,9 +15,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255, 255, 255, 0.05)" fill-opacity="1" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>'); background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255, 255, 255, 0.05)" fill-opacity="1" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
background-repeat: no-repeat;
background-position: bottom;
background-size: cover; background-size: cover;
opacity: 0.1; opacity: 0.1;
z-index: 0; z-index: 0;
@@ -250,6 +250,8 @@
color: var(--primary-color); color: var(--primary-color);
font-size: 1.25rem; font-size: 1.25rem;
font-weight: 600; font-weight: 600;
font-family: 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
line-height: 1.3;
} }
/* Custom form action buttons container */ /* Custom form action buttons container */
@@ -354,6 +356,24 @@
} }
} }
/* Selected competitions list in confirmation page */
.selected-competitions ul.competition-list {
list-style: none;
padding-left: 0;
margin-top: 0.5rem;
}
.selected-competitions ul.competition-list li {
padding: 0.5rem 0;
border-bottom: 1px dashed var(--border-color);
margin-bottom: 0.5rem;
}
.selected-competitions ul.competition-list li:last-child {
border-bottom: none;
margin-bottom: 0;
}
@media (max-width: 480px) { @media (max-width: 480px) {
.form-section { .form-section {
padding: 1.25rem; padding: 1.25rem;
@@ -146,10 +146,9 @@
} }
.tournament-competitions li { .tournament-competitions li {
padding: 0.5rem 0;
border-bottom: 1px dashed var(--border-color); border-bottom: 1px dashed var(--border-color);
transition: transform var(--transition-fast); transition: transform var(--transition-fast);
padding-left: 1.5rem; padding: 0.5rem 0 0.5rem 1.5rem;
position: relative; position: relative;
} }
@@ -244,14 +243,14 @@
.competitions-list { .competitions-list {
width: 100%; width: 100%;
margin: 0; margin: 0;
display: grid; display: flex;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); flex-direction: column;
gap: 1.5rem; gap: 0.75rem;
} }
/* Competition item */ /* Competition item */
.competition-item { .competition-item {
padding: 1.25rem; padding: 0.75rem;
border-radius: var(--border-radius); border-radius: var(--border-radius);
transition: all var(--transition-fast); transition: all var(--transition-fast);
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
@@ -259,7 +258,8 @@
box-shadow: var(--box-shadow-sm); box-shadow: var(--box-shadow-sm);
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
align-items: center;
} }
.competition-item:hover { .competition-item:hover {
@@ -272,43 +272,81 @@
/* Custom form check styling */ /* Custom form check styling */
.competition-item .form-check { .competition-item .form-check {
display: flex; display: flex;
align-items: flex-start; align-items: center;
padding-left: 0; padding-left: 0;
margin-bottom: 0; margin-bottom: 0;
height: 100%; height: 100%;
width: 100%;
} }
.competition-item .form-check-input { .competition-item .form-check-input {
margin-right: 1rem; margin-right: 1rem;
margin-top: 0.25rem;
float: none; float: none;
flex-shrink: 0; flex-shrink: 0;
width: 1.25rem; width: 1.25rem;
height: 1.25rem; height: 1.25rem;
cursor: pointer; cursor: pointer;
border: 2px solid var(--primary-color);
border-radius: 0.25rem;
transition: all var(--transition-fast);
position: relative;
background-color: white;
}
.competition-item .form-check-input:checked {
background-color: var(--primary-color);
border-color: var(--primary-color);
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
background-position: center;
background-repeat: no-repeat;
background-size: 75%;
}
.competition-item .form-check-input:focus {
outline: 0;
box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
border-color: var(--primary-hover);
}
.competition-item .form-check-input:hover {
border-color: var(--primary-hover);
} }
.competition-details { .competition-details {
flex-grow: 1; flex-grow: 1;
font-family: 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
color: var(--text-color);
line-height: 1.5;
font-size: 1rem;
} }
.competition-details strong { .competition-details strong {
color: var(--primary-color); color: var(--primary-color);
font-weight: 700; font-weight: 700;
font-size: 1.1rem; font-size: 1.1rem;
display: block; display: inline;
margin-bottom: 0.5rem; margin-right: 0.25rem;
} }
/* Participant details section */ /* Participant details section */
.participant-details { .participant-details {
width: 100%; width: 100%;
font-family: 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
} }
.participant-details .form-label { .participant-details .form-label {
font-weight: 600; font-weight: 600;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
color: var(--text-color); color: var(--text-color);
font-size: 1rem;
line-height: 1.5;
}
.participant-details input,
.participant-details textarea {
font-family: 'Inter', 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
color: var(--text-color);
font-size: 1rem;
} }
/* Custom form spacing */ /* Custom form spacing */
@@ -5,7 +5,7 @@
--secondary-color: #7209b7; --secondary-color: #7209b7;
--secondary-hover: #6008a0; --secondary-hover: #6008a0;
--accent-color: #f72585; --accent-color: #f72585;
--text-color: #2b2d42; --text-color: #555555;
--light-text: #6c757d; --light-text: #6c757d;
--lighter-text: #adb5bd; --lighter-text: #adb5bd;
--border-color: #e9ecef; --border-color: #e9ecef;