diff --git a/Cargo.lock b/Cargo.lock index d68f82d..a8b8638 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "lupt" -version = "0.1.0" +version = "0.2.0" dependencies = [ "actix", "actix-broker", diff --git a/Cargo.toml b/Cargo.toml index 0bab179..4c3b8be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lupt" -version = "0.1.0" +version = "0.2.0" description = "Chat app for lupt(लुप्त) users!" authors = ["Piyush Raj "] edition = "2018" diff --git a/src/chat_pinnd.rs b/src/chat_pinnd.rs index 1a90e0c..15c224b 100644 --- a/src/chat_pinnd.rs +++ b/src/chat_pinnd.rs @@ -9,11 +9,11 @@ use crate::{ws_sansad, messages as ms}; #[allow(dead_code)] pub struct ChatPinnd { - grih: HashMap, // kunjika, Grih + kaksh: HashMap, // kunjika, Kaksh vyaktigat_waitlist: Vec, } -pub struct Grih { +pub struct Kaksh { length: Option, loog: Vec } @@ -48,17 +48,17 @@ impl Actor for ChatPinnd { } } -/// Join grih -impl Handler for ChatPinnd { +/// Join kaksh +impl Handler for ChatPinnd { type Result = ms::Resp; - fn handle(&mut self, msg: ms::JoinGrih, _: &mut Self::Context) -> Self::Result { + fn handle(&mut self, msg: ms::JoinKaksh, _: &mut Self::Context) -> Self::Result { // check if user exist if let Some(_) = self.vyaktigat_waitlist.iter().position(|vk| vk.kunjika == msg.kunjika) { return ms::Resp::Err("Kunjika already exist".to_owned()); } - if let Some(_) = self.grih.iter().position(|(_,g)| { + if let Some(_) = self.kaksh.iter().position(|(_,g)| { match g.loog.iter().position(|a| a.kunjika == msg.kunjika) { Some(_) => true, None => false @@ -67,33 +67,33 @@ impl Handler for ChatPinnd { return ms::Resp::Err("Kunjika already exist".to_owned()); } - // check if grih exist and add user - match self.grih.get_mut(&msg.grih_kunjika) { - Some(grih) =>{ // exist - // check if grih have no space left - if let Some(n) = grih.length { - if grih.loog.len() >= n { - return ms::Resp::Err("Grih have no space".to_owned()); + // check if kaksh exist and add user + match self.kaksh.get_mut(&msg.kaksh_kunjika) { + Some(kaksh) =>{ // exist + // check if kaksh have no space left + if let Some(n) = kaksh.length { + if kaksh.loog.len() >= n { + return ms::Resp::Err("Kaksh have no space".to_owned()); } } - grih.loog.iter().for_each(|a: &Loog| { + kaksh.loog.iter().for_each(|a: &Loog| { a.addr.do_send(ms::WsConnected { name: msg.name.to_owned(), kunjika: msg.kunjika.to_owned() }) }); - grih.loog.push(Loog::new(msg.addr, msg.kunjika,msg.name, None)); + kaksh.loog.push(Loog::new(msg.addr, msg.kunjika,msg.name, None)); }, None => { // don't exist - // add grih and notify + // add kaksh and notify msg.addr.do_send(ms::WsConnected { name: msg.name.to_owned(), kunjika: msg.kunjika.to_owned() }); - self.grih.insert(msg.grih_kunjika, Grih { + self.kaksh.insert(msg.kaksh_kunjika, Kaksh { length: msg.length, loog: vec![Loog::new(msg.addr,msg.kunjika,msg.name, None)] }); @@ -116,7 +116,7 @@ impl Handler for ChatPinnd { return ms::Resp::Err("Kunjika already exist".to_owned()); } - if let Some(_) = self.grih.iter().position(|(_,g)| { + if let Some(_) = self.kaksh.iter().position(|(_,g)| { match g.loog.iter().position(|a| a.kunjika == msg.kunjika) { Some(_) => true, None => false @@ -159,7 +159,7 @@ impl Handler for ChatPinnd { let vayakti_watchlist = self.vyaktigat_waitlist.remove(pos); let group_kunjika = format!("gupt_{}>{}",msg.kunjika.to_owned(), vayakti_watchlist.kunjika); - self.grih.insert(group_kunjika.to_owned(), Grih { + self.kaksh.insert(group_kunjika.to_owned(), Kaksh { length: Some(2), loog: vec![Loog::new(msg.addr.clone(), msg.kunjika.to_owned(), msg.name.to_owned(), Some(msg.tags.clone())), Loog::new(vayakti_watchlist.addr.clone(), vayakti_watchlist.kunjika.to_owned(), vayakti_watchlist.name.to_owned(), Some(vayakti_watchlist.tags.clone()))] @@ -169,12 +169,12 @@ impl Handler for ChatPinnd { msg.addr.do_send(ms::WsConnectedRandom { name: vayakti_watchlist.name, kunjika: vayakti_watchlist.kunjika, - grih_kunjika: group_kunjika.to_owned() + kaksh_kunjika: group_kunjika.to_owned() }); vayakti_watchlist.addr.do_send(ms::WsConnectedRandom { name: msg.name, kunjika: msg.kunjika.to_owned(), - grih_kunjika: group_kunjika + kaksh_kunjika: group_kunjika }); ms::Resp::Ok @@ -185,16 +185,25 @@ impl Handler for ChatPinnd { impl Handler for ChatPinnd { type Result = ms::Resp; fn handle(&mut self, msg: ms::JoinRandomNext, _: &mut Self::Context) -> Self::Result { - let grih = self.grih.get_mut(&msg.grih_kunjika).unwrap(); + let kaksh = match self.kaksh.get_mut(&msg.kaksh_kunjika) { + Some(v) => v, + None => return ms::Resp::Err("Failed to join, check entries!".to_owned()) + }; - let loog_i = grih.loog.iter().position(|a| a.kunjika == msg.kunjika).unwrap(); + let loog_i = match kaksh.loog.iter().position(|a| a.kunjika == msg.kunjika) { + Some(v) => v, + None => return ms::Resp::Err("Failed to join, check entries!".to_owned()) + }; let addr; let name; let tags; { - let loog = grih.loog.get(loog_i).unwrap(); + let loog = match kaksh.loog.get(loog_i) { + Some(v) => v, + None => return ms::Resp::Err("Failed to join, check entries!".to_owned()) + }; if let None = loog.tags { return ms::Resp::Err("You are not a randome vyakti!".to_owned()); @@ -202,12 +211,15 @@ impl Handler for ChatPinnd { addr = loog.addr.clone(); name = loog.name.to_owned(); - tags = loog.tags.clone().unwrap(); + tags = match loog.tags.clone() { + Some(v) => v, + None => return ms::Resp::Err("Failed to join, check entries!".to_owned()) + }; } - // remove from old grih - grih.loog.remove(loog_i); - grih.loog.iter().for_each(|a| { + // remove from old kaksh + kaksh.loog.remove(loog_i); + kaksh.loog.iter().for_each(|a| { a.addr.do_send(ms::WsDisconnected { kunjika: msg.kunjika.to_owned(), name: name.to_owned() @@ -247,12 +259,12 @@ impl Handler for ChatPinnd { let vayakti_watchlist = self.vyaktigat_waitlist.remove(pos); let group_kunjika = format!("gupt_{}>{}",msg.kunjika.to_owned(), vayakti_watchlist.kunjika); - let log_count = grih.loog.len(); - drop(grih); + let log_count = kaksh.loog.len(); + drop(kaksh); if log_count == 0 { - self.grih.remove(&msg.grih_kunjika); + self.kaksh.remove(&msg.kaksh_kunjika); } - self.grih.insert(group_kunjika.to_owned(), Grih { + self.kaksh.insert(group_kunjika.to_owned(), Kaksh { length: Some(2), loog: vec![Loog::new(addr.clone(), msg.kunjika.to_owned(), name.to_owned(), Some(tags.clone())), Loog::new(vayakti_watchlist.addr.clone(), vayakti_watchlist.kunjika.to_owned(), vayakti_watchlist.name.to_owned(), Some(vayakti_watchlist.tags.clone()))] @@ -261,13 +273,13 @@ impl Handler for ChatPinnd { addr.do_send(ms::WsConnectedRandom { name: vayakti_watchlist.name, kunjika: vayakti_watchlist.kunjika, - grih_kunjika: group_kunjika.to_owned() + kaksh_kunjika: group_kunjika.to_owned() }); vayakti_watchlist.addr.do_send(ms::WsConnectedRandom { name, kunjika: msg.kunjika.to_owned(), - grih_kunjika: group_kunjika + kaksh_kunjika: group_kunjika }); ms::Resp::Ok @@ -279,8 +291,8 @@ impl Handler for ChatPinnd { type Result = (); fn handle(&mut self, msg: ms::SendText, _: &mut Self::Context) -> Self::Result { - if let Some(grih) = self.grih.get(&msg.grih_kunjika) { - grih.loog.iter().for_each(|c| { + if let Some(kaksh) = self.kaksh.get(&msg.kaksh_kunjika) { + kaksh.loog.iter().for_each(|c| { c.addr.do_send(ms::WsText { sender_kunjika: msg.kunjika.to_owned(), text: msg.text.to_owned(), @@ -296,8 +308,8 @@ impl Handler for ChatPinnd { type Result = (); fn handle(&mut self, msg: ms::SendStatus, _: &mut Self::Context) -> Self::Result { - if let Some(grih) = self.grih.get(&msg.grih_kunjika) { - grih.loog.iter().for_each(|c| { + if let Some(kaksh) = self.kaksh.get(&msg.kaksh_kunjika) { + kaksh.loog.iter().for_each(|c| { if c.kunjika == msg.kunjika { return; } @@ -315,9 +327,9 @@ impl Handler for ChatPinnd { type Result = String; fn handle(&mut self, msg: ms::List, _: &mut Self::Context) -> Self::Result { - if let Some(grih) = self.grih.get(&msg.grih_kunjika) { + if let Some(kaksh) = self.kaksh.get(&msg.kaksh_kunjika) { let mut list = Vec::new(); - for x in grih.loog.iter() { + for x in kaksh.loog.iter() { list.push((x.kunjika.to_owned(),x.name.to_owned())); } serde_json::json!(list).to_string() @@ -327,21 +339,21 @@ impl Handler for ChatPinnd { } } -/// Notifiy a user disconnected and trim grih +/// Notifiy a user disconnected and trim kaksh impl Handler for ChatPinnd { type Result = (); fn handle(&mut self, msg: ms::LeaveUser, _: &mut Self::Context) -> Self::Result { - if let Some(grih_kunjika) = &msg.grih_kunjika { - if let Some(grih) = self.grih.get_mut(grih_kunjika) { - let name = if let Some(i) = grih.loog.iter().position(|x| x.addr == msg.addr) { - grih.loog.remove(i).name + if let Some(kaksh_kunjika) = &msg.kaksh_kunjika { + if let Some(kaksh) = self.kaksh.get_mut(kaksh_kunjika) { + let name = if let Some(i) = kaksh.loog.iter().position(|x| x.addr == msg.addr) { + kaksh.loog.remove(i).name } else { "".to_owned() }; - if grih.loog.len() == 0 { - self.grih.remove(grih_kunjika); + if kaksh.loog.len() == 0 { + self.kaksh.remove(kaksh_kunjika); } else { - grih.loog.iter().for_each(|a| { + kaksh.loog.iter().for_each(|a| { a.addr.do_send(ms::WsDisconnected { kunjika: msg.kunjika.to_owned(), name: name.to_owned() @@ -360,7 +372,7 @@ impl Handler for ChatPinnd { impl Default for ChatPinnd { fn default() -> Self { ChatPinnd { - grih: HashMap::new(), + kaksh: HashMap::new(), vyaktigat_waitlist: Vec::new() } } diff --git a/src/errors/grih_full_error.rs b/src/errors/kaksh_full_error.rs similarity index 70% rename from src/errors/grih_full_error.rs rename to src/errors/kaksh_full_error.rs index 513a7b9..f1583ce 100644 --- a/src/errors/grih_full_error.rs +++ b/src/errors/kaksh_full_error.rs @@ -1,8 +1,8 @@ use std::fmt; #[derive(Debug, Clone)] -pub struct GrihFullError; +pub struct KakshFullError; -impl fmt::Display for GrihFullError { +impl fmt::Display for KakshFullError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "No space left for more user!") } diff --git a/src/errors/mod.rs b/src/errors/mod.rs index f9ca0f0..5462fde 100644 --- a/src/errors/mod.rs +++ b/src/errors/mod.rs @@ -1,5 +1,5 @@ -mod grih_full_error; +mod kaksh_full_error; mod user_kunjika_error; -pub use grih_full_error::GrihFullError; +pub use kaksh_full_error::KakshFullError; pub use user_kunjika_error::AlreadyExistError; \ No newline at end of file diff --git a/src/messages.rs b/src/messages.rs index 1ef25ed..0f21eb9 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -7,11 +7,11 @@ use crate::ws_sansad::WsSansad; //################################################## For ChatPinnd ################################################## /// Request to change information of vayakti to list of vayakti im ChatPind -/// Request to Grih with its kunjika +/// Request to Kaksh with its kunjika #[derive(Clone, Message)] #[rtype(result = "Resp")] -pub struct JoinGrih { - pub grih_kunjika: String, +pub struct JoinKaksh { + pub kaksh_kunjika: String, pub length: Option, pub addr: Addr, pub kunjika: String, @@ -31,7 +31,7 @@ pub struct JoinRandom { #[derive(Clone, Message)] #[rtype(result = "Resp")] pub struct JoinRandomNext { - pub grih_kunjika: String, + pub kaksh_kunjika: String, pub kunjika: String } @@ -39,7 +39,7 @@ pub struct JoinRandomNext { #[derive(Clone, Message)] #[rtype(result = "()")] pub struct SendText { - pub grih_kunjika: String, + pub kaksh_kunjika: String, pub kunjika: String, pub text: String, pub reply: Option, @@ -49,7 +49,7 @@ pub struct SendText { #[derive(Clone, Message)] #[rtype(result = "()")] pub struct SendStatus { - pub grih_kunjika: String, + pub kaksh_kunjika: String, pub kunjika: String, pub status: String } @@ -58,14 +58,14 @@ pub struct SendStatus { #[derive(Clone, Message)] #[rtype(result = "String")] pub struct List { - pub grih_kunjika: String + pub kaksh_kunjika: String } -/// Request to leave grih +/// Request to leave kaksh #[derive(Clone, Message)] #[rtype(result = "()")] pub struct LeaveUser { - pub grih_kunjika: Option, + pub kaksh_kunjika: Option, pub kunjika: String, pub addr: Addr } @@ -125,7 +125,7 @@ pub struct WsResponse { pub struct WsConnectedRandom { pub name: String, pub kunjika: String, - pub grih_kunjika: String + pub kaksh_kunjika: String } //################################################## Helper ################################################## #[derive(Debug)] diff --git a/src/ws_sansad.rs b/src/ws_sansad.rs index 8475b53..a31a319 100644 --- a/src/ws_sansad.rs +++ b/src/ws_sansad.rs @@ -28,7 +28,7 @@ pub struct WsSansad { #[derive(Debug)] enum Isthiti { None, - Grih(String), + Kaksh(String), VraktigatWaitlist } @@ -42,7 +42,7 @@ impl Actor for WsSansad { } fn stopping(&mut self, _: &mut Self::Context) -> Running { - futures::executor::block_on(self.leave_grih()); // notify leaving + futures::executor::block_on(self.leave_kaksh()); // notify leaving Running::Stop } } @@ -151,7 +151,7 @@ impl Handler for WsSansad { impl Handler for WsSansad { type Result = (); fn handle(&mut self, msg: ms::WsConnectedRandom, ctx: &mut Self::Context) -> Self::Result { - self.isthiti = Isthiti::Grih(msg.grih_kunjika); + self.isthiti = Isthiti::Kaksh(msg.kaksh_kunjika); let json = json!({ "cmd": "random", "name": msg.name, @@ -182,7 +182,7 @@ impl WsSansad { // heartbeat timed out // stop actor - futures::executor::block_on(act.leave_grih()); // notify leaving + futures::executor::block_on(act.leave_kaksh()); // notify leaving ctx.stop(); // don't try to send a ping return; @@ -202,7 +202,7 @@ impl WsSansad { // heartbeat timed out // stop actor - futures::executor::block_on(act.leave_grih()); // notify leaving + futures::executor::block_on(act.leave_kaksh()); // notify leaving ctx.stop(); // don't try to send a ping @@ -214,14 +214,23 @@ impl WsSansad { /// parse the request text from client async fn parse_text_handle(&mut self, msg: String) { if let Ok(val) = serde_json::from_str::(&msg) { + // let cmd = match val.get("cmd") { + // Some(v) => v, + // None => return + // }; + // let cmd = match cmd.as_str() { + // Some(v) => v, + // None => return + // }; + match val.get("cmd").unwrap().as_str().unwrap() { - "join" => { self.join_grih(val).await }, + "join" => { self.join_kaksh(val).await }, "rand" => { self.join_random(val).await }, "randnext" => { self.join_random_next().await }, "text" => { self.send_text(val).await }, "status" => { self.send_status(val).await }, "list" => { self.list().await }, - "leave" => { self.leave_grih().await }, + "leave" => { self.leave_kaksh().await }, _ => () } } @@ -250,7 +259,7 @@ impl WsSansad { Isthiti::VraktigatWaitlist => { self.send_ok_response("watchlist"); return; - }, Isthiti::Grih(_) => return + }, Isthiti::Kaksh(_) => return } let kunjika = match val.get("kunjika") { @@ -314,12 +323,12 @@ impl WsSansad { /// Request for joining to random person async fn join_random_next(&mut self) { // Check is already joined - let grih_kunjika = match &self.isthiti { + let kaksh_kunjika = match &self.isthiti { Isthiti::VraktigatWaitlist => { self.send_ok_response("watchlist"); return; }, - Isthiti::Grih(grih_kunjika) => grih_kunjika, + Isthiti::Kaksh(kaksh_kunjika) => kaksh_kunjika, Isthiti::None => { self.send_ok_response("Not allowed"); return; @@ -329,7 +338,7 @@ impl WsSansad { // request let result: Resp = ChatPinnd::from_registry().send(ms::JoinRandomNext { kunjika: self.kunjika.to_owned(), - grih_kunjika: grih_kunjika.to_owned(), + kaksh_kunjika: kaksh_kunjika.to_owned(), }).await.unwrap(); match result { @@ -346,8 +355,8 @@ impl WsSansad { } } - /// Request to join to grih - async fn join_grih(&mut self, val: Value) { + /// Request to join to kaksh + async fn join_kaksh(&mut self, val: Value) { // Check is already joined match self.isthiti { Isthiti::None => (), @@ -374,7 +383,7 @@ impl WsSansad { return; } }; - let grih_kunjika = match val.get("grih_kunjika") { + let kaksh_kunjika = match val.get("kaksh_kunjika") { Some(val ) => val.as_str().unwrap().to_owned(), None => { self.send_err_response("Invalid request"); @@ -391,7 +400,7 @@ impl WsSansad { // Validate - if let Some(val ) = validate(vec![vl::NonEmpty, vl::NoGupt, vl::NoSpace], &grih_kunjika, "Grih Kunjika") { + if let Some(val ) = validate(vec![vl::NonEmpty, vl::NoGupt, vl::NoSpace], &kaksh_kunjika, "Kaksh Kunjika") { self.send_err_response(&val); return; } else if let Some(val ) = validate(vec![vl::NonEmpty, vl::NoSpace, vl::NoHashtag], &kunjika, "Kunjika") { @@ -403,8 +412,8 @@ impl WsSansad { } // request - let result: Resp = ChatPinnd::from_registry().send(ms::JoinGrih { - grih_kunjika: grih_kunjika.to_owned(), + let result: Resp = ChatPinnd::from_registry().send(ms::JoinKaksh { + kaksh_kunjika: kaksh_kunjika.to_owned(), length, addr: self.addr.clone().unwrap(), kunjika: kunjika.to_owned(), @@ -415,7 +424,7 @@ impl WsSansad { match result { Resp::Err(err) => self.send_err_response(&err), Resp::Ok => { - self.isthiti = Isthiti::Grih(grih_kunjika); + self.isthiti = Isthiti::Kaksh(kaksh_kunjika); self.kunjika = kunjika; self.send_ok_response("joined") } @@ -423,19 +432,19 @@ impl WsSansad { } } - /// Request to join to grih + /// Request to join to kaksh async fn list(&mut self) { // check if vayakti exist if let Isthiti::None = self.isthiti { - self.send_err_response("Not in any Grih"); + self.send_err_response("Not in any Kaksh"); return; } - // check if connected to any grih + // check if connected to any kaksh match &self.isthiti { - Isthiti::Grih(kunjika) => { + Isthiti::Kaksh(kunjika) => { let json: String = ChatPinnd::from_registry().send(ms::List { - grih_kunjika: kunjika.to_owned() + kaksh_kunjika: kunjika.to_owned() }).await.unwrap(); self.addr.clone().unwrap().do_send(ms::WsList { @@ -443,25 +452,25 @@ impl WsSansad { }) }, _ => { - self.send_err_response("Grih not connected"); + self.send_err_response("Kaksh not connected"); return; } } } - /// send text to vayakti in grih + /// send text to vayakti in kaksh async fn send_text(&mut self, val: Value) { // check if vayakti exist if let Isthiti::None = self.isthiti { - self.send_err_response("Not in any Grih"); + self.send_err_response("Not in any Kaksh"); return; } - // check if connected to any grih + // check if connected to any kaksh match self.isthiti { - Isthiti::Grih(_) => (), + Isthiti::Kaksh(_) => (), _ => { - self.send_err_response("Grih not connected"); + self.send_err_response("Kaksh not connected"); return; } } @@ -480,34 +489,34 @@ impl WsSansad { None => None }; - let grih_kunjika = match &self.isthiti { - Isthiti::Grih(grih_kunjika) => { - grih_kunjika.to_owned() + let kaksh_kunjika = match &self.isthiti { + Isthiti::Kaksh(kaksh_kunjika) => { + kaksh_kunjika.to_owned() }, _ => { return; } }; Broker::::issue_async(ms::SendText { - grih_kunjika, + kaksh_kunjika, kunjika: self.kunjika.to_owned(), text, reply }); } - /// send status to vayakti in grih + /// send status to vayakti in kaksh async fn send_status(&mut self, val: Value) { // check if vayakti exist if let Isthiti::None = self.isthiti { - self.send_err_response("Not in any Grih"); + self.send_err_response("Not in any Kaksh"); return; } - // check if connected to any grih + // check if connected to any kaksh match self.isthiti { - Isthiti::Grih(_) => (), + Isthiti::Kaksh(_) => (), _ => { - self.send_err_response("Grih not connected"); + self.send_err_response("Kaksh not connected"); return; } } @@ -520,34 +529,33 @@ impl WsSansad { return; } }.as_str().unwrap().to_owned(); - let grih_kunjika = match &self.isthiti { - Isthiti::Grih(grih_kunjika) => { - grih_kunjika.to_owned() + let kaksh_kunjika = match &self.isthiti { + Isthiti::Kaksh(kaksh_kunjika) => { + kaksh_kunjika.to_owned() }, _ => { return; } }; Broker::::issue_async(ms::SendStatus { - grih_kunjika, + kaksh_kunjika, kunjika: self.kunjika.to_owned(), status }); } /// notify leaving - async fn leave_grih(&mut self) { - let grih_kunjika = match &self.isthiti { - Isthiti::Grih(val) => Some(val.to_owned()), + async fn leave_kaksh(&mut self) { + let kaksh_kunjika = match &self.isthiti { + Isthiti::Kaksh(val) => Some(val.to_owned()), _ => None }; Broker::::issue_async(ms::LeaveUser { - grih_kunjika, + kaksh_kunjika, kunjika: self.kunjika.to_owned(), addr: self.addr.clone().unwrap() }); - self.isthiti = Isthiti::None; self.send_ok_response("left"); } diff --git a/static/css/chota.min.css b/static/css/chota.min.css new file mode 100644 index 0000000..7acf70a --- /dev/null +++ b/static/css/chota.min.css @@ -0,0 +1 @@ +/*! chota.css v0.8.0 | MIT License | github.com/jenil/chota */:root{--bg-color:#fff;--bg-secondary-color:#f3f3f6;--color-primary:#14854f;--color-lightGrey:#d2d6dd;--color-grey:#747681;--color-darkGrey:#3f4144;--color-error:#d43939;--color-success:#28bd14;--grid-maxWidth:120rem;--grid-gutter:2rem;--font-size:1.6rem;--font-color:#333;--font-family-sans:-apple-system,BlinkMacSystemFont,Avenir,"Avenir Next","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--font-family-mono:monaco,"Consolas","Lucida Console",monospace}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:62.5%;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}*{scrollbar-width:thin;scrollbar-color:var(--color-lightGrey) var(--bg-primary)}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:var(--bg-primary)}::-webkit-scrollbar-thumb{background:var(--color-lightGrey)}body{background-color:var(--bg-color);line-height:1.6;font-size:var(--font-size);color:var(--font-color);font-family:Segoe UI,Helvetica Neue,sans-serif;font-family:var(--font-family-sans);margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-weight:500;margin:.35em 0 .7em}h1{font-size:2em}h2{font-size:1.75em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.85em}a{color:var(--color-primary);text-decoration:none}a:hover:not(.button){opacity:.75}button{font-family:inherit}p{margin-top:0}blockquote{background-color:var(--bg-secondary-color);padding:1.5rem 2rem;border-left:3px solid var(--color-lightGrey)}dl dt{font-weight:700}hr{background-color:var(--color-lightGrey);height:1px;margin:1rem 0}hr,table{border:none}table{width:100%;border-collapse:collapse;border-spacing:0;text-align:left}table.striped tr:nth-of-type(2n){background-color:var(--bg-secondary-color)}td,th{vertical-align:middle;padding:1.2rem .4rem}thead{border-bottom:2px solid var(--color-lightGrey)}tfoot{border-top:2px solid var(--color-lightGrey)}code,kbd,pre,samp,tt{font-family:var(--font-family-mono)}code,kbd{font-size:90%;white-space:pre-wrap;border-radius:4px;padding:.2em .4em;color:var(--color-error)}code,kbd,pre{background-color:var(--bg-secondary-color)}pre{font-size:1em;padding:1rem;overflow-x:auto}pre code{background:none;padding:0}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}img{max-width:100%}fieldset{border:1px solid var(--color-lightGrey)}iframe{border:0}.container{max-width:var(--grid-maxWidth);margin:0 auto;width:96%;padding:0 calc(var(--grid-gutter)/2)}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-left:calc(var(--grid-gutter)/-2);margin-right:calc(var(--grid-gutter)/-2)}.row,.row.reverse{-webkit-box-orient:horizontal}.row.reverse{-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col{-webkit-box-flex:1;-ms-flex:1;flex:1}.col,[class*=" col-"],[class^=col-]{margin:0 calc(var(--grid-gutter)/2) calc(var(--grid-gutter)/2)}.col-1{-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-1,.col-2{-webkit-box-flex:0}.col-2{-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3{-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-3,.col-4{-webkit-box-flex:0}.col-4{-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5{-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-5,.col-6{-webkit-box-flex:0}.col-6{-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7{-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-7,.col-8{-webkit-box-flex:0}.col-8{-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9{-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-9,.col-10{-webkit-box-flex:0}.col-10{-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11{-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-11,.col-12{-webkit-box-flex:0}.col-12{-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}@media screen and (max-width:599px){.container{width:100%}.col,[class*=col-],[class^=col-]{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;max-width:100%}}@media screen and (min-width:900px){.col-1-md{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-md{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-md{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-md{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-md{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-md{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-md{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-md{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-md{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-md{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-md{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-md{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}@media screen and (min-width:1200px){.col-1-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(8.33333% - var(--grid-gutter));flex:0 0 calc(8.33333% - var(--grid-gutter));max-width:calc(8.33333% - var(--grid-gutter))}.col-2-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(16.66667% - var(--grid-gutter));flex:0 0 calc(16.66667% - var(--grid-gutter));max-width:calc(16.66667% - var(--grid-gutter))}.col-3-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(25% - var(--grid-gutter));flex:0 0 calc(25% - var(--grid-gutter));max-width:calc(25% - var(--grid-gutter))}.col-4-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(33.33333% - var(--grid-gutter));flex:0 0 calc(33.33333% - var(--grid-gutter));max-width:calc(33.33333% - var(--grid-gutter))}.col-5-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(41.66667% - var(--grid-gutter));flex:0 0 calc(41.66667% - var(--grid-gutter));max-width:calc(41.66667% - var(--grid-gutter))}.col-6-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(50% - var(--grid-gutter));flex:0 0 calc(50% - var(--grid-gutter));max-width:calc(50% - var(--grid-gutter))}.col-7-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(58.33333% - var(--grid-gutter));flex:0 0 calc(58.33333% - var(--grid-gutter));max-width:calc(58.33333% - var(--grid-gutter))}.col-8-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(66.66667% - var(--grid-gutter));flex:0 0 calc(66.66667% - var(--grid-gutter));max-width:calc(66.66667% - var(--grid-gutter))}.col-9-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(75% - var(--grid-gutter));flex:0 0 calc(75% - var(--grid-gutter));max-width:calc(75% - var(--grid-gutter))}.col-10-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(83.33333% - var(--grid-gutter));flex:0 0 calc(83.33333% - var(--grid-gutter));max-width:calc(83.33333% - var(--grid-gutter))}.col-11-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(91.66667% - var(--grid-gutter));flex:0 0 calc(91.66667% - var(--grid-gutter));max-width:calc(91.66667% - var(--grid-gutter))}.col-12-lg{-webkit-box-flex:0;-ms-flex:0 0 calc(100% - var(--grid-gutter));flex:0 0 calc(100% - var(--grid-gutter));max-width:calc(100% - var(--grid-gutter))}}fieldset{padding:.5rem 2rem}legend{text-transform:uppercase;font-size:.8em;letter-spacing:.1rem}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),select,textarea,textarea[type=text]{font-family:inherit;padding:.8rem 1rem;border-radius:4px;border:1px solid var(--color-lightGrey);font-size:1em;-webkit-transition:all .2s ease;transition:all .2s ease;display:block;width:100%}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):not(:disabled):hover,select:hover,textarea:hover,textarea[type=text]:hover{border-color:var(--color-grey)}input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]):focus,select:focus,textarea:focus,textarea[type=text]:focus{outline:none;border-color:var(--color-primary);-webkit-box-shadow:0 0 1px var(--color-primary);box-shadow:0 0 1px var(--color-primary)}input.error:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.error{border-color:var(--color-error)}input.success:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=color]):not([type=button]):not([type=reset]),textarea.success{border-color:var(--color-success)}select{-webkit-appearance:none;background:#f3f3f6 no-repeat 100%;background-size:1ex;background-origin:content-box;background-image:url("data:image/svg+xml;utf8,")}[type=checkbox],[type=radio]{width:1.6rem;height:1.6rem}.button,[type=button],[type=reset],[type=submit],button{padding:1rem 2.5rem;color:var(--color-darkGrey);background:var(--color-lightGrey);border-radius:4px;border:1px solid transparent;font-size:var(--font-size);line-height:1;text-align:center;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;text-decoration:none;-webkit-transform:scale(1);transform:scale(1);display:inline-block;cursor:pointer}.grouped{display:-webkit-box;display:-ms-flexbox;display:flex}.grouped>:not(:last-child){margin-right:16px}.grouped.gapless>*{margin:0 0 0 -1px!important;border-radius:0!important}.grouped.gapless>:first-child{margin:0!important;border-radius:4px 0 0 4px!important}.grouped.gapless>:last-child{border-radius:0 4px 4px 0!important}.button+.button{margin-left:1rem}.button:hover,[type=button]:hover,[type=reset]:hover,[type=submit]:hover,button:hover{opacity:.8}.button:active,[type=button]:active,[type=reset]:active,[type=submit]:active,button:active{-webkit-transform:scale(.98);transform:scale(.98)}button:disabled,button:disabled:hover,input:disabled,input:disabled:hover{opacity:.4;cursor:not-allowed}.button.dark,.button.error,.button.primary,.button.secondary,.button.success,[type=submit]{color:#fff;z-index:1;background-color:#000;background-color:var(--color-primary)}.button.secondary{background-color:var(--color-grey)}.button.dark{background-color:var(--color-darkGrey)}.button.error{background-color:var(--color-error)}.button.success{background-color:var(--color-success)}.button.outline{background-color:transparent;border-color:var(--color-lightGrey)}.button.outline.primary{border-color:var(--color-primary);color:var(--color-primary)}.button.outline.secondary{border-color:var(--color-grey);color:var(--color-grey)}.button.outline.dark{border-color:var(--color-darkGrey);color:var(--color-darkGrey)}.button.clear{background-color:transparent;border-color:transparent;color:var(--color-primary)}.button.icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.button.icon>img{margin-left:2px}.button.icon-only{padding:1rem}::-webkit-input-placeholder{color:#bdbfc4}::-moz-placeholder{color:#bdbfc4}:-ms-input-placeholder{color:#bdbfc4}::-ms-input-placeholder{color:#bdbfc4}::placeholder{color:#bdbfc4}.nav{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:5rem;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.nav img{max-height:3rem}.nav-center,.nav-left,.nav-right,.nav>.container{display:-webkit-box;display:-ms-flexbox;display:flex}.nav-center,.nav-left,.nav-right{-webkit-box-flex:1;-ms-flex:1;flex:1}.nav-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.nav-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.nav-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (max-width:480px){.nav,.nav>.container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.nav-center,.nav-left,.nav-right{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.nav .brand,.nav a{text-decoration:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1rem 2rem;color:var(--color-darkGrey)}.nav .active:not(.button),.nav [aria-current=page]:not(.button){color:#000;color:var(--color-primary)}.nav .brand{font-size:1.75em;padding-top:0;padding-bottom:0}.nav .brand img{padding-right:1rem}.nav .button{margin:auto 1rem}.card{padding:1rem 2rem;border-radius:4px;background:var(--bg-color);-webkit-box-shadow:0 1px 3px var(--color-grey);box-shadow:0 1px 3px var(--color-grey)}.card p:last-child{margin:0}.card header>*{margin-top:0;margin-bottom:1rem}.tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.tabs a{text-decoration:none}.tabs>.dropdown>summary,.tabs>a{padding:1rem 2rem;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;color:var(--color-darkGrey);border-bottom:2px solid var(--color-lightGrey);text-align:center}.tabs>a.active,.tabs>a:hover,.tabs>a[aria-current=page]{opacity:1;border-bottom:2px solid var(--color-darkGrey)}.tabs>a.active,.tabs>a[aria-current=page]{border-color:var(--color-primary)}.tabs.is-full a{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.tag{display:inline-block;border:1px solid var(--color-lightGrey);text-transform:uppercase;color:var(--color-grey);padding:.5rem;line-height:1;letter-spacing:.5px}.tag.is-small{padding:.4rem;font-size:.75em}.tag.is-large{padding:.7rem;font-size:1.125em}.tag+.tag{margin-left:1rem}details.dropdown{position:relative;display:inline-block}details.dropdown>:last-child{position:absolute;left:0;white-space:nowrap}.bg-primary{background-color:var(--color-primary)!important}.bg-light{background-color:var(--color-lightGrey)!important}.bg-dark{background-color:var(--color-darkGrey)!important}.bg-grey{background-color:var(--color-grey)!important}.bg-error{background-color:var(--color-error)!important}.bg-success{background-color:var(--color-success)!important}.bd-primary{border:1px solid var(--color-primary)!important}.bd-light{border:1px solid var(--color-lightGrey)!important}.bd-dark{border:1px solid var(--color-darkGrey)!important}.bd-grey{border:1px solid var(--color-grey)!important}.bd-error{border:1px solid var(--color-error)!important}.bd-success{border:1px solid var(--color-success)!important}.text-primary{color:var(--color-primary)!important}.text-light{color:var(--color-lightGrey)!important}.text-dark{color:var(--color-darkGrey)!important}.text-grey{color:var(--color-grey)!important}.text-error{color:var(--color-error)!important}.text-success{color:var(--color-success)!important}.text-white{color:#fff!important}.pull-right{float:right!important}.pull-left{float:left!important}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-justify{text-align:justify}.text-uppercase{text-transform:uppercase}.text-lowercase{text-transform:lowercase}.text-capitalize{text-transform:capitalize}.is-full-screen{width:100%;min-height:100vh}.is-full-width{width:100%!important}.is-vertical-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-center,.is-horizontal-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.is-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.is-left,.is-right{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-left{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.is-fixed{position:fixed;width:100%}.is-paddingless{padding:0!important}.is-marginless{margin:0!important}.is-pointer{cursor:pointer!important}.is-rounded{border-radius:100%}.clearfix{content:"";display:table;clear:both}.is-hidden{display:none!important}@media screen and (max-width:599px){.hide-xs{display:none!important}}@media screen and (min-width:600px) and (max-width:899px){.hide-sm{display:none!important}}@media screen and (min-width:900px) and (max-width:1199px){.hide-md{display:none!important}}@media screen and (min-width:1200px){.hide-lg{display:none!important}}@media print{.hide-pr{display:none!important}} \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index dce1afc..7491d8a 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,9 +1,44 @@ + +@import url(chota.min.css); + +@font-face { + font-family: "Itim"; + src: url("../img/Itim-Regular.ttf"); +} + +:root { + --bg-color: #ffffff; + --bg-secondary-color: #f3f3f6; + --color-primary: #14854F; + --color-lightGrey: #d2d6dd; + --color-grey: #747681; + --color-darkGrey: #3f4144; + --color-error: #d43939; + --color-success: #28bd14; + --grid-maxWidth: 120rem; + --grid-gutter: 2rem; + --font-size: 1.8rem; + --font-color: #333333; + --font-family-sans: "Itim"; + --font-family-mono: monaco, "Consolas", "Lucida Console", monospace; +} + +body > .container { + max-width: 720px; +} + +form > div { + padding: 5px; +} + pre { - font-family: Arial, Helvetica, sans-serif; + font-family: Itim; font-size: 0.9em; margin-top: 0; margin-bottom: 0; white-space: pre-wrap; + background: none; + padding: 0.1rem; } textarea { @@ -13,15 +48,8 @@ textarea { margin-bottom: 0; } -.hidden { - display: none; -} - -.siimple-progress.progress-bar { - height: 10px !important; - position: fixed; - top: 0; left: 0; right: 0; - z-index: 99999; +.bg-white { + background-color: white; } .cover-screen { @@ -31,34 +59,68 @@ textarea { } .chatpanel { - display: flex; - justify-content: center; - width: 100%; - height: 44px; + background-image: url(../img/pattern.svg); + background-size: 30px; } -.chatpanel-left { - position: fixed; - display: inline; - width: 34px; - bottom: 0; - left: 0; +.chatpanel-top { + width: 100%; + height: 50px; + text-align: center; } .chatpanel-mid { - position: fixed; - display: inline; - width: calc(100% - 54px - 34px); - bottom: 3px; - left: 34px; + height: calc(100% - 2*50px); + padding: 5px; + overflow-y: scroll; } -.chatpanel-right { +.chatpanel-bot { + width: 100%; + height: 50px; + text-align: center; +} + +.chatpanel-top-l { + height: 50px; position: fixed; - display: inline; - width: 44px; - bottom: 5px; - right: 5px; + left: 0; + top: 0; +} + +.chatpanel-top-m { + margin-top: 5px; +} + +.chatpanel-top-r { + height: 50px; + float: right; + position: fixed; + right: 0; + top: 0; +} + +.chatpanel-bot-l { + height: 50px; + width: 50px; + float: left; + padding: 1rem; + margin: 0px; +} + +.chatpanel-bot-m { + width: calc(100% - 100px); + position: fixed; + bottom: 5px; + left: 50px; +} + +.chatpanel-bot-r { + height: 50px; + width: 50px; + float: right; + padding: 0.2rem; + margin: 0px; } #send_box { @@ -97,7 +159,7 @@ textarea { } .message .message-by { - font-size: 0.7rem; + font-size: 1.3rem; font-style: italic; text-decoration: underline; padding-bottom: 1px; @@ -116,23 +178,25 @@ textarea { .clip-win { position: fixed; z-index: 9999; - padding: 8px; + padding: 6px; margin: 5px; - bottom: 44px; + bottom: 50px; border: 1px dashed #1E86D7; } .clip-win.reply-clip { width: calc(100% - 2*8px - 3*5px); max-width: 720px; - height: 1.5em; + height: 2em; + padding: 2px; border-left: 5px solid #1E86D7; border-radius: 0px 30px 30px 0px; } .clip-win.selected-clip { width: fit-content; - height: 34px; + min-width: 250px; + height: fit-content; left: 50%; transform: translateX(-50%); border-radius: 15px; @@ -143,3 +207,9 @@ textarea { width: calc(100% - 2*8px - 3*5px); max-width: 720px; } + +@media screen and (max-width: 600px) { + div[name="error_msg"] { + width: 100%; + } +} \ No newline at end of file diff --git a/static/img/Itim-Regular.ttf b/static/img/Itim-Regular.ttf new file mode 100644 index 0000000..fbed40f Binary files /dev/null and b/static/img/Itim-Regular.ttf differ diff --git a/static/img/back.svg b/static/img/back.svg index fa4c0d6..7eafb80 100644 --- a/static/img/back.svg +++ b/static/img/back.svg @@ -15,7 +15,7 @@ style="enable-background:new 0 0 477.175 477.175;" xml:space="preserve" sodipodi:docname="back.svg" - inkscape:version="1.0.2 (e86c870879, 2021-01-15)">image/svg+xml + inkscape:current-layer="Capa_1" + inkscape:document-rotation="0" /> + style="fill:#1a1a1a"> + style="fill:#1a1a1a" /> diff --git a/static/img/close.svg b/static/img/close.svg new file mode 100644 index 0000000..48384e9 --- /dev/null +++ b/static/img/close.svg @@ -0,0 +1,102 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/label-l.svg b/static/img/label-l.svg deleted file mode 100644 index 8d686f4..0000000 --- a/static/img/label-l.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - Lupt Chat - लुप्त चैट - - - - - - - - diff --git a/static/img/label.png b/static/img/label.png new file mode 100644 index 0000000..a760a48 Binary files /dev/null and b/static/img/label.png differ diff --git a/static/img/label.svg b/static/img/label.svg index 4090088..7d3dde8 100644 --- a/static/img/label.svg +++ b/static/img/label.svg @@ -12,29 +12,29 @@ viewBox="0 0 710 260.00001" version="1.1" id="svg8" - inkscape:version="1.0.2 (e86c870879, 2021-01-15)" + inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)" sodipodi:docname="label.svg"> - @@ -54,51 +54,53 @@ id="layer1"> Lupt Chat + x="152.76921" + y="232.96042" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:96px;font-family:Itim;-inkscape-font-specification:Itim;fill:#216778;">Lupt Chat लुप्त चैट + x="268.19843" + y="130.02667" + style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:133.333px;font-family:Rajdhani;-inkscape-font-specification:'Rajdhani Medium';fill:#374548">लुप्त चैट + transform="matrix(-10.249207,0,0,10.492348,280.41862,-26.401894)"> + style="fill:none;stroke:#005544;stroke-width:0.385726;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke:#005544;stroke-width:0.385726;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke:#005544;stroke-width:0.385726;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke:#005544;stroke-width:0.385726;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:nodetypes="cccsssccssccccc" /> diff --git a/static/img/loading.svg b/static/img/loading.svg new file mode 100644 index 0000000..bf06422 --- /dev/null +++ b/static/img/loading.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/static/img/next.svg b/static/img/next.svg index ec7485e..daa25de 100644 --- a/static/img/next.svg +++ b/static/img/next.svg @@ -15,7 +15,7 @@ style="enable-background:new 0 0 477.175 477.175;" xml:space="preserve" sodipodi:docname="next.svg" - inkscape:version="1.0.2 (e86c870879, 2021-01-15)">image/svg+xml + inkscape:current-layer="Capa_1" + inkscape:document-rotation="0" /> + style="fill:#1a1a1a"> + style="fill:#1a1a1a" /> diff --git a/static/img/pattern.svg b/static/img/pattern.svg new file mode 100644 index 0000000..0bc97f0 --- /dev/null +++ b/static/img/pattern.svg @@ -0,0 +1,100 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/send.svg b/static/img/send.svg index 2088688..ecfcf99 100644 --- a/static/img/send.svg +++ b/static/img/send.svg @@ -13,8 +13,8 @@ fill="none" version="1.1" id="svg4" - sodipodi:docname="send2.svg" - inkscape:version="1.0.2 (e86c870879, 2021-01-15)"> + sodipodi:docname="send.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)"> @@ -41,16 +41,17 @@ inkscape:window-height="810" id="namedview6" showgrid="false" - inkscape:zoom="17.479167" - inkscape:cx="10.309773" - inkscape:cy="11.868146" + inkscape:zoom="15.22" + inkscape:cx="10.195351" + inkscape:cy="15.765659" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="0" - inkscape:current-layer="svg4" /> + inkscape:current-layer="svg4" + inkscape:document-rotation="0" /> + style="fill:#2ca089;stroke-width:1" /> diff --git a/static/index.html b/static/index.html index 823f781..f30d5e2 100644 --- a/static/index.html +++ b/static/index.html @@ -3,176 +3,197 @@ - Lupt Chat -
- +
+
+ + +
- -
-
- -
-
Lupt Chat
-
Chat in group or to strangers
-
-
-
Grih
-
Stranger
-
- -
-
-
Connect Grih(home) with kunjika(id).
-
-
Grih kunjika(home id)
- -
New grih is created if no such grih exists
-
-
-
Your kunjika(id)
- -
-
-
Your name
- -
-
-
Size of Grih
- -
Number of perople allowed in grih. Leave empty for infinite
-
-
-
-
Connect
-
-
- - -
-
-
By tapping "Connect" button I agree with Terms of Service and Privacy Policy
+
+ + + + +
+
+ Connect Kaksh(room) with kunjika(id) +
+
+ + + Pick a random id to create new kaksh +
+
+ + + Pick a random kunjika(id) +
+
+ + +
+
+ + + Number of perople allowed in kaksh. +
+
+
+
+ Connect +
+
+
+ + +
+
+ + By tapping "Connect" button I agree with + Terms of Service and + Privacy Policy +
- + +
-