1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Factored out button css

This commit is contained in:
Krateng 2019-11-20 22:46:20 +01:00
parent aafbfa747a
commit 899f1ea121
3 changed files with 25 additions and 39 deletions

View File

@ -59,27 +59,6 @@
window.addEventListener("load",function(){checkAPIkey(buttonlock)});
// we do this twice, but this one ensures that the button is correctly locked / unlocked after the api key has been checked
</script>
<style>
.button {
padding:3px;
padding-right:6px;
padding-left:6px;
background-color:beige;
color:black;
cursor:pointer;
}
.button:hover {
background-color:gold;
}
.button:active {
background-color:orange;
}
.button.locked {
background-color:grey;
color:black;
cursor:not-allowed;
}
</style>
</head>
<body>

View File

@ -368,6 +368,28 @@ img.star {
}
.button {
padding:3px;
padding-right:6px;
padding-left:6px;
background-color:@BUTTON_BG_COLOR;
color:@BUTTON_FG_COLOR;
cursor:pointer;
}
.button:hover {
background-color:@BUTTON_FOCUS_BG_COLOR;
color:@BUTTON_FOCUS_FG_COLOR;
}
.button.locked {
background-color:grey;
color:black;
cursor:not-allowed;
}
/*
**
**

View File

@ -119,7 +119,7 @@
track.innerHTML = "<a href='" + tracklink + "'>" + trackstr + "</a>";
row = document.createElement("tr")
col1 = document.createElement("td")
col1.className = "scrobblebutton"
col1.className = "button"
col1.innerHTML = "Scrobble!"
col1.onclick = function(){ scrobble(t["artists"],t["title"])};
col2 = document.createElement("td")
@ -134,22 +134,7 @@
}
</script>
<style>
.scrobblebutton {
padding:3px;
padding-right:6px;
padding-left:6px;
background-color:beige;
color:black;
cursor:pointer;
}
.scrobblebutton:hover {
background-color:gold;
}
.scrobblebutton:active {
background-color:orange;
}
</style>
</head>
@ -192,7 +177,7 @@
<br/>
<span class="scrobblebutton" onclick="scrobbleNew(event)">Scrobble!</span>
<span class="button" onclick="scrobbleNew(event)">Scrobble!</span>
<br/>