small css video fix

thumb
km0 2 years ago
parent 7f3b869af8
commit 0175e858d2

@ -1,280 +1,259 @@
html, body { html,
margin: 0; body {
box-sizing: border-box; margin: 0;
box-sizing: border-box;
} }
nav { nav {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 400; z-index: 400;
background-color: white; background-color: white;
} }
nav a::after{ nav a::after {
display: none; display: none;
} }
nav .content-wrapper { nav .content-wrapper {
max-width: var(--content-width); max-width: var(--content-width);
margin: 0 auto; margin: 0 auto;
padding: 0 var(--app-margin); padding: 0 var(--app-margin);
} }
.content-wrapper { .content-wrapper {
display: flex; display: flex;
justify-content: stretch; justify-content: stretch;
} }
.content-wrapper > * { .content-wrapper > * {
flex: 1; flex: 1;
margin: 0; margin: 0;
} }
nav .date { nav .date {
text-align: right; text-align: right;
} }
nav .title { nav .title {
text-align: center; text-align: center;
} }
code { code {
background-color: white; background-color: white;
} }
nav .return:hover{ nav .return:hover {
color: var(--accent); color: var(--accent);
} }
.project--header {
position: relative;
.project--header{ height: 100vh;
position: relative; background-color: var(--accent);
height: 100vh; display: flex;
background-color: var(--accent); flex-direction: column;
display: flex; justify-content: flex-end;
flex-direction: column; align-items: flex-start;
justify-content: flex-end;
align-items: flex-start;
} }
.header--cover { .header--cover {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0 auto; margin: 0 auto;
}
}
.header--cover img { .header--cover img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.header--title { .header--title {
display: inline-block; display: inline-block;
margin: 0; margin: 0;
position: absolute; position: absolute;
font-size: 48px; font-size: 48px;
z-index: 100; z-index: 100;
background-color: white; background-color: white;
top: 50%; top: 50%;
left: 50%; left: 50%;
/* transform: translate(-50%,-50%); */ /* transform: translate(-50%,-50%); */
text-align: center; text-align: center;
} }
.header--links { .header--links {
position: relative; position: relative;
z-index: 60; z-index: 60;
font-size: 32px; font-size: 32px;
padding: 0 var(--app-margin); padding: 0 var(--app-margin);
width: calc(100% - var(--app-margin) * 2); width: calc(100% - var(--app-margin) * 2);
margin: 0 auto; margin: 0 auto;
margin-bottom: 24px; margin-bottom: 24px;
max-width: var(--content-width); max-width: var(--content-width);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: flex-start; align-items: flex-start;
grid-gap: 8px; grid-gap: 8px;
pointer-events: none; pointer-events: none;
} }
.header--links a { .header--links a {
background-color: white; background-color: white;
pointer-events: all; pointer-events: all;
} }
.header--categories { .header--categories {
position: absolute; position: absolute;
left: 0; left: 0;
top: 32px; top: 32px;
width: 100%; width: 100%;
height: calc(100% - 32px); height: calc(100% - 32px);
z-index: 50; z-index: 50;
/* pointer-events: none; */ /* pointer-events: none; */
} }
.header--categories .tag { .header--categories .tag {
padding: 0 4px;
background-color: white;
border-left-width: 6px;
padding: 0 4px; border-left-style: solid;
background-color: white; border-left-color: #d5dde8;
border-left-width: 6px;
border-left-style: solid;
border-left-color: #D5DDE8;
} }
.project--content { .project--content {
padding: 0 var(--app-margin); padding: 0 var(--app-margin);
max-width: var(--content-width); max-width: var(--content-width);
margin: 0 auto; margin: 0 auto;
display: grid; display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
margin-top: 48px; margin-top: 48px;
margin-bottom: 96px; margin-bottom: 96px;
} }
.project--content h2 { .project--content h2 {
grid-column: 1 / span 3; grid-column: 1 / span 3;
} }
.project--content p,
.project--content p, div, code, pre, ul, ol, h3 { div,
grid-column: 4 / span 5; code,
pre,
ul,
ol,
h3,
video {
grid-column: 4 / span 5;
} }
.project--content > video, .project--content > img { .project--content > img {
grid-column: 1 / -1; grid-column: 1 / -1;
margin: 32px 0; margin: 32px 0;
} }
.project--content p img { .project--content p img {
width: 100%; width: 100%;
height: auto; height: auto;
} }
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
nav {
nav{ padding: 0;
padding: 0; }
}
nav .date {
nav .date { display: none;
display: none; }
}
nav .title {
nav .title { white-space: nowrap;
white-space: nowrap; text-overflow: ellipsis;
text-overflow: ellipsis; padding: 0 var(--app-margin);
padding: 0 var(--app-margin); }
}
nav .return {
nav .return { display: inline-block;
display: inline-block; position: fixed;
position: fixed; bottom: 24px;
bottom: 24px; right: 24px;
right: 24px; width: 48px;
width: 48px; height: 48px;
height: 48px; line-height: 48px;
line-height: 48px; background-color: white;
background-color: white; border-radius: 50%;
border-radius: 50%; text-align: center;
text-align: center; }
}
header.project--header {
header.project--header { justify-content: center;
justify-content: center; flex-wrap: wrap;
flex-wrap: wrap; height: auto;
height: auto; min-height: 100vh;
min-height: 100vh; }
}
.header--title,
.header--title, .header--categories, .header--links { .header--categories,
font-size: 1rem; .header--links {
position: relative; font-size: 1rem;
width: auto; position: relative;
margin: 0; width: auto;
padding: var(--app-margin); margin: 0;
transform: none!important; padding: var(--app-margin);
left: auto; transform: none !important;
top: auto; left: auto;
top: auto;
} }
h1.header--title { h1.header--title {
margin: 0 var(--app-margin); margin: 0 var(--app-margin);
transform: none!important; transform: none !important;
}
}
.header--categories,
.header--categories, .header--links { .header--links {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
height: auto; height: auto;
grid-gap: 8px; grid-gap: 8px;
} }
.header--categories .tag {
.header--categories .tag { padding: 0 4px;
padding: 0 4px; position: relative;
position: relative; transform: none !important;
transform: none!important; }
}
.project--content {
display: block;
}
code {
.project--content{ white-space: pre-wrap;
display: block; }
}
code {
white-space: pre-wrap;
}
} }
@media print { @media print {
nav {
nav { position: absolute !important;
position: absolute!important; top: 0;
top: 0; left: 0;
left: 0; }
}
main {
main { padding: 1rem !important;
padding: 1rem!important; }
}
.return {
.return { display: none !important;
display: none!important; }
} }
}

Loading…
Cancel
Save