claude and example site

This commit is contained in:
2025-09-28 07:51:22 -04:00
parent c99bced56e
commit c9a3a21f07
11 changed files with 1298 additions and 0 deletions

View File

@ -0,0 +1,28 @@
.content {
display: flex;
flex-direction: column;
align-content: flex-start;
justify-content: center;
height: 100%;
gap: 1rem;
width: 100%;
background: var(--font-color);
}
.content div {
background: var(--background-color);
font-size: 100%;
}
.content .code {
flex-grow: 1;
font-size: 6em;
}
.content .message {
flex-grow: 1;
font-size: 4em;
}
.content .description {
flex-grow: 1;
font-size: 2em;
}

View File

@ -0,0 +1,87 @@
.content img {
max-width: 20vw;
height: auto;
display: block;
}
.content p {
text-align: left;
}
.content * {
text-align: left;
}
.body {
min-width: 0px
}
.holder .title {
padding-bottom: 9em;
margin-bottom: 1em
}
.holder {
padding-left: 2em;
max-width: 1400px;
min-width: 0px;
}
.holder .title h1 {
font-size: 5em;
margin-top: 0.1em;
margin-bottom: 0.1em;
}
.holder .title h2 {
font-size: 2.5em;
margin-top: 0.1em;
margin-bottom: 0.1em;
}
.content {
flex-grow: 10;
display: flex;
flex-direction: row;
}
.content a {
color: oklch(58.28% 0.128 52.2);
text-decoration: none;
transition: all 0.3s ease-in-out;
}
.content a:hover {
color: oklch(75.84% 0.122 92.21);
text-decoration: none;
transition: all 0.3s ease-in-out;
}
.content a:visited {
color: oklch(63.8% 0.142 52.1);
text-decoration: none;
transition: all 0.3s ease-in-out;
}
.content a:visited:hover {
color: oklch(75.84% 0.122 92.21);
text-decoration: none;
transition: all 0.3s ease-in-out;
}
hr {
max-width: 800px;
margin-left: 0;
}
.content .metadata {
padding-right: 2em;
flex-shrink: 0;
max-width: 8em;
font-size: small;
display: flex;
flex-direction: column;
gap: 1em;
overflow-wrap: break-word;
}

View File

@ -0,0 +1,145 @@
.albums {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.6rem;
font-size: 1rem;
margin: 0.6rem;
flex-shrink: 0;
max-width: 12em;
}
.albums a {
border-radius: 2rem;
padding: 0.2rem;
color: var(--font-color);
text-decoration: none;
transition: color 0.6s ease-in-out, box-shadow 0.6s ease-in-out, border 0.6s ease-in-out;
}
.albums a:hover {
color: var(--hover-color);
transition: color 0.6s ease-in-out, box-shadow 0.6s ease-in-out, border 0.6s ease-in-out;
}
.breadcrumbs {
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
font-size: 1rem;
margin: 0.5rem;
}
.breadcrumbs .separator {
color: grey;
}
.breadcrumbs .current {
font-weight: bold;
}
.breadcrumbs a {
color: var(--font-color);
text-decoration: none;
transition: color 0.3s ease-in-out;
}
.content_holder {
display: flex;
flex-direction: row;
}
@media (max-width: 1250px) {
.content_holder {
flex-direction: column;
}
.albums {
flex-direction: row;
max-width: 100%;
flex-wrap: wrap;
}
}
.breadcrumbs a:hover {
color: var(--hover-color);
transition: color 0.3s ease-in-out;
}
.content {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: flex-start;
max-width: 1400px;
align-items: center;
}
.post {
margin: 0.65rem;
position: relative;
}
.post.photo {
cursor: zoom-in;
background-color: white; /* The base for our white border */
padding: 0.65rem 0.65rem 1.35rem;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.post.text {
border: 2px solid rgba(0, 0, 0, .1);
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-decoration: none;
padding: 3.9rem 2.6rem;
}
.post.text .title {
font-size: 22px;
max-width: 15em;
text-align: center;
margin: 0.65rem 0 0.15rem;
}
.post.text .date {
font-size: 14px;
}
/* When navigation is collapsed into toggle */
@media screen and (max-width: 800px) {
.posts {
padding: 0 1.35rem;
}
.post {
margin: 1rem 0.65rem;
}
}
/*.posts::after {
content: '';
flex-grow: 999999999;
}*/
.post:hover {
opacity: 0.93
}
.post:active {
opacity: 0.87
}
.post i {
display: block;
}
.post img {
width: 100%;
vertical-align: bottom;
}

View File

@ -0,0 +1,77 @@
.albums {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 0.6rem;
font-size: 1rem;
margin: 0.6rem;
flex-shrink: 0;
max-width: 8em;
}
hr {
max-width: 800px;
margin-left: 0;
}
.albums a {
border-radius: 2rem;
padding: 0.2rem;
color: var(--font-color);
text-decoration: none;
transition: color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
}
.albums a:hover {
color: var(--hover-color);
transition: color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
}
.breadcrumbs {
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
font-size: 1rem;
margin: 0.5rem;
}
.breadcrumbs .separator {
color: grey;
}
.breadcrumbs .current {
font-weight: bold;
}
a {
color: var(--font-color);
text-decoration: none;
transition: color 0.3s ease-in-out;
}
a:hover {
color: var(--hover-color);
transition: color 0.3s ease-in-out;
}
.content {
display: flex;
flex-direction: row;
width: 100%;
gap: 2rem;
}
.content_holder {
display: flex;
flex-direction: row;
}
.holder {
width: 100%;
padding: 0.6rem
}
.post {
padding: 0.6rem;
}

222
example_site/style/base.css Normal file
View File

@ -0,0 +1,222 @@
@charset "UTF-8";
@property --font-color {
syntax: "<color>";
inherits: true;
initial-value: oklch(25.11% 0.006 258.36);
}
@property --background-color {
syntax: "<color>";
inherits: true;
initial-value: oklch(97.05% 0.039 91.2);
}
@property --hover-color {
syntax: "<color>";
inherits: true;
initial-value: oklch(82.39% 0.133 91.5);
}
@media (prefers-color-scheme: dark) {
:root {
--font-color: oklch(91.87% 0.003 264.54);
--background-color: oklch(25.11% 0.006 258.36);
--hover-color: oklch(90.92% 0.125 92.56);
}
}
html {
margin: 0;
padding: 0;
box-sizing: border-box;
width: 100%;
height: 100%;
background-color: var(--background-color);
color: var(--font-color);
overflow-x: hidden !important;
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* Internet Explorer 10+ */
}
body {
margin: 0;
padding: 0;
box-sizing: border-box;
padding-right: 2.5rem;
padding-left: 2.5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
font-family: "Outfit", serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
background-color: var(--background-color);
color: var(--font-color);
overflow-x: hidden !important;
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* Internet Explorer 10+ */
justify-content: center;
}
.fixed-sidebar-holder {
position: fixed;
}
.sidebar {
width: 14em;
min-width: 14em;
display: flex;
flex-direction: column;
margin-right: 10px;
}
.sidebar a {
text-decoration: none;
color: var(--font-color);
transition: color 0.3s ease-in-out;
}
.sidebar a:hover {
color: var(--hover-color);
transition: color 0.3s ease-in-out;
}
.sidebar h1 {
padding: 0.25em;
font-size: 2em;
}
.sidebar ul {
list-style: none;
padding: 0.3em;
margin-left: 0.6em;
}
.sidebar li {
padding: 0.2em;
}
p {
line-height: calc(1ex / 0.32);
max-width: 80ch;
text-align: justify;
hyphens: auto;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased !important;
-moz-font-smoothing: antialiased !important;
text-rendering: optimizelegibility !important;
}
hr {
max-width: 50px;
}
.pre-loaded {
visibility: hidden;
opacity: 0;
will-change: opacity;
transition: opacity 0.3s, visibility 0.3s ease-in;
}
.loaded {
visibility: visible;
opacity: 1;
transition: opacity 0.3s, visibility 0.3s ease-in;
}
.sidebar-toggle {
display: none;
}
p {
margin-bottom: 1em;
}
h1, h2 {
margin: 0.25em;
}
ul, li {
padding: 0.15em;
margin: 0.15em;
}
pre, code {
overflow: auto;
}
@media (max-width: 872px) {
body {
flex-direction: column;
justify-content: flex-start;
}
.fixed-sidebar-holder {
position: relative;
}
.sidebar {
width: 100%;
flex-direction: row;
}
.sidebar-toggle {
display: block;
}
.sidebar-toggle button {
background-color: var(--background-color);
color: var(--font-color);
border: none;
padding: 0.5em;
margin: 0.5em;
font-size: 1.5em;
cursor: pointer;
}
.sidebar-content {
display: none;
}
ul, li {
display: flex;
padding: 0.15em;
margin: 0.15em;
}
.sidebar-header h1{
padding: 0.15em;
margin: 0.15em;
}
.sidebar-header {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.sidebar hr {
margin: 0.15em;
}
.sidebar-toggle-active {
display: flex;
flex-direction: column;
transition: all 0.3s ease-in-out;
}
}

View File

@ -0,0 +1,11 @@
<div class="content">
<div class="code">
{{ error_code }}
</div>
<div class="message">
{{ error_message }}
</div>
<div class="description">
{{ error_description }}
</div>
</div>

View File

@ -0,0 +1,36 @@
<div class="holder">
{% if metadata %}
{% if metadata.title %}
{% if metadata.title_image %}
<div class="title" style="background-image: url('{{ metadata.title_image }}'); background-size: cover; background-position: center;">
<h1>{{ metadata.title }}</h1>
{% if metadata.description %}
<h2>{{ metadata.description }}</h2>
{% endif %}
</div>
{% else %}
<div class="title">
<h1>{{ metadata.title }}</h1>
{% if metadata.description %}
<h2>{{ metadata.description }}</h2>
{% endif %}
</div>
{% endif %}
{% endif %}
{% endif %}
<div class="content">
{% if metadata %}
<div class="metadata">
{% for key, value in metadata.items() %}
<div class="metadata-item">
<span class="metadata-key">{{ key }}</span>:
<span class="metadata-value">{{ value }}</span>
</div>
{% endfor %}
</div>
{% endif %}
<div class="body">
{{ content|safe }}
</div>
</div>
</div>

View File

@ -0,0 +1,42 @@
<div class="holder">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.11.7/viewer.min.css" integrity="sha512-vRbASHFS0JiM4xwX/iqr9mrD/pXGnOP2CLdmXSSNAjLdgQVFyt4qI+BIoUW7/81uSuKRj0cWv3Dov8vVQOTHLw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.11.7/viewer.min.js" integrity="sha512-lZD0JiwhtP4UkFD1mc96NiTZ14L7MjyX5Khk8PMxJszXMLvu7kjq1sp4bb0tcL6MY+/4sIuiUxubOqoueHrW4w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<div class="breadcrumbs">
{% set breadcrumbs = currentPath.split('/') %}
{% for i in range(breadcrumbs|length) %}
{% if i+1 == breadcrumbs|length %}
<div class="current">{{ breadcrumbs[i] }}</div>
{% else %}
<a href="{{ '/' ~ '/'.join(breadcrumbs[:i+1]) }}"> 🗀 {{ breadcrumbs[i] }}</a>
<div class="seperator">/</div>
{% endif %}
{% endfor %}
</div>
<div class="content_holder">
<div class="albums">
{% for album in get_sibling_content_folders(currentPath) %}
<a href="/{{ album[1] }}">↪ 🗀 {{ album[0] }}</a>
{% endfor %}
</div>
<div class="content">
{% for picture in get_folder_contents(currentPath) | sort(attribute='date_modified', reverse=True) %}
{% if 'image' in picture.categories %}
<a class="post photo" style="
max-width:{{picture.metadata.width//20}}px;
max-height:{{picture.metadata.height//20}}px;
width:calc({{picture.metadata.width//20}}px*250/{{picture.metadata.height//20}});
flex-grow:calc({{picture.metadata.width//20}}*250/{{picture.metadata.height//20}})">
<img src="/download/{{ picture.path }}" alt="{{ picture.name }}" class="pre-loaded"
onload="this.className+=' loaded'" data-zoom-image>
{{ picture.metadata.exif['DateTimeOriginal '] }}
</a>
{% endif %}
{% endfor %}
</div>
<script>
const gallery = new Viewer(document.querySelector('.content'), {
inline: false,
});
</script>
</div>
</div>

View File

@ -0,0 +1,40 @@
<div class="holder">
<div class="breadcrumbs">
{% set breadcrumbs = currentPath.split('/') %}
{% for i in range(breadcrumbs|length) %}
{% if i+1 == breadcrumbs|length %}
<div class="current">{{ breadcrumbs[i] }}</div>
{% else %}
<a href="{{ '/' ~ '/'.join(breadcrumbs[:i+1]) }}"> 🗀 {{ breadcrumbs[i] }}</a>
<div class="seperator">/</div>
{% endif %}
{% endfor %}
</div>
<div class="content_holder">
<div class="albums">
{% for album in get_sibling_content_folders(currentPath) %}
<a href="/{{ album[1] }}">↪ 🗀 {{ album[0] }}</a>
{% endfor %}
</div>
<div class="content">
{% set sorted_files = get_folder_contents(currentPath) | sort(attribute='date_created', reverse=True) %}
{% set filtered_files = [] %}
<!-- Filter sorted_files to only items are have "document" in item.categories -->
{% for file in sorted_files %}
{% if 'document' in file.categories %}
{{ filtered_files.append(file) or "" }}
{% endif %}
{% endfor %}
<div class="filelist">
{% for file in filtered_files %}
{% if 'document' in file.categories %}
<div class="post">
<a href="/{{ file.path }}"><p>{{ file.date_created }}</p><h2>{{ file.proper_name }}</h2></a>
</div>
<hr class="solid">
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ pageTitle }}</title>
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/8.0.1/normalize.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
{% for style in styles %}
<link rel="stylesheet" href="/styles{{ style }}" type="text/css">
{% endfor %}
</head>
<body>
<div class="sidebar">
<div class="fixed-sidebar-holder">
<div class="sidebar-header">
<div class="sidebar-toggle" id="sidebar-toggle">
<button id="sidebar-button" type="button" onclick="onSidebar()"></button>
</div>
<a href="/">
<h1>Tanishq Dubey</h1>
</a>
</div>
<div class="sidebar-content" id="sidebar-content">
<ul>
<li><a href="/">⌂ Home</a></li>
{% for f in get_folder_contents() %}
{% if not f.is_dir %}
{% if f.proper_name == "index" %}
{% else %}
<li><a href="/{{ f.path }}">{{ f.proper_name }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
<hr class="solid">
<ul>
{% for f in get_sibling_content_folders() %}
<li><a href="/{{ f[1] }}">↪ 🗀 {{ f[0] }}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{{ content|safe }}
<script>
function onSidebar() {
document.getElementById("sidebar-content").classList.toggle("sidebar-toggle-active");
return false;
}
</script>
</body>
</html>