From 2798c60d88b48254cefa3088b0b560c085c7f608 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Wed, 9 Aug 2023 22:26:46 +0900 Subject: [PATCH 01/34] Feat: Add index --- .firebaserc | 5 +++ .gitignore | 70 +++++++++++++++++++++++++++++++++++++ firebase.json | 17 +++++++++ firestore.indexes.json | 4 +++ firestore.rules | 9 +++++ public/404.html | 33 ++++++++++++++++++ public/index.html | 42 ++++++++++++++++++++++ public/main.css | 48 +++++++++++++++++++++++++ public/main.js | 34 ++++++++++++++++++ public/reset.css | 79 ++++++++++++++++++++++++++++++++++++++++++ public/upload.html | 60 ++++++++++++++++++++++++++++++++ storage.rules | 12 +++++++ 12 files changed, 413 insertions(+) create mode 100644 .firebaserc create mode 100644 .gitignore create mode 100644 firebase.json create mode 100644 firestore.indexes.json create mode 100644 firestore.rules create mode 100644 public/404.html create mode 100644 public/index.html create mode 100644 public/main.css create mode 100644 public/main.js create mode 100644 public/reset.css create mode 100644 public/upload.html create mode 100644 storage.rules diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 000000000..66e05759c --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "javascript-picture" + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..855bd1c81 --- /dev/null +++ b/.gitignore @@ -0,0 +1,70 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +firebase-debug.log* +firebase-debug.*.log* + +# Firebase cache +.firebase/ + +# Firebase config + +# Uncomment this if you'd like others to create their own Firebase project. +# For a team working on the same Firebase project(s), it is recommended to leave +# it commented so all members can deploy to the same project(s) in .firebaserc. +# .firebaserc + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + + +# Ignore IDE specific files +.vscode/ diff --git a/firebase.json b/firebase.json new file mode 100644 index 000000000..13c45df0f --- /dev/null +++ b/firebase.json @@ -0,0 +1,17 @@ +{ + "firestore": { + "rules": "firestore.rules", + "indexes": "firestore.indexes.json" + }, + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + }, + "storage": { + "rules": "storage.rules" + } +} diff --git a/firestore.indexes.json b/firestore.indexes.json new file mode 100644 index 000000000..415027e5d --- /dev/null +++ b/firestore.indexes.json @@ -0,0 +1,4 @@ +{ + "indexes": [], + "fieldOverrides": [] +} diff --git a/firestore.rules b/firestore.rules new file mode 100644 index 000000000..cd1a4346f --- /dev/null +++ b/firestore.rules @@ -0,0 +1,9 @@ +rules_version = '2'; + +service cloud.firestore { + match /databases/{database}/documents { + match /{document=**} { + allow read, write: if false; + } + } +} \ No newline at end of file diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..829eda8fd --- /dev/null +++ b/public/404.html @@ -0,0 +1,33 @@ + + + + + + Page Not Found + + + + +
+

404

+

Page Not Found

+

The specified file was not found on this website. Please check the URL for mistakes and try again.

+

Why am I seeing this?

+

This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html file in your project's configured public directory.

+
+ + diff --git a/public/index.html b/public/index.html new file mode 100644 index 000000000..8dd2e1c4a --- /dev/null +++ b/public/index.html @@ -0,0 +1,42 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + +
+

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

+ +
+ + +
+ +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/public/main.css b/public/main.css new file mode 100644 index 000000000..c0379a59e --- /dev/null +++ b/public/main.css @@ -0,0 +1,48 @@ +h1 { + text-align: center; + font-size: 2.6rem; + margin: 40px auto; +} + +.pos-r { + position: relative; +} +.nav ul { + display: flex; + justify-content: space-around; + width: 100%; + margin: 40px auto; +} +.container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + margin-top: 2rem; +} + +.employee { + width: 100%; + display: flex; + padding: 10px; +} + +.employee .profile { + font-size: 1rem; + line-height: 1.6rem; + margin-left: 4%; +} + +.employee .profile .name { + font-weight: bold; + font-size: 1.4rem; + line-height: 3rem; +} + +.thumbnail { + max-width: 200px; + width: 100%; + border-radius: 10px; + background-size: cover; + background-position: center; +} diff --git a/public/main.js b/public/main.js new file mode 100644 index 000000000..0396d6d98 --- /dev/null +++ b/public/main.js @@ -0,0 +1,34 @@ +const firebaseConfig = { + apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", + authDomain: "javascript-picture.firebaseapp.com", + projectId: "javascript-picture", + storageBucket: "javascript-picture.appspot.com", + messagingSenderId: "487659103783", + appId: "1:487659103783:web:e98479de1137818dfa9002", + measurementId: "G-0RSTQFT7N8" + }; + + // Initialize Firebase + firebase.initializeApp(firebaseConfig) + const db = firebase.firestore(); + + db.collection('member').get().then((๊ฒฐ๊ณผ)=>{ + console.log(๊ฒฐ๊ณผ); + ๊ฒฐ๊ณผ.forEach((doc)=>{ + console.log(doc.data()); + var template = `
+
+
+
${doc.data().์ด๋ฆ„}
+

์†Œ์†/์ง๊ธ‰: ${doc.data().์ง๊ธ‰}

+

์—ฐ๋ฝ์ฒ˜: ${doc.data().์—ฐ๋ฝ์ฒ˜}

+ +

๊ธฐํƒ€: ${doc.data().๊ธฐํƒ€}

+
+
` + const wrap = document.querySelector('.container') + wrap.insertAdjacentHTML('beforeend',template) + + }) + + }) \ No newline at end of file diff --git a/public/reset.css b/public/reset.css new file mode 100644 index 000000000..8e31ad25f --- /dev/null +++ b/public/reset.css @@ -0,0 +1,79 @@ +@charset "utf-8"; + + +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { + margin:0; + padding:0; + border:0; + outline:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} + +body { + line-height:1; +} + +h1{text-align: center + ;} +article,aside,details,figcaption,figure, footer,header,hgroup,menu,nav,section { + display:block; +} + +ul { + list-style:none; +} + +blockquote, q { + quotes:none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content:''; + content:none; +} +a { + margin:0; + padding:0; + font-size:100%; + vertical-align:baseline; + background:transparent; +} +/* change colors to suit your needs */ +ins { + background-color:#ff9; + color:#000; + text-decoration:none; +} +/* change colors to suit your needs */ +mark { + background-color:#ff9; + color:#000; + font-style:italic; + font-weight:bold; +} +del { + text-decoration: line-through; +} +abbr[title], dfn[title] { + border-bottom:1px dotted; + cursor:help; +} +table { + border-collapse:collapse; + border-spacing:0; +} +/* change border color to suit your needs */ +hr { + display:block; + height:1px; + border:0; + border-top:1px solid #cccccc; + margin:1em 0; + padding:0; +} +input, select { + vertical-align:middle; +} + diff --git a/public/upload.html b/public/upload.html new file mode 100644 index 000000000..3b2cbe6fe --- /dev/null +++ b/public/upload.html @@ -0,0 +1,60 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
+

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

+ +
+ + +
+ + + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/storage.rules b/storage.rules new file mode 100644 index 000000000..f08744f03 --- /dev/null +++ b/storage.rules @@ -0,0 +1,12 @@ +rules_version = '2'; + +// Craft rules based on data in your Firestore database +// allow write: if firestore.get( +// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin; +service firebase.storage { + match /b/{bucket}/o { + match /{allPaths=**} { + allow read, write: if false; + } + } +} From 3b85946efe04a52a1f85b739e29bae75e66b0628 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Thu, 10 Aug 2023 12:58:30 +0900 Subject: [PATCH 02/34] Feat: Add upload & login --- public/common.js | 17 +++++++ public/index.html | 23 ++++++---- public/login.html | 65 +++++++++++++++++++++++++++ public/login.js | 36 +++++++++++++++ public/main.css | 89 +++++++++++++++++++++++++++++++++++- public/main.js | 25 ++++++----- public/upload.html | 52 +++++++++++---------- public/upload.js | 110 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 371 insertions(+), 46 deletions(-) create mode 100644 public/common.js create mode 100644 public/login.html create mode 100644 public/login.js create mode 100644 public/upload.js diff --git a/public/common.js b/public/common.js new file mode 100644 index 000000000..7a08a017f --- /dev/null +++ b/public/common.js @@ -0,0 +1,17 @@ +const firebaseConfig = { + apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", + authDomain: "javascript-picture.firebaseapp.com", + projectId: "javascript-picture", + storageBucket: "javascript-picture.appspot.com", + messagingSenderId: "487659103783", + appId: "1:487659103783:web:e98479de1137818dfa9002", + measurementId: "G-0RSTQFT7N8" + }; + + + // Initialize Firebase + firebase.initializeApp(firebaseConfig) + + +const db = firebase.firestore(); +const storage = firebase.storage(); \ No newline at end of file diff --git a/public/index.html b/public/index.html index 8dd2e1c4a..ec4ea2e31 100644 --- a/public/index.html +++ b/public/index.html @@ -5,8 +5,12 @@ ๐Ÿ™‹โ€โ™€๏ธemployee picture - - + + + + @@ -14,19 +18,19 @@

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

-
+
-
+ @@ -34,6 +38,7 @@

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

+ diff --git a/public/login.html b/public/login.html new file mode 100644 index 000000000..9b1a51827 --- /dev/null +++ b/public/login.html @@ -0,0 +1,65 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
+

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

+ +
+ + +
+

ํšŒ์›๊ฐ€์ž…

+
+ + + +
+ +
+
+ +
+ + +
+

๋กœ๊ทธ์ธ

+
+ + + +
+ + +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/public/login.js b/public/login.js new file mode 100644 index 000000000..4f6bea391 --- /dev/null +++ b/public/login.js @@ -0,0 +1,36 @@ +const joinBtn=document.getElementById('join-btn') +const loginBtn=document.getElementById('login-btn') +const logoutBtn=document.getElementById('logout-btn') + +//๊ฐ€์ž…ํ•˜๊ธฐ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด +joinBtn.addEventListener("click",function(){ + const joinName = document.getElementById("join__name").value; + const joinEmail = document.getElementById("join__email").value; + const joinPw = document.getElementById("join__pw").value; + + firebase.auth().createUserWithEmailAndPassword(joinEmail,joinPw).then((result)=>{ + console.log(result); + console.log(result.user); + result.user.updateProfile( {displayName : joinName} ) + + }) +}); + + +//๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด +loginBtn.addEventListener("click",function(){ + const loginEmail = document.getElementById("login__email").value; + const loginPw = document.getElementById("login__pw").value; + + firebase.auth().signInWithEmailAndPassword(loginEmail,loginPw).then((result)=>{ + console.log('๋กœ๊ทธ์ธ ์™„๋ฃŒ!'+result.user) + alert('๋กœ๊ทธ์ธ ์™„๋ฃŒ!') + + }) +}); + +//๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด +logoutBtn.addEventListener("click",function(){ + firebase.auth().signOut(); + alert('๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!') +}); \ No newline at end of file diff --git a/public/main.css b/public/main.css index c0379a59e..acc2403c9 100644 --- a/public/main.css +++ b/public/main.css @@ -1,9 +1,25 @@ h1 { text-align: center; font-size: 2.6rem; - margin: 40px auto; + margin: 4rem auto; +} +h2 { + text-align: center; + font-size: 1.4rem; + margin: 4rem auto 2rem; +} +.txt-l { + text-align: left; +} +.txt-r { + text-align: right; +} +.txt-c { + text-align: center; +} +.ml-20 { + margin-left: 20px; } - .pos-r { position: relative; } @@ -20,6 +36,14 @@ h1 { align-items: flex-start; margin-top: 2rem; } +.input-col { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + margin-top: 2rem; + gap: 0.5rem; +} .employee { width: 100%; @@ -46,3 +70,64 @@ h1 { background-size: cover; background-position: center; } + +.input-col { + width: 50%; + margin: 0 auto; +} +.form-input, +.form-text { + width: 100%; + margin: 0 auto 0.4rem; + height: 30px; +} +.upload-area .form-file { + z-index: 0; + position: absolute; + top: 10%; + left: 32px; +} +.upload-area .custom-upload { + background: #797979; + color: #fff; + padding: 10px; + border-radius: 5px; + cursor: pointer; + position: relative; + z-index: 1; +} +.custom-upload:hover { + background: #b1b1b1; +} +.upload-area, +.btn-area { + width: 100%; + margin: 0.5rem 0; +} +.upload-area { + display: flex; + justify-content: flex-start; +} +.btn-area { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: nowrap; +} +.btn { + width: 100%; + height: 50px; + background: #264665; + border-radius: 5px; + color: #fff; + border: none; +} +.btn:hover { + background: #3e4e6d; +} +#login .btn { + width: 49%; +} +.btn#logout-btn { + background: #828282; +} diff --git a/public/main.js b/public/main.js index 0396d6d98..40a7b07d0 100644 --- a/public/main.js +++ b/public/main.js @@ -1,16 +1,17 @@ -const firebaseConfig = { - apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", - authDomain: "javascript-picture.firebaseapp.com", - projectId: "javascript-picture", - storageBucket: "javascript-picture.appspot.com", - messagingSenderId: "487659103783", - appId: "1:487659103783:web:e98479de1137818dfa9002", - measurementId: "G-0RSTQFT7N8" - }; +// const firebaseConfig = { +// apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", +// authDomain: "javascript-picture.firebaseapp.com", +// projectId: "javascript-picture", +// storageBucket: "javascript-picture.appspot.com", +// messagingSenderId: "487659103783", +// appId: "1:487659103783:web:e98479de1137818dfa9002", +// measurementId: "G-0RSTQFT7N8" +// }; - // Initialize Firebase - firebase.initializeApp(firebaseConfig) - const db = firebase.firestore(); +// // Initialize Firebase +// firebase.initializeApp(firebaseConfig) + + // const db = firebase.firestore(); db.collection('member').get().then((๊ฒฐ๊ณผ)=>{ console.log(๊ฒฐ๊ณผ); diff --git a/public/upload.html b/public/upload.html index 3b2cbe6fe..17f17fa25 100644 --- a/public/upload.html +++ b/public/upload.html @@ -5,8 +5,8 @@ ๐Ÿ™‹โ€โ™€๏ธemployee picture - - + + + + + +
+

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

+ +
+ + +
+

์ƒ์„ธ์ •๋ณด

+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/public/detail.js b/public/detail.js new file mode 100644 index 000000000..dbf52fd69 --- /dev/null +++ b/public/detail.js @@ -0,0 +1,36 @@ +//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ +let queryString = new URLSearchParams(window.location.search); +queryString.get('id') + +db.collection('member').doc(queryString.get('id')).get().then((result) => { + console.log(result.data()) + + var templateDetail = ` +
+
+
+
+
+
${result.data().์ด๋ฆ„}
+
์†Œ์†ํŒ€: ${result.data().์†Œ์†ํŒ€}
+
์ง๊ธ‰: ${result.data().์ง๊ธ‰}
+
๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}
+
์—ฐ๋ฝ์ฒ˜: ${result.data().์—ฐ๋ฝ์ฒ˜}
+
์ด๋ฉ”์ผ: ${result.data().์ด๋ฉ”์ผ}
+
๊ธฐํƒ€: ${result.data().๊ธฐํƒ€}
+
+
+ ` + + const wrap = document.querySelector('#detail') + wrap.insertAdjacentHTML('beforeend',templateDetail) +}); + + + + + + + + + From d831dfd48b61845e469442557bae59e763bd243a Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Thu, 10 Aug 2023 17:57:06 +0900 Subject: [PATCH 05/34] Fix: Delete form tag --- public/login.html | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/public/login.html b/public/login.html index c0ce584dc..ebe94a39c 100644 --- a/public/login.html +++ b/public/login.html @@ -21,44 +21,38 @@

๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

  • ์ง์›๋ชฉ๋ก
  • ์—…๋กœ๋“œ
  • ๋กœ๊ทธ์ธ
  • -
  • ์ƒ์„ธ์ •๋ณด
  • ๊ฒ€์ƒ‰
  • -
    +

    ํšŒ์›๊ฐ€์ž…

    -
    -
    -
    +

    ๋กœ๊ทธ์ธ

    -
    -
    - - - - - - - + + + + + + \ No newline at end of file From 5a28ac19734d92df7bb00dd7187299d1e2cbf24f Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Thu, 10 Aug 2023 17:59:55 +0900 Subject: [PATCH 06/34] Design: Modify layout(index,upload) --- public/index.html | 100 +++++++++++++++++++++++++++------------------ public/main.css | 32 ++++++++++----- public/main.js | 31 ++++---------- public/reset.css | 2 + public/upload.html | 17 +++----- public/upload.js | 7 +++- 6 files changed, 103 insertions(+), 86 deletions(-) diff --git a/public/index.html b/public/index.html index ec4ea2e31..834389bbc 100644 --- a/public/index.html +++ b/public/index.html @@ -1,47 +1,69 @@ - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - + + +
    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    +
    +
    +
    ์ด๋ฏธ์ง€
    +
    ์ด๋ฆ„
    +
    ์†Œ์†/์ง๊ธ‰
    +
    ๋‚ด์„ ๋ฒˆํ˜ธ
    +
    ์ƒ์„ธ์ •๋ณด
    +
    +
    - -
    - -
    - - - - - - - + + + + + + - - - - - \ No newline at end of file + + diff --git a/public/main.css b/public/main.css index acc2403c9..df11d6105 100644 --- a/public/main.css +++ b/public/main.css @@ -45,32 +45,44 @@ h2 { gap: 0.5rem; } -.employee { - width: 100%; - display: flex; - padding: 10px; -} -.employee .profile { +.profile { font-size: 1rem; line-height: 1.6rem; - margin-left: 4%; } -.employee .profile .name { +.profile .name { font-weight: bold; font-size: 1.4rem; line-height: 3rem; } +main .profile, +main .profile_title{ + width: 100%; + display:grid; + grid-template-columns: 20% 20% 20% 20% 20%; + margin:10px auto; + text-align: center;align-items: center; +} + .thumbnail { - max-width: 200px; width: 100%; + height: 100%; + margin:0 auto; border-radius: 10px; background-size: cover; background-position: center; } +main .thumbnail{ max-width: 80px; height: 100%;} +#detail .profile{display:flex;flex-direction: row;flex-wrap: wrap; line-height: 2rem;} +#detail .profile .col-1{width:30%;} +#detail .profile .col-2{width:70%;} + +#detail .thumbnail{ max-width: 200px;} + + .input-col { width: 50%; margin: 0 auto; @@ -117,7 +129,7 @@ h2 { .btn { width: 100%; height: 50px; - background: #264665; + background: #183153; border-radius: 5px; color: #fff; border: none; diff --git a/public/main.js b/public/main.js index 40a7b07d0..1a27ea9b6 100644 --- a/public/main.js +++ b/public/main.js @@ -1,32 +1,15 @@ -// const firebaseConfig = { -// apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", -// authDomain: "javascript-picture.firebaseapp.com", -// projectId: "javascript-picture", -// storageBucket: "javascript-picture.appspot.com", -// messagingSenderId: "487659103783", -// appId: "1:487659103783:web:e98479de1137818dfa9002", -// measurementId: "G-0RSTQFT7N8" -// }; - -// // Initialize Firebase -// firebase.initializeApp(firebaseConfig) - - // const db = firebase.firestore(); db.collection('member').get().then((๊ฒฐ๊ณผ)=>{ console.log(๊ฒฐ๊ณผ); ๊ฒฐ๊ณผ.forEach((doc)=>{ console.log(doc.data()); - var template = `
    -
    -
    -
    ${doc.data().์ด๋ฆ„}
    -

    ์†Œ์†/์ง๊ธ‰: ${doc.data().์ง๊ธ‰}

    -

    ์—ฐ๋ฝ์ฒ˜: ${doc.data().์—ฐ๋ฝ์ฒ˜}

    - -

    ๊ธฐํƒ€: ${doc.data().๊ธฐํƒ€}

    -
    -
    ` + var template = `
    +
    +
    ${doc.data().์ด๋ฆ„}
    +
    ${doc.data().์†Œ์†ํŒ€} ${doc.data().์ง๊ธ‰}
    +
    ${doc.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    +
    ์ƒ์„ธ

    +

    ` const wrap = document.querySelector('.container') wrap.insertAdjacentHTML('beforeend',template) diff --git a/public/reset.css b/public/reset.css index 8e31ad25f..b0ef7a8ae 100644 --- a/public/reset.css +++ b/public/reset.css @@ -39,6 +39,8 @@ a { font-size:100%; vertical-align:baseline; background:transparent; + color:#000; + text-decoration:none; } /* change colors to suit your needs */ ins { diff --git a/public/upload.html b/public/upload.html index 17f17fa25..9ce299f88 100644 --- a/public/upload.html +++ b/public/upload.html @@ -21,19 +21,19 @@

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

  • ์ง์›๋ชฉ๋ก
  • ์—…๋กœ๋“œ
  • ๋กœ๊ทธ์ธ
  • -
  • ์ƒ์„ธ์ •๋ณด
  • ๊ฒ€์ƒ‰
  • -
    +

    ์ง์› ์ •๋ณด ์—…๋กœ๋“œ

    -
    - + + - + +
    @@ -43,12 +43,7 @@

    ์ง์› ์ •๋ณด ์—…๋กœ๋“œ

    - -
    - - - - +
    diff --git a/public/upload.js b/public/upload.js index 6cf59dc24..5ed1e29d7 100644 --- a/public/upload.js +++ b/public/upload.js @@ -22,17 +22,20 @@ console.log('์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”', url); const name = document.getElementById("name").value; + const tel = document.getElementById("tel").value; const phone = document.getElementById("phone").value; const email= document.getElementById("email").value; + const team= document.getElementById("team").value; const rank= document.getElementById("rank").value; const memo = document.getElementById("memo").value; - const saveData ={ ์ด๋ฆ„ : name, + ๋‚ด์„ ๋ฒˆํ˜ธ : tel, + ์†Œ์†ํŒ€ : team, + ์ง๊ธ‰ : rank, ์—ฐ๋ฝ์ฒ˜ : phone, ์ด๋ฉ”์ผ : email, - ์ง๊ธ‰ : rank, ๊ธฐํƒ€ : memo, ์ด๋ฏธ์ง€: url } From 6ab7483b6516b430e260b8ec9631a847c3fdba17 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 11 Aug 2023 18:27:35 +0900 Subject: [PATCH 07/34] Feat: Add onAuthStateChanged --- public/common.js | 66 +++++++++++++++++++++++++++++++-- public/detail.html | 53 -------------------------- public/detail/detail.html | 55 +++++++++++++++++++++++++++ public/{ => detail}/detail.js | 0 public/index.html | 27 +++++++++----- public/login.html | 58 ----------------------------- public/login/login.html | 69 ++++++++++++++++++++++++++++++++++ public/{ => login}/login.js | 15 +++----- public/main.css | 28 ++++++++------ public/upload.html | 61 ------------------------------ public/upload/upload.html | 70 +++++++++++++++++++++++++++++++++++ public/{ => upload}/upload.js | 1 + 12 files changed, 298 insertions(+), 205 deletions(-) delete mode 100644 public/detail.html create mode 100644 public/detail/detail.html rename public/{ => detail}/detail.js (100%) delete mode 100644 public/login.html create mode 100644 public/login/login.html rename public/{ => login}/login.js (75%) delete mode 100644 public/upload.html create mode 100644 public/upload/upload.html rename public/{ => upload}/upload.js (99%) diff --git a/public/common.js b/public/common.js index 7a08a017f..4dd0a44c0 100644 --- a/public/common.js +++ b/public/common.js @@ -9,9 +9,69 @@ const firebaseConfig = { }; - // Initialize Firebase - firebase.initializeApp(firebaseConfig) + // Initialize Firebase + firebase.initializeApp(firebaseConfig) const db = firebase.firestore(); -const storage = firebase.storage(); \ No newline at end of file +const storage = firebase.storage(); + + + +if (localStorage.getItem('user') != null) { + console.log('ํ˜„์žฌ๋กœ๊ทธ์ธ์ค‘') + //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์—์„œ ์œ ์ €์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ + const localDataUser =localStorage.getItem('user') + const localName = JSON.parse(localDataUser).displayName; + console.log(localName) + document.querySelector('#user-name').innerHTML = localName +'๋‹˜'; + // document.querySelector('.user-welcome').classList.remove('none'); + document.querySelector('.logout').classList.remove('none'); + document.querySelector('.login').classList.add('none'); + +}else{ + console.log('ํ˜„์žฌ๋กœ๊ทธ์•„์›ƒ์ค‘') + localStorage.removeItem('user') + // document.querySelector('.user-welcome').classList.add('none'); + document.querySelector('.logout').classList.add('none'); + document.querySelector('.login').classList.remove('none'); +} + + + +//๋กœ๊ทธ์ธ ์ƒํƒœ ํ™•์ธ. ๋กœ๊ทธ์ธ,๋กœ๊ทธ์•„์›ƒ,์ƒˆ๋กœ๊ณ ์นจ ๋“ฑ ์œ ์ € ์ธ์ฆ์ƒํƒœ ๋ณ€๊ฒฝ์‹œ๋งˆ๋‹ค ์‹คํ–‰๋จ +firebase.auth().onAuthStateChanged((user)=>{ + if(user){ + console.log(user) + console.log(user.displayName+'๋กœ๊ทธ์ธ ์™„๋ฃŒ') + // document.querySelector('.user-welcome').classList.remove('none'); + document.querySelector('.logout').classList.remove('none'); + document.querySelector('.login').classList.add('none'); + + //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์— ์œ ์ €์ •๋ณด ์ €์žฅ + localStorage.setItem('user', JSON.stringify(user)) + // userUid = user.uid; + // console.log(userUid) + + }else if(user = null){ + localStorage.removeItem('user') + // document.querySelector('.user-welcome').classList.add('none'); + document.querySelector('.logout').classList.add('none'); + document.querySelector('.login').classList.remove('none'); + + } +}) + + +const logoutBtn=document.getElementById('logout-btn') + +//๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด +logoutBtn.addEventListener("click",function(){ + firebase.auth().signOut(); + localStorage.removeItem('user') + // document.querySelector('.user-welcome').classList.add('none'); + alert('๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!') + document.querySelector('.logout').classList.add('none'); + document.querySelector('.login').classList.remove('none'); + +}); \ No newline at end of file diff --git a/public/detail.html b/public/detail.html deleted file mode 100644 index 5b00a98b0..000000000 --- a/public/detail.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - - -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    - - -
    -

    ์ƒ์„ธ์ •๋ณด

    - -
    - - - - - - - - - - \ No newline at end of file diff --git a/public/detail/detail.html b/public/detail/detail.html new file mode 100644 index 000000000..bcfbf864b --- /dev/null +++ b/public/detail/detail.html @@ -0,0 +1,55 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    +
      +
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • +
    • +
    +
    + +
    + + +
    +

    ์ƒ์„ธ์ •๋ณด

    + + +
    + + + + + + + + + + \ No newline at end of file diff --git a/public/detail.js b/public/detail/detail.js similarity index 100% rename from public/detail.js rename to public/detail/detail.js diff --git a/public/index.html b/public/index.html index 834389bbc..c81358086 100644 --- a/public/index.html +++ b/public/index.html @@ -17,24 +17,31 @@ onload="this.rel = 'stylesheet'" href="main.css" /> - - +
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    +
      +
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • +
    • +
    +
    +
    -
    ์ด๋ฏธ์ง€
    diff --git a/public/login.html b/public/login.html deleted file mode 100644 index ebe94a39c..000000000 --- a/public/login.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - - -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    - - -
    -

    ํšŒ์›๊ฐ€์ž…

    - - - -
    - -
    -
    - - -
    -

    ๋กœ๊ทธ์ธ

    - - -
    - - -
    -
    - - - - - - - - - \ No newline at end of file diff --git a/public/login/login.html b/public/login/login.html new file mode 100644 index 000000000..2c0f13ec8 --- /dev/null +++ b/public/login/login.html @@ -0,0 +1,69 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    +
      +
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • +
    • +
    +
    + +
    + + +
    +

    ํšŒ์›๊ฐ€์ž…

    + + + +
    + +
    +
    + + +
    +

    ๋กœ๊ทธ์ธ

    + + +
    + +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/public/login.js b/public/login/login.js similarity index 75% rename from public/login.js rename to public/login/login.js index 4f6bea391..87fe07e4b 100644 --- a/public/login.js +++ b/public/login/login.js @@ -1,6 +1,5 @@ const joinBtn=document.getElementById('join-btn') const loginBtn=document.getElementById('login-btn') -const logoutBtn=document.getElementById('logout-btn') //๊ฐ€์ž…ํ•˜๊ธฐ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด joinBtn.addEventListener("click",function(){ @@ -23,14 +22,12 @@ loginBtn.addEventListener("click",function(){ const loginPw = document.getElementById("login__pw").value; firebase.auth().signInWithEmailAndPassword(loginEmail,loginPw).then((result)=>{ - console.log('๋กœ๊ทธ์ธ ์™„๋ฃŒ!'+result.user) - alert('๋กœ๊ทธ์ธ ์™„๋ฃŒ!') - + alert('๋กœ๊ทธ์ธ ์™„๋ฃŒ!') + window.location.href="/index.html" + document.querySelector('.user-welcome').classList.remove('none'); + document.querySelector('.logout').classList.remove('none'); + document.querySelector('.login').classList.add('none'); }) }); -//๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด -logoutBtn.addEventListener("click",function(){ - firebase.auth().signOut(); - alert('๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!') -}); \ No newline at end of file + diff --git a/public/main.css b/public/main.css index df11d6105..68b152a22 100644 --- a/public/main.css +++ b/public/main.css @@ -6,8 +6,11 @@ h1 { h2 { text-align: center; font-size: 1.4rem; - margin: 4rem auto 2rem; + width: 100%; + margin: 1rem; } +.none{display: none;} + .txt-l { text-align: left; } @@ -37,6 +40,9 @@ h2 { margin-top: 2rem; } .input-col { + width: 50%; + margin: 0 auto; + min-width: 300px; display: flex; flex-direction: column; justify-content: center; @@ -83,10 +89,7 @@ main .thumbnail{ max-width: 80px; height: 100%;} #detail .thumbnail{ max-width: 200px;} -.input-col { - width: 50%; - margin: 0 auto; -} + .form-input, .form-text { width: 100%; @@ -137,9 +140,12 @@ main .thumbnail{ max-width: 80px; height: 100%;} .btn:hover { background: #3e4e6d; } -#login .btn { - width: 49%; -} -.btn#logout-btn { - background: #828282; -} + + +.user-welcome{ + display: flex; + align-items: center; + justify-content: flex-end; + gap:1rem; + padding:0 1.5rem; +} \ No newline at end of file diff --git a/public/upload.html b/public/upload.html deleted file mode 100644 index 9ce299f88..000000000 --- a/public/upload.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - - -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    - -
    -

    ์ง์› ์ •๋ณด ์—…๋กœ๋“œ

    - - - - - - - - -
    - - -
    -
    - -
    -
    - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/upload/upload.html b/public/upload/upload.html new file mode 100644 index 000000000..137274a5a --- /dev/null +++ b/public/upload/upload.html @@ -0,0 +1,70 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    +
      +
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • +
    • +
    +
    + +
    + +
    +

    ์ง์› ์ •๋ณด ์—…๋กœ๋“œ

    + + + + + + + + +
    + + +
    +
    + +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/upload.js b/public/upload/upload.js similarity index 99% rename from public/upload.js rename to public/upload/upload.js index 5ed1e29d7..9b7feec49 100644 --- a/public/upload.js +++ b/public/upload/upload.js @@ -38,6 +38,7 @@ ์ด๋ฉ”์ผ : email, ๊ธฐํƒ€ : memo, ์ด๋ฏธ์ง€: url + } console.log(name,phone,email,rank,memo) From ad58f9320fc118adb96fd2ef86793144abcd30a6 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 11 Aug 2023 19:14:28 +0900 Subject: [PATCH 08/34] Feat: Add upload permission --- public/upload/upload.js | 185 ++++++++++++++++------------------------ 1 file changed, 73 insertions(+), 112 deletions(-) diff --git a/public/upload/upload.js b/public/upload/upload.js index 9b7feec49..91db33d94 100644 --- a/public/upload/upload.js +++ b/public/upload/upload.js @@ -1,114 +1,75 @@ - // ์˜ฌ๋ฆฌ๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐฉ๊ธˆ๋งŒ๋“  ์ œ๋ชฉ, ๋‚ด์šฉ, ๊ฐ€๊ฒฉ ์ธํ’‹์— ์ž…๋ ฅํ•œ ์ •๋ณด db์ €์žฅ - document.getElementById("send").addEventListener("click", function(){ - - //์Šคํ† ๋ฆฌ์ง€์— ์ด๋ฏธ์ง€ ์ €์žฅ - let file = document.querySelector('#image').files[0]; - const storageRef = storage.ref(); - let imgPath = storageRef.child('image/'+file.name); - let upload = imgPath.put(file) - - //์ด๋ฏธ์ง€ ์—…๋กœ๋“œ / ์‹คํŒจ ํ™•์ธ - upload.on( 'state_changed', - // ๋ณ€ํ™”์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - null, - //์—๋Ÿฌ์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - (error) => { - console.error('์‹คํŒจ์‚ฌ์œ ๋Š”', error); - }, - // ์„ฑ๊ณต์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - () => { - upload.snapshot.ref.getDownloadURL().then((url) => { //์ด๋ฏธ์ง€ url ๊ฐ€์ ธ์˜ค๊ธฐ - console.log('์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”', url); - - const name = document.getElementById("name").value; - const tel = document.getElementById("tel").value; - const phone = document.getElementById("phone").value; - const email= document.getElementById("email").value; - const team= document.getElementById("team").value; - const rank= document.getElementById("rank").value; - const memo = document.getElementById("memo").value; - - const saveData ={ - ์ด๋ฆ„ : name, - ๋‚ด์„ ๋ฒˆํ˜ธ : tel, - ์†Œ์†ํŒ€ : team, - ์ง๊ธ‰ : rank, - ์—ฐ๋ฝ์ฒ˜ : phone, - ์ด๋ฉ”์ผ : email, - ๊ธฐํƒ€ : memo, - ์ด๋ฏธ์ง€: url - - } - - console.log(name,phone,email,rank,memo) - - db.collection('member').add(saveData).then((result)=>{ - window.location.href="/index.html" - console.log(result) - }).catch((err)=>{ - console.log(err) - }); - - }); - - } - ); - - - }); - - // ์˜ฌ๋ฆฌ๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐฉ๊ธˆ๋งŒ๋“  ์ œ๋ชฉ, ๋‚ด์šฉ, ๊ฐ€๊ฒฉ ์ธํ’‹์— ์ž…๋ ฅํ•œ ์ •๋ณด db์ €์žฅ - document.getElementById("send").addEventListener("click", function(){ - - //์Šคํ† ๋ฆฌ์ง€์— ์ด๋ฏธ์ง€ ์ €์žฅ - let file = document.querySelector('#image').files[0]; - const storageRef = storage.ref(); - let imgPath = storageRef.child('image/'+file.name); - let upload = imgPath.put(file) - - //์ด๋ฏธ์ง€ ์—…๋กœ๋“œ / ์‹คํŒจ ํ™•์ธ - upload.on( 'state_changed', - // ๋ณ€ํ™”์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - null, - //์—๋Ÿฌ์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - (error) => { - console.error('์‹คํŒจ์‚ฌ์œ ๋Š”', error); - }, - // ์„ฑ๊ณต์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ - () => { - upload.snapshot.ref.getDownloadURL().then((url) => { //์ด๋ฏธ์ง€ url ๊ฐ€์ ธ์˜ค๊ธฐ - console.log('์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”', url); - - const name = document.getElementById("name").value; - const phone = document.getElementById("phone").value; - const email= document.getElementById("email").value; - const rank= document.getElementById("rank").value; - const memo = document.getElementById("memo").value; - - - const saveData ={ - ์ด๋ฆ„ : name, - ์—ฐ๋ฝ์ฒ˜ : phone, - ์ด๋ฉ”์ผ : email, - ์ง๊ธ‰ : rank, - ๊ธฐํƒ€ : memo, - ์ด๋ฏธ์ง€: url - } - - console.log(name,phone,email,rank,memo) - - db.collection('member').add(saveData).then((result)=>{ - window.location.href="/index.html" - console.log(result) - }).catch((err)=>{ - console.log(err) - }); - - }); - - } - ); - - +//๋น„๋กœ๊ทธ์ธ์‹œ ์—…๋กœ๋“œ ๋ถˆ๊ฐ€ +if (localStorage.getItem("user") == null) { + document.querySelectorAll('input').forEach(el => { + el.addEventListener("focus", function () { + alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); + this.blur(); }); + }) +} + +// ์˜ฌ๋ฆฌ๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐฉ๊ธˆ๋งŒ๋“  ์ œ๋ชฉ, ๋‚ด์šฉ, ๊ฐ€๊ฒฉ ์ธํ’‹์— ์ž…๋ ฅํ•œ ์ •๋ณด db์ €์žฅ +document.getElementById("send").addEventListener("click", function () { + + if (localStorage.getItem("user") != null) { + //์Šคํ† ๋ฆฌ์ง€์— ์ด๋ฏธ์ง€ ์ €์žฅ + let file = document.querySelector("#image").files[0]; + const storageRef = storage.ref(); + let imgPath = storageRef.child("image/" + file.name); + let upload = imgPath.put(file); + + //์ด๋ฏธ์ง€ ์—…๋กœ๋“œ ์„ฑ๊ณต,์‹คํŒจ ํ™•์ธ + upload.on( + "state_changed", + // ๋ณ€ํ™”์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ + null, + //์—๋Ÿฌ์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ + (error) => { + console.error("์‹คํŒจ์‚ฌ์œ ๋Š”", error); + }, + // ์„ฑ๊ณต์‹œ ๋™์ž‘ํ•˜๋Š” ํ•จ์ˆ˜ + () => { + upload.snapshot.ref.getDownloadURL().then((url) => { + //์ด๋ฏธ์ง€ url ๊ฐ€์ ธ์˜ค๊ธฐ + console.log("์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”", url); + + const name = document.getElementById("name").value; + const tel = document.getElementById("tel").value; + const phone = document.getElementById("phone").value; + const email = document.getElementById("email").value; + const team = document.getElementById("team").value; + const rank = document.getElementById("rank").value; + const memo = document.getElementById("memo").value; + + const saveData = { + ์ด๋ฆ„: name, + ๋‚ด์„ ๋ฒˆํ˜ธ: tel, + ์†Œ์†ํŒ€: team, + ์ง๊ธ‰: rank, + ์—ฐ๋ฝ์ฒ˜: phone, + ์ด๋ฉ”์ผ: email, + ๊ธฐํƒ€: memo, + ์ด๋ฏธ์ง€: url, + uid: JSON.parse(localStorage.getItem("user")).uid, + username: JSON.parse(localStorage.getItem("user")).displayName, + }; + + console.log(name, phone, email, rank, memo); + + db.collection("member") + .add(saveData) + .then((result) => { + window.location.href = "/index.html"; + console.log(result); + }) + .catch((err) => { + console.log(err); + }); + }); + } + ); + }else{ + alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); + } +}); From 6113e2a8fd2d51f6721e727529d95f9b5185e8c6 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 11 Aug 2023 19:31:25 +0900 Subject: [PATCH 09/34] fix: Modify detail path(href) --- public/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/main.js b/public/main.js index 1a27ea9b6..3257aa703 100644 --- a/public/main.js +++ b/public/main.js @@ -8,7 +8,7 @@
    ${doc.data().์ด๋ฆ„}
    ${doc.data().์†Œ์†ํŒ€} ${doc.data().์ง๊ธ‰}
    ${doc.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    -
    ์ƒ์„ธ

    +

    ์ƒ์„ธ

    ` const wrap = document.querySelector('.container') wrap.insertAdjacentHTML('beforeend',template) From 8150a30b0800b613a744fb5a4b0fb1d295b6d445 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 11 Aug 2023 19:33:01 +0900 Subject: [PATCH 10/34] Feat: Add DB_uid, DB_username --- public/upload/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/upload/upload.js b/public/upload/upload.js index 91db33d94..d6102d14a 100644 --- a/public/upload/upload.js +++ b/public/upload/upload.js @@ -52,7 +52,7 @@ document.getElementById("send").addEventListener("click", function () { ๊ธฐํƒ€: memo, ์ด๋ฏธ์ง€: url, uid: JSON.parse(localStorage.getItem("user")).uid, - username: JSON.parse(localStorage.getItem("user")).displayName, + username: JSON.parse(localStorage.getItem("user")).displayName }; console.log(name, phone, email, rank, memo); From cc9c04f599ecb16b401c3d52cdbb927c2afcc5f9 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 12 Aug 2023 16:26:42 +0900 Subject: [PATCH 11/34] Feat: Add edit page --- public/detail/detail.html | 3 +- public/detail/detail.js | 40 +++++++++++----------- public/edit/edit.html | 72 +++++++++++++++++++++++++++++++++++++++ public/edit/edit.js | 38 +++++++++++++++++++++ 4 files changed, 132 insertions(+), 21 deletions(-) create mode 100644 public/edit/edit.html create mode 100644 public/edit/edit.js diff --git a/public/detail/detail.html b/public/detail/detail.html index bcfbf864b..08b8b1e61 100644 --- a/public/detail/detail.html +++ b/public/detail/detail.html @@ -40,8 +40,7 @@

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    ์ƒ์„ธ์ •๋ณด

    - - +
    diff --git a/public/detail/detail.js b/public/detail/detail.js index dbf52fd69..e6609f06c 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -6,28 +6,30 @@ db.collection('member').doc(queryString.get('id')).get().then((result) => { console.log(result.data()) var templateDetail = ` -
    -
    -
    -
    -
    -
    ${result.data().์ด๋ฆ„}
    -
    ์†Œ์†ํŒ€: ${result.data().์†Œ์†ํŒ€}
    -
    ์ง๊ธ‰: ${result.data().์ง๊ธ‰}
    -
    ๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    -
    ์—ฐ๋ฝ์ฒ˜: ${result.data().์—ฐ๋ฝ์ฒ˜}
    -
    ์ด๋ฉ”์ผ: ${result.data().์ด๋ฉ”์ผ}
    -
    ๊ธฐํƒ€: ${result.data().๊ธฐํƒ€}
    -
    -
    - ` - - const wrap = document.querySelector('#detail') - wrap.insertAdjacentHTML('beforeend',templateDetail) +
    +
    +
    +
    +
    +
    ${result.data().์ด๋ฆ„}
    +
    ์†Œ์†ํŒ€: ${result.data().์†Œ์†ํŒ€}
    +
    ์ง๊ธ‰: ${result.data().์ง๊ธ‰}
    +
    ๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    +
    ์—ฐ๋ฝ์ฒ˜: ${result.data().์—ฐ๋ฝ์ฒ˜}
    +
    ์ด๋ฉ”์ผ: ${result.data().์ด๋ฉ”์ผ}
    +
    ๊ธฐํƒ€: ${result.data().๊ธฐํƒ€}
    +
    +
    + ` + const wrap = document.querySelector('#detail') + wrap.insertAdjacentHTML('beforeend',templateDetail) }); - +const detailEditBtn= document.querySelector('.detail__edit-btn'); +detailEditBtn.addEventListener('click',function(){ + window.location.href='/edit/edit.html?id='+ queryString.get('id') +}); diff --git a/public/edit/edit.html b/public/edit/edit.html new file mode 100644 index 000000000..638cf7347 --- /dev/null +++ b/public/edit/edit.html @@ -0,0 +1,72 @@ + + + + + + + ๐Ÿ™‹โ€โ™€๏ธemployee picture + + + + + + + +
    +

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    + +
    +
      +
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • +
    • +
    +
    + +
    + +
    +

    ์ •๋ณด ์ˆ˜์ •

    +
    + + + + + + + +
    +
    + + +
    +
    + +
    + +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/edit/edit.js b/public/edit/edit.js new file mode 100644 index 000000000..429aaa3ef --- /dev/null +++ b/public/edit/edit.js @@ -0,0 +1,38 @@ +//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ +let queryString = new URLSearchParams(window.location.search); +queryString.get('id') + + +db.collection('member').doc(queryString.get('id')).get().then((result) => { + console.log(result.data()) + document.getElementById("name").value =` ${result.data().์ด๋ฆ„}`; + document.getElementById("tel").value=`${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}`; + document.getElementById("phone").value=`${result.data().์—ฐ๋ฝ์ฒ˜}`; + document.getElementById("email").value=`${result.data().์ด๋ฉ”์ผ}`; + document.getElementById("team").value=`${result.data().์†Œ์†ํŒ€}`; + document.getElementById("rank").value=`${result.data().์ง๊ธ‰}`; + document.getElementById("memo").value=`${result.data().๊ธฐํƒ€}`; +}); + + +// ์ˆ˜์ •๋ฒ„ํŠผ ํด๋ฆญ ์‹œ +const editBtn= document.querySelector('.edit__edit-btn'); +editBtn.addEventListener('click',function(){ + + let editDB = { + ์ด๋ฆ„ : document.getElementById("name").value, + ๋‚ด์„ ๋ฒˆํ˜ธ : document.getElementById("tel").value, + ์—ฐ๋ฝ์ฒ˜ : document.getElementById("phone").value, + ์ด๋ฉ”์ผ : document.getElementById("email").value, + ์†Œ์†ํŒ€ : document.getElementById("team").value, + ์ง๊ธ‰ : document.getElementById("rank").value, + ๊ธฐํƒ€ : document.getElementById("memo").value + } + + console.log(editDB) + + db.collection('member').doc(queryString.get('id')).update(editDB) + // window.location.href='/detail/detail.html?id='+ queryString.get('id') + // console.log(queryString.get('id')) +}); + From 1aeb1d30bfce690babb9755d822b4638fc65cbbd Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 12 Aug 2023 16:36:34 +0900 Subject: [PATCH 12/34] Docs: Change field name --- public/common.js | 8 +------- public/detail/detail.js | 16 ++++++++-------- public/edit/edit.js | 28 ++++++++++++++-------------- public/main.js | 8 ++++---- public/upload/upload.js | 26 +++++++++----------------- 5 files changed, 36 insertions(+), 50 deletions(-) diff --git a/public/common.js b/public/common.js index 4dd0a44c0..b701ec13f 100644 --- a/public/common.js +++ b/public/common.js @@ -16,8 +16,6 @@ const firebaseConfig = { const db = firebase.firestore(); const storage = firebase.storage(); - - if (localStorage.getItem('user') != null) { console.log('ํ˜„์žฌ๋กœ๊ทธ์ธ์ค‘') //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์—์„œ ์œ ์ €์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ @@ -25,16 +23,15 @@ if (localStorage.getItem('user') != null) { const localName = JSON.parse(localDataUser).displayName; console.log(localName) document.querySelector('#user-name').innerHTML = localName +'๋‹˜'; - // document.querySelector('.user-welcome').classList.remove('none'); document.querySelector('.logout').classList.remove('none'); document.querySelector('.login').classList.add('none'); }else{ console.log('ํ˜„์žฌ๋กœ๊ทธ์•„์›ƒ์ค‘') localStorage.removeItem('user') - // document.querySelector('.user-welcome').classList.add('none'); document.querySelector('.logout').classList.add('none'); document.querySelector('.login').classList.remove('none'); + } @@ -44,7 +41,6 @@ firebase.auth().onAuthStateChanged((user)=>{ if(user){ console.log(user) console.log(user.displayName+'๋กœ๊ทธ์ธ ์™„๋ฃŒ') - // document.querySelector('.user-welcome').classList.remove('none'); document.querySelector('.logout').classList.remove('none'); document.querySelector('.login').classList.add('none'); @@ -55,7 +51,6 @@ firebase.auth().onAuthStateChanged((user)=>{ }else if(user = null){ localStorage.removeItem('user') - // document.querySelector('.user-welcome').classList.add('none'); document.querySelector('.logout').classList.add('none'); document.querySelector('.login').classList.remove('none'); @@ -69,7 +64,6 @@ const logoutBtn=document.getElementById('logout-btn') logoutBtn.addEventListener("click",function(){ firebase.auth().signOut(); localStorage.removeItem('user') - // document.querySelector('.user-welcome').classList.add('none'); alert('๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!') document.querySelector('.logout').classList.add('none'); document.querySelector('.login').classList.remove('none'); diff --git a/public/detail/detail.js b/public/detail/detail.js index e6609f06c..9a01b1f34 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -8,16 +8,16 @@ db.collection('member').doc(queryString.get('id')).get().then((result) => { var templateDetail = `
    -
    +
    -
    ${result.data().์ด๋ฆ„}
    -
    ์†Œ์†ํŒ€: ${result.data().์†Œ์†ํŒ€}
    -
    ์ง๊ธ‰: ${result.data().์ง๊ธ‰}
    -
    ๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    -
    ์—ฐ๋ฝ์ฒ˜: ${result.data().์—ฐ๋ฝ์ฒ˜}
    -
    ์ด๋ฉ”์ผ: ${result.data().์ด๋ฉ”์ผ}
    -
    ๊ธฐํƒ€: ${result.data().๊ธฐํƒ€}
    +
    ${result.data().name}
    +
    ์†Œ์†ํŒ€: ${result.data().team}
    +
    ์ง๊ธ‰: ${result.data().rank}
    +
    ๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().ext}
    +
    ์—ฐ๋ฝ์ฒ˜: ${result.data().phone}
    +
    ์ด๋ฉ”์ผ: ${result.data().email}
    +
    ๊ธฐํƒ€: ${result.data().memo}
    ` diff --git a/public/edit/edit.js b/public/edit/edit.js index 429aaa3ef..9269a7ad2 100644 --- a/public/edit/edit.js +++ b/public/edit/edit.js @@ -5,13 +5,13 @@ queryString.get('id') db.collection('member').doc(queryString.get('id')).get().then((result) => { console.log(result.data()) - document.getElementById("name").value =` ${result.data().์ด๋ฆ„}`; - document.getElementById("tel").value=`${result.data().๋‚ด์„ ๋ฒˆํ˜ธ}`; - document.getElementById("phone").value=`${result.data().์—ฐ๋ฝ์ฒ˜}`; - document.getElementById("email").value=`${result.data().์ด๋ฉ”์ผ}`; - document.getElementById("team").value=`${result.data().์†Œ์†ํŒ€}`; - document.getElementById("rank").value=`${result.data().์ง๊ธ‰}`; - document.getElementById("memo").value=`${result.data().๊ธฐํƒ€}`; + document.getElementById("name").value =` ${result.data().name}`; + document.getElementById("tel").value=`${result.data().ext}`; + document.getElementById("phone").value=`${result.data().phone}`; + document.getElementById("email").value=`${result.data().email}`; + document.getElementById("team").value=`${result.data().team}`; + document.getElementById("rank").value=`${result.data().rank}`; + document.getElementById("memo").value=`${result.data().memo}`; }); @@ -20,13 +20,13 @@ const editBtn= document.querySelector('.edit__edit-btn'); editBtn.addEventListener('click',function(){ let editDB = { - ์ด๋ฆ„ : document.getElementById("name").value, - ๋‚ด์„ ๋ฒˆํ˜ธ : document.getElementById("tel").value, - ์—ฐ๋ฝ์ฒ˜ : document.getElementById("phone").value, - ์ด๋ฉ”์ผ : document.getElementById("email").value, - ์†Œ์†ํŒ€ : document.getElementById("team").value, - ์ง๊ธ‰ : document.getElementById("rank").value, - ๊ธฐํƒ€ : document.getElementById("memo").value + name : document.getElementById("name").value, + ext : document.getElementById("tel").value, + phone : document.getElementById("phone").value, + email : document.getElementById("email").value, + team : document.getElementById("team").value, + rank : document.getElementById("rank").value, + memo : document.getElementById("memo").value } console.log(editDB) diff --git a/public/main.js b/public/main.js index 3257aa703..99da3cfe1 100644 --- a/public/main.js +++ b/public/main.js @@ -4,10 +4,10 @@ ๊ฒฐ๊ณผ.forEach((doc)=>{ console.log(doc.data()); var template = `
    -
    -
    ${doc.data().์ด๋ฆ„}
    -
    ${doc.data().์†Œ์†ํŒ€} ${doc.data().์ง๊ธ‰}
    -
    ${doc.data().๋‚ด์„ ๋ฒˆํ˜ธ}
    +
    +
    ${doc.data().name}
    +
    ${doc.data().team} ${doc.data().rank}
    +
    ${doc.data().ext}
    ์ƒ์„ธ

    ` const wrap = document.querySelector('.container') diff --git a/public/upload/upload.js b/public/upload/upload.js index d6102d14a..1b52c09c7 100644 --- a/public/upload/upload.js +++ b/public/upload/upload.js @@ -34,23 +34,15 @@ document.getElementById("send").addEventListener("click", function () { //์ด๋ฏธ์ง€ url ๊ฐ€์ ธ์˜ค๊ธฐ console.log("์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”", url); - const name = document.getElementById("name").value; - const tel = document.getElementById("tel").value; - const phone = document.getElementById("phone").value; - const email = document.getElementById("email").value; - const team = document.getElementById("team").value; - const rank = document.getElementById("rank").value; - const memo = document.getElementById("memo").value; - - const saveData = { - ์ด๋ฆ„: name, - ๋‚ด์„ ๋ฒˆํ˜ธ: tel, - ์†Œ์†ํŒ€: team, - ์ง๊ธ‰: rank, - ์—ฐ๋ฝ์ฒ˜: phone, - ์ด๋ฉ”์ผ: email, - ๊ธฐํƒ€: memo, - ์ด๋ฏธ์ง€: url, + let saveData = { + name : document.getElementById("name").value, + ext : document.getElementById("tel").value, + team : document.getElementById("team").value, + rank : document.getElementById("rank").value, + phone: document.getElementById("phone").value, + email : document.getElementById("email").value, + memo: document.getElementById("memo").value, + img: url, uid: JSON.parse(localStorage.getItem("user")).uid, username: JSON.parse(localStorage.getItem("user")).displayName }; From 90d83226271c8f20ce973ee81f21599e09b15253 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 12 Aug 2023 17:43:58 +0900 Subject: [PATCH 13/34] Feat: DB delete --- public/detail/detail.html | 8 +++++++- public/detail/detail.js | 15 +++++++++++++-- public/edit/edit.html | 1 + public/edit/edit.js | 17 +++++++++++------ 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/public/detail/detail.html b/public/detail/detail.html index 08b8b1e61..6f4984e04 100644 --- a/public/detail/detail.html +++ b/public/detail/detail.html @@ -40,7 +40,13 @@

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    ์ƒ์„ธ์ •๋ณด

    -
    +
    + +
    +
    + + +
    diff --git a/public/detail/detail.js b/public/detail/detail.js index 9a01b1f34..a3fb818c8 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -21,8 +21,7 @@ db.collection('member').doc(queryString.get('id')).get().then((result) => {
    ` - const wrap = document.querySelector('#detail') - wrap.insertAdjacentHTML('beforeend',templateDetail) + document.querySelector('.detail-area').insertAdjacentHTML('beforeend',templateDetail) }); @@ -31,6 +30,18 @@ detailEditBtn.addEventListener('click',function(){ window.location.href='/edit/edit.html?id='+ queryString.get('id') }); +const detailDeleteBtn= document.querySelector('.detail__delete-btn'); +detailDeleteBtn.addEventListener('click',function(){ + db.collection('member').doc(queryString.get('id')).delete().then(()=>{ + alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); + window.location.href='/' + }) + + +}); + + + diff --git a/public/edit/edit.html b/public/edit/edit.html index 638cf7347..88e4481c8 100644 --- a/public/edit/edit.html +++ b/public/edit/edit.html @@ -54,6 +54,7 @@

    ์ •๋ณด ์ˆ˜์ •

    +
    diff --git a/public/edit/edit.js b/public/edit/edit.js index 9269a7ad2..8797fc3ea 100644 --- a/public/edit/edit.js +++ b/public/edit/edit.js @@ -17,8 +17,7 @@ db.collection('member').doc(queryString.get('id')).get().then((result) => { // ์ˆ˜์ •๋ฒ„ํŠผ ํด๋ฆญ ์‹œ const editBtn= document.querySelector('.edit__edit-btn'); -editBtn.addEventListener('click',function(){ - +editBtn.addEventListener('click',function(){ let editDB = { name : document.getElementById("name").value, ext : document.getElementById("tel").value, @@ -29,10 +28,16 @@ editBtn.addEventListener('click',function(){ memo : document.getElementById("memo").value } - console.log(editDB) - db.collection('member').doc(queryString.get('id')).update(editDB) - // window.location.href='/detail/detail.html?id='+ queryString.get('id') - // console.log(queryString.get('id')) + window.location.href='/detail/detail.html?id='+ queryString.get('id') +}); + + +const deleteBtn= document.querySelector('.edit__delete-btn'); +deleteBtn.addEventListener('click',function(){ + db.collection('member').doc(queryString.get('id')).delete().then(()=>{ + alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); + window.location.href='/' + }) }); From 5931373c1aa1cb86d695c47c20abed21223c3529 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 14:40:25 +0900 Subject: [PATCH 14/34] Feat: Preview, login check --- .gitignore | 1 + README.md | 46 ++--- public/common.js | 71 ------- public/detail/detail.html | 139 +++++++------ public/detail/detail.js | 69 +++---- public/edit/delete.js | 23 +++ public/edit/edit.html | 193 +++++++++++------- public/edit/edit.js | 133 +++++++++---- public/index.html | 97 +++++---- public/keyframes.css | 0 public/login/login.html | 176 +++++++++++------ public/login/login.js | 80 +++++--- public/login_ck.js | 88 +++++++++ public/main.css | 399 +++++++++++++++++++++++++++++++------- public/main.js | 86 ++++++-- public/media.css | 98 ++++++++++ public/preview.js | 32 +++ public/upload/upload.html | 178 +++++++++++------ public/upload/upload.js | 34 ++-- 19 files changed, 1350 insertions(+), 593 deletions(-) delete mode 100644 public/common.js create mode 100644 public/edit/delete.js create mode 100644 public/keyframes.css create mode 100644 public/login_ck.js create mode 100644 public/media.css create mode 100644 public/preview.js diff --git a/.gitignore b/.gitignore index 855bd1c81..e2cc90f00 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ node_modules/ # Ignore IDE specific files .vscode/ +.test/ \ No newline at end of file diff --git a/README.md b/README.md index a29ee163b..3f291a0f2 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,26 @@ # :camera: ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค -์ง์›๋“ค์˜ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ์ง„ ๊ด€๋ฆฌ์ž ์„œ๋น„์Šค๋ฅผ ๋งŒ๋“ค์–ด ๋ณด์„ธ์š”. - -๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ๋ฆฌ๋ทฐ ๊ธฐ๊ฐ„์€ ๋ณ„๋„ ๊ณต์ง€๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”! -## [๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๋ฐฉ๋ฒ•] -1. ํ˜„์žฌ ์ €์žฅ์†Œ๋ฅผ ๋กœ์ปฌ์— ํด๋ก (Clone)ํ•ฉ๋‹ˆ๋‹ค. -2. ์ž์‹ ์˜ ๋ณธ๋ช…์œผ๋กœ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.(๊ตฌ๋ถ„ ๊ฐ€๋Šฅํ•˜๋„๋ก ๋ณธ๋ช…์„ ๊ผญ ํŒŒ์Šค์นผ์ผ€์ด์Šค๋กœ ํ‘œ์‹œํ•˜์„ธ์š”, git branch KDT0_์ด๋ฆ„) -3. ์ž์‹ ์˜ ๋ณธ๋ช… ๋ธŒ๋žœ์น˜์—์„œ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. -4. ๊ณผ์ œ ์ˆ˜ํ–‰์ด ์™„๋ฃŒ๋˜๋ฉด, ์ž์‹ ์˜ ๋ณธ๋ช… ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์— ํ‘ธ์‹œ(Push)ํ•ฉ๋‹ˆ๋‹ค.(main ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œํ•˜์ง€ ์•Š๋„๋ก ๊ผญ ์ฃผ์˜ํ•˜์„ธ์š”, git push origin KDT0_์ด๋ฆ„) -5. ์ €์žฅ์†Œ์—์„œ main ๋ธŒ๋žœ์น˜๋ฅผ ๋Œ€์ƒ์œผ๋กœ Pull Request ์ƒ์„ฑํ•˜๋ฉด, ๊ณผ์ œ ์ œ์ถœ์ด ์™„๋ฃŒ๋ฉ๋‹ˆ๋‹ค!(E.g, main <== KDT0_์ด๋ฆ„) -6. Pull Request ๋งํฌ๋ฅผ LMS๋กœ๋„ ์ œ์ถœํ•ด ์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค. -7. main ํ˜น์€ ๋‹ค๋ฅธ ์‚ฌ๋žŒ์˜ ๋ธŒ๋žœ์น˜๋กœ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”! -8. Pull Request์—์„œ ๋ณด์ด๋Š” ์„ค๋ช…์„ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๋„๋ก ๊ผผ๊ผผํ•˜๊ฒŒ ์ž‘์„ฑํ•˜์„ธ์š”! -9. Pull Request์—์„œ ๊ณผ์ œ ์ œ์ถœ ํ›„ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉ(Merge)ํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”! -10. ๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๊ณผ์ •์—์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ, ๋ฐ”๋กœ ๋‹ด๋‹น ๋ฉ˜ํ† ๋‚˜ ๊ฐ•์‚ฌ์—์„œ ์–˜๊ธฐํ•˜์„ธ์š”! - -## [ํ•„์ˆ˜ ์š”๊ตฌ์‚ฌํ•ญ] -- โ€œAWS S3 / Firebase ๊ฐ™์€ ์„œ๋น„์Šคโ€๋ฅผ ์ด์šฉํ•˜์—ฌ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ํŽ˜์ด์ง€๋ฅผ ๊ตฌํ˜„ํ•˜์„ธ์š”. -- ํ”„๋กœํ•„ ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœํ•˜์„ธ์š”. -- ์Šคํฌ๋กค์ด ๊ฐ€๋Šฅํ•œ ํ˜•ํƒœ์˜ ๋ฆฌ์ŠคํŒ… ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœํ•˜์„ธ์š”. -- ์ „์ฒด ํŽ˜์ด์ง€ ๋ฐ์Šคํฌํƒ‘-๋ชจ๋ฐ”์ผ ๋ฐ˜์‘ํ˜• ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœํ•˜์„ธ์š”. -- ์‚ฌ์ง„์„ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. -- ์œ ์ € ํ”Œ๋กœ์šฐ๋ฅผ ์ œ์ž‘ํ•˜์—ฌ ๋ฆฌ๋“œ๋ฏธ์— ์ถ”๊ฐ€ํ•˜์„ธ์š”. +์ง์›๋“ค์˜ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ์ง„ ๊ด€๋ฆฌ์ž ์„œ๋น„์Šค + +## [๊ตฌํ˜„๋ฒ”์œ„] +- โ€œFirebase ์„œ๋น„์Šคโ€๋ฅผ ์ด์šฉํ•˜์—ฌ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ํŽ˜์ด์ง€๋ฅผ ๊ตฌํ˜„ +- ํ”„๋กœํ•„ ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœ +- ์Šคํฌ๋กค์ด ๊ฐ€๋Šฅํ•œ ํ˜•ํƒœ์˜ ๋ฆฌ์ŠคํŒ… ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœ +- ์ „์ฒด ํŽ˜์ด์ง€ ๋ฐ์Šคํฌํƒ‘-๋ชจ๋ฐ”์ผ ๋ฐ˜์‘ํ˜• ํŽ˜์ด์ง€๋ฅผ ๊ฐœ๋ฐœ +- ์‚ฌ์ง„ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ ๊ฐ€๋Šฅ +- ๋กœ๊ทธ์ธ / ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€ ๊ฐœ๋ฐœ + * CSS * ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ตฌํ˜„ * ์ƒ๋Œ€์ˆ˜์น˜ ์‚ฌ์šฉ(rem, em) * JavaScript * DOM event ์กฐ์ž‘ -## [์„ ํƒ ์š”๊ตฌ์‚ฌํ•ญ] -- ์‚ฌ์ง„ ๊ด€๋ฆฌ ํŽ˜์ด์ง€์™€ ๊ด€๋ จ๋œ ๊ธฐํƒ€ ๊ธฐ๋Šฅ๋„ ๊ณ ๋ คํ•ด ๋ณด์„ธ์š”. -- ํŽ˜์ด์ง€๊ฐ€ ๋ณด์—ฌ์ง€๊ธฐ ์ „์— ๋กœ๋”ฉ ์• ๋‹ˆ๋ฉ”์ด์…˜์ด ๋ณด์ด๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”. -- ์ง์›์„ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด๋ณด์„ธ์š”. -- ์ง์› ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•ด ๋ณด์„ธ์š”. -- infinity scroll ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•ด ๋ณด์„ธ์š”. -- ์‚ฌ์ง„์„ ํŽธ์ง‘ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•ด ๋ณด์„ธ์š”. +- ์ง์›์„ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅ +- infinity scroll ๊ธฐ๋Šฅ - LocalStorage ์‚ฌ์šฉ -## [ํ™”๋ฉด ์˜ˆ์‹œ] -![Untitled (1)](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/5dda6755-2501-4af4-bc3e-b63a353c44c2) - -![Untitled (2)](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/6c1805f1-2b00-453e-a729-2b483612726d) - ## [ํ๋ฆ„] ![Untitled](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/e2934c05-26f6-4ef6-88d4-beed76aa007a) diff --git a/public/common.js b/public/common.js deleted file mode 100644 index b701ec13f..000000000 --- a/public/common.js +++ /dev/null @@ -1,71 +0,0 @@ -const firebaseConfig = { - apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", - authDomain: "javascript-picture.firebaseapp.com", - projectId: "javascript-picture", - storageBucket: "javascript-picture.appspot.com", - messagingSenderId: "487659103783", - appId: "1:487659103783:web:e98479de1137818dfa9002", - measurementId: "G-0RSTQFT7N8" - }; - - - // Initialize Firebase - firebase.initializeApp(firebaseConfig) - - -const db = firebase.firestore(); -const storage = firebase.storage(); - -if (localStorage.getItem('user') != null) { - console.log('ํ˜„์žฌ๋กœ๊ทธ์ธ์ค‘') - //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์—์„œ ์œ ์ €์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ - const localDataUser =localStorage.getItem('user') - const localName = JSON.parse(localDataUser).displayName; - console.log(localName) - document.querySelector('#user-name').innerHTML = localName +'๋‹˜'; - document.querySelector('.logout').classList.remove('none'); - document.querySelector('.login').classList.add('none'); - -}else{ - console.log('ํ˜„์žฌ๋กœ๊ทธ์•„์›ƒ์ค‘') - localStorage.removeItem('user') - document.querySelector('.logout').classList.add('none'); - document.querySelector('.login').classList.remove('none'); - -} - - - -//๋กœ๊ทธ์ธ ์ƒํƒœ ํ™•์ธ. ๋กœ๊ทธ์ธ,๋กœ๊ทธ์•„์›ƒ,์ƒˆ๋กœ๊ณ ์นจ ๋“ฑ ์œ ์ € ์ธ์ฆ์ƒํƒœ ๋ณ€๊ฒฝ์‹œ๋งˆ๋‹ค ์‹คํ–‰๋จ -firebase.auth().onAuthStateChanged((user)=>{ - if(user){ - console.log(user) - console.log(user.displayName+'๋กœ๊ทธ์ธ ์™„๋ฃŒ') - document.querySelector('.logout').classList.remove('none'); - document.querySelector('.login').classList.add('none'); - - //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์— ์œ ์ €์ •๋ณด ์ €์žฅ - localStorage.setItem('user', JSON.stringify(user)) - // userUid = user.uid; - // console.log(userUid) - - }else if(user = null){ - localStorage.removeItem('user') - document.querySelector('.logout').classList.add('none'); - document.querySelector('.login').classList.remove('none'); - - } -}) - - -const logoutBtn=document.getElementById('logout-btn') - -//๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด -logoutBtn.addEventListener("click",function(){ - firebase.auth().signOut(); - localStorage.removeItem('user') - alert('๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!') - document.querySelector('.logout').classList.add('none'); - document.querySelector('.login').classList.remove('none'); - -}); \ No newline at end of file diff --git a/public/detail/detail.html b/public/detail/detail.html index 6f4984e04..8bd1c196d 100644 --- a/public/detail/detail.html +++ b/public/detail/detail.html @@ -1,60 +1,87 @@ - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - + +
    +

    ์ƒ์„ธ์ •๋ณด

    +
    +
    + + +
    +
    -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    -
      -
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • -
    • -
    -
    - -
    - - -
    -

    ์ƒ์„ธ์ •๋ณด

    -
    - -
    -
    - - -
    -
    - - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/public/detail/detail.js b/public/detail/detail.js index a3fb818c8..a866cbb90 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -1,49 +1,36 @@ -//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ -let queryString = new URLSearchParams(window.location.search); -queryString.get('id') - -db.collection('member').doc(queryString.get('id')).get().then((result) => { - console.log(result.data()) +db.collection("member") + .doc(queryString.get("id")) + .get() + .then((result) => { + console.log(result.data()); var templateDetail = `
    -
    +
    -
    ${result.data().name}
    -
    ์†Œ์†ํŒ€: ${result.data().team}
    -
    ์ง๊ธ‰: ${result.data().rank}
    -
    ๋‚ด์„ ๋ฒˆํ˜ธ: ${result.data().ext}
    -
    ์—ฐ๋ฝ์ฒ˜: ${result.data().phone}
    -
    ์ด๋ฉ”์ผ: ${result.data().email}
    -
    ๊ธฐํƒ€: ${result.data().memo}
    +
    ์ด๋ฆ„ : ${result.data().name}
    +
    ์†Œ์†ํŒ€ : ${result.data().team}
    +
    ์ง๊ธ‰ : ${result.data().rank}
    +
    ๋‚ด์„ ๋ฒˆํ˜ธ : ${result.data().ext}
    +
    ์—ฐ๋ฝ์ฒ˜ : ${result.data().phone}
    +
    ์ด๋ฉ”์ผ : ${result.data().email}
    +
    ๊ธฐํƒ€ : ${ + result.data().memo + }
    - ` - document.querySelector('.detail-area').insertAdjacentHTML('beforeend',templateDetail) -}); - - -const detailEditBtn= document.querySelector('.detail__edit-btn'); -detailEditBtn.addEventListener('click',function(){ - window.location.href='/edit/edit.html?id='+ queryString.get('id') -}); - -const detailDeleteBtn= document.querySelector('.detail__delete-btn'); -detailDeleteBtn.addEventListener('click',function(){ - db.collection('member').doc(queryString.get('id')).delete().then(()=>{ - alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); - window.location.href='/' - }) - - -}); - - - - - - - - + `; + document + .querySelector(".detail-area") + .insertAdjacentHTML("beforeend", templateDetail); + }); + +if (localStorage.getItem("user") != null) { + document.querySelector(".edit-btn").addEventListener("click", editBtnClick); +} else { + document.querySelector(".edit-btn").addEventListener("click", alertLogin); +} diff --git a/public/edit/delete.js b/public/edit/delete.js new file mode 100644 index 000000000..c0fcede03 --- /dev/null +++ b/public/edit/delete.js @@ -0,0 +1,23 @@ + // ์‚ญ์ œ + const deleteBtn= document.querySelectorAll('.delete-btn'); + deleteBtn.addEventListener('click',function(){ + //db์ •๋ณด ์‚ญ์ œ + db.collection('member').doc(queryString.get('id')).delete().then(()=>{ + alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); + window.location.href='/' + + }) + + //์ด๋ฏธ์ง€ ์‚ญ์ œ + var deleteFilename = document.getElementById('image-delete').value; + var deleteRef = storage.refFromURL(deleteFilename) + // console.log(deleteRef) + + deleteRef.delete().then(function() { + console.log("File deleted successfully"); + }).catch(function(error) { + console.error("Error removing file.", error); + }); + + + }); \ No newline at end of file diff --git a/public/edit/edit.html b/public/edit/edit.html index 88e4481c8..9b478716e 100644 --- a/public/edit/edit.html +++ b/public/edit/edit.html @@ -1,73 +1,136 @@ - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - +
    +

    ์ •๋ณด ์ˆ˜์ •

    +
    +
    + +
    + + + +
    +
    + + +
    +
    -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    -
      -
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • -
    • -
    -
    - -
    - -
    -

    ์ •๋ณด ์ˆ˜์ •

    -
    - - - - - - - -
    -
    - - -
    -
    - - + + + + + + + + +
    + + +
    - -
    +
    - - - - - - + + + + - + + + + - - - \ No newline at end of file + + + diff --git a/public/edit/edit.js b/public/edit/edit.js index 8797fc3ea..24af1ed23 100644 --- a/public/edit/edit.js +++ b/public/edit/edit.js @@ -1,43 +1,92 @@ -//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ -let queryString = new URLSearchParams(window.location.search); -queryString.get('id') - - -db.collection('member').doc(queryString.get('id')).get().then((result) => { - console.log(result.data()) - document.getElementById("name").value =` ${result.data().name}`; - document.getElementById("tel").value=`${result.data().ext}`; - document.getElementById("phone").value=`${result.data().phone}`; - document.getElementById("email").value=`${result.data().email}`; - document.getElementById("team").value=`${result.data().team}`; - document.getElementById("rank").value=`${result.data().rank}`; - document.getElementById("memo").value=`${result.data().memo}`; -}); - - -// ์ˆ˜์ •๋ฒ„ํŠผ ํด๋ฆญ ์‹œ -const editBtn= document.querySelector('.edit__edit-btn'); -editBtn.addEventListener('click',function(){ - let editDB = { - name : document.getElementById("name").value, - ext : document.getElementById("tel").value, - phone : document.getElementById("phone").value, - email : document.getElementById("email").value, - team : document.getElementById("team").value, - rank : document.getElementById("rank").value, - memo : document.getElementById("memo").value - } - - db.collection('member').doc(queryString.get('id')).update(editDB) - window.location.href='/detail/detail.html?id='+ queryString.get('id') -}); - - -const deleteBtn= document.querySelector('.edit__delete-btn'); -deleteBtn.addEventListener('click',function(){ - db.collection('member').doc(queryString.get('id')).delete().then(()=>{ - alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); - window.location.href='/' - }) -}); +const employeeName = document.getElementById("name"); +const ext = document.getElementById("tel"); +const phone = document.getElementById("phone"); +const email = document.getElementById("email"); +const team = document.getElementById("team"); +const rank = document.getElementById("rank"); +const memo = document.getElementById("memo"); +const deleteImg = document.getElementById("image-delete"); +const previewImg = document.getElementById("preview-image"); +const editBtn = document.querySelector(".edit-btn"); +db.collection("member") + .doc(queryString.get("id")) + .get() + .then((result) => { + console.log(result.data()); + console.log("์ˆ˜์ • ์ „ ์ด๋ฏธ์ง€url::::" + result.data().img); + employeeName.value = result.data().name; + ext.value = result.data().ext; + phone.value = result.data().phone; + email.value = result.data().email; + team.value = result.data().team; + rank.value = result.data().rank; + memo.value = result.data().memo; + deleteImg.value = result.data().img; + previewImg.src = result.data().img; + + // ์ˆ˜์ •๋ฒ„ํŠผ ํด๋ฆญ ์‹œ + editBtn.addEventListener("click", function () { + const editImg = document.querySelector("#image").files[0]; + const imgName = document.querySelector("#image").files.name; + const storageRef = storage.ref(); + const editImgPath = storageRef.child("image/" + randomNum + imgName); + const updateImg = editImgPath.put(editImg); + + updateImg.on( + "state_changed", + null, + (err) => { + console.log(err); + }, + () => { + updateImg.snapshot.ref.getDownloadURL().then((editUrl) => { + console.log("์ˆ˜์ •๋œ ๊ฒฝ๋กœ๋Š”", editUrl); + + const editDB = { + name: employeeName.value, + ext: ext.value, + phone: phone.value, + email: email.value, + team: team.value, + rank: rank.value, + memo: memo.value, + img: editUrl, + }; + + if (previewImg.src === result.data().img) { + editDB["img"] = result.data().img; + } + + db.collection("member") + .doc(queryString.get("id")) + .update(editDB) + .then(() => { + alert(editDB.name + "๋‹˜์˜ ์ง์› ์ •๋ณด๊ฐ€ ์ˆ˜์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค:)"); + window.location.href = + "/detail/detail.html?id=" + queryString.get("id"); + }); + }); + } + ); + }); + }); + +//์ด๋ฏธ์ง€๋งŒ ์‚ญ์ œ +document + .getElementById("file-delete-btn") + .addEventListener("click", function (e) { + var deleteFilename = document.getElementById("image-delete").value; + var deleteRef = storage.refFromURL(deleteFilename); + // console.log(deleteRef) + + deleteRef + .delete() + .then(function () { + alert("์ด๋ฏธ์ง€๊ฐ€ ์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!"); + window.location.reload(); + }) + .catch(function (error) { + console.error("Error removing file.", error); + }); + }); diff --git a/public/index.html b/public/index.html index c81358086..debb72bfe 100644 --- a/public/index.html +++ b/public/index.html @@ -9,68 +9,97 @@ rel="preload" as="style" onload="this.rel = 'stylesheet'" - href="reset.css" + href="/reset.css" /> - + +
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    -
      -
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • -
    • -
    -
    +

    ๐Ÿ™‹โ€โ™‚๏ธ---logo--- ๐Ÿ™‹โ€โ™€๏ธ

    +
    + +
    -
    ์ด๋ฏธ์ง€
    -
    ์ด๋ฆ„
    -
    ์†Œ์†/์ง๊ธ‰
    -
    ๋‚ด์„ ๋ฒˆํ˜ธ
    -
    ์ƒ์„ธ์ •๋ณด
    +
    ์ด๋ฏธ์ง€
    +
    ์ด๋ฆ„
    +
    ์†Œ์†/์ง๊ธ‰
    +
    ๋‚ด์„ ๋ฒˆํ˜ธ
    +
    ์ƒ์„ธ์ •๋ณด
    +
    +
    +
    +
    +
    - - - - + + - - - + + + + diff --git a/public/keyframes.css b/public/keyframes.css new file mode 100644 index 000000000..e69de29bb diff --git a/public/login/login.html b/public/login/login.html index 2c0f13ec8..17e2e4858 100644 --- a/public/login/login.html +++ b/public/login/login.html @@ -1,69 +1,123 @@ - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - - -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    -
      -
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • -
    • -
    -
    - -
    - - -
    -

    ํšŒ์›๊ฐ€์ž…

    - - - -
    - + +
    +
    + +
    -
    - -
    -

    ๋กœ๊ทธ์ธ

    - - -
    - + +
    +
    + + +
    +
    + +
    -
    - - - - - - + +
    +
    + + + +
    +
    + +
    +
    +
    - - \ No newline at end of file + + + + + + + + + diff --git a/public/login/login.js b/public/login/login.js index 87fe07e4b..b7b118dcb 100644 --- a/public/login/login.js +++ b/public/login/login.js @@ -1,33 +1,63 @@ -const joinBtn=document.getElementById('join-btn') -const loginBtn=document.getElementById('login-btn') +const joinBtn = document.getElementById("join-btn"); +const loginBtn = document.getElementById("login-btn"); //๊ฐ€์ž…ํ•˜๊ธฐ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด -joinBtn.addEventListener("click",function(){ - const joinName = document.getElementById("join__name").value; - const joinEmail = document.getElementById("join__email").value; - const joinPw = document.getElementById("join__pw").value; - - firebase.auth().createUserWithEmailAndPassword(joinEmail,joinPw).then((result)=>{ - console.log(result); - console.log(result.user); - result.user.updateProfile( {displayName : joinName} ) - - }) -}); +joinBtn.addEventListener("click", function () { + const joinName = document.getElementById("join__name").value; + const joinEmail = document.getElementById("join__email").value; + const joinPw = document.getElementById("join__pw").value; + + firebase + .auth() + .createUserWithEmailAndPassword(joinEmail, joinPw) + .then((result) => { + const userInfo = { + name: joinName, + email: joinEmail, + }; + db.collection("user") + .doc(result.user.uid) + .set(userInfo) + .then(() => { + window.location.reload(true); + alert("ํšŒ์›๊ฐ€์ž…์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.:)"); + + // console.log(result); + // console.log(result.user); + result.user.updateProfile({ displayName: joinName }); + }); + }); +}); //๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด -loginBtn.addEventListener("click",function(){ - const loginEmail = document.getElementById("login__email").value; - const loginPw = document.getElementById("login__pw").value; - - firebase.auth().signInWithEmailAndPassword(loginEmail,loginPw).then((result)=>{ - alert('๋กœ๊ทธ์ธ ์™„๋ฃŒ!') - window.location.href="/index.html" - document.querySelector('.user-welcome').classList.remove('none'); - document.querySelector('.logout').classList.remove('none'); - document.querySelector('.login').classList.add('none'); - }) +loginBtn.addEventListener("click", function () { + const loginEmail = document.getElementById("login__email").value; + const loginPw = document.getElementById("login__pw").value; + + firebase + .auth() + .signInWithEmailAndPassword(loginEmail, loginPw) + .then((result) => { + alert("๋กœ๊ทธ์ธ ์™„๋ฃŒ!"); + window.location.href = "/index.html"; + document.querySelector(".user-welcome").classList.remove("none"); + document.querySelector(".logout").classList.remove("none"); + document.querySelector(".login").classList.add("none"); + }); }); +//๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž… ํƒญ +const tabBtn = document.querySelectorAll(".tab-btn"); +const tabCon = document.querySelectorAll(".tab-con"); +for (let i = 0; i < tabBtn.length; i++) { + tabBtn[i].addEventListener("click", function (e) { + for (let j = 0; j < tabBtn.length; j++) { + tabBtn[j].classList.remove("act"); + tabCon[j].classList.remove("show"); + } + tabBtn[i].classList.add("act"); + tabCon[i].classList.add("show"); + }); +} diff --git a/public/login_ck.js b/public/login_ck.js new file mode 100644 index 000000000..29e5ec81e --- /dev/null +++ b/public/login_ck.js @@ -0,0 +1,88 @@ + + +if (localStorage.getItem("user") != null) { + console.log("ํ˜„์žฌ๋กœ๊ทธ์ธ์ค‘"); + //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์—์„œ ์œ ์ €์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ + const localDataUser = localStorage.getItem("user"); + const localName = JSON.parse(localDataUser).displayName; + document.querySelector("#user-name").innerHTML = localName + "๋‹˜"; + document.querySelector(".welcome__logout").classList.remove("none"); + document.querySelector(".welcome__login").classList.add("none"); + document.querySelectorAll(".delete-btn").forEach(el => { + el.addEventListener("click", deleteBtnClick); + }); +} else { + console.log("ํ˜„์žฌ๋กœ๊ทธ์•„์›ƒ์ค‘"); + localStorage.removeItem("user"); + document.querySelector(".welcome__logout").classList.add("none"); + document.querySelector(".welcome__login").classList.remove("none"); + document.querySelector(".delete-btn").addEventListener("click", alertLogin); +} + + +//๋กœ๊ทธ์ธ ์ƒํƒœ ํ™•์ธ. ๋กœ๊ทธ์ธ,๋กœ๊ทธ์•„์›ƒ,์ƒˆ๋กœ๊ณ ์นจ ๋“ฑ ์œ ์ € ์ธ์ฆ์ƒํƒœ ๋ณ€๊ฒฝ์‹œ๋งˆ๋‹ค ์‹คํ–‰๋จ +firebase.auth().onAuthStateChanged((user) => { + if (user) { + console.log(user); + console.log(user.displayName + "๋กœ๊ทธ์ธ ์™„๋ฃŒ"); + document.querySelector(".welcome__logout").classList.remove("none"); + document.querySelector(".welcome__login").classList.add("none"); + + //๋กœ์ปฌ์Šคํ† ๋ฆฌ์ง€์— ์œ ์ €์ •๋ณด ์ €์žฅ + localStorage.setItem("user", JSON.stringify(user)); + // userUid = user.uid; + // console.log(userUid) + } else if ((user = null)) { + localStorage.removeItem("user"); + document.querySelector(".welcome__logout").classList.add("none"); + document.querySelector(".welcome__login").classList.remove("none"); + } +}); + +const logoutBtn = document.getElementById("logout-btn"); +//๋กœ๊ทธ์•„์›ƒ ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด +logoutBtn.addEventListener("click", function () { + firebase.auth().signOut(); + localStorage.removeItem("user"); + alert("๋กœ๊ทธ์•„์›ƒ ์™„๋ฃŒ!"); + document.querySelector(".welcome__logout").classList.add("none"); + document.querySelector(".welcome__login").classList.remove("none"); +}); + + +function deleteBtnClick() { + //db์ •๋ณด ์‚ญ์ œ + db.collection("member") + .doc(queryString.get("id")) + .delete() + .then(() => { + alert("์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค."); + window.location.href = "/"; + + //์ด๋ฏธ์ง€ ์‚ญ์ œ + var deleteFilename = document.getElementById("image-delete").value; + var deleteRef = storage.refFromURL(deleteFilename); + // console.log(deleteRef) + + deleteRef + .delete() + .then(function () { + console.log("File deleted successfully"); + }) + .catch(function (error) { + console.error("Error removing file.", error); + }); + }); + } + + function editBtnClick(){ + window.location.href='/edit/edit.html?id='+ queryString.get('id') +} + + + function alertLogin(){ + alert('๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค!') + } + + + diff --git a/public/main.css b/public/main.css index 68b152a22..81970f3cd 100644 --- a/public/main.css +++ b/public/main.css @@ -1,151 +1,410 @@ +/*common */ + +body { + font-size: 14px; +} +* { + font-family: "NanumSquareNeo"; +} + +a, +button { + cursor: pointer; +} + +:root { + --sky: #78a4b8; + --navy: #7888a9; + --yellow: #ffdf81; +} + h1 { text-align: center; - font-size: 2.6rem; - margin: 4rem auto; + font-size: 2rem; + margin: 3rem auto; } h2 { text-align: center; font-size: 1.4rem; width: 100%; - margin: 1rem; + padding: 20px; + box-sizing: border-box; + border-radius: 0; + color: #575279; + border: 1px solid #575279; + border-left: none; + border-right: none; } -.none{display: none;} - -.txt-l { - text-align: left; -} -.txt-r { - text-align: right; +.none, +main .profile_title { + display: none; } + .txt-c { text-align: center; } -.ml-20 { - margin-left: 20px; + +.mr1 { + margin: 1rem auto; } + .pos-r { position: relative; } -.nav ul { + +/* layout */ +.nav .gnb { display: flex; - justify-content: space-around; + justify-content: flex-start; + align-items: center; + flex-wrap: wrap; width: 100%; - margin: 40px auto; + gap: 20px; + margin: 1.4rem auto; + font-size: 1rem; } -.container { +.gnb__welcome { display: flex; - flex-direction: column; - justify-content: center; - align-items: flex-start; - margin-top: 2rem; + justify-content: flex-end; + width: 100%; + background: #183153; + color: #fff; + padding: 0 0 0 10px; + position: relative; + text-align: right; } -.input-col { - width: 50%; + +.gnb__welcome button { + position: relative; + left: 0px; +} +.gnb li a { + font-weight: 800; + color: #183153; +} + +.search { + text-align: center; +} +section, +main, +header { + width: 90%; margin: 0 auto; - min-width: 300px; + max-width: 900px; +} +.input-col { + width: 100%; + max-width: 500px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; - margin-top: 2rem; gap: 0.5rem; + margin: 40px auto; } +.btn { + font-weight: bold; + width: 100%; + height: 50px; + border-radius: 5px; + border: 1px solid #000; + background: var(--yellow); +} +.btn-del { + background: #ffeaea; +} + +.btn-area, +.btn-area-full { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: nowrap; + gap: 1%; + width: 100%; +} +.btn-area .btn { + width: 50%; +} +.btn-area-full .btn { + display: block; + width: 100%; +} + +.btn-area .btn:nth-child(1) { + background: var(--yellow); + color: #000; +} +.btn-area .btn:nth-child(2) { + background: #ddd; + color: #000; +} + +.btn-s { + overflow: hidden; + position: relative; + display: inline-block; + background: #78a4b8; + color: #fff; + border-radius: 5px; + transition: all 0.5s ease; + border: 1px solid #78a4b8; + padding: 5px 10px; + transform: translateY(8px); +} + +.btn-s:hover { + background-color: #78a4b8; + color: #fff; + border-color: #78a4b8; + box-shadow: 0px 3px 3px #b5b8d1; +} + +/* main / detail */ .profile { - font-size: 1rem; line-height: 1.6rem; + box-sizing: border-box; } .profile .name { font-weight: bold; - font-size: 1.4rem; + font-size: 1rem; line-height: 3rem; } -main .profile, -main .profile_title{ + +main .profile .tel::before { + content: "๐Ÿ“ž"; + display: inline-block; + transform: rotate(10deg); +} + +main .profile { + border: 1px solid #000; + border-radius: 20px; + padding: 1rem; width: 100%; - display:grid; - grid-template-columns: 20% 20% 20% 20% 20%; - margin:10px auto; - text-align: center;align-items: center; + display: grid; + grid-template-columns: 100%; + margin: 1.4rem auto; + text-align: center; + align-items: center; + box-shadow: 5px 8px 1px var(--navy); + background: #fff; + opacity: 0; + transition: all 1s; + scale: 0.5; + transition-delay: 0.3s; + position: relative; +} +main .profile:first-child { + margin-top: 0; } +/* main .profile .ck{position: absolute;} */ +main .profile__dl { + width: 100%; + display: grid; + grid-template-columns: 50% 50%; + grid-template-rows: 20% 20% 20% 40%; + align-items: center; +} +main .ck { + margin-left: -10px; + display: none; +} + +main .profile.active { + opacity: 1; + scale: 1; + background: #fffcf3; +} + +main .profile:nth-child(odd) { + box-shadow: 5px 8px 1px #adbbd5; + background: #f9ffff; +} .thumbnail { width: 100%; - height: 100%; - margin:0 auto; + margin: 0 auto; border-radius: 10px; background-size: cover; background-position: center; } -main .thumbnail{ max-width: 80px; height: 100%;} -#detail .profile{display:flex;flex-direction: row;flex-wrap: wrap; line-height: 2rem;} -#detail .profile .col-1{width:30%;} -#detail .profile .col-2{width:70%;} +main .ck, +main .thumbnail { + grid-row: span 4; +} +main .thumbnail { + max-width: 130px; + max-height: 130px; + height: 100%; + background-position: center; + border-radius: 100px; +} -#detail .thumbnail{ max-width: 200px;} +/* upload, edit input */ +.image-container { + width: 100%; + margin: 0 auto; + text-align: center; + background: #f2f5fb; + border-radius: 10px; + border: 1px solid #ccc; + padding: 10px; + box-sizing: border-box; +} +.image-container img { + width: 100%; +} + +#upload .image-container { + border-radius: 0; +} + +#detail .profile { + display: flex; + flex-direction: column; + line-height: 2rem; + box-sizing: border-box; +} +#detail .profile .col-1 { + border: 1px solid var(--navy); + border-radius: 10px; + margin-top: 1rem; +} +#detail .thumbnail { + width: 100%; + height: 28vh; +} .form-input, .form-text { width: 100%; - margin: 0 auto 0.4rem; - height: 30px; + height: 35px; + border-radius: 5px; + box-sizing: border-box; + border: 1px solid #ccc; } + .upload-area .form-file { - z-index: 0; - position: absolute; - top: 10%; - left: 32px; + display: none; } .upload-area .custom-upload { - background: #797979; + background: var(--navy); color: #fff; - padding: 10px; - border-radius: 5px; + padding: 1.5rem 0; + border-radius: 5px 0 0 5px; cursor: pointer; + width: 30%; position: relative; - z-index: 1; + box-sizing: border-box; + border-right: 1px solid #000; +} +.upload-area .custom-upload span { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: 100%; + text-align: center; + line-height: 1.2rem; + font-size: 0.8rem; +} + +#upload .file-data { + position: absolute; } -.custom-upload:hover { - background: #b1b1b1; +#edit .filedata { + font-size: 0.5rem; + position: absolute; + right: 5%; + bottom: 5%; + transform: translateY(-50%); + color: #fff; } -.upload-area, -.btn-area { + +.upload-area { width: 100%; margin: 0.5rem 0; + box-sizing: border-box; } .upload-area { display: flex; justify-content: flex-start; + background: #fff; + border-radius: 5px; + border: 1px solid #000; } -.btn-area { + +.edit__del { + position: relative; +} + +.edit__del input[type="text"] { + display: none; +} + +.tab-wrap { + max-width: 500px; +} + +.tab-wrap .btn { + border-color: var(--navy); + color: #333a49; +} +.tab-wrap .tab-btn-area { display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: nowrap; + position: relative; } -.btn { +.tab-wrap .tab-btn { + text-align: center; + background: transparent; +} +.tab-wrap .tab-btn { + border: none; + border-bottom: 2px solid var(--navy); width: 100%; height: 50px; - background: #183153; - border-radius: 5px; - color: #fff; - border: none; } -.btn:hover { - background: #3e4e6d; + +.tab-wrap .tab-con { + display: none; + width: 100%; + margin: 0px auto; } +.tab-wrap .tab-btn.act { + background-color: var(--sky); + border: 1px solid var(--navy); + border-bottom: none; + border-radius: 10px 10px 0 0; + color: #fff; +} -.user-welcome{ +.tab-con.show { display: flex; - align-items: center; - justify-content: flex-end; - gap:1rem; - padding:0 1.5rem; -} \ No newline at end of file + flex-direction: column; +} +.tab-wrap .input-col { + margin: 40px auto 20px; +} +.tab-wrap .form-input { + height: 45px; +} + +/* ์ˆจ๊น€ */ +#gnb__delete-btn, +.ck { + display: none; +} +.nav .gnb li:nth-child(1) .nav .gnb li:nth-child(2) { + width: 20%; +} +/* .nav .gnb li.welcome__login, .nav .gnb li.welcome__logout{width: 100%;} */ diff --git a/public/main.js b/public/main.js index 99da3cfe1..fdf43bb94 100644 --- a/public/main.js +++ b/public/main.js @@ -1,18 +1,74 @@ +// import { firebaseConfig } from '/firebase.js'; +const firebaseConfig = { + apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", + authDomain: "javascript-picture.firebaseapp.com", + projectId: "javascript-picture", + storageBucket: "javascript-picture.appspot.com", + messagingSenderId: "487659103783", + appId: "1:487659103783:web:e98479de1137818dfa9002", + measurementId: "G-0RSTQFT7N8", +}; - db.collection('member').get().then((๊ฒฐ๊ณผ)=>{ +// Initialize Firebase +firebase.initializeApp(firebaseConfig); + +const db = firebase.firestore(); +const storage = firebase.storage(); +const randomNum = Math.round(Math.random() * 9999); + +//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ +const queryString = new URLSearchParams(window.location.search); +queryString.get("id"); + +db.collection("member") + .get() + .then((๊ฒฐ๊ณผ) => { console.log(๊ฒฐ๊ณผ); - ๊ฒฐ๊ณผ.forEach((doc)=>{ + ๊ฒฐ๊ณผ.forEach((doc) => { console.log(doc.data()); - var template = `
    -
    -
    ${doc.data().name}
    -
    ${doc.data().team} ${doc.data().rank}
    -
    ${doc.data().ext}
    -
    ์ƒ์„ธ

    -

    ` - const wrap = document.querySelector('.container') - wrap.insertAdjacentHTML('beforeend',template) - - }) - - }) \ No newline at end of file + + const template = ` + + `; + + const wrap = document.querySelector(".basic-container"); + wrap.insertAdjacentHTML("beforeend", template); + }); + }) + .then(() => { + // intersectionObserver + + const io = new IntersectionObserver((entries, observer) => { + entries.forEach((entry) => { + // ์ฃผ์‹œ ๋Œ€์ƒ์ด ๋ทฐํฌํŠธ ์•ˆ์œผ๋กœ ๋“ค์–ด์˜ค๋ฉด active ํด๋ž˜์Šค ์ถ”๊ฐ€ + if (entry.intersectionRatio > 0) { + entry.target.classList.add("active"); + } + // ์•„๋‹ˆ๋ฉด active ํด๋ž˜์Šค ์ œ๊ฑฐ + else { + entry.target.classList.remove("active"); + } + }); + }); + + // ์ฃผ์‹œ ๋Œ€์ƒ ์„ ์–ธ, ์ฃผ์‹œ ์‹œ์ž‘ + const boxElList = document.querySelectorAll(".profile"); + boxElList.forEach((el) => { + io.observe(el); + }); + }); diff --git a/public/media.css b/public/media.css new file mode 100644 index 000000000..c053d0b0a --- /dev/null +++ b/public/media.css @@ -0,0 +1,98 @@ +@charset "utf-8"; + +/* Mobile Device */ +@media (min-width: 576px) { + /* layout */ + header, + main, + section { + max-width: 80%; + margin: 0 auto; + } + .nav .gnb { + flex-wrap: nowrap; + justify-content: space-between; + } + .gnb__welcome { + display: flex; + justify-content: flex-end; + width: initial; + } + .tab-wrap { + max-width: 500px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + + h1 { + font-size: 2.8rem; + } + + /* :hover */ + main .profile_title { + display: block; + } + main .profile { + width: 100%; + margin: 3rem auto; + } + main .profile_title { + background: #ffffde; + padding: 10px; + box-sizing: border-box; + margin: 3.4rem auto 1.4rem; + } + + /* ์ฒดํฌ๋ฐ•์Šค ์ƒ๊ธฐ๋ฉด ์ฃผ์„ ํ•ด์ œ */ + /* main .profile{ grid-template-columns: 10% 90%;} */ + main .profile_title, + main .profile__dl { + display: grid; + align-items: center; + text-align: center; + grid-template-columns: 20% 20% 20% 20% 20%; + grid-template-rows: 100%; + } + main .profile .thumbnail { + width: 100%; + height: 130px; + } + main .profile .btn-s { + padding: 10px; + } + main .profile .btn-s:hover { + transform: translateY(0px); + } + .profile .name { + font-size: 1.4rem; + } + + #detail .profile { + flex-direction: row; + flex-wrap: nowrap; + gap: 5%; + } + #detail .profile .col-1 { + width: 30%; + } + #detail .profile .col-2 { + width: 70%; + } + + .custom-upload:hover { + background: #ffc107; + color: #183153; + } +} + +/* Tablet & Desktop Device */ +@media all and (min-width: 768px) { + header, + section, + main { + max-width: 800px; + margin: 0 auto; + } +} diff --git a/public/preview.js b/public/preview.js new file mode 100644 index 000000000..803c29e0f --- /dev/null +++ b/public/preview.js @@ -0,0 +1,32 @@ + +function readImage(input) { + // ์ธํ’‹ ํƒœ๊ทธ์— ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ์šฐ + if (input.files && input.files[0]) { + // FileReader ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ + const reader = new FileReader(); + // ์ด๋ฏธ์ง€๊ฐ€ ๋กœ๋“œ๊ฐ€ ๋œ ๊ฒฝ์šฐ + reader.onload = (e) => { + const previewImage = document.getElementById("preview-image"); + previewImage.src = e.target.result; + }; + // reader๊ฐ€ ์ด๋ฏธ์ง€ ์ฝ๋„๋ก ํ•˜๊ธฐ + reader.readAsDataURL(input.files[0]); + } +} + +// input file change ์ด๋ฒคํŠธ ๋ถ€์—ฌ +const inputImage = document.getElementById("image"); +inputImage.addEventListener("change", (e) => { + let file = e.target.files[0]; + let fileName = file.name; + const fileData = document.querySelector(".filedata"); + + if (fileName) { + fileData.style.display = "block"; + } + fileData.innerHTML = fileName; + console.log(file, fileName); + + readImage(e.target); + +}); \ No newline at end of file diff --git a/public/upload/upload.html b/public/upload/upload.html index 137274a5a..43cf9bf97 100644 --- a/public/upload/upload.html +++ b/public/upload/upload.html @@ -1,70 +1,122 @@ - - - - - ๐Ÿ™‹โ€โ™€๏ธemployee picture - - - - - - +
    + + +
    + + +
    +
    -
    -

    ๐Ÿ™‹โ€โ™€๏ธ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค๐Ÿ™‹โ€โ™‚๏ธ

    - -
    -
      -
    • ์˜ค๋Š˜๋„ ํž˜์ฐจ๊ฒŒ!๐Ÿ˜
    • -
    • -
    -
    - -
    - -
    -

    ์ง์› ์ •๋ณด ์—…๋กœ๋“œ

    - - - - - - - - -
    - - -
    -
    - +
    + +
    -
    - - - - - - - +
    - + + + + + + + + - - - \ No newline at end of file + + + diff --git a/public/upload/upload.js b/public/upload/upload.js index 1b52c09c7..fcc070337 100644 --- a/public/upload/upload.js +++ b/public/upload/upload.js @@ -1,23 +1,25 @@ - //๋น„๋กœ๊ทธ์ธ์‹œ ์—…๋กœ๋“œ ๋ถˆ๊ฐ€ if (localStorage.getItem("user") == null) { - document.querySelectorAll('input').forEach(el => { + document.querySelectorAll("input").forEach((el) => { el.addEventListener("focus", function () { alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); this.blur(); }); - }) + }); } -// ์˜ฌ๋ฆฌ๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐฉ๊ธˆ๋งŒ๋“  ์ œ๋ชฉ, ๋‚ด์šฉ, ๊ฐ€๊ฒฉ ์ธํ’‹์— ์ž…๋ ฅํ•œ ์ •๋ณด db์ €์žฅ +// ์˜ฌ๋ฆฌ๊ธฐ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ์ž…๋ ฅํ•œ ์ •๋ณด db์ €์žฅ document.getElementById("send").addEventListener("click", function () { - if (localStorage.getItem("user") != null) { //์Šคํ† ๋ฆฌ์ง€์— ์ด๋ฏธ์ง€ ์ €์žฅ - let file = document.querySelector("#image").files[0]; + + const file = document.querySelector("#image").files[0]; const storageRef = storage.ref(); - let imgPath = storageRef.child("image/" + file.name); - let upload = imgPath.put(file); + const imgPath = storageRef.child( + "image/" + Math.round(Math.random() * 9999) + file + ); + + const upload = imgPath.put(file); //์ด๋ฏธ์ง€ ์—…๋กœ๋“œ ์„ฑ๊ณต,์‹คํŒจ ํ™•์ธ upload.on( @@ -34,17 +36,17 @@ document.getElementById("send").addEventListener("click", function () { //์ด๋ฏธ์ง€ url ๊ฐ€์ ธ์˜ค๊ธฐ console.log("์—…๋กœ๋“œ๋œ ๊ฒฝ๋กœ๋Š”", url); - let saveData = { - name : document.getElementById("name").value, - ext : document.getElementById("tel").value, - team : document.getElementById("team").value, - rank : document.getElementById("rank").value, + const saveData = { + name: document.getElementById("name").value, + ext: document.getElementById("tel").value, + team: document.getElementById("team").value, + rank: document.getElementById("rank").value, phone: document.getElementById("phone").value, - email : document.getElementById("email").value, + email: document.getElementById("email").value, memo: document.getElementById("memo").value, img: url, uid: JSON.parse(localStorage.getItem("user")).uid, - username: JSON.parse(localStorage.getItem("user")).displayName + username: JSON.parse(localStorage.getItem("user")).displayName, }; console.log(name, phone, email, rank, memo); @@ -61,7 +63,7 @@ document.getElementById("send").addEventListener("click", function () { }); } ); - }else{ + } else { alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); } }); From 7237b5be8b68fa40f023fcaf80bf1540e7c0f6a4 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 15:12:21 +0900 Subject: [PATCH 15/34] Docs:Add firebase.js --- public/detail/detail.html | 4 ---- public/firebase.js | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 public/firebase.js diff --git a/public/detail/detail.html b/public/detail/detail.html index 8bd1c196d..4a36b161d 100644 --- a/public/detail/detail.html +++ b/public/detail/detail.html @@ -65,19 +65,15 @@

    ์ƒ์„ธ์ •๋ณด

    diff --git a/public/firebase.js b/public/firebase.js new file mode 100644 index 000000000..9fb83327f --- /dev/null +++ b/public/firebase.js @@ -0,0 +1,21 @@ +const firebaseConfig = { + apiKey: "AIzaSyBRDdAmcnRV3_Ui_Md_vhbyp9-9-eXqzbw", + authDomain: "javascript-picture.firebaseapp.com", + projectId: "javascript-picture", + storageBucket: "javascript-picture.appspot.com", + messagingSenderId: "487659103783", + appId: "1:487659103783:web:e98479de1137818dfa9002", + measurementId: "G-0RSTQFT7N8" + }; + +// Initialize Firebase +firebase.initializeApp(firebaseConfig) ; + +const db = firebase.firestore(); +const storage = firebase.storage(); +const randomNum = Math.round(Math.random() * 9999); + +//url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ +const queryString = new URLSearchParams(window.location.search); +queryString.get('id') + From e1fe1003e49469108923682c92f81ed00c1c57c3 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 21:25:37 +0900 Subject: [PATCH 16/34] Feat:Add loading page --- public/loading.css | 131 +++++++++++++++++++++++++++++++++++++++++++++ public/loading.js | 11 ++++ 2 files changed, 142 insertions(+) create mode 100644 public/loading.css create mode 100644 public/loading.js diff --git a/public/loading.css b/public/loading.css new file mode 100644 index 000000000..0e1140db1 --- /dev/null +++ b/public/loading.css @@ -0,0 +1,131 @@ +@charset "utf-8"; + +@font-face { + font-family: 'DungGeunMo'; + src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff") format('woff'); + font-weight: normal; + font-style: normal; +} + +* { + box-sizing: border-box; +} +#wrap { + position: relative; +} + +.loading { + position: fixed; + width: 100vw; + height: 100vh; + top: 0; + left: 0; + display: flex; + align-items: center; + background-color: rgb(255, 235, 248); + z-index: 10; + +} + +#loading > div { + margin: 10px auto; + border: 10px solid #aeaefa; + border-radius: 20px; + background-color: rgb(252, 251, 255); + width: 300px; + max-width: 800px; + margin: 0px auto; + max-height: 80vh; + padding: 1rem; + display: inline-block; + text-align: center; + box-shadow: 10px 10px #a4ddd2; + box-sizing: border-box; +} + +#loading .loading_txt { + animation: loading 2.5s infinite step-end; + text-align: center; + color: #aeaefa; + display: block; + font-family: "DungGeunMo"; + font-weight: bold; + font-size: 24px; + letter-spacing: 0.5rem; + margin: 2rem auto; + text-transform: uppercase; +} +#loading .loading_txt .rotate { + display: inline-block; + animation-name: rotate; + animation-duration: 6s; + animation-iteration-count: infinite; + text-shadow: 3px 3px #ffeebc; +} +#loading .loading_txt .hi { + display: inline-block; + animation-duration: 1.5s; + animation-name: hi; + animation-iteration-count: infinite; + text-shadow: 3px 3px #ffeebc; + -webkit-text-stroke: 0.5px #fffae6; +} +#loading .loading_txt:first-child { + animation-delay: 0s; +} + +#loading .loading_txt:nth-child(2) { + animation-delay: 0.1s; +} + +#loading .loading_txt:nth-child(3) { + animation-delay: 0.2s; +} +#loading .loading_txt:nth-child(4) { + animation-delay: 0.3s; +} +#loading .loading_txt:nth-child(5) { + animation-delay: 0.4s; +} +#loading .loading_txt:nth-child(6) { + animation-delay: 0.5s; +} + +@keyframes loading { + 0% { + text-shadow: 1px 1px #fff, 2px 2px #a4ddd2, 3px 3px #a4ddd2, 4px 4px #a4ddd2, + 5px 5px #a4ddd2, 6px 6px #a4ddd2; + } + 60% { + text-shadow: none; + } +} +@keyframes hi { + 0% { + transform: rotate(0deg); + } + 25% { + transform: rotate(-10deg); + } + 50% { + transform: rotate(15deg); + } + 75% { + transform: rotate(-10deg); + } + 100% { + transform: rotate(0deg); + } +} + +@keyframes rotate { + 0% { + transform: rotate(0deg); + } + 45% { + transform: rotate(360deg); + } + 90% { + transform: rotate(0deg); + } +} diff --git a/public/loading.js b/public/loading.js new file mode 100644 index 000000000..6bc49d953 --- /dev/null +++ b/public/loading.js @@ -0,0 +1,11 @@ +window.onload = function () { + setTimeout(()=>{ + loading.style.opacity = "0"; + loading.style.transform = "scale(0)"; + loading.style.transition='all 1s'; + + },1200); +} + + + From 3b15ad8449a718ddf9d327001252aedec015a3eb Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 21:29:42 +0900 Subject: [PATCH 17/34] Feat: Add loading page --- public/index.html | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index debb72bfe..a704b367f 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,12 @@ onload="this.rel = 'stylesheet'" href="/reset.css" /> + + + +
    + + +
    +
    +

    ....๐Ÿ™‹....

    +

    ....๋กœ....

    +

    ....์˜ค....

    +

    ....์˜ค....

    +

    ....๋”ฉ....

    +

    ....๐ŸŒž....

    +
    +

    ๐Ÿ™‹โ€โ™‚๏ธ---logo--- ๐Ÿ™‹โ€โ™€๏ธ

    - + @@ -98,7 +119,7 @@
    ์ƒ์„ธ์ •๋ณด
    src="https://kit.fontawesome.com/3e1fab0201.js" crossorigin="anonymous" > - + From 45ec51afc596c51c19d821ae0c6320186f284d2a Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 21:30:28 +0900 Subject: [PATCH 18/34] Fix:login_edit/delete --- public/detail/detail.js | 6 ++++++ public/edit/edit.js | 6 ++++++ public/login/login.js | 5 ++++- public/login_ck.js | 5 +---- public/upload/upload.js | 8 +++++++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/public/detail/detail.js b/public/detail/detail.js index a866cbb90..c809a9ea7 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -31,6 +31,12 @@ db.collection("member") if (localStorage.getItem("user") != null) { document.querySelector(".edit-btn").addEventListener("click", editBtnClick); + document.querySelectorAll(".delete-btn").forEach(el => { + el.addEventListener("click", deleteBtnClick); +}); + } else { document.querySelector(".edit-btn").addEventListener("click", alertLogin); + document.querySelector(".delete-btn").addEventListener("click", alertLogin); + } diff --git a/public/edit/edit.js b/public/edit/edit.js index 24af1ed23..48444e3b2 100644 --- a/public/edit/edit.js +++ b/public/edit/edit.js @@ -90,3 +90,9 @@ document console.error("Error removing file.", error); }); }); + +// ์‚ญ์ œ + document.querySelectorAll(".delete-btn").forEach(el => { + el.addEventListener("click", deleteBtnClick); + }); + diff --git a/public/login/login.js b/public/login/login.js index b7b118dcb..bd9766d89 100644 --- a/public/login/login.js +++ b/public/login/login.js @@ -44,7 +44,10 @@ loginBtn.addEventListener("click", function () { document.querySelector(".user-welcome").classList.remove("none"); document.querySelector(".logout").classList.remove("none"); document.querySelector(".login").classList.add("none"); - }); + }).catch(function(error) { + console.error("Error removing file.", error); + alert('๋กœ๊ทธ์ธ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค. \n '+error.message) + }); }); //๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž… ํƒญ diff --git a/public/login_ck.js b/public/login_ck.js index 29e5ec81e..378e9bd34 100644 --- a/public/login_ck.js +++ b/public/login_ck.js @@ -8,15 +8,11 @@ if (localStorage.getItem("user") != null) { document.querySelector("#user-name").innerHTML = localName + "๋‹˜"; document.querySelector(".welcome__logout").classList.remove("none"); document.querySelector(".welcome__login").classList.add("none"); - document.querySelectorAll(".delete-btn").forEach(el => { - el.addEventListener("click", deleteBtnClick); - }); } else { console.log("ํ˜„์žฌ๋กœ๊ทธ์•„์›ƒ์ค‘"); localStorage.removeItem("user"); document.querySelector(".welcome__logout").classList.add("none"); document.querySelector(".welcome__login").classList.remove("none"); - document.querySelector(".delete-btn").addEventListener("click", alertLogin); } @@ -82,6 +78,7 @@ function deleteBtnClick() { function alertLogin(){ alert('๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค!') + window.location.href='login/login.html' } diff --git a/public/upload/upload.js b/public/upload/upload.js index fcc070337..cdb16282b 100644 --- a/public/upload/upload.js +++ b/public/upload/upload.js @@ -3,6 +3,7 @@ if (localStorage.getItem("user") == null) { document.querySelectorAll("input").forEach((el) => { el.addEventListener("focus", function () { alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); + window.location.href='/login/login.html' this.blur(); }); }); @@ -54,7 +55,11 @@ document.getElementById("send").addEventListener("click", function () { db.collection("member") .add(saveData) .then((result) => { - window.location.href = "/index.html"; + console.log(result) + window.location.href = + "/detail/detail.html?id=" + saveData.uid; + // "/detail/detail.html?id=" + queryString.get("id"); + // window.location.href = "/index.html"; console.log(result); }) .catch((err) => { @@ -65,5 +70,6 @@ document.getElementById("send").addEventListener("click", function () { ); } else { alert("๋กœ๊ทธ์ธ ํ›„ ์—…๋กœ๋“œ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!"); + window.location.href='/login/login.html' } }); From 3986b80805f20af1316bf7878b442bc7caa5218b Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 21:31:09 +0900 Subject: [PATCH 19/34] Chore:Modify design --- public/main.css | 8 +++++++- public/media.css | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/main.css b/public/main.css index 81970f3cd..f844b747e 100644 --- a/public/main.css +++ b/public/main.css @@ -2,6 +2,7 @@ body { font-size: 14px; + background:#fffefd; } * { font-family: "NanumSquareNeo"; @@ -69,7 +70,7 @@ main .profile_title { width: 100%; background: #183153; color: #fff; - padding: 0 0 0 10px; + padding: 0 0 0 15px; position: relative; text-align: right; } @@ -77,6 +78,11 @@ main .profile_title { .gnb__welcome button { position: relative; left: 0px; + border-radius: 3px; + border: solid #333;background:#eee; + margin-left: 10px; +} + } .gnb li a { font-weight: 800; diff --git a/public/media.css b/public/media.css index c053d0b0a..213b30c06 100644 --- a/public/media.css +++ b/public/media.css @@ -19,6 +19,7 @@ width: initial; } .tab-wrap { + margin-top: 3rem; max-width: 500px; position: absolute; left: 50%; @@ -39,7 +40,6 @@ margin: 3rem auto; } main .profile_title { - background: #ffffde; padding: 10px; box-sizing: border-box; margin: 3.4rem auto 1.4rem; From 39c6efdfb55ad9d4654eb7bb1841511b66ad8847 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Fri, 18 Aug 2023 22:59:16 +0900 Subject: [PATCH 20/34] Add:userflow, readme --- README.md | 18 +++++++++++++++++- userflow.JPG | Bin 0 -> 53542 bytes 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 userflow.JPG diff --git a/README.md b/README.md index 3f291a0f2..c930346af 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,19 @@ # :camera: ์ง์› ์‚ฌ์ง„ ๊ด€๋ฆฌ ์„œ๋น„์Šค -์ง์›๋“ค์˜ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ์ง„ ๊ด€๋ฆฌ์ž ์„œ๋น„์Šค +## ์ง์›๋“ค์˜ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ์ง„ ๊ด€๋ฆฌ์ž ์„œ๋น„์Šค +https://javascript-picture.web.app/index.html + +ID: admin@email.com + +PW: 123456 + +- ๋น„๋กœ๊ทธ์ธ์‹œ ๋ฐ์ดํ„ฐ ์กฐํšŒ๋งŒ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. + +- admin@email.com์œผ๋กœ ๋กœ๊ทธ์ธ ์‹œ ๋ชจ๋“  ๋ฐ์ดํ„ฐ์˜ ๋“ฑ๋ก / ์ˆ˜์ • / ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ˜Š + +- ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ ์‹œ ์ž์‹ ์ด ์‚ฌ์ง„ ๋“ฑ๋ก ๊ฐ€๋Šฅํ•˜๋ฉฐ, ์ž‘์„ฑ์ž์™€ ๋กœ๊ทธ์ธ ํ•œ ์œ ์ €๊ฐ€ ๋™์ผ ํ•  ๊ฒฝ์šฐ์— ๋“ฑ๋กํ•œ ์‚ฌ์ง„์˜ ์ˆ˜์ •, ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. + ## [๊ตฌํ˜„๋ฒ”์œ„] - โ€œFirebase ์„œ๋น„์Šคโ€๋ฅผ ์ด์šฉํ•˜์—ฌ ์‚ฌ์ง„์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ํŽ˜์ด์ง€๋ฅผ ๊ตฌํ˜„ @@ -20,8 +32,12 @@ - ์ง์›์„ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅ - infinity scroll ๊ธฐ๋Šฅ - LocalStorage ์‚ฌ์šฉ +- ๋กœ๋”ฉํŽ˜์ด์ง€ ๊ตฌํ˜„ ## [ํ๋ฆ„] ![Untitled](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/e2934c05-26f6-4ef6-88d4-beed76aa007a) +## [ํ•„์š”ํ•œ ์ž‘์—…] +- ๊ฒ€์ƒ‰ / ์ •๋ ฌ ๊ธฐ๋Šฅ +- ๋ฐ์ดํ„ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ diff --git a/userflow.JPG b/userflow.JPG new file mode 100644 index 0000000000000000000000000000000000000000..49f7d3583f368bfeb7b043eccb8b3a286ac877c4 GIT binary patch literal 53542 zcmeFZ2UJvBx-DD?NKO(ZDp`UkIU_1bgpwdRC_!>gMJx;i5hwux1pxucS#m~l5R@P} z7CBcD3n;4o%{krgzV`IJ-F?S<;~%%*DcLw2?pk|=Z>=@IIp^BgaqK*Z@`19NG6)9; z2lNE^1Hw*$?tySGUAp)IK6t8s@HyYvRG3kUHcgw!gY7ZhfMJ(K35E0YSGhAil;^yJK!6zyvE+Hu; zeeb@KvWlwO10CJRdin;2MwV9A&unb%>^(faynP_PelK5zgocH`j);wW7oU*${zFnm z=I5;JoZP(pFXa`LRn;}Mb**jf9i3g>J-tK2BR@yS#wR8h;EPMkE30ek8_2!=gTtd^ z)XC{ZyKsPZ{`K>F!+vQO70|9rczC#Y1Q+eXx#R;}xKw!f*Kc3GqNqji)Qy^5_&FiX z-I(;UuS6Uo+6Y<;_d#MhPSFJ}!Tu`bw|I4Jc0}X#o zBv*LDun>D=6=xnKS;oLikL7Wgmn26`!8b7JkQ~ya7^Ww!BDY)JJK4E)YZ=K?w*<@9 zMcP9IiyStYW{1RBBBg@`9_*1Jb)8xNfc2#&kn(|Fk!cFaMl z$l&y$Uo8hk`>ZKU8%eeZd8zxlx@{%9&sgs;l=N-Rd6fV{jDP7 zE7iqE`T5cy0!8iN)vC9{`{e4If_H2CU0RNk;*ld;*~v?b>Bjm`OpI<;z-}+}x|;G3EI84M~pS=HQR1YI|QVb1Te7 zMr#_HmCPi@p$U&OSDL9yGisegy0il8SVT-KTqrj7Qeu=`7e3XxoIVx5)Pq@{L@j+P z&d$(so380mf07Zw_kfr;Blv$^{L!c~&VmKP#n2V_@V0bSq8(>KT*H+U?F~9)cL6(P z-#c%UJc87UIh5`s4;l-CBx6CuMLJketixl5y?r$-$lN#iU2UyJ^gzU-!h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^F=;LK|icZ2?42XtQ9&}@gd(eeb-;!(Jp{;on}2$A^w@AFd?x!;14or|Gwvx zPydfb|9|o&&ximWbuy?Qy9jR_pI3IfoC-s{ipxkfa>DMm^!_vY&FNBkXFyRs9|$O_ zd4SEmk@Q#Y_8`B+GE#Ru>wB3wXBLZubi$a%lhXMrlyr-9*Y4u8v7DiI&NNB8wu>K| zG?2UhG;Zv~5gGEfVxjp2sk`|&^tTbrnV-!6|J4ktf9>%XH5&X=FfSiREA+F&QEd3R z^TXr!^Xf3yz322!5l*8Q=aGL9fs)Ph*497w$}7VR=s%f&lJVVF>^~%N03H2jQUCyt zE8RfKHl$qiEhOBvkrLQs{s8>{8RicdR@cmsJV&*E{g(gMCuSoAsRiR992EVZ^pxL> zUy4KU%3Uv0Ao#4Dgihiu!wJwcqjp^@@5{wtmp`_;ZsvZxzCzB)tsWFTnT) z76SO_f5^E3SVmSK5;x1vCQ`aQT=*xyQfw$jE+_dY<(A9iIVrB-n$t<+-v&14%`2uV80uATbZYcuqWteni(4Sg z!y2xg!G&8&NhyfUmu&o$ue7?D5eP6FgfC4|erGoPX^;kRU4Wv}jypFfeq$Q^5YWW( zhs#bhOJN>~aArZW9sx-TKcp=M|G~@pfrIe>@Gp7XIK}BvP}aoBeoQ%aBv(u$OIAmv zh0kbCEWviRiGH7KKvD8R^6yuK>?t+>bcFZU&tIRxUu)p6HSpIO_-hUPwFdrL1Anc7 Vzt+HCYv8Xn@V|8p;C&nV{{T^)OLqVO literal 0 HcmV?d00001 From df0a88339f3e6d43f3c96294e5813da6b2f96d01 Mon Sep 17 00:00:00 2001 From: developer-jyyun <131247158+developer-jyyun@users.noreply.github.com> Date: Fri, 18 Aug 2023 23:17:08 +0900 Subject: [PATCH 21/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c930346af..3c21fbd41 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ PW: 123456 - ๋กœ๋”ฉํŽ˜์ด์ง€ ๊ตฌํ˜„ ## [ํ๋ฆ„] -![Untitled](https://github.com/KDT1-FE/Y_FE_JAVASCRIPT_PICTURE/assets/38754963/e2934c05-26f6-4ef6-88d4-beed76aa007a) +![userflow](https://firebasestorage.googleapis.com/v0/b/javascript-picture.appspot.com/o/image%2Fuserflow.JPG?alt=media&token=1164b946-69e6-411b-ad31-93facf55cbab) ## [ํ•„์š”ํ•œ ์ž‘์—…] From 7e42e40df275918643882229c6b17d08ad03298a Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 15:00:44 +0900 Subject: [PATCH 22/34] Fix: login alert --- et HEAD~1 | 113 ++++++++++++++++++++++++++++++++++++++++++ public/login/login.js | 2 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 et HEAD~1 diff --git a/et HEAD~1 b/et HEAD~1 new file mode 100644 index 000000000..7f2116390 --- /dev/null +++ b/et HEAD~1 @@ -0,0 +1,113 @@ +commit 4808e2bd550a4a6092a626020846f74c45adb156 (HEAD -> KDT0_YunJiYoung) +Author: developer-jyyun +Date: Fri Aug 18 19:36:47 2023 +0900 + + Feat: Add loading page + +commit 7237b5be8b68fa40f023fcaf80bf1540e7c0f6a4 +Author: developer-jyyun +Date: Fri Aug 18 15:12:21 2023 +0900 + + Docs:Add firebase.js + +commit 5931373c1aa1cb86d695c47c20abed21223c3529 +Author: developer-jyyun +Date: Fri Aug 18 14:40:25 2023 +0900 + + Feat: Preview, login check + +commit 90d83226271c8f20ce973ee81f21599e09b15253 +Author: developer-jyyun +Date: Sat Aug 12 17:43:58 2023 +0900 + + Feat: DB delete + +commit 1aeb1d30bfce690babb9755d822b4638fc65cbbd +Author: developer-jyyun +Date: Sat Aug 12 16:36:34 2023 +0900 + + Docs: Change field name + +commit cc9c04f599ecb16b401c3d52cdbb927c2afcc5f9 +Author: developer-jyyun +Date: Sat Aug 12 16:26:42 2023 +0900 + + Feat: Add edit page + +commit 8150a30b0800b613a744fb5a4b0fb1d295b6d445 +Author: developer-jyyun +Date: Fri Aug 11 19:33:01 2023 +0900 + + Feat: Add DB_uid, DB_username + +commit 6113e2a8fd2d51f6721e727529d95f9b5185e8c6 +Author: developer-jyyun +Date: Fri Aug 11 19:31:25 2023 +0900 + + fix: Modify detail path(href) + +commit ad58f9320fc118adb96fd2ef86793144abcd30a6 +Author: developer-jyyun +Date: Fri Aug 11 19:14:28 2023 +0900 + + Feat: Add upload permission + +commit 6ab7483b6516b430e260b8ec9631a847c3fdba17 +Author: developer-jyyun +Date: Fri Aug 11 18:27:35 2023 +0900 + + Feat: Add onAuthStateChanged + +commit 5a28ac19734d92df7bb00dd7187299d1e2cbf24f +Author: developer-jyyun +Date: Thu Aug 10 17:59:55 2023 +0900 + + Design: Modify layout(index,upload) + +commit d831dfd48b61845e469442557bae59e763bd243a +Author: developer-jyyun +Date: Thu Aug 10 17:57:06 2023 +0900 + + Fix: Delete form tag + +commit ec35453339b3b3b491cb4821a7ff4e8173391296 +Author: developer-jyyun +Date: Thu Aug 10 17:50:31 2023 +0900 + + Feat: Add detail page + +commit a491878cb971f6c21454b2017a2304a82fe25f62 +Author: developer-jyyun +Date: Thu Aug 10 13:09:29 2023 +0900 + + Correct: close section tag + +commit 3b85946efe04a52a1f85b739e29bae75e66b0628 +Author: developer-jyyun +Date: Thu Aug 10 12:58:30 2023 +0900 + + Feat: Add upload & login + +commit 2798c60d88b48254cefa3088b0b560c085c7f608 +Author: developer-jyyun +Date: Wed Aug 9 22:26:46 2023 +0900 + + Feat: Add index + +commit 6eb0917c558a06852aef719ab8bb7cbd5067629d (origin/main, origin/HEAD, main) +Author: DT - Career <96465306+DT-Career@users.noreply.github.com> +Date: Tue Aug 8 17:31:50 2023 +0900 + + Update README.md + +commit 61a894eb885fd617a3218008af46cd415871e1b1 +Author: John Ahn +Date: Tue Aug 8 12:23:57 2023 +0900 + + Update README.md + +commit acc67141cdce095352aa4dc28e0e6e1dbd64cdf8 +Author: John Ahn +Date: Tue Aug 8 12:12:26 2023 +0900 + + Initial commit diff --git a/public/login/login.js b/public/login/login.js index bd9766d89..b402203ec 100644 --- a/public/login/login.js +++ b/public/login/login.js @@ -46,7 +46,7 @@ loginBtn.addEventListener("click", function () { document.querySelector(".login").classList.add("none"); }).catch(function(error) { console.error("Error removing file.", error); - alert('๋กœ๊ทธ์ธ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค. \n '+error.message) + // alert('๋กœ๊ทธ์ธ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค. \n '+error.message) }); }); From 8adbc2d538248d8430e4fede6de5b87c080c8b42 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 15:30:38 +0900 Subject: [PATCH 23/34] Fix : Login error --- public/login/login.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/login/login.js b/public/login/login.js index b402203ec..54e0219b7 100644 --- a/public/login/login.js +++ b/public/login/login.js @@ -22,7 +22,6 @@ joinBtn.addEventListener("click", function () { .then(() => { window.location.reload(true); alert("ํšŒ์›๊ฐ€์ž…์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.:)"); - // console.log(result); // console.log(result.user); result.user.updateProfile({ displayName: joinName }); @@ -41,12 +40,9 @@ loginBtn.addEventListener("click", function () { .then((result) => { alert("๋กœ๊ทธ์ธ ์™„๋ฃŒ!"); window.location.href = "/index.html"; - document.querySelector(".user-welcome").classList.remove("none"); - document.querySelector(".logout").classList.remove("none"); - document.querySelector(".login").classList.add("none"); }).catch(function(error) { console.error("Error removing file.", error); - // alert('๋กœ๊ทธ์ธ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค. \n '+error.message) + alert('๋กœ๊ทธ์ธ์— ์‹คํŒจํ•˜์˜€์Šต๋‹ˆ๋‹ค. \n '+error.message) }); }); From 42c71e616dc73fbeed76f30d5b0e8710c525aee4 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 17:08:52 +0900 Subject: [PATCH 24/34] Fix: Loading --- public/loading.js | 5 +++++ public/login/login.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/loading.js b/public/loading.js index 6bc49d953..a148cf9e9 100644 --- a/public/loading.js +++ b/public/loading.js @@ -1,10 +1,15 @@ window.onload = function () { + + const loading = document.getElementById("loading"); + setTimeout(()=>{ loading.style.opacity = "0"; loading.style.transform = "scale(0)"; loading.style.transition='all 1s'; },1200); + + console.log(loading) } diff --git a/public/login/login.html b/public/login/login.html index 17e2e4858..6013da47a 100644 --- a/public/login/login.html +++ b/public/login/login.html @@ -117,7 +117,7 @@

    ๐Ÿ™‹โ€โ™‚๏ธ---logo--- ๐Ÿ™‹โ€โ™€๏ธ

    - + From 8579876d56cffddbf1643f8bebe0147a5e562d21 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 17:21:51 +0900 Subject: [PATCH 25/34] Fix: Remove remove class --- public/loading.js | 2 +- public/main.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/loading.js b/public/loading.js index a148cf9e9..408801cc8 100644 --- a/public/loading.js +++ b/public/loading.js @@ -9,7 +9,7 @@ window.onload = function () { },1200); - console.log(loading) + // console.log(loading) } diff --git a/public/main.js b/public/main.js index fdf43bb94..b48c7413b 100644 --- a/public/main.js +++ b/public/main.js @@ -59,10 +59,7 @@ db.collection("member") if (entry.intersectionRatio > 0) { entry.target.classList.add("active"); } - // ์•„๋‹ˆ๋ฉด active ํด๋ž˜์Šค ์ œ๊ฑฐ - else { - entry.target.classList.remove("active"); - } + }); }); From f65db110f6093585c04a8b3d9cb783fbce444f1f Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 17:33:46 +0900 Subject: [PATCH 26/34] Fix: Url --- public/login_ck.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/login_ck.js b/public/login_ck.js index 378e9bd34..8e2c818bc 100644 --- a/public/login_ck.js +++ b/public/login_ck.js @@ -78,7 +78,7 @@ function deleteBtnClick() { function alertLogin(){ alert('๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค!') - window.location.href='login/login.html' + window.location.href='/login/login.html' } From d02f1673c4778315eeb323e42352790c4d4e91c2 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 17:47:02 +0900 Subject: [PATCH 27/34] edit path --- public/detail/detail.html | 4 ++-- public/index.html | 4 ++-- public/login/login.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/detail/detail.html b/public/detail/detail.html index 4a36b161d..daa667f35 100644 --- a/public/detail/detail.html +++ b/public/detail/detail.html @@ -77,7 +77,7 @@

    ์ƒ์„ธ์ •๋ณด

    src="https://www.gstatic.com/firebasejs/8.6.5/firebase-storage.js" > - - + + diff --git a/public/index.html b/public/index.html index a704b367f..e7e938106 100644 --- a/public/index.html +++ b/public/index.html @@ -119,8 +119,8 @@
    ์ƒ์„ธ์ •๋ณด
    src="https://kit.fontawesome.com/3e1fab0201.js" crossorigin="anonymous" > - - + + diff --git a/public/login/login.html b/public/login/login.html index 6013da47a..bd8e29da9 100644 --- a/public/login/login.html +++ b/public/login/login.html @@ -118,6 +118,6 @@

    ๐Ÿ™‹โ€โ™‚๏ธ---logo--- ๐Ÿ™‹โ€โ™€๏ธ

    - + From 568a2ffdf722a66c55c90b33db287f931026b841 Mon Sep 17 00:00:00 2001 From: developer-jyyun <131247158+developer-jyyun@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:34:14 +0900 Subject: [PATCH 28/34] Delete delete.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ํŒŒ์ผ// login_ck.js์— ํ•ด๋‹น ๋‚ด์šฉ ์ด๋™ --- public/edit/delete.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 public/edit/delete.js diff --git a/public/edit/delete.js b/public/edit/delete.js deleted file mode 100644 index c0fcede03..000000000 --- a/public/edit/delete.js +++ /dev/null @@ -1,23 +0,0 @@ - // ์‚ญ์ œ - const deleteBtn= document.querySelectorAll('.delete-btn'); - deleteBtn.addEventListener('click',function(){ - //db์ •๋ณด ์‚ญ์ œ - db.collection('member').doc(queryString.get('id')).delete().then(()=>{ - alert('์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.'); - window.location.href='/' - - }) - - //์ด๋ฏธ์ง€ ์‚ญ์ œ - var deleteFilename = document.getElementById('image-delete').value; - var deleteRef = storage.refFromURL(deleteFilename) - // console.log(deleteRef) - - deleteRef.delete().then(function() { - console.log("File deleted successfully"); - }).catch(function(error) { - console.error("Error removing file.", error); - }); - - - }); \ No newline at end of file From afa4035b439bbd30de3e3c0a8dd25d07ca82e8c6 Mon Sep 17 00:00:00 2001 From: developer-jyyun <131247158+developer-jyyun@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:34:54 +0900 Subject: [PATCH 29/34] Delete keyframes.css --- public/keyframes.css | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 public/keyframes.css diff --git a/public/keyframes.css b/public/keyframes.css deleted file mode 100644 index e69de29bb..000000000 From 4813e76035c61ec490d325e8678bb2b9324113e3 Mon Sep 17 00:00:00 2001 From: developer-jyyun Date: Sat, 19 Aug 2023 22:50:22 +0900 Subject: [PATCH 30/34] Fix:pocation path --- .gitignore | 1 - public/detail/detail.js | 10 +++------- public/edit/edit.js | 1 + public/firebase.js | 1 - public/index.html | 2 +- public/main.css | 2 +- public/main.js | 1 - public/upload/upload.html | 6 +++--- public/upload/upload.js | 7 +++---- 9 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index e2cc90f00..855bd1c81 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,3 @@ node_modules/ # Ignore IDE specific files .vscode/ -.test/ \ No newline at end of file diff --git a/public/detail/detail.js b/public/detail/detail.js index c809a9ea7..997e13411 100644 --- a/public/detail/detail.js +++ b/public/detail/detail.js @@ -4,12 +4,10 @@ db.collection("member") .then((result) => { console.log(result.data()); - var templateDetail = ` + const templateDetail = `
    -
    +
    ์ด๋ฆ„ : ${result.data().name}
    @@ -18,9 +16,7 @@ db.collection("member")
    ๋‚ด์„ ๋ฒˆํ˜ธ : ${result.data().ext}
    ์—ฐ๋ฝ์ฒ˜ : ${result.data().phone}
    ์ด๋ฉ”์ผ : ${result.data().email}
    -
    ๊ธฐํƒ€ : ${ - result.data().memo - }
    +
    ๊ธฐํƒ€ : ${result.data().memo}
    `; diff --git a/public/edit/edit.js b/public/edit/edit.js index 48444e3b2..63d0b3257 100644 --- a/public/edit/edit.js +++ b/public/edit/edit.js @@ -29,6 +29,7 @@ db.collection("member") editBtn.addEventListener("click", function () { const editImg = document.querySelector("#image").files[0]; const imgName = document.querySelector("#image").files.name; + const randomNum = Math.round(Math.random() * 9999); const storageRef = storage.ref(); const editImgPath = storageRef.child("image/" + randomNum + imgName); const updateImg = editImgPath.put(editImg); diff --git a/public/firebase.js b/public/firebase.js index 9fb83327f..a6fea73f0 100644 --- a/public/firebase.js +++ b/public/firebase.js @@ -13,7 +13,6 @@ firebase.initializeApp(firebaseConfig) ; const db = firebase.firestore(); const storage = firebase.storage(); -const randomNum = Math.round(Math.random() * 9999); //url query string์— ์žˆ๋˜ ์ž๋ฃŒ๋ฅผ object๋กœ ๋ณ€ํ™˜ const queryString = new URLSearchParams(window.location.search); diff --git a/public/index.html b/public/index.html index e7e938106..452b470d0 100644 --- a/public/index.html +++ b/public/index.html @@ -55,7 +55,7 @@

    ๐Ÿ™‹โ€โ™‚๏ธ---logo--- ๐Ÿ™‹โ€โ™€๏ธ