fix: extract styles to sheet
This commit is contained in:
parent
9e63835825
commit
124d91f811
2 changed files with 76 additions and 78 deletions
79
index.html
79
index.html
|
|
@ -8,6 +8,7 @@
|
|||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
|
||||
/>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<title>Barrett Ruth</title>
|
||||
</head>
|
||||
|
||||
|
|
@ -68,84 +69,6 @@
|
|||
<a target="_blank" href="/transcript.pdf">transcript</a>
|
||||
</h2>
|
||||
</body>
|
||||
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: et-book;
|
||||
src: url(et-book.ttf);
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: et-book;
|
||||
font-size: 1.5em;
|
||||
background-color: #f9f5d7;
|
||||
margin: 100px auto;
|
||||
max-width: 650px;
|
||||
scroll-behavior: smooth;
|
||||
overscroll-behavior-y: none;
|
||||
overscroll-behavior-x: none;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
overflow-anchor: none;
|
||||
padding: 0 5%;
|
||||
}
|
||||
|
||||
.project {
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
}
|
||||
.project::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 1px;
|
||||
background-color: #000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: width 0.5s;
|
||||
}
|
||||
.project:hover::after {
|
||||
width: 100%;
|
||||
}
|
||||
.description {
|
||||
visibility: hidden;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
transition: all 0.5s ease;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
max-width: 0;
|
||||
}
|
||||
.project:hover + .description,
|
||||
.description.revealed {
|
||||
visibility: visible;
|
||||
width: auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
}
|
||||
.social-icons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.social-icons a {
|
||||
margin-left: 15px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.querySelectorAll(".project").forEach((project) => {
|
||||
|
|
|
|||
75
styles.css
Normal file
75
styles.css
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
@font-face {
|
||||
font-family: et-book;
|
||||
src: url(et-book.ttf);
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: et-book;
|
||||
font-size: 1.5em;
|
||||
background-color: #f9f5d7;
|
||||
margin: 100px auto;
|
||||
max-width: 650px;
|
||||
scroll-behavior: smooth;
|
||||
overscroll-behavior-y: none;
|
||||
overscroll-behavior-x: none;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
overflow-anchor: none;
|
||||
padding: 0 5%;
|
||||
}
|
||||
|
||||
.project {
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
}
|
||||
.project::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 1px;
|
||||
background-color: #000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: width 0.5s;
|
||||
}
|
||||
.project:hover::after {
|
||||
width: 100%;
|
||||
}
|
||||
.description {
|
||||
visibility: hidden;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
transition: all 0.5s ease;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
max-width: 0;
|
||||
}
|
||||
.project:hover + .description,
|
||||
.description.revealed {
|
||||
visibility: visible;
|
||||
width: auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
}
|
||||
.social-icons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.social-icons a {
|
||||
margin-left: 15px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue