Created
August 24, 2021 23:27
-
-
Save curlpipe/220447296476afd34eeced5b3ad0f3eb to your computer and use it in GitHub Desktop.
The stackbunch library example
This file contains hidden or 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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script defer src="stackbunch.js"></script> | |
</head> | |
<body mobile="500px" tablet="700px" desktop="1000px"> | |
<stack> | |
<bunch class="titlebar"> | |
<div class="logo"> | |
<p>Cosmos Music</p> | |
</div> | |
<div class="search"> | |
<input placeholder="Search"> | |
<p class="search-icon">α³</p> | |
</input> | |
</div> | |
<div></div> | |
</bunch> | |
<bunch on-mobile="stack" on-tablet="stack"> | |
<div class="menu"> | |
<stack class="options"> | |
<a href="#">My Music</a> | |
<a href="#">Discover</a> | |
<a href="#">Radio</a> | |
<a href="#">Help</a> | |
<p>π― 2021</p> | |
</stack> | |
</div> | |
<div class="album"> | |
<bunch class="main" on-tablet="stack" on-mobile="stack"> | |
<stack class="album-info" on-tablet="bunch"> | |
<div class="album-picture"> | |
<img src="https://lastfm.freetls.fastly.net/i/u/770x0/7c1d40f52bca4dab8f702fd0918a134b.jpg" width="200px" /> | |
</div> | |
<div class="text-container"> | |
<div class="album-text"> | |
<h3>My Life In The Bush Of Ghosts</h3> | |
<h5>Brian Eno & David Byrne</h5> | |
<p>1979</p> | |
</div> | |
</div> | |
</stack> | |
<stack class="album-tracks"> | |
<a href="#">π America Is Waiting</a> | |
<a href="#">π Mea Culpa</a> | |
<a href="#">π Regiment</a> | |
<a href="#">π Help Me Somebody</a> | |
<a href="#">π The Jezebel Spirit</a> | |
<a href="#">π Very Very Hungry</a> | |
<a href="#">π Moonlight In Glory</a> | |
<a href="#">π The Carrier</a> | |
<a href="#">π A Secret Life</a> | |
<a href="#">π Come With Us</a> | |
<a href="#">π Mountain Of Needles</a> | |
<a href="#">π Pitch To Voltage</a> | |
<a href="#">π Two Against Three</a> | |
<a href="#">π Vocal Out-Takes</a> | |
<a href="#">π New Feet</a> | |
<a href="#">π Defiant</a> | |
<a href="#">π Number 8 Mix</a> | |
<a href="#">π Solo Guitar With Tin Foil</a> | |
</stack> | |
</bunch> | |
</div> | |
</bunch> | |
</stack> | |
</body> | |
</html> | |
<style> | |
body { | |
margin: 0; | |
background-color: #2D3047; | |
} | |
p, h3, h5 { | |
margin: 0; | |
color: white; | |
font-family: monospace; | |
} | |
a { | |
color: #1B998B; | |
text-decoration: none; | |
font-family: monospace; | |
} | |
.main { | |
padding: 20px; | |
} | |
.album-info { | |
flex-basis: 200px; | |
flex-grow: 0; | |
flex-shrink: 0; | |
padding: 20px; | |
} | |
.text-container { | |
display: flex; | |
justify-content: center; | |
align-self: center; | |
} | |
.album-tracks { | |
padding: 20px; | |
} | |
.album-tracks > a { | |
color: lightgrey; | |
padding: 7px; | |
margin-bottom: 2px; | |
background-color: #404464; | |
border: 3px solid #383B57; | |
border-radius: 5px; | |
font-size: 15px; | |
} | |
div.album-picture { | |
padding-bottom: 20px; | |
flex-basis: 0; | |
display: flex; | |
justify-content: center; | |
align-self: center; | |
} | |
.album-text > * { | |
margin-bottom: 5px; | |
} | |
.titlebar > * { | |
padding: 5px; | |
display: flex; | |
align-items: center; | |
background-color: #404464; | |
} | |
div.search > input { | |
width: 100%; | |
background-color: #50557C; | |
border: 0px; | |
padding: 3px; | |
margin-right: 5px; | |
border-radius: 7px; | |
color: white; | |
} | |
div.search > input::placeholder { | |
color: white; | |
} | |
.logo { | |
font-size: 20px; | |
} | |
.search-icon { | |
background-color: #1B998B; | |
font-size: 20px; | |
text-align: center; | |
height: 22px; | |
width: 22px; | |
} | |
.menu { | |
background-color: #383B57; | |
flex-basis: 200px; | |
flex-grow: 0; | |
flex-shrink: 0; | |
height: calc(100vh - 35px); | |
} | |
.options { | |
height: 200px; | |
padding: 20px; | |
} | |
.options > * { | |
font-size: 20px; | |
padding: 5px; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment