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,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>