Spaces:
Sleeping

File size: 2,782 Bytes
34b8916
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>marimo WebAssembly + GitHub Pages Template</title>
  <!-- Include Tailwind CSS via CDN -->
  <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="font-sans text-gray-800 bg-white p-5">    
  <div class="max-w-4xl mx-auto">
    <!-- Header -->
    <header class="bg-gray-100 p-6 text-center rounded-lg mb-6">
      <img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo Logo" class="w-20 h-auto mx-auto mb-3">
      <h1 class="text-2xl font-bold mb-2">marimo WebAssembly + GitHub Pages Template</h1>
      <p class="text-sm">Interactive Python notebooks exported to WebAssembly and deployed to GitHub Pages</p>
    </header>

    <main>
      {% if notebooks %}
      <h2 class="text-xl font-bold text-center my-4">Notebooks</h2>
      <p class="text-center mb-4">Interactive notebooks in edit mode - you can modify and experiment with the code</p>
      <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-8">
        {% for notebook in notebooks %}
        <!-- {{ notebook.display_name }} Notebook -->
        <div class="bg-gray-50 border border-gray-200 rounded-lg overflow-hidden">
          <div class="bg-gray-200 p-3 font-semibold">{{ notebook.display_name }}</div>
          <div class="p-4">
            <a href="{{ notebook.html_path }}" class="inline-block bg-blue-500 hover:bg-blue-600 text-white py-1 px-3 rounded transition-colors">Open Notebook</a>
          </div>
        </div>
        {% endfor %}
      </div>
      {% endif %}

      {% if apps %}
      <h2 class="text-xl font-bold text-center my-4">Apps</h2>
      <p class="text-center mb-4">Interactive applications in run mode - code is hidden for a clean user interface</p>
      <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
        {% for app in apps %}
        <!-- {{ app.display_name }} App -->
        <div class="bg-gray-50 border border-gray-200 rounded-lg overflow-hidden">
          <div class="bg-gray-100 p-3 font-semibold">{{ app.display_name }}</div>
          <div class="p-4">
            <a href="{{ app.html_path }}" class="inline-block bg-amber-500 hover:bg-amber-600 text-white py-1 px-3 rounded transition-colors">Open App</a>
          </div>
        </div>
        {% endfor %}
      </div>
      {% endif %}
    </main>

    <footer class="mt-10 pt-6 border-t border-gray-200 text-center text-sm text-gray-600">
      <p class="mb-2">Built with <a href="https://marimo.io" target="_blank" class="text-blue-500 hover:underline">marimo</a> - Interactive Python notebooks</p>
    </footer>
  </div>
</body>
</html>