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

@ -105,4 +105,8 @@ html, body{
.messageContent{ .messageContent{
margin: 0px; margin: 0px;
font-size: 60%; font-size: 60%;
}
.messageImage{
width: 100%;
} }

View file

@ -14,9 +14,17 @@ class Phone{
h2.className = "messageTitle"; h2.className = "messageTitle";
h2.innerText = message.title; h2.innerText = message.title;
let p = document.createElement("p"); let p;
p.className = "messageContent"; let match = message.content.match(/:(\w+):/);
p.innerText = message.content; 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(h2);
msg.appendChild(p); msg.appendChild(p);
@ -46,12 +54,15 @@ class Phone{
} }
changePosition(){ changePosition(){
if(this.position == 0){ if(!document.getElementById("phoneContainer").contains(document.activeElement)){
document.getElementById("phoneContainer").className = "visible"; if(this.position == 0){
this.position = 1; document.getElementById("phoneContainer").className = "visible";
}else{ this.position = 1;
document.getElementById("phoneContainer").className = "hidden"; }else{
this.position = 0; document.getElementById("phoneContainer").className = "hidden";
this.position = 0;
}
} }
} }
} }