concord images adding

This commit is contained in:
Killian Marty 2023-12-14 10:44:34 +01:00
parent a7014b48ec
commit 5060d0594d
19 changed files with 24 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View file

@ -106,3 +106,7 @@ html, body{
margin: 0px;
font-size: 60%;
}
.messageImage{
width: 100%;
}

View file

@ -14,9 +14,17 @@ class Phone{
h2.className = "messageTitle";
h2.innerText = message.title;
let p = document.createElement("p");
let p;
let match = message.content.match(/:(\w+):/);
if(match){
p = document.createElement("img");
p.className = "messageImage";
p.src = "assets/concord_images/" + match[1] + '.jpg';
}else{
p = document.createElement("p");
p.className = "messageContent";
p.innerText = message.content;
}
msg.appendChild(h2);
msg.appendChild(p);
@ -46,6 +54,7 @@ class Phone{
}
changePosition(){
if(!document.getElementById("phoneContainer").contains(document.activeElement)){
if(this.position == 0){
document.getElementById("phoneContainer").className = "visible";
this.position = 1;
@ -54,4 +63,6 @@ class Phone{
this.position = 0;
}
}
}
}