Skip to content

Commit 531c205

Browse files
committed
Improved UX
1 parent 2466598 commit 531c205

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

public/favicon.ico

35.7 KB
Binary file not shown.

public/icon.png

111 KB
Loading

public/index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<meta id="metaThemeColor" name="theme-color" content="#212531">
9-
<title>Document</title>
9+
<title>Codebox - Pastefy Codebox</title>
10+
<link rel="icon" type="image/x-icon" href="/favicon.ico">
11+
<link rel="shortcut icon" type="image/png" href="/icon.png">
12+
13+
<meta name="description" content="Pastefy Codebox is an easy Code-Playground built on top of Pastefy.">
14+
<meta property="og:site_name" content="Pastefy Codebox" />
15+
<meta property="og:locale" content="en_UK" />
16+
<meta property="og:type" content="website" />
17+
<meta property="og:title" content="Pastefy Codebox" />
18+
<meta property="og:description" content="Pastefy Codebox is an easy Code-Playground built on top of Pastefy." />
19+
<meta property="og:url" content="https://box.pastefy.app" />
20+
<meta property="og:site_name" content="Pastefy Codebox" />
21+
<meta name="twitter:card" content="summary_large_image" />
22+
<meta name="twitter:description" content="Pastefy Codebox is an easy Code-Playground built on top of Pastefy." />
23+
<meta name="twitter:title" content="Pastefy Codebox" />
24+
1025
<link rel="stylesheet" href="/index.css?v=1">
1126
</head>
1227
<body>

src/views/HomeView.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default class HomeView extends JDOMComponent.unshadowed {
3636

3737
render() {
3838
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', '#212531')
39+
document.title = 'Home - Pastefy Codebox'
3940

4041
if (user.value) {
4142
this.loadUserPastes()
@@ -119,6 +120,8 @@ export default class HomeView extends JDOMComponent.unshadowed {
119120
padding: 14px;
120121
cursor: pointer;
121122
width: 200px;
123+
background: #262B39;
124+
transition: 0.2s;
122125
123126
margin-right: 10px;
124127
margin-bottom: 10px;

src/views/editor/EditorView.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {computed, css, html, JDOMComponent, state} from 'jdomjs'
22

3-
import {Attribute, CustomElement, State} from 'jdomjs/src/decorators.ts'
3+
import {Attribute, Computed, CustomElement, State, Watch} from 'jdomjs/src/decorators.ts'
44
import { Awaiting, ForEach } from 'jdomjs/src/template/helper/components.js'
55
import {api, router} from "../../main.ts";
66
import { WebContainer } from '@webcontainer/api';
@@ -101,6 +101,7 @@ export default class EditorView extends JDOMComponent.unshadowed {
101101
this.paste.value = out
102102
this.pasteNameEdit.value = out.title
103103
this.loading.value = false
104+
document.title = `${out.title || 'Editor'} - Pastefy Codebox`
104105
}
105106

106107
getFile(name) {
@@ -137,6 +138,7 @@ export default class EditorView extends JDOMComponent.unshadowed {
137138
}
138139
this.savedIndicator.value = true
139140
setTimeout(() => this.savedIndicator.value = false, 3000)
141+
document.title = `${this.paste.value?.title || 'Editor'} - Pastefy Codebox`
140142
}
141143

142144
async initWebContainer() {
@@ -231,6 +233,8 @@ export default class EditorView extends JDOMComponent.unshadowed {
231233

232234
render() {
233235
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', '#1c202a')
236+
document.title = 'Editor - Pastefy Codebox'
237+
234238
this.frame = document.createElement('iframe')
235239
const termDiv = document.createElement('div')
236240
termDiv.classList.add('terminal')

0 commit comments

Comments
 (0)