-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Embedded player for social media
- Loading branch information
1 parent
74f7bc9
commit 464a090
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,8 @@ def move_lower? | |
def reorder? | ||
record.unpublished? && move_lower? && move_higher? | ||
end | ||
|
||
def player? | ||
true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%= display_meta_tags site: "jam.coop" %> | ||
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> | ||
|
||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> | ||
<%= javascript_importmap_tags %> | ||
<%= hotwire_livereload_tags if Rails.env.development? %> | ||
</head> | ||
|
||
<style> | ||
.player { | ||
width: 100vw; | ||
height: 100vh; | ||
background-image: url('<%= cdn_url(@album.cover.representation(resize_to_limit: [750, 750])) %>'); | ||
background-size: cover; | ||
background-position: 50% 50%; | ||
} | ||
|
||
.footer { | ||
position: absolute; | ||
right: 0; | ||
bottom: 3%; | ||
left: 3%; | ||
} | ||
</style> | ||
|
||
<body> | ||
<div class="player"> | ||
<div class="footer"> | ||
<span class="text-white bg-slate-600 px-2 py-1"> | ||
<%= text_link_to @album.title, artist_album_url(@album.artist, @album) %> by <%= @album.artist.name %> | ||
</span> | ||
<span></span> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
member do | ||
post 'move_higher' | ||
post 'move_lower' | ||
get 'player' | ||
end | ||
end | ||
|
||
|