Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ eXeLearning (see `RESEARCH.md`, *Path to eXeLearning core*).
- **Untrusted input:** ZIPs from the editor go through `readElpx` (path and size limits);
paths through `isSafePath`.
- Use plain browser APIs and minimal dependencies (runtime: `fflate` only). No frameworks.
- English for code, comments and docs. UI strings live in `src/app/i18n.ts`, in English and
Spanish.
- English for code, comments and docs. UI strings live in `src/app/i18n.ts`, in the editor's
languages (en, es, ca, eu, gl, de); English is the default, the browser language picks the rest.

## Layout

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eXeLearning · GitHub
# eXeLearning for GitHub

[![CI](https://github.com/exelearning/github-exelearning/actions/workflows/ci.yml/badge.svg)](https://github.com/exelearning/github-exelearning/actions/workflows/ci.yml)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](LICENSE)
Expand Down
90 changes: 58 additions & 32 deletions public/app.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
:root {
color-scheme: light;
--accent: #00a99d;
--accent-ink: #00756d; /* 4.5:1 for text and button labels */
--ink: #1f2937;
--muted: #6b7280;
--line: #e5e7eb;
--accent: #00665f; /* 6.9:1 on white: buttons, links, focus */
--accent-ink: #00665f;
--accent-soft: #e3f1ef;
--ink: #1c2321;
--muted: #5f6966;
--line: #e3e7e6;
--ground: #f7f8f8;
font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); }
body { display: flex; flex-direction: column; }
[hidden] { display: none !important; }

button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; cursor: pointer; }
button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; cursor: pointer; }
#save, button.github, #footer a { display: inline-flex; align-items: center; gap: 8px; }
button.github { background: #24292f; border-color: #24292f; color: #fff; font-weight: 600; }
button.github:hover { background: #32383f; }
.muted { color: var(--muted); }
#footer { margin: 48px 0 24px; font-size: 12px; color: var(--muted); }
#footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 56px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
#footer a { gap: 4px; color: inherit; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
input { font: inherit; padding: 7px 10px; border: 1px solid #cfd6d4; border-radius: 8px; min-width: 0; background: #fff; color: inherit; }

#bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
#bar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 700; color: inherit; text-decoration: none; }
#repo-link { color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#repo-link:hover { text-decoration: underline; }
#site-link { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; color: inherit; text-decoration: none; white-space: nowrap; }
#site-link:hover { background: #f3f4f6; }
#site-link[hidden] { display: none; }
#status { color: var(--muted); white-space: nowrap; }
#status.dirty { color: #b45309; }
#status.dirty { color: #8a4a00; }
#status.dirty::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #d97706; vertical-align: 1px; }
.spacer { flex: 1; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 4px 10px; border-radius: 6px; font-size: 18px; line-height: 1; }
Expand All @@ -46,11 +50,35 @@ input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-
#editor { flex: 1; min-height: 0; }
#editor iframe { display: block; width: 100%; height: 100%; border: 0; }

#landing { width: 100%; max-width: 640px; margin: 12vh auto 0; padding: 0 20px; }
#landing h1 { display: flex; align-items: center; gap: 10px; font-size: 28px; }
#landing .row { display: flex; gap: 8px; margin-top: 6px; }
#landing .row input { flex: 1; }
#message { color: #b91c1c; min-height: 1.4em; }
#landing { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; font-size: 15px; }
.site-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 20px 0; }
.site-head .brand { gap: 10px; font-weight: 600; }
.site-head .brand span { color: var(--muted); font-weight: 400; }
.site-head nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }
.pill { font-size: 12px; font-weight: 500; color: #8a4a00; background: #fdf1e3; border: 1px solid #f2d6b3; border-radius: 999px; padding: 2px 10px; }
.hero { max-width: 680px; padding: 40px 0 8px; }
.hero h1 { margin: 0 0 16px; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -0.02em; }
.hero p { margin: 0; font-size: 18px; line-height: 1.55; color: #4b5552; }
#landing.wide .hero, #landing.wide #how, #landing.wide #how-link { display: none; }
#message:empty { min-height: 0; margin: 8px 0; }
#open-form.compact .row { flex-wrap: nowrap; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.panel h2 { margin: 0; font-size: 18px; }
.panel p { margin: 0; line-height: 1.55; }
#landing .row { display: flex; flex-wrap: wrap; gap: 8px; }
#landing .row input { flex: 1 1 220px; min-height: 44px; padding: 0 14px; }
#landing .row button { min-height: 44px; padding: 0 22px; }
.how { margin-top: 56px; }
.how h2 { margin: 0 0 20px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.how ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.how li { display: flex; gap: 14px; padding-top: 16px; border-top: 1px solid #dfe4e3; }
.how li div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.5; color: #4b5552; }
.how li strong { font-size: 15px; color: var(--ink); }
.num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
#message { color: #b91c1c; min-height: 1.4em; margin: 24px 0 8px; }
#message.busy { color: var(--muted); }
.busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
Expand All @@ -76,34 +104,32 @@ button.info { display: inline-flex; border: 0; padding: 4px; background: none; c
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 8px 0 0; }

#toast { position: fixed; right: 16px; bottom: 16px; max-width: 420px; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 8px; box-shadow: 0 8px 24px #0003; z-index: 20; }
#toast a { color: #6ee7d8; margin-left: 8px; }
#toast a { color: #7fe0d2; margin-left: 8px; }
#toast button { margin-left: 8px; }

body.callback { display: grid; place-items: center; color: var(--muted); }

#mine h2 { font-size: 18px; margin: 32px 0 2px; }
#landing.wide { max-width: 960px; }
#mine h2 { font-size: 28px; letter-spacing: -0.01em; margin: 16px 0 4px; }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; color: var(--muted); }
button.link { border: 0; padding: 0; background: none; color: var(--accent); text-decoration: underline; }
dialog fieldset { border: 0; padding: 0; margin: 0 0 8px; }
dialog fieldset { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0 0 8px; }
dialog fieldset .check { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
dialog fieldset .check:has(input:checked) { border-color: var(--accent); background: #f2f8f7; }
dialog input[type=radio], dialog input[type=checkbox] { accent-color: var(--accent); }
dialog { border-radius: 14px; padding: 24px; }
#pages-dialog ol { padding-left: 20px; }
#pages-dialog li { margin-bottom: 8px; }
#pages-dialog a { color: var(--accent); }

.signin-card { margin-top: 28px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 14px; }
.signin-card h2 { margin: 0 0 6px; font-size: 17px; }
.signin-card p { margin: 0 0 14px; line-height: 1.5; }
.signin-card p:last-child { margin: 0; }
button.github { min-height: 44px; padding: 0 18px; font-size: 15px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 20px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#open-form label { font-weight: 600; }
#open-form .hint { font-size: 13px; margin: 8px 0 0; }
#open-form.compact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; font-size: 13px; color: var(--muted); }
button.github { min-height: 44px; padding: 0 20px; font-size: 15px; }
#signin-card .muted { flex: 1; }
#open-form label { font-size: 14px; font-weight: 500; color: #4b5552; }
#open-form .hint { font-size: 13px; }
#open-form.compact { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; padding: 0; background: none; border: 0; font-size: 13px; color: var(--muted); }
#open-form.compact label { font-weight: normal; }
#open-form.compact .row { margin: 0; }
#open-form.compact input { width: 260px; font-size: 13px; padding: 6px 10px; }
#open-form.compact button { font-size: 13px; padding: 6px 12px; background: #fff; color: var(--ink); border-color: var(--line); font-weight: normal; }
#landing #open-form.compact input { flex: 0 1 260px; min-height: 36px; font-size: 13px; padding: 6px 10px; }
#landing #open-form.compact button { min-height: 36px; font-size: 13px; padding: 6px 12px; background: #fff; color: var(--ink); border-color: var(--line); font-weight: normal; }
#open-form.compact .hint { display: none; }
.resources-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.resources-head p { margin: 0; }
Expand Down Expand Up @@ -137,7 +163,7 @@ button.github { min-height: 44px; padding: 0 18px; font-size: 15px; }
.card .actions { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.card .actions a { color: var(--accent-ink); }
a.button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 8px; background: var(--accent-ink); color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; }
a.button:hover { background: #00524c; }
a.button:hover { background: #004f49; }
li.searching { color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; min-height: 120px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; }
.list li.searching { min-height: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; justify-content: flex-start; }
#other-repos { margin-top: 20px; font-size: 14px; color: var(--muted); }
Expand Down
2 changes: 1 addition & 1 deletion public/auth/callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>eXeLearning · GitHub</title>
<title>eXeLearning for GitHub</title>
<link rel="stylesheet" href="/app.css">
</head>
<body class="callback">
Expand Down
58 changes: 39 additions & 19 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>eXeLearning · GitHub</title>
<title>eXeLearning for GitHub</title>
<meta name="description" content="Edit eXeLearning resources stored on GitHub and save them back to the repository.">
<link rel="icon" href="/editor/favicon.ico">
<link rel="stylesheet" href="/app.css">
Expand Down Expand Up @@ -33,24 +33,36 @@
</header>

<main id="landing">
<h1><img src="/editor/exelearning.png" alt="" width="40" height="40"> eXeLearning · GitHub</h1>
<p id="tagline"></p>
<header class="site-head">
<a class="brand" href="/"><img src="/editor/exelearning.png" alt="" width="24" height="24">eXeLearning <span>for GitHub</span></a>
<nav>
<a href="#how" id="how-link"></a>
<a href="https://github.com/exelearning/github-exelearning" target="_blank" rel="noopener"><span id="source-label"></span></a>
<span class="pill" id="experimental"></span>
</nav>
</header>
<section class="hero">
<h1 id="headline"></h1>
<p id="tagline"></p>
</section>
<p id="message" role="alert"></p>
<ul id="candidates"></ul>
<section id="signin-card" class="signin-card" hidden>
<h2 id="see-all"></h2>
<p class="muted" id="see-all-hint"></p>
<p><button type="button" id="signin" class="github"><svg width="18" height="18" aria-hidden="true"><use href="#github-mark"/></svg><span id="signin-label"></span></button></p>
</section>
<div class="divider" id="divider" hidden><span id="or-open"></span></div>
<form id="open-form">
<label for="repo-input" id="repo-label"></label>
<div class="row">
<input id="repo-input" name="repo" placeholder="owner/repository" required autocomplete="off" spellcheck="false">
<button class="primary" id="open-button"></button>
</div>
<p class="muted hint" id="open-hint"></p>
</form>
<div class="choices" id="choices">
<section id="signin-card" class="panel" hidden>
<h2 id="see-all"></h2>
<p class="muted" id="see-all-hint"></p>
<p><button type="button" id="signin" class="github"><svg width="18" height="18" aria-hidden="true"><use href="#github-mark"/></svg><span id="signin-label"></span></button></p>
</section>
<form id="open-form" class="panel">
<h2 id="divider" hidden><span id="or-open"></span></h2>
<label for="repo-input" id="repo-label"></label>
<div class="row">
<input id="repo-input" name="repo" placeholder="owner/repository" required autocomplete="off" spellcheck="false">
<button class="primary" id="open-button"></button>
</div>
<p class="muted hint" id="open-hint"></p>
</form>
</div>
<section id="mine">
<div id="repos-box" hidden>
<div class="resources-head">
Expand All @@ -71,9 +83,17 @@ <h2 id="repos-title"></h2>
<p class="links"><button type="button" class="link" id="more-access"></button> · <button type="button" class="link" id="logout-landing"></button></p>
</div>
</section>
<section id="how" class="how">
<h2 id="how-title"></h2>
<ol>
<li><span class="num">1</span><div><strong id="step1-title"></strong><span id="step1-text"></span></div></li>
<li><span class="num">2</span><div><strong id="step2-title"></strong><span id="step2-text"></span></div></li>
<li><span class="num">3</span><div><strong id="step3-title"></strong><span id="step3-text"></span></div></li>
</ol>
</section>
<footer id="footer">
<span id="experimental"></span> ·
<a href="https://github.com/exelearning/github-exelearning" target="_blank" rel="noopener"><svg width="12" height="12" aria-hidden="true"><use href="#github-mark"/></svg><span id="source-label"></span></a>
<span id="footer-note"></span>
<span>AGPL-3.0 · <a href="https://github.com/exelearning/github-exelearning" target="_blank" rel="noopener"><svg width="12" height="12" aria-hidden="true"><use href="#github-mark"/></svg>exelearning/github-exelearning</a></span>
</footer>
</main>

Expand Down
2 changes: 1 addition & 1 deletion public/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>eXeLearning · GitHub App setup</title>
<title>eXeLearning for GitHub · App setup</title>
<link rel="stylesheet" href="/app.css">
</head>
<body>
Expand Down
Loading