Moved tool CSS to shared CSS file

Just for future flexibility, moved the CSS from each individual tool to a shared CSS library
This commit is contained in:
vonmillhausen 2023-06-26 13:19:47 +01:00
parent 97acb14959
commit 617b8e5365
6 changed files with 134 additions and 325 deletions

View File

@ -4,56 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Data Frog SF2000 BIOS CRC32 Patcher</title> <title>Data Frog SF2000 BIOS CRC32 Patcher</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<style type="text/css"> <link rel="stylesheet" href="tools.css">
:root {
--background: rgb(240, 235, 220);
--text: rgb(50, 40, 20);
--errorBackground: rgb(200, 65, 65);
--errorText: rgb(255, 255, 255);
--mappingBox: rgba(50, 40, 20, 0.1);
}
@media (prefers-color-scheme: dark) {
:root {
--background: rgb(70, 75, 100);
--text: rgb(190, 190, 200);
--errorBackground: rgb(130, 85, 75);
--errorText: rgb(245, 200, 200);
--mappingBox: rgba(190, 190, 200, 0.1);
}
}
body {
background-color: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active { color: var(--text); }
hr {
border: 1px solid var(--text);
margin: 2em 0;
}
p.errorMessage{
background-color: var(--errorBackground);
border: 1px dashed var(--errorText);
color: var(--errorText);
border-radius: 10px;
padding: 10px;
margin: 20px;
}
h1:first-child { text-align: center; }
p:last-child { text-align: center; }
.controlContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.control {
display: inline;
background-color: var(--mappingBox);
padding: 1em;
border-radius: 1em;
margin: 0.5em;
}
</style>
</head> </head>
<body> <body>
<h1>Data Frog SF2000 BIOS CRC32 Patcher</h1> <h1>Data Frog SF2000 BIOS CRC32 Patcher</h1>

View File

@ -4,63 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Data Frog SF2000 Boot Logo Changer</title> <title>Data Frog SF2000 Boot Logo Changer</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<style type="text/css"> <link rel="stylesheet" href="tools.css">
body {
background-color: rgb(240, 235, 220);
color: rgb(50, 40, 20);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active {
color: rgb(50, 40, 20);
}
hr {
border: 1px solid rgb(50, 40, 20);
margin: 2em 0;
}
p.errorMessage, p.infoMessage {
border-radius: 10px;
padding: 10px;
margin: 20px;
}
p.errorMessage {
background-color: rgb(200, 65, 65);
border: 1px dashed rgb(255, 255, 255);
color: rgb(255, 255, 255);
}
p.infoMessage {
background-color: rgb(65, 160, 65);
border: 1px dashed rgb(255, 255, 255);
color: rgb(255, 255, 255);
}
@media (prefers-color-scheme: dark) {
body {
background-color: rgb(70, 75, 100);
color: rgb(190, 190, 200);
}
a, a:visited, a:hover, a:active {
color: rgb(190, 190, 200);
}
hr {
border: 1px solid rgb(190, 190, 200);
}
p.errorMessage {
background-color: rgb(130, 85, 75);
border-color: rgb(245, 200, 200);
color: rgb(245, 200, 200);
}
p.infoMessage {
background-color: rgb(75, 130, 85);
border: 1px dashed rgb(200, 245, 200);
color: rgb(200, 245, 200);
}
}
h1:first-child {
text-align: center;
}
p:last-child {
text-align: center;
}
</style>
</head> </head>
<body> <body>
<h1>Data Frog SF2000 Boot Logo Changer</h1> <h1>Data Frog SF2000 Boot Logo Changer</h1>

View File

@ -4,93 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Data Frog SF2000 Button Mapping Tool</title> <title>Data Frog SF2000 Button Mapping Tool</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<style> <link rel="stylesheet" href="tools.css">
:root {
--background: rgb(240, 235, 220);
--text: rgb(50, 40, 20);
--errorBackground: rgb(200, 65, 65);
--errorText: rgb(255, 255, 255);
--infoBackground: rgb(65, 160, 65);
--infoText: rgb(255, 255, 255);
--mappingBox: rgba(50, 40, 20, 0.1);
}
@media (prefers-color-scheme: dark) {
:root {
--background: rgb(70, 75, 100);
--text: rgb(190, 190, 200);
--errorBackground: rgb(130, 85, 75);
--errorText: rgb(245, 200, 200);
--infoBackground: rgb(75, 130, 85);
--infoText: rgb(200, 245, 200);
--mappingBox: rgba(190, 190, 200, 0.1);
}
}
body {
background-color: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active { color: var(--text); }
hr {
border: 1px solid var(--text);
margin: 2em 0;
}
p.errorMessage, p.infoMessage {
border-radius: 10px;
padding: 10px;
margin: 20px;
}
p.errorMessage {
background-color: var(--errorBackground);
border: 1px dashed var(--errorText);
color: var(--errorText);
}
p.infoMessage {
background-color: var(--infoBackground);
border: 1px dashed var(--infoText);
color: var(--infoText);
}
h1:first-child { text-align: center; }
p:last-child { text-align: center; }
#mappingControls {
display: flex;
flex-wrap: wrap;
justify-content: center;
/*display: grid;*/
/*grid-template-columns: repeat(auto-fit, minmax(16em, 1fr));*/
/*grid-row-gap: 1em;*/
/*grid-column-gap: 1em;*/
}
.mappingConsole {
background-color: var(--mappingBox);
padding: 1em;
border-radius: 1em;
max-width: 14em;
max-width: 18em;
margin: 0.5em;
}
.mappingConsole h3:first-child {
text-align: center;
margin-top: 0;
border-bottom: 1px solid var(--text);
}
.mappingConsole table {
width: 100%;
border-spacing: 0 0.1em;
background-color: var(--mappingBox);
border-radius: 0.5em;
padding: 0.5em;
}
.mappingConsole table:nth-child(2) { margin-bottom: 1em; }
.mappingConsole table caption { margin-bottom: 0.5em; }
.mappingConsole table thead tr th {
border-bottom: 1px solid var(--text);
border-collapse: separate;
border-spacing: 1em 1em;
}
.alignC { text-align: center; }
.alignL { text-align: left; }
</style>
</head> </head>
<body> <body>
<h1>Data Frog SF2000 Button Mapping Tool</h1> <h1>Data Frog SF2000 Button Mapping Tool</h1>

View File

@ -4,63 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Data Frog SF2000 Generic Image Tool</title> <title>Data Frog SF2000 Generic Image Tool</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<style> <link rel="stylesheet" href="tools.css">
:root {
--background: rgb(240, 235, 220);
--text: rgb(50, 40, 20);
--errorBackground: rgb(200, 65, 65);
--errorText: rgb(255, 255, 255);
--mappingBox: rgba(50, 40, 20, 0.1);
}
@media (prefers-color-scheme: dark) {
:root {
--background: rgb(70, 75, 100);
--text: rgb(190, 190, 200);
--errorBackground: rgb(130, 85, 75);
--errorText: rgb(245, 200, 200);
--mappingBox: rgba(190, 190, 200, 0.1);
}
}
body {
background-color: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active { color: var(--text); }
hr {
border: 1px solid var(--text);
margin: 2em 0;
}
p.errorMessage{
background-color: var(--errorBackground);
border: 1px dashed var(--errorText);
color: var(--errorText);
border-radius: 10px;
padding: 10px;
margin: 20px;
}
h1:first-child { text-align: center; }
p:last-child { text-align: center; }
.controlContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.control {
display: inline;
background-color: var(--mappingBox);
padding: 1em;
border-radius: 1em;
margin: 0.5em;
}
.control input[type=number] {width: 4em;}
#processFilePreview {
border: 1px white dashed;
}
dl {margin: 2em;}
dt {font-weight: bold;}
dd {margin-bottom: 1em;}
</style>
</head> </head>
<body> <body>
<h1>Data Frog SF2000 Generic Image Tool</h1> <h1>Data Frog SF2000 Generic Image Tool</h1>

View File

@ -4,80 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Data Frog SF2000 Save State Tool</title> <title>Data Frog SF2000 Save State Tool</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<style> <link rel="stylesheet" href="tools.css">
:root {
--background: rgb(240, 235, 220);
--text: rgb(50, 40, 20);
--errorBackground: rgb(200, 65, 65);
--errorText: rgb(255, 255, 255);
--warningBackground: rgb(200, 128, 64);
--warningText: rgb(255, 255, 255);
--mappingBox: rgba(50, 40, 20, 0.1);
}
@media (prefers-color-scheme: dark) {
:root {
--background: rgb(70, 75, 100);
--text: rgb(190, 190, 200);
--errorBackground: rgb(130, 85, 75);
--errorText: rgb(245, 200, 200);
--warningBackground: rgb(130, 110, 75);
--warningText: rgb(255, 240, 214);
--mappingBox: rgba(190, 190, 200, 0.1);
}
}
body {
background-color: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active { color: inherit; }
hr {
border: 1px solid var(--text);
margin: 2em 0;
}
.icon {
position: relative;
top: 0.15em;
left: -0.2em;
height: 1em;
}
p.warning, p.error {
border: 1px dashed;
border-radius: 10px;
padding: 10px;
margin: 20px;
}
p.warning {
background-color: var(--warningBackground);
border-color: var(--warningText);
color: var(--warningText);
}
p.error {
background-color: var(--errorBackground);
border-color: var(--errorText);
color: var(--errorText);
}
h1:first-child { text-align: center; }
p:last-child { text-align: center; }
.controlContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.control {
display: inline;
background-color: var(--mappingBox);
padding: 1em;
border-radius: 1em;
margin: 0.5em;
}
#thumbnailPreview {
border: 1px white dashed;
}
#slotSelector label:not(:last-child) {
margin-right: 1em;
}
</style>
</head> </head>
<body> <body>
<h1>Data Frog SF2000 Save State Tool</h1> <h1>Data Frog SF2000 Save State Tool</h1>

129
tools/tools.css Normal file
View File

@ -0,0 +1,129 @@
/*
Von Millhausen's SF2000 Tools Shared CSS Library
================================================
There's a fairly common UI between all of my tools, so rather than each tool
including a full copy of all the shared stuff, all the shared stuff can go
into this CSS file. Makes the tools a bit more maintainable, at the cost of a
bit less portability.
Just like the tools themselves, this file should be considered CC0 Public
Domain (https://creativecommons.org/publicdomain/zero/1.0/)
Version 1.0: Initial version
*/
:root {
--background: rgb(240, 235, 220);
--text: rgb(50, 40, 20);
--infoBackground: rgb(65, 160, 65);
--infoText: rgb(255, 255, 255);
--errorBackground: rgb(200, 65, 65);
--errorText: rgb(255, 255, 255);
--warningBackground: rgb(200, 128, 64);
--warningText: rgb(255, 255, 255);
--mappingBox: rgba(50, 40, 20, 0.1);
}
@media (prefers-color-scheme: dark) {
:root {
--background: rgb(70, 75, 100);
--text: rgb(190, 190, 200);
--infoBackground: rgb(75, 130, 85);
--infoText: rgb(200, 245, 200);
--errorBackground: rgb(130, 85, 75);
--errorText: rgb(245, 200, 200);
--warningBackground: rgb(130, 110, 75);
--warningText: rgb(255, 240, 214);
--mappingBox: rgba(190, 190, 200, 0.1);
}
}
body {
background-color: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
a, a:visited, a:hover, a:active { color: inherit; }
hr {
border: 1px solid var(--text);
margin: 2em 0;
}
p.info, p.warning, p.error {
border: 1px dashed;
border-radius: 10px;
padding: 10px;
margin: 20px;
}
p.info {
background-color: var(--infoBackground);
border-color: var(--infoText);
color: var(--infoText);
}
p.warning {
background-color: var(--warningBackground);
border-color: var(--warningText);
color: var(--warningText);
}
p.error {
background-color: var(--errorBackground);
border-color: var(--errorText);
color: var(--errorText);
}
.icon {
position: relative;
top: 0.15em;
left: -0.2em;
height: 1em;
}
h1:first-child { text-align: center; }
p:last-child { text-align: center; }
.controlContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.control {
display: inline;
background-color: var(--mappingBox);
padding: 1em;
border-radius: 1em;
margin: 0.5em;
}
.control input[type=number] {width: 4em;}
.control h3:first-child {
text-align: center;
margin-top: 0;
border-bottom: 1px solid var(--text);
}
.control table {
width: 100%;
border-spacing: 0 0.1em;
background-color: var(--mappingBox);
border-radius: 0.5em;
padding: 0.5em;
}
.control table:nth-child(2) { margin-bottom: 1em; }
.control table caption { margin-bottom: 0.5em; }
.control table thead tr th {
border-bottom: 1px solid var(--text);
border-collapse: separate;
border-spacing: 1em 1em;
padding: 0 1em;
}
.alignC { text-align: center; }
.alignL { text-align: left; }
canvas {
border: 1px white dashed;
}
#slotSelector label:not(:last-child) {
margin-right: 1em;
}