Better button styling

• A more modern button styling.
 • Fix CSS injection bug in the card generator (this fix should apply to existing cards as well).
 • Remove useless line in helpers.js.
 • Add a .gitignore.
master
luk3yx 2018-12-08 09:51:10 +13:00
parent ad3e9d29d6
commit fd5fbb47a4
4 changed files with 20 additions and 16 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
_site
.sass-cache
.jekyll-metadata

View File

@ -60,7 +60,7 @@ title = helpers.escapeHTML(title);
from = helpers.escapeHTML(from);
msg = helpers.escapeHTML(msg, true);
img = helpers.escapeHTML(img);
colour = helpers.escapeHTML(colour);
colour = colour.replace(/[^#A-Za-z0-9\-_]/g, '');
// Get the image URL
if (img) {
@ -93,8 +93,8 @@ if (imgurl) {
// Set the text colour
var morecss = '';
if (colour) {
morecss = '<style type="text/css" id="txtcolour">* { color: ' +
helpers.escapeHTML(colour) + ' !important; }</style>';
morecss = '<style type="text/css" id="txtcolour">* { color: ' + colour +
' !important; }</style>';
}
var html = `<!DOCTYPE html>

View File

@ -136,5 +136,3 @@ helpers = {
'youtube-cinema': 2,
},
};
// window.history.replaceState(null, document.title, '/js');

View File

@ -228,28 +228,31 @@ a, button {
.button, button, input[type=submit] {
font-weight: 400 !important;
font-size: 12px !important;
padding: 4px 4px !important;
padding: 5px 10px !important;
text-decoration: none;
background: $accent-colour;
border: 1px solid #000000;
border-radius: 5px;
color: #000000;
border: 1px solid rgba(0, 0, 0, 0.25);
border-radius: 10px;
color: black;
display: inline-block;
text-align: center;
text-shadow: none;
box-shadow: 1px 1px 0 #000000;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
outline: none;
&:hover {
background: #FFFFFF;
color: #111111;
}
&:active {
position: relative;
top: 1px;
left: 1px;
box-shadow: 0px 0px 0 #000000;
}
}
.button:active, button:active, input[type=submit]:active {
position: relative;
top: 1px;
left: 1px;
box-shadow: 0px 0px 0 #000000;
}
input[type=checkbox] {
background-color: #FFFFFF;
}