mirror of
https://github.com/sophokles187/data-cards.git
synced 2026-07-22 12:30:26 +00:00
updated-docs
This commit is contained in:
parent
1bd5de77af
commit
00564970ac
15 changed files with 1394 additions and 59 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -134,4 +134,10 @@ data.json
|
|||
dataview-docs
|
||||
test-cases.md
|
||||
obsidian-meta-bind-docs
|
||||
docs-obsidian
|
||||
docs-obsidian
|
||||
|
||||
# Documentation internal files - not visible on GitHub
|
||||
docs/preview-instructions.md
|
||||
docs/README.md
|
||||
docs/Gemfile
|
||||
docs/Gemfile.lock
|
||||
|
|
|
|||
0
docs/.nojekyll
Normal file
0
docs/.nojekyll
Normal file
|
|
@ -1,24 +1,37 @@
|
|||
remote_theme: just-the-docs/just-the-docs
|
||||
# Site settings
|
||||
title: DataCards Documentation
|
||||
description: Official documentation for the DataCards plugin for Obsidian
|
||||
url: https://github.com/Sophokles187/data-cards
|
||||
baseurl: "" # the subpath of your site, e.g. /blog
|
||||
url: "https://sophokles187.github.io" # the base hostname & protocol for your site
|
||||
|
||||
# Theme settings
|
||||
color_scheme: dark
|
||||
search_enabled: true
|
||||
heading_anchors: true
|
||||
# Build settings
|
||||
markdown: kramdown
|
||||
highlighter: rouge
|
||||
|
||||
# Aux links for the upper right navigation
|
||||
aux_links:
|
||||
"DataCards on GitHub":
|
||||
- "https://github.com/Sophokles187/data-cards"
|
||||
# Exclude from processing
|
||||
exclude:
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- node_modules
|
||||
- preview-instructions.md
|
||||
- README.md
|
||||
|
||||
# Footer content
|
||||
footer_content: "Copyright © 2025 Sophokles187. Licensed under the <a href=\"https://github.com/Sophokles187/data-cards/blob/main/LICENSE\">GPL-3.0 License</a>."
|
||||
# Plugins
|
||||
plugins:
|
||||
- jekyll-seo-tag
|
||||
|
||||
# Back to top link
|
||||
back_to_top: true
|
||||
back_to_top_text: "Back to top"
|
||||
# Include these files that are automatically excluded
|
||||
include:
|
||||
- .nojekyll
|
||||
|
||||
# Makes Aux links open in a new tab
|
||||
aux_links_new_tab: true
|
||||
# Custom variables
|
||||
version: "1.0"
|
||||
|
||||
# Defaults
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: ""
|
||||
type: "pages"
|
||||
values:
|
||||
layout: "page"
|
||||
|
|
|
|||
6
docs/_includes/card.html
Normal file
6
docs/_includes/card.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<div class="card">
|
||||
{% if include.title %}
|
||||
<h3>{{ include.title }}</h3>
|
||||
{% endif %}
|
||||
{{ include.content | markdownify }}
|
||||
</div>
|
||||
6
docs/_includes/code.html
Normal file
6
docs/_includes/code.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<div class="code-container">
|
||||
<div class="code-header">
|
||||
<span>{{ include.title | default: "Example" }}</span>
|
||||
</div>
|
||||
<pre><code>{{ include.code }}</code></pre>
|
||||
</div>
|
||||
3
docs/_includes/note.html
Normal file
3
docs/_includes/note.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="note">
|
||||
{{ include.content | markdownify }}
|
||||
</div>
|
||||
79
docs/_includes/sidebar.html
Normal file
79
docs/_includes/sidebar.html
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<div class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="logo-container">
|
||||
<div class="logo"></div>
|
||||
<div>
|
||||
<div class="site-title">DataCards</div>
|
||||
<div class="version">v1.0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/' | relative_url }}" class="nav-link">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/getting-started' | relative_url }}" class="nav-link">Getting Started</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/installation' | relative_url }}" class="nav-link">Installation</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="nav-section">
|
||||
<div class="nav-section-title">Features</div>
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/presets' | relative_url }}" class="nav-link">Card Presets</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/images' | relative_url }}" class="nav-link">Image Support</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/properties' | relative_url }}" class="nav-link">Property Customization</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/mobile' | relative_url }}" class="nav-link">Mobile Support</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/dynamic-updates' | relative_url }}" class="nav-link">Dynamic Updates</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/features/advanced-options' | relative_url }}" class="nav-link">Advanced Options</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="nav-section">
|
||||
<div class="nav-section-title">Examples</div>
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/examples/books' | relative_url }}" class="nav-link">Book Library</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/examples/tasks' | relative_url }}" class="nav-link">Task Management</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/examples/photos' | relative_url }}" class="nav-link">Photo Gallery</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/examples/movies' | relative_url }}" class="nav-link">Movie Collection</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="nav-section">
|
||||
<div class="nav-section-title">Support</div>
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item">
|
||||
<a href="{{ '/faq' | relative_url }}" class="nav-link">FAQ & Troubleshooting</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="https://github.com/Sophokles187/data-cards" class="nav-link" target="_blank">GitHub Repository</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
49
docs/_layouts/default.html
Normal file
49
docs/_layouts/default.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% if page.title %}{{ page.title }} - {% endif %}DataCards Documentation</title>
|
||||
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
|
||||
<link rel="icon" href="{{ '/favicon.ico' | relative_url }}" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Skip to content link for accessibility -->
|
||||
<a href="#main-content" class="skip-to-content">Skip to content</a>
|
||||
|
||||
<!-- Dark mode toggle button -->
|
||||
<button class="theme-toggle" aria-label="Toggle dark mode">
|
||||
<!-- Moon icon for light mode -->
|
||||
<svg class="moon-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
||||
</svg>
|
||||
<!-- Sun icon for dark mode (hidden initially) -->
|
||||
<svg class="sun-icon" style="display: none;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Mobile menu toggle -->
|
||||
<button class="mobile-menu-toggle" aria-label="Toggle mobile menu">
|
||||
<span></span>
|
||||
</button>
|
||||
|
||||
<div class="container">
|
||||
{% include sidebar.html %}
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{ '/assets/js/script.js' | relative_url }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
7
docs/_layouts/page.html
Normal file
7
docs/_layouts/page.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{{ content }}
|
||||
419
docs/assets/css/custom.css
Normal file
419
docs/assets/css/custom.css
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
/*
|
||||
* DataCards Custom Documentation Styling
|
||||
* Modern, clean, Apple-inspired design
|
||||
*/
|
||||
|
||||
/* Typography */
|
||||
:root {
|
||||
--body-font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
--mono-font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, Monaco, "Liberation Mono", "Courier New", monospace;
|
||||
--body-line-height: 1.6;
|
||||
--content-line-height: 1.8;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--body-font-family);
|
||||
font-weight: 400;
|
||||
line-height: var(--body-line-height);
|
||||
color: #333333;
|
||||
background-color: #ffffff;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: var(--mono-font-family);
|
||||
border-radius: 6px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0.2em 0.4em;
|
||||
background-color: #f5f5f7;
|
||||
border-radius: 4px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.25;
|
||||
letter-spacing: -0.01em;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.03em;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.75rem;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
color: #0070c9;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.side-bar {
|
||||
background-color: #f5f5f7;
|
||||
border-right: none;
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.nav-list .nav-list-item .nav-list-link {
|
||||
color: #333333;
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-list .nav-list-item .nav-list-link:hover,
|
||||
.nav-list .nav-list-item .nav-list-link.active {
|
||||
background-color: rgba(0, 112, 201, 0.08);
|
||||
color: #0070c9;
|
||||
}
|
||||
|
||||
.nav-list .nav-list-item .nav-list-expander {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
padding: 24px 16px;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Main content */
|
||||
.main-content {
|
||||
padding: 3rem;
|
||||
line-height: var(--content-line-height);
|
||||
}
|
||||
|
||||
.main-content p {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.main-content-wrap {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.main {
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-bottom: 2rem;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
|
||||
border: none;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f5f5f7;
|
||||
padding: 12px 16px;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
border: none;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 12px 16px;
|
||||
border: none;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #f9f9fb;
|
||||
}
|
||||
|
||||
/* Buttons and labels */
|
||||
.btn {
|
||||
border-radius: 8px;
|
||||
padding: 12px 20px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0070c9;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-radius: 4px;
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
.highlight {
|
||||
background-color: #f5f5f7;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
pre.highlight {
|
||||
padding: 16px;
|
||||
overflow-x: auto;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Blockquotes */
|
||||
blockquote {
|
||||
margin: 1rem 0;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-left: 4px solid #0070c9;
|
||||
border-radius: 0 8px 8px 0;
|
||||
background-color: #f5f7fa;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Search */
|
||||
.search-input {
|
||||
border-radius: 8px;
|
||||
padding: 12px 16px;
|
||||
border: 1px solid #e0e0e0;
|
||||
background-color: #fafafa;
|
||||
transition: all 0.2s ease;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.search-input:focus {
|
||||
outline: none;
|
||||
border-color: #0070c9;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 0 0 2px rgba(0, 112, 201, 0.2);
|
||||
}
|
||||
|
||||
/* Box elements */
|
||||
.deprecated, .warning {
|
||||
padding: 12px 16px;
|
||||
margin: 20px 0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.deprecated {
|
||||
background-color: #fff3e0;
|
||||
border-left: 4px solid #ff9800;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: #ffebee;
|
||||
border-left: 4px solid #f44336;
|
||||
}
|
||||
|
||||
/* Scroll bar */
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #ccc;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #aaa;
|
||||
}
|
||||
|
||||
/* No-JS fallback */
|
||||
.no-js-message {
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
background-color: #f9f9fb;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Tables of contents */
|
||||
.table-of-contents {
|
||||
background-color: #f9f9fb;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.table-of-contents ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.table-of-contents code {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.site-footer {
|
||||
background-color: #f9f9fb;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.main-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
table {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Apple-style cards for examples */
|
||||
.example-card {
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
margin: 24px 0;
|
||||
padding: 24px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.example-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.example-card h3 {
|
||||
margin-top: 0;
|
||||
color: #0070c9;
|
||||
}
|
||||
|
||||
/* Image styling */
|
||||
img {
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
margin: 1.5rem 0;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Dark mode support (if enabled) */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--body-background: #1e1e1e;
|
||||
--sidebar-color: #252525;
|
||||
--content-background: #1e1e1e;
|
||||
--link-color: #0a84ff;
|
||||
--text-color: #e0e0e0;
|
||||
--heading-color: #ffffff;
|
||||
--code-background: #2d2d2d;
|
||||
--border-color: #3d3d3d;
|
||||
--search-background: #252525;
|
||||
}
|
||||
|
||||
/* This will only apply if the site has dark mode support enabled */
|
||||
.dark-theme {
|
||||
background-color: var(--body-background);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.dark-theme .side-bar {
|
||||
background-color: var(--sidebar-color);
|
||||
border-right: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.dark-theme .main-content-wrap {
|
||||
background-color: var(--content-background);
|
||||
}
|
||||
|
||||
.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4, .dark-theme h5, .dark-theme h6 {
|
||||
color: var(--heading-color);
|
||||
}
|
||||
|
||||
.dark-theme code {
|
||||
background-color: var(--code-background);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.dark-theme a {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.dark-theme .example-card {
|
||||
background-color: #252525;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.dark-theme table th {
|
||||
background-color: #252525;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.dark-theme table td {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.dark-theme tr:hover {
|
||||
background-color: #2a2a2a;
|
||||
}
|
||||
|
||||
.dark-theme .search-input {
|
||||
background-color: var(--search-background);
|
||||
border-color: var(--border-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
}
|
||||
611
docs/assets/css/style.css
Normal file
611
docs/assets/css/style.css
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
/*
|
||||
* DataCards Documentation
|
||||
* Modern Apple-inspired design system
|
||||
*/
|
||||
|
||||
/* Base Styles */
|
||||
:root {
|
||||
/* Light mode colors */
|
||||
--primary-color: #0071e3;
|
||||
--primary-color-hover: #0051a2;
|
||||
--text-color: #1d1d1f;
|
||||
--text-secondary: #86868b;
|
||||
--text-on-primary: #ffffff;
|
||||
--bg-color: #ffffff;
|
||||
--bg-secondary: #f5f5f7;
|
||||
--border-color: #d2d2d7;
|
||||
--nav-highlight: rgba(0, 113, 227, 0.05);
|
||||
--code-bg: #f2f2f2;
|
||||
--card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
--card-shadow-hover: 0 6px 25px rgba(0, 0, 0, 0.12);
|
||||
|
||||
/* Gradient background */
|
||||
--gradient-start: #ffffff;
|
||||
--gradient-end: #f5f5f7;
|
||||
|
||||
/* Other variables */
|
||||
--sidebar-width: 250px;
|
||||
--content-max-width: 800px;
|
||||
--border-radius: 12px;
|
||||
--transition-speed: 0.2s;
|
||||
}
|
||||
|
||||
/* Dark mode colors */
|
||||
.dark-theme {
|
||||
--primary-color: #0a84ff;
|
||||
--primary-color-hover: #409cff;
|
||||
--text-color: #f5f5f7;
|
||||
--text-secondary: #a1a1a6;
|
||||
--text-on-primary: #ffffff;
|
||||
--bg-color: #121212;
|
||||
--bg-secondary: #1c1c1e;
|
||||
--border-color: #38383a;
|
||||
--nav-highlight: rgba(10, 132, 255, 0.15);
|
||||
--code-bg: #2a2a2c;
|
||||
--card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
|
||||
--card-shadow-hover: 0 6px 25px rgba(0, 0, 0, 0.35);
|
||||
|
||||
/* Dark mode gradient */
|
||||
--gradient-start: #121212;
|
||||
--gradient-end: #1a1a1a;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
color: var(--text-color);
|
||||
background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
|
||||
background-attachment: fixed;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
letter-spacing: -0.015em;
|
||||
color: var(--text-color);
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.75rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 0.5rem;
|
||||
margin-top: 2rem;
|
||||
transition: border-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.3rem;
|
||||
margin-top: 1.8rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 1.25rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.6;
|
||||
color: var(--text-color);
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--primary-color-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 0.9em;
|
||||
background-color: var(--code-bg);
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: 4px;
|
||||
color: var(--text-color);
|
||||
transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: var(--code-bg);
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
overflow-x: auto;
|
||||
line-height: 1.4;
|
||||
transition: background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.container {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
background-color: var(--bg-secondary);
|
||||
border-right: 1px solid var(--border-color);
|
||||
padding: 2rem 0;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
z-index: 10;
|
||||
transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 0 1.5rem 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
transition: border-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
background-color: var(--primary-color);
|
||||
border-radius: 10px;
|
||||
margin-right: 0.75rem;
|
||||
transition: background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text-color);
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.version {
|
||||
display: inline-block;
|
||||
font-size: 0.8rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
background-color: var(--bg-color);
|
||||
border-radius: 12px;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 0.25rem;
|
||||
transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
margin-left: var(--sidebar-width);
|
||||
padding: 2rem 3rem;
|
||||
max-width: var(--content-max-width);
|
||||
transition: background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.nav-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: 0.5rem 1.5rem;
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
border-left: 3px solid transparent;
|
||||
transition: all var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
background-color: var(--nav-highlight);
|
||||
border-left-color: var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
background-color: var(--nav-highlight);
|
||||
border-left-color: var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.nav-section {
|
||||
margin-top: 1rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
transition: border-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.nav-section-title {
|
||||
padding: 0 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-secondary);
|
||||
letter-spacing: 0.05em;
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
/* Components */
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 0.5rem 1.25rem;
|
||||
background-color: var(--primary-color);
|
||||
color: var(--text-on-primary);
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
transition: all var(--transition-speed) ease;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: var(--primary-color-hover);
|
||||
text-decoration: none;
|
||||
transform: translateY(-1px);
|
||||
color: var(--text-on-primary);
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: var(--bg-color);
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: var(--card-shadow);
|
||||
padding: 1.5rem;
|
||||
margin: 1.5rem 0;
|
||||
transition: transform var(--transition-speed) ease,
|
||||
box-shadow var(--transition-speed) ease,
|
||||
background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: var(--card-shadow-hover);
|
||||
}
|
||||
|
||||
.note {
|
||||
background-color: var(--nav-highlight);
|
||||
border-left: 4px solid var(--primary-color);
|
||||
border-radius: 0 8px 8px 0;
|
||||
padding: 1rem 1.5rem;
|
||||
margin: 1.5rem 0;
|
||||
transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.note p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.25em 0.5em;
|
||||
font-size: 0.75em;
|
||||
font-weight: 500;
|
||||
background-color: var(--primary-color);
|
||||
color: var(--text-on-primary);
|
||||
border-radius: 12px;
|
||||
vertical-align: middle;
|
||||
margin-left: 0.5em;
|
||||
transition: background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
box-shadow: var(--card-shadow);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
transition: box-shadow var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 0.75rem 1rem;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: var(--bg-secondary);
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
td {
|
||||
color: var(--text-color);
|
||||
transition: color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: var(--nav-highlight);
|
||||
}
|
||||
|
||||
/* Dark mode toggle */
|
||||
.theme-toggle {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
z-index: 100;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--bg-color);
|
||||
box-shadow: var(--card-shadow);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.theme-toggle:hover {
|
||||
box-shadow: var(--card-shadow-hover);
|
||||
}
|
||||
|
||||
.theme-toggle svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
fill: none;
|
||||
stroke: var(--text-color);
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
transition: stroke var(--transition-speed) ease, transform var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.theme-toggle:hover svg {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* Mobile menu toggle */
|
||||
.mobile-menu-toggle {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
z-index: 20;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: var(--bg-color);
|
||||
box-shadow: var(--card-shadow);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle span {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background-color: var(--text-color);
|
||||
position: relative;
|
||||
transition: background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle span:before,
|
||||
.mobile-menu-toggle span:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background-color: var(--text-color);
|
||||
transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle span:before {
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle span:after {
|
||||
bottom: -6px;
|
||||
}
|
||||
|
||||
.mobile-menu-open .mobile-menu-toggle span {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.mobile-menu-open .mobile-menu-toggle span:before {
|
||||
transform: rotate(45deg);
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-open .mobile-menu-toggle span:after {
|
||||
transform: rotate(-45deg);
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/* Mobile adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
z-index: 15;
|
||||
transition: left var(--transition-speed) ease, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
|
||||
box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.mobile-menu-open .sidebar {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-toggle {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
justify-content: center;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 0.75rem 1.5rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
bottom: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Additional styles for code blocks */
|
||||
.code-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: var(--bg-secondary);
|
||||
padding: 0.5rem 1rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
border-radius: 8px 8px 0 0;
|
||||
font-family: var(--mono-font-family);
|
||||
font-size: 0.9em;
|
||||
color: var(--text-secondary);
|
||||
transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease, color var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.code-container {
|
||||
margin: 1.5rem 0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--card-shadow);
|
||||
transition: box-shadow var(--transition-speed) ease;
|
||||
}
|
||||
|
||||
.code-container pre {
|
||||
margin: 0;
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
/* Skip to content link for accessibility */
|
||||
.skip-to-content {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: auto;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.skip-to-content:focus {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
background-color: var(--primary-color);
|
||||
color: var(--text-on-primary);
|
||||
z-index: 100;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Improve focus styles for accessibility */
|
||||
a:focus, button:focus, .nav-link:focus {
|
||||
outline: 2px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Animation for page load */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.main-content {
|
||||
animation: fadeIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* Jekyll-specific modifications */
|
||||
.page-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Jekyll syntax highlighting compatibility */
|
||||
.highlight {
|
||||
background-color: var(--code-bg);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.highlight pre,
|
||||
.highlight code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Other Jekyll-specific overrides */
|
||||
.site-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-header,
|
||||
.site-footer {
|
||||
display: none;
|
||||
}
|
||||
103
docs/assets/js/script.js
Normal file
103
docs/assets/js/script.js
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* DataCards Documentation
|
||||
* Main JavaScript functionality
|
||||
*/
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const body = document.body;
|
||||
const themeToggle = document.querySelector('.theme-toggle');
|
||||
const moonIcon = document.querySelector('.moon-icon');
|
||||
const sunIcon = document.querySelector('.sun-icon');
|
||||
const mobileMenuToggle = document.querySelector('.mobile-menu-toggle');
|
||||
|
||||
// Check for saved theme preference or use device preference
|
||||
const savedTheme = localStorage.getItem('theme');
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
// Apply theme based on preference
|
||||
if (savedTheme === 'dark' || (!savedTheme && prefersDark)) {
|
||||
enableDarkMode();
|
||||
}
|
||||
|
||||
// Toggle theme when button is clicked
|
||||
if (themeToggle) {
|
||||
themeToggle.addEventListener('click', function() {
|
||||
if (body.classList.contains('dark-theme')) {
|
||||
disableDarkMode();
|
||||
} else {
|
||||
enableDarkMode();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Toggle mobile menu
|
||||
if (mobileMenuToggle) {
|
||||
mobileMenuToggle.addEventListener('click', function() {
|
||||
body.classList.toggle('mobile-menu-open');
|
||||
});
|
||||
}
|
||||
|
||||
// Close mobile menu when clicking on a nav link
|
||||
const navLinks = document.querySelectorAll('.nav-link');
|
||||
navLinks.forEach(link => {
|
||||
link.addEventListener('click', function() {
|
||||
body.classList.remove('mobile-menu-open');
|
||||
});
|
||||
});
|
||||
|
||||
// Close mobile menu when clicking outside
|
||||
document.addEventListener('click', function(event) {
|
||||
const sidebar = document.querySelector('.sidebar');
|
||||
const isClickInside = sidebar && (sidebar.contains(event.target) || (mobileMenuToggle && mobileMenuToggle.contains(event.target)));
|
||||
|
||||
if (!isClickInside && body.classList.contains('mobile-menu-open')) {
|
||||
body.classList.remove('mobile-menu-open');
|
||||
}
|
||||
});
|
||||
|
||||
// Mark current page as active in navigation
|
||||
markActiveNavItem();
|
||||
|
||||
// Functions to enable/disable dark mode
|
||||
function enableDarkMode() {
|
||||
body.classList.add('dark-theme');
|
||||
if (moonIcon) moonIcon.style.display = 'none';
|
||||
if (sunIcon) sunIcon.style.display = 'block';
|
||||
try {
|
||||
localStorage.setItem('theme', 'dark');
|
||||
} catch (e) {
|
||||
console.warn('LocalStorage not available:', e);
|
||||
}
|
||||
}
|
||||
|
||||
function disableDarkMode() {
|
||||
body.classList.remove('dark-theme');
|
||||
if (moonIcon) moonIcon.style.display = 'block';
|
||||
if (sunIcon) sunIcon.style.display = 'none';
|
||||
try {
|
||||
localStorage.setItem('theme', 'light');
|
||||
} catch (e) {
|
||||
console.warn('LocalStorage not available:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// Mark the current page in navigation
|
||||
function markActiveNavItem() {
|
||||
const currentPath = window.location.pathname;
|
||||
|
||||
// Handle root path
|
||||
if (currentPath === '/' || currentPath.endsWith('/index.html')) {
|
||||
const homeLinks = document.querySelectorAll('.nav-link[href="/"], .nav-link[href="index.html"], .nav-link[href="./"]');
|
||||
homeLinks.forEach(link => link.classList.add('active'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle other pages
|
||||
navLinks.forEach(link => {
|
||||
const href = link.getAttribute('href');
|
||||
if (href && (currentPath.endsWith(href) || currentPath.includes(href))) {
|
||||
link.classList.add('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
1
docs/favicon.ico
Normal file
1
docs/favicon.ico
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!-- Dies ist nur ein Platzhalter. Du solltest hier eine echte ICO-Datei ablegen. -->
|
||||
|
|
@ -1,19 +1,6 @@
|
|||
---
|
||||
layout: default
|
||||
layout: page
|
||||
title: Card Presets
|
||||
parent: Features
|
||||
nav_order: 1
|
||||
---
|
||||
|
||||
# Card Presets
|
||||
{: .no_toc }
|
||||
|
||||
## Table of contents
|
||||
{: .no_toc .text-delta }
|
||||
|
||||
1. TOC
|
||||
{:toc}
|
||||
|
||||
---
|
||||
|
||||
DataCards offers several presets to display your data in different layouts. Each preset is optimized for specific use cases and has its own default settings.
|
||||
|
|
@ -105,42 +92,38 @@ preset: dense
|
|||
|
||||
You can set a preset in your code block:
|
||||
|
||||
```markdown
|
||||
```datacards
|
||||
{% include code.html title="Setting a Preset" code="```datacards
|
||||
TABLE title, author, rating, cover FROM #books
|
||||
SORT rating DESC
|
||||
|
||||
// Settings
|
||||
preset: portrait
|
||||
```
|
||||
```
|
||||
```" %}
|
||||
|
||||
## Overriding Columns
|
||||
|
||||
Each preset has a default number of columns, but you can override this:
|
||||
|
||||
```markdown
|
||||
```datacards
|
||||
{% include code.html title="Overriding Columns" code="```datacards
|
||||
TABLE title, author, rating, cover FROM #books
|
||||
SORT rating DESC
|
||||
|
||||
// Settings
|
||||
preset: dense
|
||||
columns: 4 // Override the default 6 columns for dense preset
|
||||
```
|
||||
```
|
||||
```" %}
|
||||
|
||||
## Mixing Preset Features
|
||||
|
||||
You can mix features from different presets using other settings. For example, use the portrait preset with small text:
|
||||
|
||||
```markdown
|
||||
```datacards
|
||||
{% include code.html title="Mixing Features" code="```datacards
|
||||
TABLE title, author, rating, cover FROM #books
|
||||
SORT rating DESC
|
||||
|
||||
// Settings
|
||||
preset: portrait
|
||||
fontSize: small
|
||||
```
|
||||
```
|
||||
```" %}
|
||||
|
||||
{% include note.html content="The preset setting must be specified first, as it sets the base defaults for all other display options." %}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,81 @@
|
|||
---
|
||||
layout: default
|
||||
title: Home
|
||||
nav_order: 1
|
||||
permalink: /
|
||||
---
|
||||
|
||||
# DataCards for Obsidian
|
||||
{: .fs-9 }
|
||||
|
||||
Transform Dataview query results into visually appealing, customizable card layouts.
|
||||
{: .fs-6 .fw-300 }
|
||||
|
||||
[Get Started](./getting-started.html){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
|
||||
[View on GitHub](https://github.com/Sophokles187/data-cards){: .btn .fs-5 .mb-4 .mb-md-0 }
|
||||
|
||||
---
|
||||
<a href="{{ '/getting-started' | relative_url }}" class="button">Get Started</a>
|
||||
|
||||
## Overview
|
||||
|
||||
DataCards is a plugin for [Obsidian](https://obsidian.md) that transforms [Dataview](https://github.com/blacksmithgu/obsidian-dataview) query results into beautiful card layouts. Whether you're organizing books, movies, projects, or any other collection of notes, DataCards helps you visualize your data in an elegant and customizable way.
|
||||
|
||||

|
||||
{% include card.html title="Quick Start" content="
|
||||
1. Install the plugin
|
||||
2. Create a code block with the `datacards` language
|
||||
3. Write a Dataview query
|
||||
4. Add your preferred settings
|
||||
" %}
|
||||
|
||||
{% include code.html title="Example Query" code="```datacards
|
||||
TABLE author, rating, cover FROM #books
|
||||
SORT rating DESC
|
||||
|
||||
// Settings
|
||||
preset: portrait
|
||||
imageProperty: cover
|
||||
```" %}
|
||||
|
||||
## Features
|
||||
|
||||
- **Custom Code Block**: Use `datacards` code blocks with Dataview query syntax
|
||||
- **Flexible Presets**: Multiple card preset options optimized for different use cases
|
||||
- **Property Customization**: Select which properties to display and how they appear
|
||||
- **Image Support**: Display images from frontmatter properties with customizable dimensions
|
||||
- **Global Settings**: Default configuration with per-block overrides
|
||||
- **Mobile Optimization**: Dedicated mobile settings for better display on small screens
|
||||
DataCards offers a range of features to help you visualize your data:
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Feature</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Flexible Presets</td>
|
||||
<td>Multiple card layouts optimized for different content types</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Image Support</td>
|
||||
<td>Display images from frontmatter properties</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Property Customization</td>
|
||||
<td>Control which properties appear and how they're displayed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mobile Optimization</td>
|
||||
<td>Responsive design with mobile-specific settings</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% include note.html content="**Note:** DataCards requires the Dataview plugin to be installed and enabled." %}
|
||||
|
||||
## Presets
|
||||
|
||||
Choose from multiple presets to display your data:
|
||||
|
||||
### Grid Preset <span class="badge">Default</span>
|
||||
|
||||
Balanced layout for most use cases with 3 columns by default.
|
||||
|
||||
### Portrait Preset
|
||||
|
||||
Optimized for book covers and portrait images. Features taller cards with "contain" fit to show full images without cropping.
|
||||
|
||||
### Square Preset
|
||||
|
||||
Perfect for photo collections and visual content. Features 1:1 square cards with images as the focus.
|
||||
|
|
|
|||
Loading…
Reference in a new issue