wilw.dev/assets/main.scss

463 lines
9.1 KiB
SCSS

$link-color: lightcyan;
$primary-tint: linen;
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
margin: 0px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
header {
max-width:960px;
margin: 10px auto;
width: 100%;
.main{
display: flex;
align-items: center;
margin-bottom: 10px;
padding: 0px 10px 0px 10px;
a.avatar {
display: inline-block;
margin-right: 10px;
img {
height: 50px;
width: 50px;
border-radius: 50%;
transition: opacity 0.2s;
&:hover{
opacity: 0.8;
}
}
}
.details{
flex: 1;
a.title{
display: inline-block;
font-size: 23px;
margin-bottom: 5px;
text-decoration: none;
font-weight: bold;
color: initial;
}
.socials{
a{
text-decoration: none;
margin-right: 5px;
margin-bottom: 5px;
padding: 4px;
border-radius: 5px;
background-color: $primary-tint;
color: rgba(0,0,0,0.75);
display: inline-block;
transition: background 0.2s;
&:hover{
background: rgb(240,237,237);
}
}
}
}
}
nav{
padding: 0px 10px 0px 10px;
display: flex;
background: $primary-tint;
border-radius: 4px;
padding: 0px 10px;
a{
padding: 10px 10px;
margin-right: 5px;
display:inline-block;
text-transform: uppercase;
font-size: 15px;
color: black;
background-color: initial;
&.active{
text-decoration: none;
font-weight: bold;
background-color: rgba(0,0,0,0.1);
}
}
}
}
main {
width: 100%;
max-width:960px;
margin: 0px auto;
flex: 1;
.content-wrapper{
padding: 0px 10px 10px;
}
}
footer {
border-top: 2px solid $primary-tint;
padding: 10px 15px 10px 15px;
margin-top: 30px;
@media (min-width: 900px) {
display: flex;
justify-content: space-between;
align-items: center;
}
.left {
display:flex;
align-items: baseline;
@media (max-width: 550px) {
justify-content: center;
display: initial;
text-align: center;
}
.copyright{
font-size: 13px;
color: rgb(100,100,100);
}
a {
margin-left: 10px;
font-size: 13px;
}
}
.right{
@media (min-width: 550px) {
display: flex;
justify-content: space-between;
align-items: center;
}
.carbonbadge{
@media (min-width: 550px) {
margin-left: 10px;
}
}
.kb-club {
font-size: 1em;
@media (max-width: 550px) {
display: block;
margin: 10px auto;
text-align: center;
}
a {
text-decoration: none;
color: #212121;
padding: .25rem 0;
background-color: initial;
}
.kb-club-bg, .kb-club-no-bg {
border: 1px solid rgb(2, 90, 84);
padding: 3px 6px;
}
.kb-club-no-bg{
border-radius: 4px 0px 0px 4px;
}
.kb-club-bg {
font-weight: bold;
background: rgb(2, 90, 84);
color: white;
border-radius: 0px 4px 4px 0px;
}
}
}
}
table {
width: 100%;
thead {
background: rgb(230,230,230);
th {
padding: 5px;
}
}
tbody{
background: rgb(245,245,245);
td {
padding: 5px;
}
}
}
.alert {
background-color: lightcyan;
border-radius: 5px;
max-width: 800px;
margin: 20px auto;
padding: 10px 10px 10px 20px;
border-left: 10px solid rgba(0,0,0,0.2);
h3 {
margin-top: 0px;
}
&.green{
background-color: #F5F5DC;
}
&.grey{
background-color: rgb(240,240,240);
}
&.non-centered{
margin: 20px 0px;
}
}
.two-columns{
display: grid;
grid-column-gap: 20px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.nav-layout{
.nav {
min-width: 250px;
border-radius: 10px;
background: rgb(247,244,244);
.menu {
a {
display: block;
margin-bottom: 8px;
padding: 3px 5px;
background-color: initial;
&.active{
background-color: rgba(0,0,0,0.1);
}
}
}
}
@media only screen and (min-width: 501px) {
display: flex;
position: relative;
.nav{
position: sticky;
top: 10px;
margin-right: 15px;
max-height: 80vh;
overflow-y: scroll;
h3 {
display: none;
}
&::after{
position: sticky;
display: block;
padding: 5px 0px;
bottom: 0px;
left: 0px;
width: 100%;
text-align: center;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
background: rgb(220,217,217);
font-size: 15px;
color: rgb(50,50,50);
content: '↕️ This menu is scrollable';
}
}
.content {
flex: 1;
}
}
@media only screen and (max-width: 500px) {
.nav {
margin-bottom: 10px;
margin-right: 0px;
h3 {
a {
text-decoration: none;
&:after {
content: '⬇️';
margin-left: 10px;
}
}
}
&:hover, &:active, &:focus {
.menu {
display: block;
}
}
.menu {
display: none;
}
}
}
}
.project, .research-item {
margin-top: 30px;
display:flex;
align-items: start;
.logo{
padding-top: 15px;
margin-right: 20px;
img{
max-width: 100px;
max-height: 100px;
}
}
.details{
flex: 1;
h4{
margin-top: 0px;
margin-bottom: 10px;
}
.platforms{
a {
margin-left: 5px;
}
}
.journal{
font-size: small;
margin-top: 2px;
}
}
}
.blog-page-header{
display: flex;
justify-content: space-between;
align-items: baseline;
}
.blog-summary, .note-summary {
background-color: #FFFAF0;
border-radius: 5px;
padding: 10px 10px 10px 20px;
border-left: 10px solid rgba(0,0,0,0.1);
margin-bottom: 15px;
display: flex;
align-items: center;
h3{
margin-top: 0px;
.date{
font-size: small;
margin-left: 20px;
}
}
.summary {
* {
font-size: smaller;
}
p {
margin-bottom: 10px;
}
img {
max-width: 100%;
margin: 10px 0px;
}
}
&::before {
margin-right: 20px;
content: '📝';
font-size: 30px;
}
&.blog-summary {
&::before {
content: '📝';
}
}
&.note-summary {
background-color: #e3f0fc;
&::before {
content: '📔';
}
}
}
.blog-post, .note-entry {
.details{
text-align: center;
}
.header-image {
display: block;
max-width: 90%;
margin: 20px auto;
}
.note-details {
text-align: left;
}
.navigation{
text-align: center;
a {
margin-right: 10px;
}
}
article{
padding-top: 20px;
border-top: 1px solid rgb(230,230,230);
font-size: large;
margin-bottom: 100px;
>*:not(.highlight) {
display: block;
max-width: 500px;
margin-left: auto;
margin-right: auto;
code {
background-color: slategray;
color: white;
border-radius: .3em;
padding: .1em .3em;
font-size: smaller;
}
}
img{
display: block;
margin: 20px auto;
max-width: 100%;
max-height: 600px;
}
blockquote{
padding: 10px;
background-color: rgb(245,245,230);
p {
margin-top: 0px;
}
}
pre {
background-color: slategray;
white-space: pre-wrap;
padding: 5px;
box-shadow: inset 0px 0px 10px 0px rgba(0,0,0,0.1);
border-radius: 4px;
code {
padding: 0px !important;
}
}
}
}
.tag{
display: inline-block;
padding: 4px;
margin-right: 15px;
border-radius: 5px;
background-color: $link-color;
color:rgba(0,0,0,0.6);
text-decoration: none;
&::before {
content: '🏷️';
margin-right: 5px;
}
}
main a, nav a {
background: $link-color;
color: black;
border-radius: 3px;
transition: background 0.2s;
&:hover{
background: rgb(220,217,217);
}
&.active{
font-weight: bold;
text-decoration: none;
background: rgb(240,237,237);
}
// Below courtesy of Christian Oliff (https://christianoliff.com/blog/styling-external-links-with-an-icon-in-css)
&[href^="http"]::after,&[href^="https://"]::after {
content: "";
width: 11px;
height: 11px;
margin-left: 4px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: contain;
display: inline-block;
}
}