better media integration

This commit is contained in:
Gabriel 2022-09-16 16:04:52 -04:00
parent dedcdb7dec
commit c319e3590d
7 changed files with 40 additions and 19 deletions

View file

@ -1,11 +1,11 @@
<main id="profile"> <main id="profile">
<div> <div>
<a href="/"> <a href="/">
<img id='profilephoto' loading="lazy" src="{{.Site.Data.details.profilephoto}}"> <img id='profilephoto' loading="lazy" src="{{.Site.Params.default_img}}">
</a> </a>
<div id="profile-details"> <div id="profile-details">
<a href="/"><h1>{{.Site.Data.details.name}}</h1></a> <a href="/"><h1>{{.Site.Title}}</h1></a>
<p>{{.Site.Data.details.bio}}</p> <p>{{.Site.Params.subtitle}}</p>
{{ if .Site.Data.details.links }} {{ if .Site.Data.details.links }}
<div id="profile-links"> <div id="profile-links">
{{range .Site.Data.details.links}} {{range .Site.Data.details.links}}

View file

@ -0,0 +1,4 @@
<video autoplay muted loop preload="true">
<source src='{{.Get "src" }}'>
<source src='{{.Get 0 }}'>
</video>

View file

@ -1,4 +1,3 @@
<video controls autoplay muted> <video {{if .Get "autoplay"}}autoplay muted loop preload="true"{{else}}controls preload="false"{{end}}>
<source src='{{.Get 0 }}'>
<source src='{{.Get "src" }}'> <source src='{{.Get "src" }}'>
</video> </video>

View file

@ -1,20 +1,21 @@
body{ body{
--theme-color-primary: white; --theme-color-primary: rgba(255, 255, 255, 0.9);
--theme-color-secondary: black; --theme-color-secondary: black;
--theme-color-accent: #076cc5; --theme-accent: #8c5c09;
} }
@media screen and (prefers-color-scheme:dark){ @media screen and (prefers-color-scheme:dark){
body{ body{
--theme-color-primary:black; --theme-color-primary:rgba(0, 0, 0, 0.9);
--theme-color-secondary:white; --theme-color-secondary:white;
--theme-accent: #42c0ff;
} }
} }
body{ body{
color:var(--theme-secondary-color); color:var(--theme-color-secondary);
background-color: var(--theme-primary-color); background-color: var(--theme-color-primary);
background-image: url(/res/bg5.png);
background-size: 15vh;
display:flex; display:flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -29,7 +30,7 @@ body{
} }
.spacer{ .spacer{
width:3vw; width:10vw;
} }
a,a:visited,hr{ a,a:visited,hr{
@ -51,6 +52,9 @@ audio{
max-width:100%; max-width:100%;
max-height: 30vh; max-height: 30vh;
margin:1.5rem; margin:1.5rem;
}
#profile img {
} }
audio{ audio{
width:80%; width:80%;
@ -90,19 +94,23 @@ audio{
.post{ .post{
width:100%; width:100%;
word-wrap: break-word; word-wrap: break-word;
margin-bottom:1rem;
}
.post h2{
margin-top:0;
} }
#profilephoto{ #profilephoto{
margin:1rem; margin:1rem;
max-width: 10rem; max-width: 10rem;
border-radius: 50%;
border: 0.5rem solid var(--theme-accent);
} }
section{ section{
width: 100%; width: 100%;
} }
#profile>nav, #profile>nav,
#profile>div{ #profile>div{
width:100%;
display:flex; display:flex;
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
@ -125,11 +133,18 @@ nav>a{
} }
article{ article,main > div,main>nav{
display:flex; display:flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width:100%; padding:1rem;
background-color: var(--theme-color-primary);
color: var(--theme-color-secondary);
border:0.25rem solid var(--theme-accent);
backdrop-filter: blur(0.1rem);
border-radius: 1rem;
margin-bottom:1.5rem;
width:90%;
} }
article p, article p,
@ -138,7 +153,7 @@ article ul,
article ol, article ol,
article table{ article table{
text-align: left; text-align: left;
width:100%; width:90%;
} }
article img{ article img{
@ -190,3 +205,6 @@ audio{
width:100%; width:100%;
} }
} }

BIN
static/res/bg5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

BIN
static/res/default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
static/res/sand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB