Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update metaljs.com for use with Electric v3.0.0 #361

Closed
wants to merge 1 commit into from
Closed
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
2,540 changes: 1,709 additions & 831 deletions packages/metaljs.com/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/metaljs.com/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"start": "electric"
},
"devDependencies": {
"electric-cli": "^2.2.0",
"electric-marble-components": "^3.0.3",
"electric-cli": "^3.0.0",
"electric-marble-components": "^4.0.0",
"marble": "^3.1.4",
"metal-toggler": "^2.0.0",
"metal-toggler": "^3.1.0",
"moment": "^2.19.2"
}
}
8 changes: 0 additions & 8 deletions packages/metaljs.com/src/layouts/base.soy
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
* @param page
* @param serialized
* @param site
* @param? scripts
*/
{template .render private="true"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Expand Down Expand Up @@ -44,12 +42,6 @@
<!-- endinject -->
</div>

{if $scripts}
{foreach $script in $scripts}
<script src="{$script}"></script>
{/foreach}
{/if}

<!-- inject:vendor:js -->
<!-- endinject -->
</body>
Expand Down
20 changes: 8 additions & 12 deletions packages/metaljs.com/src/pages/docs/guides/index.soy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Guides"
url: "/docs/guides/alias.html"
icon: "streams"
weight: 2
layout: false
---

{namespace pageDocsGuidesIndex}
Expand All @@ -11,17 +12,12 @@ weight: 2
*
*/
{template .render}
{/template}
{@param page: ?}

/**
* @param page
*/
{template .soyweb}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
{/template}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: "Learn to create a simple Todo App with Metal.js and JSX."
icon: "menu"
tutorialTitle: "Learn to create a simple Todo App with Metal.js and JSX"
url: "/docs/tutorials/tutorial-todo-jsx/before-we-start.html"
layout: false
---

{namespace pageTutorialTodoJSX}
Expand All @@ -12,17 +13,12 @@ url: "/docs/tutorials/tutorial-todo-jsx/before-we-start.html"
*
*/
{template .render}
{/template}
{@param page: ?}

/**
* @param page
*/
{template .soyweb}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
{/template}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
{/template}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: "Learn to create a simple Todo App with Metal.js and Soy."
icon: "menu"
tutorialTitle: "Learn to create a simple Todo App with Metal.js and Soy"
url: "/docs/tutorials/tutorial-todo-soy/before-we-start.html"
layout: false
---

{namespace pageTutorialTodoSoy}
Expand All @@ -12,17 +13,12 @@ url: "/docs/tutorials/tutorial-todo-soy/before-we-start.html"
*
*/
{template .render}
{/template}
{@param page: ?}

/**
* @param page
*/
{template .soyweb}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
{/template}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; URL='{$page.url}'">
</head>
</html>
{/template}
2 changes: 1 addition & 1 deletion packages/metaljs.com/src/partials/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Component from 'metal-component';
import Soy from 'metal-soy';
import Toggler from 'metal-toggler';

import templates from './Sidebar.soy';
import templates from './Sidebar.soy.js';

class Sidebar extends Component {
attached() {
Expand Down
7 changes: 6 additions & 1 deletion packages/metaljs.com/src/partials/TutorialTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ import Component from 'metal-component';
import Soy from 'metal-soy';
import moment from 'moment';
import {addClasses, hasClass} from 'metal-dom';
import {isServerSide} from 'metal';

import templates from './TutorialTimer.soy';
import templates from './TutorialTimer.soy.js';

class TutorialTimer extends Component {
attached() {
if (isServerSide()) {
return;
}

this.time = this.calculateTimeRemaining();
}

Expand Down