From db56a1529d3832f41089138f9c44fc893af1e1ba Mon Sep 17 00:00:00 2001 From: Andrew Trieu Date: Fri, 3 Feb 2023 10:23:41 +0200 Subject: [PATCH] Add basic HTML files --- assets/default.png | Bin 0 -> 5929 bytes chat.html | 49 +++++ css/style.css | 390 ++++++++++++++++++++++++++++++++++++++ home.html | 117 ++++++++++++ js/password-visibility.js | 14 ++ js/search-visibility.js | 14 ++ login.html | 37 ++++ register.html | 51 +++++ 8 files changed, 672 insertions(+) create mode 100644 assets/default.png create mode 100644 chat.html create mode 100644 css/style.css create mode 100644 home.html create mode 100644 js/password-visibility.js create mode 100644 js/search-visibility.js create mode 100644 login.html create mode 100644 register.html diff --git a/assets/default.png b/assets/default.png new file mode 100644 index 0000000000000000000000000000000000000000..c4ee4c66d692b7bf2fbfc45082ad2724e732031d GIT binary patch literal 5929 zcma)Ai8s{W`yWd&g~l6YkMXu|Gm(@f%NsNHWvn0Th-?YjQuawR)|s(KVv0~g38`cm zlBMkXk|k2Ig@p9g?=Se>bMAdT&+EMI^W1ZvbDne0C7GKVu%F;R0fWKVu^7k_24e*N zO;)BO=Gpvk$`SAd>)8ccUH1$Qa|`l-XEU+eX5a@8^&`<;b7P!d zZ*OlvU=Wd%SXflFv$ON#$B&H6%!7l2$;ruqfr0w^S3iIL3=IqK?Ce}xTB6hGb8~aU z!^0&dkAMIEeLFI0Y-}tpp78W(#m$IYU%q@4r#_U&70T3S+a%Jb(h z?&alu=;qz-x!zdv3UP;ohO2T6J%3kZpQLT+jVrqjc7pLI3`z}z|SAe#|ApuAV^`p_LKuw~oT zOC~K;)&ydtww7P}mb8o?PHZGz^HV2 z7G?9j8iQ+etYHr|wzuXrJSD5knJ=@8k;AI@mWzl{nkvs2;2;x8@XdA+%Dz}-VIX|_Qc$Tm<` z=Fq=|I!)@bB-UJWOtD4+zpaR|uSKfTPsE>SQ9av=0fTBPQqIJZ7|BroxoKwP2{D8Y zg9%<8HGPc#$c9N}Ap_r>szy!g%W}di`K@xzll5Be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|e_W<2m zXBtA(e-I5ZrP>xYWfmnwDz=nYUTm%xNUu_qQTH-TNyLo)C!VWJ^3Ve_uAI)ZYqX03 zB8sdjB#$fiMcigG%(*l43B#O#p;WJ0)=+xy#%o4=sIL>UNR0dI6pgT_FbpZ0V-fGv#lhMU`0R{(^>=rs=(!cGKbP74u+*$D*(P z8(dU;xn$9yijT9s7+hfarOlY(r@Bk4rt%;zwZ)Y4s6v!;Cpx5Q`aq{t?+JDoFfP<4 zqm01V?bGg8HTzK(8KSh5J6ZZ6^KA4B3kbZ(Ktsx~?)I-~thOSKAe} z>KI6bN)3N0gco>QPSaD-wGNg-xGv>s7H|QUMlh3FeE_?AmO@aJnmg0c{2rXu-DWt! zm`&%n)7A5&PkyCoo;n($EEMUy{%(Xde6R>>w?Fr}Y-+3$5z*a@^;7Dxt)nLHvPaTq zv3}_%!iG<+@WkJxtN0rz81s;wSZx3fW1hcnr>Sh`Pm-o^+WFQ8QFDA(k-$Xw!xf+D zzlk}=bCc-)45G3|SCvm5mnAvb?|pX`hT<%a6|*=1yRsb`Wh|b68qamH?)%j_vJZlZ z^u}|M$8RxSQHePD>Tbq;dermqW4UsN`z9J1^}6^6*ENS46X>7n{F95tz-jw8(<3Ts zlMPC#9F$Q-q~fQ*m)F*Ix21!8*@VP4G@ag9&m)EZL<9!xI)WQl8+kKrlDp@Y9{*=+ z@X;PP%hlfX)3-=T|6u?3a@!B|jePop)wZsmH*WK!?C*y7if*}89f)j%^^cB^&JouH r?C1W@g>M}k>}<{riTrs7V}g;-mWW`63m+f-A;YkGrqDAT*SP-y!+7To literal 0 HcmV?d00001 diff --git a/chat.html b/chat.html new file mode 100644 index 0000000..8657715 --- /dev/null +++ b/chat.html @@ -0,0 +1,49 @@ + + + + ChatLine - Real-time Messaging App + + + + + + + +
+
+
+ + Profile photo +
+ User +

Active now

+
+
+
+
+
+

+ This is an outgoing message. Lorem ipsum dolor sit amet consectetur adipisicing elit. Ullam facilis fugiat reiciendis adipisci iste assumenda error nemo quos nisi asperiores officiis voluptatibus, cumque laudantium. Praesentium aperiam rerum quisquam voluptate tempore! +

+
+
+
+ Profile photo +
+

+ This is an incoming message. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem consectetur illo nam! Veritatis odio consectetur delectus doloribus dolores rem, hic, id molestias odit cupiditate laboriosam, facere commodi eius officia repudiandae? +

+
+
+
+
+ + +
+
+
+ + diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..7648f8a --- /dev/null +++ b/css/style.css @@ -0,0 +1,390 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto:400,700"); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + text-decoration: none; + font-family: "Roboto", sans-serif; +} + +body { + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + background: #f4f4f4; +} + +.wrapper { + background: #fff; + width: 450px; + border-radius: 16px; + box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.3), + 0 32px 64px -48px rgba(0, 0, 0, 0.5); +} + +/* Form */ + +.form { + padding: 25px 30px; +} + +.form header { + font-size: 25px; + font-weight: 600; + padding-bottom: 10px; + border-bottom: 1px solid #e6e6e6; +} + +.form form { + margin: 20px 0; +} + +.form form .error { + color: #721c24; + padding: 8px 10px; + text-align: center; + border-radius: 5px; + background: #f8d7da; + border: 1px solid #f5c6cb; + margin-bottom: 10px; +} + +.form form .names { + display: flex; +} + +.form .names .field:first-child { + margin-right: 10px; +} + +.form .names .field:last-child { + margin-left: 10px; +} + +.form form .field { + display: flex; + margin-bottom: 10px; + flex-direction: column; + position: relative; +} + +.form form .field label { + margin-bottom: 2px; +} + +.form form .field input { + height: 40px; + width: 100%; + font-size: 16px; + padding: 0 10px; + border-radius: 5px; + border: 1px solid #ccc; + outline-color: #333; +} + +.form form .image { + margin-bottom: 10px; +} + +.form form .image input { + font-size: 17px; +} + +.form form .button input { + height: 45px; + border: none; + color: #fff; + font-size: 17px; + background: #333; + border-radius: 5px; + cursor: pointer; + margin-top: 13px; + width: 100%; +} + +.form form .field i { + position: absolute; + right: 15px; + top: 70%; + color: #ccc; + cursor: pointer; + transform: translateY(-50%); +} + +.form form .field i.active::before { + color: #333; + content: "\f070"; +} + +.form .link { + text-align: center; + margin: 10px 0; + font-size: 17px; +} + +.form .link a { + color: #333; +} + +.form .link a:hover { + text-decoration: underline; +} + +/* Home area */ +.user { + padding: 25px 30px; +} + +.user header, +.users a { + display: flex; + align-items: center; + padding-bottom: 20px; + justify-content: space-between; + border-bottom: 1px solid #e6e6e6; + position: relative; +} + +.wrapper img { + object-fit: cover; + border-radius: 50%; +} + +:is(.user, .users) .content { + display: flex; + align-items: center; +} + +.user header .content img { + width: 50px; + height: 50px; +} + +:is(.user, .users) .details { + margin-left: 15px; + align-items: center; + color: #333; +} + +.user header .details span { + font-size: 20px; + font-weight: 600; +} + +.user header .logout { + color: #fff; + background: #333; + font-size: 17px; + padding: 8px 15px; + border-radius: 5px; +} + +.user .search { + margin: 20px 0; + display: flex; + align-items: center; + justify-content: space-between; + position: relative; +} + +.user .search .text { + font-size: 18px; +} + +.user .search input.active { + opacity: 1; + pointer-events: auto; +} + +.user .search input { + position: absolute; + height: 45px; + width: calc(100% - 50px); + border: 1px solid #ccc; + padding: 0 10px; + font-size: 16px; + border-radius: 40px 0 0 40px; + outline: none; + opacity: 0; + pointer-events: none; + transition: all 0.3s ease; +} + +.user .search button.active { + color: #fff; + background: #333; + outline: none; + border-radius: 0 40px 40px 0; +} + +.user .search button { + width: 45px; + height: 45px; + border-radius: 40px; + border: none; + outline: 1px solid #ccc; + cursor: pointer; + color: #333; + background: #fff; + transition: all 0.3s ease; +} + +.users { + max-height: 500px; + overflow-y: auto; +} + +.users a { + padding-right: 15px; + margin-bottom: 15px; + page-break-after: 10px; + border-bottom-color: #e6e6e6; +} + +.users a .content img { + width: 40px; + height: 40px; + object-fit: cover; + border-radius: 50%; +} + +.users a .content p { + color: #676767; +} + +.users .details span { + font-size: 18px; + font-weight: 600; +} + +.users a .status-dot { + font-size: 12px; + color: forestgreen; +} + +.users a .status-dot .offline { + font-size: 12px; + color: gray; +} + +.users a:last-child { + margin-bottom: 0; + border-bottom: none; +} + +/* Chat area */ +.chat-area header { + display: flex; + align-items: center; + padding: 20px 30px; +} + +.chat-area header img { + width: 50px; + height: 50px; + object-fit: cover; + border-radius: 50%; + margin: 0 15px; +} + +.chat-area header .back-icon { + font-size: 20px; + cursor: pointer; + color: #333; +} + +.chat-area header .details span { + font-size: 20px; + font-weight: 600; +} + +.chat-box { + max-height: 500px; + overflow-y: auto; + background: #f4f4f4; + padding: 10px 30px 20px 30px; + box-shadow: inset 0 32px 32px -32px rgba(0, 0, 0, 5%), + inset 0 -32px 32px -32px rgba(0, 0, 0, 5%); +} + +.chat-box .chat { + margin: 15px 0; +} + +.chat-box .chat p { + word-wrap: break-word; + padding: 10px 15px; + box-shadow: 0 32px 32px -32px rgba(0, 0, 0, 5%), + 0 -32px 32px -32px rgba(0, 0, 0, 5%); +} + +.chat-box .post { + display: flex; +} + +.post .details { + margin-left: auto ; + max-width: calc(100% - 100px); +} + +.post .details p { + background: #333; + color: #fff; + border-radius: 15px 15px 0 15px; + +} + +.chat-box .get { + display: flex; + align-items: flex-end; + margin-top: 15px; +} + +.get img { + width: 30px; + height: 30px; + object-fit: cover; + border-radius: 50%; +} + +.get .details { + margin-left: 10px; + margin-right: auto; + max-width: calc(100% - 100px); +} + +.get .details p { + background: lightgray; + color: black; + border-radius: 15px 15px 15px 0; +} + +.chat-area .message-input { + display: flex; + padding: 20px 30px; + justify-content: space-between; +} + +.message-input input{ + height: 40px; + width: calc(100% - 50px); + font-size: 15px; + border: 1px solid #ccc; + padding: 0 15px; + border-radius: 40px 0 0 40px; + outline: none; +} + +.message-input button { + font-size: 20px; + width: 50px; + height: 40px; + border-radius: 0 40px 40px 0; + border: none; + outline: none; + cursor: pointer; + color: #fff; + background: #333; +} \ No newline at end of file diff --git a/home.html b/home.html new file mode 100644 index 0000000..1ca0d0d --- /dev/null +++ b/home.html @@ -0,0 +1,117 @@ + + + + ChatLine - Real-time Messaging App + + + + + + + + + + + \ No newline at end of file diff --git a/js/password-visibility.js b/js/password-visibility.js new file mode 100644 index 0000000..cdc887e --- /dev/null +++ b/js/password-visibility.js @@ -0,0 +1,14 @@ +const passwordField = document.querySelector( + ".form .field input[type='password']" +); +toggleButton = document.querySelector(".form .field i"); + +toggleButton.onclick = () => { + if (passwordField.type === "password") { + passwordField.type = "text"; + toggleButton.classList.add("active"); + } else { + passwordField.type = "password"; + toggleButton.classList.remove("active"); + } +}; diff --git a/js/search-visibility.js b/js/search-visibility.js new file mode 100644 index 0000000..7b13604 --- /dev/null +++ b/js/search-visibility.js @@ -0,0 +1,14 @@ +const searchElement = document.querySelector(".user .search"); + +const searchBar = document.querySelector(".user .search input"); +const searchButton = document.querySelector(".user .search button"); + +searchElement.onmouseover = () => { + searchButton.classList.toggle("active"); + searchBar.classList.toggle("active"); +} + +searchElement.onmouseout = () => { + searchButton.classList.remove("active"); + searchBar.classList.remove("active"); +} diff --git a/login.html b/login.html new file mode 100644 index 0000000..52b0e32 --- /dev/null +++ b/login.html @@ -0,0 +1,37 @@ + + + + ChatLine - Real-time Messaging App + + + + + + + +
+
+
Login to ChatLine
+
+
Error
+
+
+ + +
+
+ + + +
+
+ +
+
+
+ +
+
+ + + \ No newline at end of file diff --git a/register.html b/register.html new file mode 100644 index 0000000..b4d34c8 --- /dev/null +++ b/register.html @@ -0,0 +1,51 @@ + + + + ChatLine - Real-time Messaging App + + + + + + + +
+
+
Join us at ChatLine!
+
+
Error
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + + +
+
+ + +
+
+ +
+
+
+ +
+
+ + + \ No newline at end of file