Skip to content

Instantly share code, notes, and snippets.

@reynish
Created July 6, 2021 14:08
Show Gist options
  • Save reynish/8a9422fc7eaebab24146cd29cd78938f to your computer and use it in GitHub Desktop.
Save reynish/8a9422fc7eaebab24146cd29cd78938f to your computer and use it in GitHub Desktop.
Website
<main draggable="true">
<div class="title">
<div class="titlebtn titlebtn_left">C</div>
<span>alexreynish.com</span>
<div class="titlebtn titlebtn_right">M</div>
</div>
<div class="content">
<h1>Alex Reynish</h1>
<p>Something about me</p>
</div>
</main>
window.addEventListener("mousemove", () => {
const data = `${event.clientX} ${event.clientY}`
console.log(data)
})
html, body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: monospace;
fonst-size: 24px;
//
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAH0lEQVQIW2NkYGD4D8SMQAwGMAZcEC4DU4ksANLxHwCC4QQE/R3QmAAAAABJRU5ErkJggg==) repeat
background: linear-gradient(180deg, rgba(185,222,0,1) 16.67%, rgba(255,173,60,1) 16.67%, rgba(255,173,60,1) 33.34%, rgba(244,88,31,1) 33.34%, rgba(244,88,31,1) 50.01%, rgba(159,30,23,1) 50.01%, rgba(159,30,23,1) 66.68%, rgba(134,39,84,1) 66.68%, rgba(134,39,84,1) 83.35%, rgba(61,129,218,1) 83.35%, rgba(61,129,218,1) 100%);
}
main {
min-width: 360px;
border: 1px solid #000;
background-color: #FFF;
}
.title {
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: space-between;
border-bottom: 1px solid #000;
background: linear-gradient(180deg, rgba(255,255,255,1) 0, rgba(255,255,255,1) 2px, rgba(0,0,0,1) 2px, rgba(0,0,0,1) 4px);
background-size: .3rem 4px;
}
.title span {
background: #FFF;
padding: 0 .25rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.titlebtn {
// margin: 2px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
// border: 1px solid #000;
background: #FFF;
overflow: hidden;
// text-indent: -9009px;
}
.titlebtn_left {
// border: 1px solid #000;
}
.content {
padding: 1.5rem 2rem 2rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment