Skip to content
Permalink
Browse files

Add a welcome screen

  • Loading branch information...
thesephist committed Apr 8, 2019
1 parent e8f5a92 commit 7d36f5fce34f71551e237dbbdafd5de399f0192b
Showing with 292 additions and 234 deletions.
  1. +92 −88 docs/src/index.js.html
  2. +94 −93 docs/src/models.js.html
  3. +57 −52 docs/static/js/main.js.html
  4. +4 −0 src/index.js
  5. +1 −0 src/models.js
  6. +38 −0 starter_fixtures/welcome.html
  7. +1 −1 static/index.html
  8. +5 −0 static/js/main.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -20,7 +20,11 @@ const CONTENT_TYPES = {
// STATIC ASSETS
const STATIC_PATHS = {
'/': 'index.html',

// Editor alias routes
'/new': 'editor.html',
'/welcome': 'editor.html',

'/favicon.ico': 'assets/favicon.ico',
'/h/:htmlFrameHash/j/:jsFrameHash/edit': 'editor.html',
}
@@ -26,6 +26,7 @@ const STARTER_FIXTURES = [
'nametag-torus.js',
'see-javascript.html',
'todo-torus.js',
'welcome.html',
];

//> Utility method to get a trimmed sha256 hash of a string.
@@ -0,0 +1,38 @@
<style>
body {
font-family: system-ui, sans-serif;
width: 96%;
max-width: 600px;
margin: 0 auto;
}
p {
line-height: 1.5em;
}
</style>

<h1>Welcome to Codeframe! 👋</h1>

<p>Start building something awesome, right here.</p>

<p>
New to web development?
Check out
<a href="https://zerotocode.org" target="_blank">
Zero to Code</a>!
</p>

<h2>What's Codeframe?</h2>

<p>
Codeframe is a code editor for the web,
built on the web to be simple, approachable,
fast, and lightweight. Try editing the HTML and
JavaScript code in the code panel and see
how the preview changes.
</p>

<p>
You can also hit the <strong>Save &amp; Reload</strong>
button to save what you've made and share the preview
with anyone in the world, with just a link.
</p>
@@ -71,7 +71,7 @@ <h2>Try it live!</h2>
</p>
<div class="liveEditorContainer fixed button">
<!-- Update this later to be a simple but intuitive demo of Codeframe -->
<iframe src="/h/ea9b2d072562/j/e3b0c44298fc/edit?from=trial" frameborder="0" class="liveEditor"></iframe>
<iframe src="/welcome?from=trial" frameborder="0" class="liveEditor"></iframe>
</div>
</div>
</section>
@@ -817,6 +817,10 @@ class App extends StyledComponent {
liveRenderMarkup: null,
});
break;
case 'welcome':
//> This is a predetermined URL that points to the welcome Codeframe.
router.go('/h/34257cad6ac3/j/e3b0c44298fc/edit');
break;
default:
{
//> If there are prefilled HTML and JavaScript values provided
@@ -866,6 +870,7 @@ const prefilledValues = {

const router = new Router({
edit: '/h/:htmlFrameHash/j/:jsFrameHash/edit',
welcome: '/welcome',
default: '/new',
});

0 comments on commit 7d36f5f

Please sign in to comment.
You can’t perform that action at this time.