diff --git a/models/Item.js b/models/Item.js index 927e894..6e295da 100644 --- a/models/Item.js +++ b/models/Item.js @@ -2,12 +2,24 @@ const mongoose = require('mongoose'); const itemSchema = new mongoose.Schema({ name: { - type: String, - required: true + en: { + type: String, + required: true + }, + nl: { + type: String, + required: true + } }, description: { - type: String, - default: '' + en: { + type: String, + default: '' + }, + nl: { + type: String, + default: '' + } }, location: { type: String, diff --git a/public/css/style.css b/public/css/style.css index 7da740c..200f8e0 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -475,4 +475,83 @@ body { background-color: var(--vista-coral); border-color: var(--vista-coral); color: var(--vista-white); +} + +/* Language Toggle Styles */ +.language-toggle { + display: flex; + align-items: center; + gap: 0.5rem; + margin-right: 1rem; +} + +.language-switch { + position: relative; + display: inline-block; + width: 60px; + height: 28px; +} + +.language-switch input { + opacity: 0; + width: 0; + height: 0; +} + +.language-slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: var(--vista-coral); + transition: .4s; + border-radius: 34px; +} + +.language-slider:before { + position: absolute; + content: ""; + height: 20px; + width: 20px; + left: 4px; + bottom: 4px; + background-color: white; + transition: .4s; + border-radius: 50%; +} + +input:checked + .language-slider { + background-color: var(--vista-blue); +} + +input:checked + .language-slider:before { + transform: translateX(32px); +} + +.language-label { + color: var(--vista-white); + font-weight: 500; + min-width: 20px; + text-align: center; +} + +.language-label.active { + font-weight: bold; +} + +/* Language toggle for login page */ +.language-toggle-container { + display: flex; + justify-content: center; + align-items: center; +} + +.language-toggle-container .language-toggle { + margin-right: 0; +} + +.language-toggle-container .language-label { + color: var(--vista-blue) !important; } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 9a4a444..655f923 100644 --- a/public/index.html +++ b/public/index.html @@ -12,23 +12,33 @@