Переглянути джерело

Add gallery model.
Update "travel" to "gallery" on the main menu.

Lee Morgan 5 роки тому
батько
коміт
207235ed53
2 змінених файлів з 18 додано та 4 видалено
  1. 13 0
      models/gallery.js
  2. 5 4
      views/main/index.html

+ 13 - 0
models/gallery.js

@@ -0,0 +1,13 @@
+const mongoose = require("mongoose");
+
+const GallerySchema = new mongoose.Schema({
+    owner: {
+        type: mongoose.Schema.Types.ObjectId,
+        ref: "Uploader",
+        required: true
+    },
+    tags: [String],
+    images: [String]
+});
+
+module.exports = mongoose.model("Gallery", GallerySchema);

+ 5 - 4
views/main/index.html

@@ -52,12 +52,13 @@
 
             <button id="travelButton">
                 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
-                    <circle cx="12" cy="12" r="10"></circle>
-                    <polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>
+                    <rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
+                    <circle cx="8.5" cy="8.5" r="1.5"></circle>
+                    <polyline points="21 15 16 10 5 21"></polyline>
                 </svg>
                 
-                <p>Travel</p>
-                <p>Путушествия</p>
+                <p>Gallery</p>
+                <p>Галерея</p>
             </button>
 
             <button id="learnButton">