seperated all styles for each container, wrapped all widgets in the same container element

This commit is contained in:
0ceanSlim 2023-08-12 21:42:40 -04:00
parent cf4437ecd6
commit fada249778
8 changed files with 127 additions and 148 deletions

View File

@ -7,7 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
<body> <body>
<div class="settings"><img src='file:///android_asset/images/cog.png' alt='cog' />
<div class="container">
<div class="settings"><img src='file:///android_asset/images/cog.png' alt='cog' />
<div class="theme-dropdown"> <div class="theme-dropdown">
<label for="theme-select"> </label> <label for="theme-select"> </label>
<select id="theme-select"> <select id="theme-select">
@ -35,6 +37,7 @@
<option value="vnd">Dong</option> <option value="vnd">Dong</option>
</select> </select>
</div> </div>
</div>
</div> </div>
<div class="container"> <div class="container">
@ -46,15 +49,19 @@
</div> </div>
</div> </div>
<div id="dollars-to-sats"></div> <div class="container">
<div id="dollars-to-sats"></div>
</div>
<div class="satstodollars"> <div class="container">
<div class="satstodollars">
<h1>Sats to fiat Calc</h1> <h1>Sats to fiat Calc</h1>
<label for="sats-input">Enter the amount of Bitcoin in satoshis:</label> <label for="sats-input">Enter the amount of Bitcoin in satoshis:</label>
<br> <br>
<input type="number" id="sats-input"> <input type="number" id="sats-input">
<br> <br>
<output id="dollars-output"></output> <output id="dollars-output"></output>
</div>
</div> </div>
<div id="exchange"> <div id="exchange">

View File

@ -7,15 +7,10 @@ body {
color: #ffffff; color: #ffffff;
font-family: monospace, Arial; font-family: monospace, Arial;
font-size: 12px; font-size: 12px;
font-feature-settings: normal;
overflow-x: hidden; overflow-x: hidden;
text-align: center; text-align: center;
} }
p {
font-size: 6px;
}
h1 { h1 {
color: #f7931a; color: #f7931a;
} }
@ -32,109 +27,10 @@ a:hover {
width: auto; width: auto;
margin-top: 20px; margin-top: 20px;
background-color: #282828; background-color: #282828;
border: 3px solid #ccc; border: 3px solid #ffffff;
border-radius: 8px; border-radius: 8px;
padding: 10px; padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
align-items: center; /* Center items vertically within the container */ align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */ justify-content: center; /* Center items horizontally within the container */
} }
.price-display {
width: auto;
margin-right: 10px;
padding: 10px;
display: flex; /* Add this to create a flexbox layout */
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
}
#bitcoin-price {
font-size: 26px;
font-weight: bold;
text-align: center;
}
.bitcoin-logo {
height: 50px;
/* Adjust this to match the font size of the Bitcoin price */
width: 50px;
margin-right: 10px;
/* Add some space between the logo and the price */
}
.bitcoin-logo img {
height: 50px;
/* Adjust this to match the font size of the Bitcoin price */
width: 50px;
/* Add some space between the logo and the price */
}
#dollars-to-sats {
width: auto;
margin-top: 20px;
background-color: #282828;
border: 3px solid #ccc;
border-radius: 8px;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
color: #ffffff;
font-family: monospace, Arial;
font-size: 20px;
font-style: bolder;
}
.satstodollars {
width: auto;
margin-top: 20px;
background-color: #282828;
border: 3px solid #ccc;
border-radius: 8px;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
}
#sats-input {
font-size: 18px;
border-radius: 7px;
font-family: monospace;
background: #101010;
font-style: bolder;
color: #f7931a;
margin-right: 5px;
padding-right: 5px;
text-align: center;
}
/* CSS for the container */
#exchange {
border: 2px solid #ffffff;
border-radius: 10px;
padding: 10px;
text-align: center;
position: fixed;
bottom: 10px;
right: 10px;
}
/* CSS for the text */
#exchange h2 {
font-size: 12px;
margin-top: 0;
}
/* CSS for the app images */
.app-image {
display: inline-block;
margin: 6px;
}
.app-image img {
width: 40px;
height: 40px;
border-radius: 8px;
border: 1px solid #909090;
}

View File

@ -0,0 +1,27 @@
#bitcoin-price {
font-size: 26px;
font-weight: bold;
text-align: center;
}
.bitcoin-logo {
height: 50px;
/* Adjust this to match the font size of the Bitcoin price */
width: 50px;
margin-right: 10px;
/* Add some space between the logo and the price */
}
.bitcoin-logo img {
height: 50px;
/* Adjust this to match the font size of the Bitcoin price */
width: 50px;
/* Add some space between the logo and the price */
}
.price-display {
width: auto;
margin-right: 10px;
display: flex; /* Add this to create a flexbox layout */
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
}

View File

@ -0,0 +1,29 @@
/* CSS for the container */
#exchange {
border: 2px solid #ffffff;
border-radius: 10px;
padding: 10px;
text-align: center;
position: fixed;
bottom: 10px;
right: 10px;
}
/* CSS for the text */
#exchange h2 {
font-size: 12px;
margin-top: 0;
}
/* CSS for the app images */
.app-image {
display: inline-block;
margin: 6px;
}
.app-image img {
width: 40px;
height: 40px;
border-radius: 8px;
border: 1px solid #909090;
}

View File

@ -0,0 +1,9 @@
#dollars-to-sats {
width: auto;
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
color: #ffffff;
font-family: monospace, Arial;
font-size: 20px;
font-style: bolder;
}

View File

@ -0,0 +1,17 @@
.satstodollars {
width: auto;
align-items: center; /* Center items vertically within the container */
justify-content: center; /* Center items horizontally within the container */
}
#sats-input {
font-size: 18px;
border-radius: 7px;
font-family: monospace;
background: #101010;
font-style: bolder;
color: #f7931a;
margin-right: 5px;
padding-right: 5px;
text-align: center;
}

View File

@ -1,13 +1,7 @@
.settings { .settings {
width: auto; width: auto;
margin-top: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
background-color: #282828;
border: 3px solid #ccc;
border-radius: 8px;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
} }
.settings img { .settings img {

View File

@ -47,7 +47,7 @@ class MainActivity : AppCompatActivity() {
} }
} }
val cssFiles = listOf("style.css", "styles/settings.css") // List of your CSS files val cssFiles = listOf("style.css", "styles/settings.css", "styles/bitcoinPrice.css","styles/exchange.css", "styles/fiatToSats.css", "styles/satsToFiat.css") // List of your CSS files
val cssCode = cssFiles.joinToString("\n") { fileName -> val cssCode = cssFiles.joinToString("\n") { fileName ->
try { try {