Skip to content

Commit

Permalink
0.2.2
Browse files Browse the repository at this point in the history
Adaptability
  • Loading branch information
SuperZombi committed Apr 13, 2024
1 parent 8aebf21 commit 42ebe01
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Melody Monitor for OBS

<p align="right">
<img align="left" src="https://shields.io/badge/version-v0.2.1-blue">
<img align="left" src="https://shields.io/badge/version-v0.2.2-blue">
<a href="#donate"><img src="https://shields.io/badge/💲-Support_the_Project-2ea043"></a>
</p>

Expand All @@ -19,7 +19,7 @@
4. Click `Open in Browser` and copy the link in your browser.
5. Add a new source in OBS (Browser).
6. Paste the copied link into the URL field
7. Adjust the height and width of the element (recommended: height: 140px, width: 600px)
7. Adjust the height and width of the element (recommended: height: 150px, width: 600px)
8. Check the box "Refresh browser when source becomes active"

## Settings
Expand Down
5 changes: 1 addition & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import eel


__version__ = "0.2.1"
__version__ = "0.2.2"
SETTINGS = {}

#####
Expand Down Expand Up @@ -164,7 +164,4 @@ def refresh_settings_mods(_):
systray = SysTrayIcon(resource_path(os.path.join("data", "music.ico")), "Melody Monitor", menu_options, on_quit=lambda _: os._exit(0))
systray.start()

notification.message = f"Running at {generate_url()}"
notification.send()

eel.start("index.html", host=SETTINGS.get('host'), port=SETTINGS.get('port'), mode=None, close_callback=lambda a, b: None)
40 changes: 28 additions & 12 deletions src/web/style.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
body {
font-family: Arial, sans-serif;
margin: 0; padding: 0;
height: 100vh;
overflow: hidden;
--margin: 8px;
--padding: 20px;
--gap: 25px;
--image-size: 100px;
--max-height: 140px;
--padding: 16px;
font-size: 12pt;
--background: rgba(255, 255, 255, 0.8);
--shadow: 0 0 4px rgba(0, 0, 0, 0.5);
Expand All @@ -15,30 +13,48 @@ body {
--progress-bar-color: #007bff;
--progress-bar-background: #bbb;
}

.track-info {
display: flex;
align-items: center;
margin: var(--margin);
width: calc(100% - var(--margin) * 2);
height: calc(100vh - var(--margin) * 2);
max-height: var(--max-height);
height: calc(100% - var(--margin) * 2);
background-color: var(--background);
border-radius: 10px;
box-shadow: var(--shadow);
gap: var(--gap);
gap: 1em;
padding: var(--padding);
box-sizing: border-box;
user-select: none;
opacity: 0;
transition: 0.3s;
}
.track-info.active{
opacity: 1;
}

@media (min-height: 200px) {
.track-info {
font-size: 1.5em;
}
}
@media (min-height: 300px) {
.track-info {
font-size: 2em;
}
}
@media (min-height: 400px) {
.track-info {
font-size: 3em;
}
}

.track-image {
width: var(--image-size);
height: var(--image-size);
border-radius: 6px;
height: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
border-radius: 6px;
}
.track-details {
flex: 1;
Expand Down Expand Up @@ -69,9 +85,9 @@ body {
}
.progress-bar {
width: 100%;
height: 10px;
height: 0.625em;
background: var(--progress-bar-background);
border-radius: 5px;
border-radius: 8px;
margin-top: 20px;
overflow: hidden;
}
Expand Down

0 comments on commit 42ebe01

Please sign in to comment.