Skip to content

Commit e129cb5

Browse files
committed
Clean up
1 parent 10788fa commit e129cb5

4 files changed

Lines changed: 47 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Thumbs.db
1818
# Editor
1919
.idea/
2020
.vscode/
21+
.claude/
2122
*.swp
2223
*.swo
2324

client/src/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ function getSavedTheme() {
4040
return localStorage.getItem('codebox_theme') || 'system'
4141
}
4242

43+
// Branding: set to false to hide the "Powered by Codebox" message
44+
const SHOW_BRANDING = true
45+
4346
function saveTheme(theme) {
4447
localStorage.setItem('codebox_theme', theme)
4548
}
@@ -521,6 +524,15 @@ function attachThemeToggle() {
521524
}
522525
}
523526

527+
function createBranding() {
528+
if (!SHOW_BRANDING) return ''
529+
return `
530+
<div class="branding">
531+
Powered by <a href="https://github.com/aapeliv/codebox" target="_blank">Codebox</a> by <a href="https://www.aapelivuorinen.com/" target="_blank">Aapeli</a>
532+
</div>
533+
`
534+
}
535+
524536
function startEditor(slug, token, canEdit, userName) {
525537
const app = document.getElementById('app')
526538

@@ -539,6 +551,7 @@ function startEditor(slug, token, canEdit, userName) {
539551
</div>
540552
</header>
541553
<div id="editor"></div>
554+
${createBranding()}
542555
`
543556

544557
attachThemeToggle()

client/src/styles.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,36 @@ button:disabled {
167167
width: 100%;
168168
}
169169

170+
/* ============ Branding ============ */
171+
172+
.branding {
173+
position: fixed;
174+
bottom: 12px;
175+
right: 12px;
176+
font-size: 11px;
177+
color: var(--text-muted);
178+
background: var(--bg-secondary);
179+
padding: 6px 10px;
180+
border-radius: 4px;
181+
opacity: 0.7;
182+
transition: opacity 0.2s ease;
183+
z-index: 100;
184+
}
185+
186+
.branding:hover {
187+
opacity: 1;
188+
}
189+
190+
.branding a {
191+
color: var(--text-secondary);
192+
text-decoration: none;
193+
}
194+
195+
.branding a:hover {
196+
text-decoration: underline;
197+
}
198+
199+
170200
/* ============ Auth / Join Forms ============ */
171201

172202
.auth-container, .home-container {

readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# codebox
1+
# Codebox
2+
3+
**Note:** this repo was built by and large with Claude, and builds off of the [Yjs Demos](https://github.com/yjs/yjs-demos) Monaco demo (public domain).

0 commit comments

Comments
 (0)