Complete system.

This commit is contained in:
retoor 2025-01-24 14:05:47 +01:00
parent d20079f3ed
commit 4b48485bcc
2 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,9 @@ class FancyButton extends HTMLElement {
const me = this
this.buttonElement.appendChild(document.createTextNode(this.getAttribute("text")))
this.buttonElement.addEventListener("click",()=>{
if(me.url){
if(me.url == "/back" || me.url == "/back/"){
window.history.back()
}else if(me.url){
window.location = me.url
}
})

View File

@ -3,5 +3,5 @@
{% block main %}
<html-frame url="/about.md"></html-frame>
<fancy-button text="Back" url="/web.html"></fancy-button>
<fancy-button text="Back" url="/back"></fancy-button>
{% endblock %}