diff --git a/.dist/message.js b/.dist/message.js index 211e221..dcf32cf 100644 --- a/.dist/message.js +++ b/.dist/message.js @@ -316,10 +316,16 @@ class Message { text.appendChild(texttxt); build.appendChild(text); texttxt.classList.add("flexltr"); - const messaged = document.createElement("p"); + const messaged = document.createElement("span"); div["txt"] = messaged; - messaged.textContent = "welcome: " + this.author.username; + messaged.textContent = "welcome: "; texttxt.appendChild(messaged); + const username = document.createElement("span"); + username.textContent = this.author.username; + this.author.profileclick(username); + this.author.bind(username, this.guild); + texttxt.appendChild(username); + username.classList.add("username"); const time = document.createElement("span"); time.textContent = " " + formatTime(new Date(this.timestamp)); time.classList.add("timestamp"); diff --git a/.dist/user.js b/.dist/user.js index 15af305..2585782 100644 --- a/.dist/user.js +++ b/.dist/user.js @@ -126,23 +126,21 @@ class User { if (Contextmenu.currentmenu != "") { Contextmenu.currentmenu.remove(); } - const div = document.createElement("table"); + const div = document.createElement("div"); if (x !== -1) { div.style.left = x + "px"; div.style.top = y + "px"; - div.classList.add("profile"); + div.classList.add("profile", "flexttb"); } else { div.classList.add("hypoprofile"); } { const pfp = this.buildpfp(); - const pfprow = document.createElement("tr"); - div.appendChild(pfprow); - pfprow.appendChild(pfp); + div.appendChild(pfp); } { - const userbody = document.createElement("tr"); + const userbody = document.createElement("div"); userbody.classList.add("infosection"); div.appendChild(userbody); const usernamehtml = document.createElement("h2"); diff --git a/webpage/message.ts b/webpage/message.ts index f258426..475d91f 100644 --- a/webpage/message.ts +++ b/webpage/message.ts @@ -320,11 +320,18 @@ class Message{ text.appendChild(texttxt); build.appendChild(text); texttxt.classList.add("flexltr"); - const messaged=document.createElement("p"); + const messaged=document.createElement("span"); div["txt"]=messaged; - messaged.textContent="welcome: "+this.author.username; + messaged.textContent="welcome: "; texttxt.appendChild(messaged); + const username=document.createElement("span"); + username.textContent=this.author.username; + this.author.profileclick(username); + this.author.bind(username,this.guild); + texttxt.appendChild(username); + username.classList.add("username"); + const time=document.createElement("span"); time.textContent=" "+formatTime(new Date(this.timestamp)); time.classList.add("timestamp"); diff --git a/webpage/style.css b/webpage/style.css index b5d9984..ffd1f78 100644 --- a/webpage/style.css +++ b/webpage/style.css @@ -9,6 +9,15 @@ body { margin: 0; padding: 0; } +.profile { + display: inline-block; + position: absolute; + background-color: var(--profile-bg); + border-radius: 10%; + padding: .2cm; + width: 7cm !important; + height: 8cm; +} video{ max-width: 3in; max-height: 4in; @@ -134,15 +143,7 @@ samp { box-sizing: border-box; } -.profile { - display: inline-block; - position: absolute; - background-color: var(--profile-bg); - border-radius: 10%; - padding: .2cm; - width: 7cm; - height: 8cm; -} + a { color: var(--link); text-decoration: none; diff --git a/webpage/user.ts b/webpage/user.ts index b963a9a..c870858 100644 --- a/webpage/user.ts +++ b/webpage/user.ts @@ -129,23 +129,21 @@ class User{ } - const div=document.createElement("table"); + const div=document.createElement("div"); if(x!==-1){ div.style.left=x+"px"; div.style.top=y+"px"; - div.classList.add("profile"); + div.classList.add("profile","flexttb"); }else{ div.classList.add("hypoprofile"); } { const pfp=this.buildpfp(); - const pfprow=document.createElement("tr"); - div.appendChild(pfprow); - pfprow.appendChild(pfp); + div.appendChild(pfp); } { - const userbody=document.createElement("tr"); + const userbody=document.createElement("div"); userbody.classList.add("infosection"); div.appendChild(userbody); const usernamehtml=document.createElement("h2");