Start competition mode
This commit is contained in:
@@ -1,416 +1,420 @@
|
|||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: rgba(255, 255, 255, 0.95);
|
background: rgba(255, 255, 255, 0.95);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header::before {
|
.header::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
|
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1 {
|
.header h1 {
|
||||||
font-size: 2.5em;
|
font-size: 2.5em;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header p {
|
.header p {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-buttons {
|
.nav-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-button {
|
.nav-button {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
border: 2px solid #e9ecef;
|
border: 2px solid #e9ecef;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #495057;
|
color: #495057;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-button:hover {
|
.nav-button:hover {
|
||||||
background: #667eea;
|
background: #667eea;
|
||||||
color: white;
|
color: white;
|
||||||
border-color: #667eea;
|
border-color: #667eea;
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
|
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section h2 {
|
.section h2 {
|
||||||
color: #495057;
|
color: #495057;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section h2::before {
|
.section h2::before {
|
||||||
content: "";
|
content: "";
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group label {
|
.form-group label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
color: #495057;
|
color: #495057;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group input {
|
.form-group input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 15px;
|
padding: 12px 15px;
|
||||||
border: 2px solid #e9ecef;
|
border: 2px solid #e9ecef;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group input:focus {
|
.form-group input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: #667eea;
|
border-color: #667eea;
|
||||||
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-row {
|
.time-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-input {
|
.time-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-time {
|
.current-time {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #495057;
|
color: #495057;
|
||||||
border: 2px solid #e9ecef;
|
border: 2px solid #e9ecef;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-group {
|
.button-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 15px 25px;
|
padding: 15px 25px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
|
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
|
background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary:hover {
|
.btn-secondary:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 10px 25px rgba(116, 185, 255, 0.3);
|
box-shadow: 0 10px 25px rgba(116, 185, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-warning {
|
.btn-warning {
|
||||||
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
|
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
|
||||||
color: #d84315;
|
color: #d84315;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-warning:hover {
|
.btn-warning:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 10px 25px rgba(252, 182, 159, 0.3);
|
box-shadow: 0 10px 25px rgba(252, 182, 159, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
|
background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
|
||||||
color: #c62828;
|
color: #c62828;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-danger:hover {
|
.btn-danger:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 10px 25px rgba(255, 154, 158, 0.3);
|
box-shadow: 0 10px 25px rgba(255, 154, 158, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-disabled {
|
.btn-disabled {
|
||||||
background: #e9ecef !important;
|
background: #e9ecef !important;
|
||||||
color: #6c757d !important;
|
color: #6c757d !important;
|
||||||
cursor: not-allowed !important;
|
cursor: not-allowed !important;
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-disabled:hover {
|
.btn-disabled:hover {
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.restriction-notice {
|
/* Toggle Buttons für Modus-Auswahl */
|
||||||
background: #fff3cd;
|
.mode-toggle {
|
||||||
color: #856404;
|
display: flex;
|
||||||
padding: 15px;
|
gap: 0;
|
||||||
border-radius: 10px;
|
border: 2px solid #e9ecef;
|
||||||
border: 2px solid #ffeaa7;
|
border-radius: 12px;
|
||||||
margin-bottom: 15px;
|
overflow: hidden;
|
||||||
font-weight: 600;
|
background: white;
|
||||||
text-align: center;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-message {
|
.mode-button {
|
||||||
margin-top: 20px;
|
flex: 1;
|
||||||
padding: 15px;
|
padding: 15px 25px;
|
||||||
border-radius: 10px;
|
border: none;
|
||||||
font-weight: 600;
|
background: white;
|
||||||
text-align: center;
|
color: #495057;
|
||||||
display: none;
|
font-size: 16px;
|
||||||
}
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.status-success {
|
.mode-button.active {
|
||||||
background: #d4edda;
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
color: #155724;
|
color: white;
|
||||||
border: 2px solid #c3e6cb;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-error {
|
.mode-button:not(.active):hover {
|
||||||
background: #f8d7da;
|
background: #f8f9fa;
|
||||||
color: #721c24;
|
color: #667eea;
|
||||||
border: 2px solid #f5c6cb;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-info {
|
.mode-button:first-child {
|
||||||
background: #cce7ff;
|
border-right: 1px solid #e9ecef;
|
||||||
color: #004085;
|
}
|
||||||
border: 2px solid #b3d9ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.learning-mode {
|
.restriction-notice {
|
||||||
display: none;
|
background: #fff3cd;
|
||||||
text-align: center;
|
color: #856404;
|
||||||
padding: 30px;
|
padding: 15px;
|
||||||
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
|
border-radius: 10px;
|
||||||
border-radius: 15px;
|
border: 2px solid #ffeaa7;
|
||||||
margin-top: 20px;
|
margin-bottom: 15px;
|
||||||
}
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.learning-mode h3 {
|
.status-message {
|
||||||
color: #d84315;
|
margin-top: 20px;
|
||||||
font-size: 1.5em;
|
padding: 15px;
|
||||||
margin-bottom: 15px;
|
border-radius: 10px;
|
||||||
}
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.learning-mode p {
|
.status-success {
|
||||||
color: #bf360c;
|
background: #d4edda;
|
||||||
font-size: 1.2em;
|
color: #155724;
|
||||||
margin-bottom: 20px;
|
border: 2px solid #c3e6cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pulse {
|
.status-error {
|
||||||
animation: pulse 2s infinite;
|
background: #f8d7da;
|
||||||
}
|
color: #721c24;
|
||||||
|
border: 2px solid #f5c6cb;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes pulse {
|
.status-info {
|
||||||
0% {
|
background: #cce7ff;
|
||||||
transform: scale(1);
|
color: #004085;
|
||||||
}
|
border: 2px solid #b3d9ff;
|
||||||
50% {
|
}
|
||||||
transform: scale(1.05);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
.learning-mode {
|
||||||
.container {
|
display: none;
|
||||||
margin: 10px;
|
text-align: center;
|
||||||
border-radius: 15px;
|
padding: 30px;
|
||||||
}
|
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
|
||||||
|
border-radius: 15px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.learning-mode h3 {
|
||||||
padding: 20px;
|
color: #d84315;
|
||||||
}
|
font-size: 1.5em;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-buttons {
|
.learning-mode p {
|
||||||
flex-direction: column;
|
color: #bf360c;
|
||||||
}
|
font-size: 1.2em;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.button-group {
|
.pulse {
|
||||||
flex-direction: column;
|
animation: pulse 2s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
@keyframes pulse {
|
||||||
width: 100%;
|
0% {
|
||||||
}
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.time-row {
|
.section select {
|
||||||
flex-direction: column;
|
width: 100%;
|
||||||
gap: 10px;
|
padding: 12px 16px;
|
||||||
}
|
font-size: 16px;
|
||||||
}
|
font-family: inherit;
|
||||||
|
border: 2px solid #e1e5e9;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: white;
|
||||||
|
background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 12px center;
|
||||||
|
background-size: 12px;
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
.section select {
|
.section select:hover {
|
||||||
width: 100%;
|
border-color: #007bff;
|
||||||
padding: 12px 16px;
|
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
|
||||||
font-size: 16px;
|
}
|
||||||
font-family: inherit;
|
|
||||||
border: 2px solid #e1e5e9;
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: white;
|
|
||||||
background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: right 12px center;
|
|
||||||
background-size: 12px;
|
|
||||||
appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section select:hover {
|
.section select:focus {
|
||||||
border-color: #007bff;
|
outline: none;
|
||||||
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
|
border-color: #007bff;
|
||||||
}
|
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
.section select:focus {
|
.section select:disabled {
|
||||||
outline: none;
|
background-color: #f8f9fa;
|
||||||
border-color: #007bff;
|
color: #6c757d;
|
||||||
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
|
cursor: not-allowed;
|
||||||
}
|
opacity: 0.6;
|
||||||
|
border-color: #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
.section select:disabled {
|
@media (max-width: 600px) {
|
||||||
background-color: #f8f9fa;
|
.container {
|
||||||
color: #6c757d;
|
margin: 10px;
|
||||||
cursor: not-allowed;
|
border-radius: 15px;
|
||||||
opacity: 0.6;
|
}
|
||||||
border-color: #dee2e6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section select:disabled:hover {
|
.content {
|
||||||
border-color: #dee2e6;
|
padding: 20px;
|
||||||
box-shadow: none;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Option Styling */
|
.nav-buttons {
|
||||||
.section select option {
|
flex-direction: column;
|
||||||
padding: 8px;
|
}
|
||||||
font-size: 16px;
|
|
||||||
background-color: white;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section select option:hover {
|
.button-group {
|
||||||
background-color: #f8f9fa;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section select option:disabled {
|
.btn {
|
||||||
color: #6c757d;
|
width: 100%;
|
||||||
background-color: #f8f9fa;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Form Group für bessere Abstände */
|
.time-row {
|
||||||
.section .form-group {
|
flex-direction: column;
|
||||||
margin-bottom: 20px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section .form-group label {
|
.mode-toggle {
|
||||||
display: block;
|
flex-direction: column;
|
||||||
margin-bottom: 8px;
|
gap: 0;
|
||||||
font-weight: 600;
|
}
|
||||||
color: #333;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive Design für kleinere Bildschirme */
|
.mode-button:first-child {
|
||||||
@media (max-width: 768px) {
|
border-right: none;
|
||||||
.section select {
|
border-bottom: 1px solid #e9ecef;
|
||||||
font-size: 16px; /* Verhindert Zoom auf iOS */
|
}
|
||||||
padding: 14px 16px;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -66,6 +66,30 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Mode Selection Section -->
|
||||||
|
<div class="section">
|
||||||
|
<h2>🎯 Modus</h2>
|
||||||
|
<form id="modeForm">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Modus auswählen:</label>
|
||||||
|
<div class="mode-toggle">
|
||||||
|
<button type="button" class="mode-button active" data-mode="individual" onclick="selectMode('individual')">
|
||||||
|
👤 Individual
|
||||||
|
</button>
|
||||||
|
<button type="button" class="mode-button" data-mode="wettkampf" onclick="selectMode('wettkampf')">
|
||||||
|
🏆 Wettkampf
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="button-group">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
💾 Modus speichern
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Basic Settings Section -->
|
<!-- Basic Settings Section -->
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>🔧 Grundeinstellungen</h2>
|
<h2>🔧 Grundeinstellungen</h2>
|
||||||
@@ -464,6 +488,43 @@
|
|||||||
saveLicence();
|
saveLicence();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Mode selection function
|
||||||
|
// Remove active class from all mode buttons
|
||||||
|
function selectMode(mode) {
|
||||||
|
document.querySelectorAll('.mode-button').forEach(button => {
|
||||||
|
button.classList.remove('active');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add active class to selected button
|
||||||
|
document.querySelector(`[data-mode="${mode}"]`).classList.add('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mode form handler
|
||||||
|
document.getElementById('modeForm').addEventListener('submit', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const activeButton = document.querySelector('.mode-button.active');
|
||||||
|
const selectedMode = activeButton ? activeButton.getAttribute('data-mode') : 'individual';
|
||||||
|
|
||||||
|
fetch('/api/set-mode', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
|
body: 'mode=' + encodeURIComponent(selectedMode)
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.success) {
|
||||||
|
showMessage('Modus erfolgreich gespeichert!', 'success');
|
||||||
|
} else {
|
||||||
|
showMessage('Fehler beim Speichern des Modus', 'error');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => showMessage('Verbindungsfehler', 'error'));
|
||||||
|
});
|
||||||
|
|
||||||
// Einstellungen laden
|
// Einstellungen laden
|
||||||
function loadSettings() {
|
function loadSettings() {
|
||||||
fetch("/api/get-settings")
|
fetch("/api/get-settings")
|
||||||
|
|||||||
20
src/gamemodes.h
Normal file
20
src/gamemodes.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
#include <ArduinoJson.h>
|
||||||
|
#include <ESPAsyncWebServer.h>
|
||||||
|
|
||||||
|
void IndividualMode();
|
||||||
|
void CompetitionMode();
|
||||||
|
|
||||||
|
void IndividualMode(const char *action, int lane, int timestamp = 0) {
|
||||||
|
Serial.printf("Individual Mode Action: %s on Lane %d at %d\n", action, lane,
|
||||||
|
timestamp);
|
||||||
|
// Implement individual mode logic here
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompetitionMode(const char *action, int lane, int timestamp = 0) {
|
||||||
|
Serial.printf("Competition Mode Action: %s on Lane %d at %d\n", action, lane,
|
||||||
|
timestamp);
|
||||||
|
// Implement competition mode logic here
|
||||||
|
}
|
||||||
@@ -56,6 +56,7 @@ unsigned long maxTimeBeforeReset = 300000; // 5 Minuten default
|
|||||||
unsigned long maxTimeDisplay = 20000; // 20 Sekunden Standard (in ms)
|
unsigned long maxTimeDisplay = 20000; // 20 Sekunden Standard (in ms)
|
||||||
bool wifimodeAP = false; // AP-Modus deaktiviert
|
bool wifimodeAP = false; // AP-Modus deaktiviert
|
||||||
String masterlocation;
|
String masterlocation;
|
||||||
|
int operationalMode = 0; // 0=Individual, 1=Wettkampf
|
||||||
|
|
||||||
// Function Declarations
|
// Function Declarations
|
||||||
void OnDataRecv(const uint8_t *mac, const uint8_t *incomingData, int len);
|
void OnDataRecv(const uint8_t *mac, const uint8_t *incomingData, int len);
|
||||||
|
|||||||
@@ -280,6 +280,31 @@ void setupRoutes() {
|
|||||||
request->send(200, "application/json", "{\"success\":true}");
|
request->send(200, "application/json", "{\"success\":true}");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
server.on("/api/set-mode", HTTP_POST, [](AsyncWebServerRequest *request) {
|
||||||
|
Serial.println("/api/set-mode called");
|
||||||
|
|
||||||
|
String mode;
|
||||||
|
if (request->hasParam("mode", true)) {
|
||||||
|
mode = request->getParam("mode", true)->value();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode.length() > 0) {
|
||||||
|
// Speichere den Modus
|
||||||
|
operationalMode = mode == "individual" ? 1 : 0;
|
||||||
|
Serial.printf("Operational mode set to: %s\n",
|
||||||
|
operationalMode == 1 ? "Individual" : "Wettkampf");
|
||||||
|
// Rückmeldung
|
||||||
|
DynamicJsonDocument doc(64);
|
||||||
|
doc["success"] = true;
|
||||||
|
String result;
|
||||||
|
serializeJson(doc, result);
|
||||||
|
request->send(200, "application/json", result);
|
||||||
|
} else {
|
||||||
|
request->send(400, "application/json",
|
||||||
|
"{\"success\":false,\"error\":\"Modus fehlt\"}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Statische Dateien
|
// Statische Dateien
|
||||||
server.serveStatic("/", SPIFFS, "/");
|
server.serveStatic("/", SPIFFS, "/");
|
||||||
server.begin();
|
server.begin();
|
||||||
|
|||||||
Reference in New Issue
Block a user