added new themes, split into theme dir, cleaned up styling more

This commit is contained in:
0ceanSlim 2023-08-22 09:54:32 -04:00
parent c9a803a98c
commit 0f05216ab2
12 changed files with 210 additions and 34 deletions

View File

@ -11,8 +11,8 @@ android {
applicationId = "com.example.satworth" applicationId = "com.example.satworth"
minSdk = 24 minSdk = 24
targetSdk = 33 targetSdk = 33
versionCode = 6 versionCode = 7
versionName = "0.1.62" versionName = "0.1.7"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="themes/*">
<link rel="stylesheet" type="text/css" href="styles/*"> <link rel="stylesheet" type="text/css" href="styles/*">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
@ -29,6 +29,7 @@
<option value="jpy">Yen</option> <option value="jpy">Yen</option>
<option value="ngn">Nigerian Naira</option> <option value="ngn">Nigerian Naira</option>
<option value="pkr">Pakistani Rupee</option> <option value="pkr">Pakistani Rupee</option>
<option value="pln">Polish Zloty</option>
<option value="php">Philippine Peso</option> <option value="php">Philippine Peso</option>
<option value="rub">Russian Ruble</option> <option value="rub">Russian Ruble</option>
<option value="thb">Thai Baht</option> <option value="thb">Thai Baht</option>
@ -64,7 +65,7 @@
</div> </div>
</div> </div>
<div id="exchange"> <div id="exchange">
<h2>Buy Bitcoin Here 👇</h2> <h2>Buy Bitcoin Here 👇</h2>
<div class="app-image"> <div class="app-image">
<a href="https://www.swanbitcoin.com/oceanslim"><img src="file:///android_asset/images/swan.png" alt="App 1"></a> <a href="https://www.swanbitcoin.com/oceanslim"><img src="file:///android_asset/images/swan.png" alt="App 1"></a>

View File

@ -13,7 +13,7 @@ function updateBitcoinPrice(selectedCurrency) {
function refreshBitcoinPrice(selectedCurrency) { function refreshBitcoinPrice(selectedCurrency) {
updateBitcoinPrice(selectedCurrency); updateBitcoinPrice(selectedCurrency);
setInterval(() => updateBitcoinPrice(selectedCurrency), 30000); setInterval(() => updateBitcoinPrice(selectedCurrency), 300000);
} }
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {

View File

@ -1,8 +1,7 @@
/* CSS for the container */ /* CSS for the container */
#exchange { #exchange {
border: 2px solid #ffffff;
border-radius: 10px;
padding: 10px; padding: 10px;
border-radius: 6px;
text-align: center; text-align: center;
position: fixed; position: fixed;
bottom: 10px; bottom: 10px;
@ -24,6 +23,6 @@
.app-image img { .app-image img {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 10px;
border: 1px solid #909090; border: 1px solid #909090;
} }

View File

@ -2,8 +2,6 @@
width: auto; width: auto;
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 */
color: #ffffff; font-size: 25px;
font-family: monospace, Arial;
font-size: 20px;
font-style: bolder; font-style: bolder;
} }

View File

@ -10,7 +10,7 @@
font-family: monospace; font-family: monospace;
background: #101010; background: #101010;
font-style: bolder; font-style: bolder;
color: #fbc219; color: #fad000;
margin-right: 5px; margin-right: 5px;
padding-right: 5px; padding-right: 5px;
text-align: center; text-align: center;

View File

@ -7,8 +7,8 @@
.settings img { .settings img {
width: 25px; width: 25px;
height: 25px; height: 25px;
margin-bottom: 40px; margin-bottom: 30px;
margin-right: 20px; /* Add margin to separate cog image from dropdowns */ margin-right: 10px; /* Add margin to separate cog image from dropdowns */
} }
.theme-dropdown, .theme-dropdown,
@ -17,7 +17,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; /* Align theme dropdown to the right */ justify-content: flex-end; /* Align theme dropdown to the right */
margin-right: 10px; /* Add some space between the dropdowns */ margin-right: 8px; /* Add some space between the dropdowns */
} }
.currency-dropdown { .currency-dropdown {
@ -26,13 +26,14 @@
#theme-select, #theme-select,
#currency-select { #currency-select {
width: fit-content; width: auto;
max-width: 130px;
overflow: hidden; /* Cut off overflow */
text-overflow: ellipsis; /* Show ellipsis (...) for cut-off content */
white-space: nowrap; /* Prevent line breaks */
height: 40px; height: 40px;
padding: 8px; padding: 4px;
background-color: #282828;
border: 3px solid #ccc;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
font-family: monospace; font-family: monospace;
color: #ffffff;
} }

View File

@ -6,13 +6,14 @@ body {
font-family: monospace, Arial; font-family: monospace, Arial;
overflow-x: hidden; overflow-x: hidden;
text-align: center; text-align: center;
color: #f0f0f0; color: #ffffff;
} }
.container { .container {
width: auto; width: auto;
margin-top: 20px; margin-top: 20px;
background-color: #252525; background-color: #252525;
border: 3px solid #f7931a; border: 3px solid #ccc;
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);
@ -20,6 +21,18 @@ body {
justify-content: center; /* Center items horizontally within the container */ justify-content: center; /* Center items horizontally within the container */
} }
#theme-select,
#currency-select {
background-color: #282828;
border: 3px solid #ccc;
color: #ffffff;
}
#exchange {
border: 2px solid #ccc;
background-color: #252525;
}
h1 { h1 {
font-size: 30; font-size: 30;
font-style: bolder; font-style: bolder;

View File

@ -0,0 +1,55 @@
/* CSS styles for the Bitcoin Price Tracker */
body {
padding-left: 20px;
padding-right: 20px;
background: #390000;
color: #f12727;
font-family: monospace, Arial;
overflow-x: hidden;
text-align: center;
}
.container {
width: auto;
margin-top: 20px;
background-color: #610000;
border: 3px solid #000000;
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 */
}
#theme-select,
#currency-select {
background-color: #610000;
border: 3px solid #000000;
color: #f12727;
}
#exchange {
border: 2px solid #000000;
background-color: #610000;
}
h1 {
font-size: 30;
font-style: bolder;
}
h2 {
font-size: 20;
font-style: bolder;
}
h3 {
font-size: 10;
font-style: bold;
}
a {
color: #f7931a;
}
a:hover {
color: #8154e9;
}

View File

@ -0,0 +1,55 @@
/* CSS styles for the Bitcoin Price Tracker */
body {
padding-left: 20px;
padding-right: 20px;
background: #191830;
color: #b356c9;
font-family: monospace, Arial;
overflow-x: hidden;
text-align: center;
}
.container {
width: auto;
margin-top: 20px;
background-color: #1f1f41;
border: 3px solid #fad000;
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 */
}
#theme-select,
#currency-select {
background-color: #1f1f41;
border: 3px solid #fad000;
color: #b356c9;
}
#exchange {
border: 2px solid #fad000;
background-color: #1f1f41;
}
h1 {
font-size: 30;
font-style: bolder;
}
h2 {
font-size: 20;
font-style: bolder;
}
h3 {
font-size: 10;
font-style: bold;
}
a {
color: #f7931a;
}
a:hover {
color: #8154e9;
}

View File

@ -0,0 +1,55 @@
/* CSS styles for the Bitcoin Price Tracker */
body {
padding-left: 20px;
padding-right: 20px;
background: #002b36;
color: #3794ff;
font-family: monospace, Arial;
overflow-x: hidden;
text-align: center;
}
.container {
width: auto;
margin-top: 20px;
background-color: #073642;
border: 3px solid #73ae63;
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 */
}
#theme-select,
#currency-select {
background-color: #073642;
border: 3px solid #73ae63;
color: #3794ff;
}
#exchange {
border: 2px solid #73ae63;
background-color: #073642;
}
h1 {
font-size: 30;
font-style: bolder;
}
h2 {
font-size: 20;
font-style: bolder;
}
h3 {
font-size: 10;
font-style: bold;
}
a {
color: #f7931a;
}
a:hover {
color: #8154e9;
}

View File

@ -4,7 +4,6 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle import android.os.Bundle
import android.webkit.WebView import android.webkit.WebView
import android.webkit.WebSettings import android.webkit.WebSettings
import com.example.satworth.R
import java.io.IOException import java.io.IOException
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
@ -47,7 +46,7 @@ class MainActivity : AppCompatActivity() {
} }
} }
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 cssFiles = listOf("themes/themeDark.css", /*"themes/themeMidnight.css", "themes/themeLava.css", "themes/themeSolar.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 {