Skip to content

lightweight, client-only calendar web application. All data persists in the URL hash for instant sharing, No backend required. Optional AES-GCM password protection keeps shared links locked without a server

JavaScript
12.7 KB
Raw Blame
<!DOCTYPE html>
<html lang="en">

<head>
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-77V3TP2B5T"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());

    // Security: Exclude URL hash from analytics to prevent leaking data
    gtag('config', 'G-77V3TP2B5T', {
      'page_location': window.location.origin + window.location.pathname,
      'page_path': window.location.pathname
    });
  </script>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>LLM Instructions | hash-calendar</title>
  <meta name="description"
    content="Instructions for any LLM to create hash-calendar event URLs using the hash-path method.">
  <meta name="robots" content="index,follow">
  <link rel="canonical" href="https://hash-calendar.netlify.app/llm.html">
  <link rel="icon" href="favicon.ico" type="image/x-icon">
  <link rel="icon" href="favicon.png" type="image/png" sizes="32x32">
  <link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="180x180">
  <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=Fraunces:wght@600;700&family=Space+Grotesk:wght@400;500;600&display=swap"
    rel="stylesheet">
  <style>
    :root {
      color-scheme: light;
      --bg-primary: #f6f6f4;
      --bg-secondary: #ffffff;
      --text-primary: #1f1f1f;
      --text-secondary: #5e5e5b;
      --text-muted: #8a8a87;
      --accent-primary: #0f6fbf;
      --accent-hover: #0d5a9f;
      --accent-light: #e9f3fc;
      --border-color: #e7e6e0;
      --border-subtle: #f0efea;
      --chip-bg: #eef5fc;
      --chip-border: #dce8f4;
      --chip-text: #35577a;
      --code-bg: #f8f8f6;
      --code-border: #ecebe5;
      --gradient-blue: radial-gradient(1200px 650px at 8% -18%, #e9f2fb 0%, transparent 45%);
      --gradient-green: radial-gradient(1000px 600px at 100% 115%, #edf3e6 0%, transparent 42%);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
      color: var(--text-primary);
      background: var(--gradient-blue), var(--gradient-green), var(--bg-primary);
      line-height: 1.62;
    }

    .wrap { width: min(1040px, 100%); margin: 0 auto; padding: 28px 18px 48px; }

    .topbar {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
    }

    .brand {
      display: inline-flex; align-items: center; gap: 10px;
      color: inherit; text-decoration: none; font-weight: 700;
      letter-spacing: 0.02em; font-family: 'Fraunces', serif;
      transition: transform 150ms ease;
    }
    .brand:hover { transform: translateY(-1px); }
    .brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

    .actions { display: flex; gap: 8px; flex-wrap: wrap; }

    .btn {
      border: 1px solid var(--border-color); background: var(--bg-secondary);
      color: var(--text-primary); text-decoration: none; border-radius: 10px;
      padding: 10px 16px; font-weight: 600; font-size: 0.92rem;
      transition: all 150ms ease; cursor: pointer;
    }
    .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: #d4d4ce; }
    .btn.primary { border-color: var(--accent-primary); background: var(--accent-primary); color: #fff; }
    .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

    .grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }

    .card {
      background: var(--bg-secondary); border: 1px solid var(--border-color);
      border-radius: 16px; box-shadow: 0 16px 34px rgba(0,0,0,0.06);
      transition: box-shadow 200ms ease;
    }

    .toc { position: sticky; top: 14px; padding: 18px; align-self: start; }
    .toc h2 { margin: 0 0 12px; font-size: 1rem; font-family: 'Fraunces', serif; font-weight: 700; }
    .toc a {
      display: block; text-decoration: none; color: var(--text-primary);
      padding: 8px 10px; border-radius: 8px; margin-bottom: 4px;
      font-size: 0.92rem; transition: all 150ms ease; position: relative;
    }
    .toc a::before {
      content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
      width: 3px; height: 0; background: var(--accent-primary); border-radius: 2px;
      transition: height 150ms ease;
    }
    .toc a:hover { background: var(--accent-light); padding-left: 16px; }
    .toc a:hover::before { height: 60%; }

    .main { padding: 28px 24px; }

    h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; font-family: 'Fraunces', serif; font-weight: 700; }
    .updated { margin: 0 0 20px; color: var(--text-secondary); font-size: 0.94rem; }

    h2 { margin: 28px 0 12px; font-size: 1.2rem; font-family: 'Fraunces', serif; font-weight: 700; border-left: 4px solid var(--accent-primary); padding-left: 12px; }

    p { margin: 0 0 12px; }
    ol, ul { margin: 0 0 14px 20px; padding: 0; }
    li { margin: 0 0 8px; }

    code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
      background: var(--code-bg); border: 1px solid var(--code-border);
      border-radius: 6px; padding: 2px 6px; font-size: 0.92em;
    }

    pre {
      margin: 12px 0 16px; padding: 14px 16px; overflow: auto;
      border-radius: 10px; border: 1px solid var(--code-border);
      background: var(--code-bg); font-size: 0.86rem; line-height: 1.6;
    }
    pre code { border: none; padding: 0; background: transparent; }

    .tip {
      margin: 10px 0 14px; padding: 12px 14px; border: 1px solid #cfe2f7;
      border-radius: 10px; background: var(--accent-light);
      font-size: 0.95rem; position: relative; padding-left: 40px;
    }
    .tip::before { content: '\1F4A1'; position: absolute; left: 14px; top: 12px; font-size: 1.2rem; }

    a { color: var(--accent-primary); text-decoration: none; transition: color 150ms ease; }
    a:hover { color: var(--accent-hover); text-decoration: underline; }

    table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 0.92rem; }
    th, td { text-align: left; padding: 10px 12px; border: 1px solid var(--border-color); }
    th { background: var(--code-bg); font-weight: 600; }

    @media (max-width: 860px) { .grid { grid-template-columns: 1fr; } .toc { position: static; } .main { padding: 24px 18px; } }
    @media (max-width: 640px) { .wrap { padding: 20px 14px 40px; } .btn { padding: 8px 12px; font-size: 0.88rem; } }
  </style>
</head>

<body>
  <div class="wrap">
    <header class="topbar">
      <a class="brand" href="./" aria-label="Open hash-calendar">
        <img src="logo.png" alt="hash-calendar logo">
        <span>hash-calendar</span>
      </a>
      <div class="actions">
        <a class="btn primary" href="./">Open app</a>
        <a class="btn" href="./about.html">About</a>
        <a class="btn" href="./help.html">Help</a>
        <a class="btn" href="./faq.html">FAQ</a>
        <a class="btn" href="./privacy.html">Privacy</a>
        <a class="btn" href="./json.html">JSON bridge</a>
      </div>
    </header>

    <div class="grid">
      <nav class="toc card" aria-label="On this page">
        <h2>On this page</h2>
        <a href="#system-role">System role</a>
        <a href="#output-rules">Output rules</a>
        <a href="#hash-path-format">Hash-path format</a>
        <a href="#parsing-rules">Parsing rules</a>
        <a href="#examples">Examples</a>
      </nav>

      <main class="main card">
        <h1>LLM Instructions</h1>
        <p class="updated">How any LLM can create hash-calendar event URLs</p>

        <section id="system-role">
          <h2>System Role</h2>
          <p>You are a <strong>hash-calendar URL builder</strong>. You generate shareable event links using
            hash-path URLs that open directly in the hash-calendar app.</p>
          <p>Base URL:</p>
          <pre><code>https://hash-calendar.netlify.app/</code></pre>
        </section>

        <section id="output-rules">
          <h2>Output Rules</h2>
          <p>When a user asks you to create a calendar link, return exactly two lines:</p>
          <pre><code>Title: &lt;calendar title&gt;
URL: &lt;full URL&gt;</code></pre>
          <p>No markdown. No explanation text. Just those two lines.</p>
        </section>

        <section id="hash-path-format">
          <h2>Hash-Path Format</h2>
          <p>Append a hash-path to the base URL to create events directly. The format uses forward slashes
            to separate date, time, duration, and title segments.</p>

          <h3 style="font-size:1.05rem; margin-top:20px;">Supported Patterns</h3>
          <table>
            <thead>
              <tr>
                <th>Pattern</th>
                <th>Type</th>
                <th>Example</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td><code>YYYY/MM/DD/Title</code></td>
                <td>All-day event</td>
                <td><code>/#/2026/12/25/Christmas-Day</code></td>
              </tr>
              <tr>
                <td><code>YYYY/MM/DD/HH/mm/Title</code></td>
                <td>Timed event (60 min default)</td>
                <td><code>/#/2026/12/25/10/30/Open-Presents</code></td>
              </tr>
              <tr>
                <td><code>YYYY/MM/DD/HH/mm+Duration/Title</code></td>
                <td>Timed with explicit duration</td>
                <td><code>/#/2026/12/25/10/00+90/Family-Brunch</code></td>
              </tr>
            </tbody>
          </table>

          <h3 style="font-size:1.05rem; margin-top:20px;">Multiple Events</h3>
          <p>Separate multiple event blocks with a comma (<code>,</code>):</p>
          <pre><code>/#/2026/01/01/Gym,2026/01/01/10/00/Clean</code></pre>
        </section>

        <section id="parsing-rules">
          <h2>Parsing Rules</h2>
          <ul>
            <li><strong>Minimum required:</strong> <code>YYYY/MM/DD</code> &mdash; year alone is not enough to create an event.</li>
            <li><strong>Titles:</strong> Use dashes (<code>-</code>) for spaces. <code>Team-Meeting</code> becomes "Team Meeting".</li>
            <li><strong>Missing title:</strong> Defaults to "New Event (URL)".</li>
            <li><strong>Hours:</strong> 0&ndash;23 (24-hour format).</li>
            <li><strong>Minutes:</strong> 0&ndash;59.</li>
            <li><strong>Duration:</strong> Specified as <code>+Minutes</code> after the minute value (e.g. <code>00+90</code> = starts at :00, lasts 90 minutes).</li>
            <li><strong>Default duration:</strong> 60 minutes when no <code>+Duration</code> is given for a timed event.</li>
            <li><strong>All-day events:</strong> Omit the hour and minute segments entirely (duration is 0).</li>
            <li><strong>Encoding:</strong> Titles are decoded with <code>decodeURIComponent()</code>, so special characters should be percent-encoded.</li>
          </ul>
        </section>

        <section id="examples">
          <h2>Examples</h2>

          <p><strong>1. Single timed event</strong> &mdash; "Team standup at 9:00 AM on Jan 15, 2026"</p>
          <pre><code>Title: Team standup
URL: https://hash-calendar.netlify.app/#/2026/01/15/09/00/Team-standup</code></pre>

          <p><strong>2. All-day event</strong> &mdash; "Company holiday on March 1, 2026"</p>
          <pre><code>Title: Company holiday
URL: https://hash-calendar.netlify.app/#/2026/03/01/Company-holiday</code></pre>

          <p><strong>3. Event with custom duration</strong> &mdash; "2-hour design review at 2:30 PM on Feb 10, 2026"</p>
          <pre><code>Title: Design review
URL: https://hash-calendar.netlify.app/#/2026/02/10/14/30+120/Design-review</code></pre>

          <p><strong>4. Multiple events</strong> &mdash; "Gym at 7 AM and Lunch at noon on Jan 5, 2026"</p>
          <pre><code>Title: Jan 5 schedule
URL: https://hash-calendar.netlify.app/#/2026/01/05/07/00/Gym,2026/01/05/12/00/Lunch</code></pre>

          <p><strong>5. Multi-word title with special characters</strong> &mdash; "Doctor's appointment at 3 PM on April 20, 2026"</p>
          <pre><code>Title: Doctor's appointment
URL: https://hash-calendar.netlify.app/#/2026/04/20/15/00/Doctor's-appointment</code></pre>

          <div class="tip">
            Copy the prompt from this page and paste it into any LLM's system instructions to enable hash-calendar URL generation.
          </div>
          <p>
            View the source code and contribute on
            <a href="https://github.com/supunlakmal/hash-calendar" target="_blank" rel="noopener">GitHub</a>.
          </p>
        </section>
      </main>
    </div>
  </div>
</body>

</html>