-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
282 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,33 @@ | ||
| <template> | ||
| <div class="page-host"> | ||
| <router-view></router-view> | ||
| <require from='./cmeditor'></require> | ||
|
|
||
| <div class="navbar navbar-fixed-top"><div class="navbar-inner"> | ||
| <ul class="nav"> | ||
| <li class="brand"><a href="/">LESS2CSS</a></li> | ||
| <li class="divider-vertical"></li> | ||
| <li class="less-options"><a href="#" ng-click="toggleDrawer($event)">Options</a></li> | ||
| <li class="divider-vertical"></li> | ||
| <li class="option-info"><span>LESS Version: <code class="">${lessVersion}</code></span></li> | ||
| </ul> | ||
| </div></div> | ||
|
|
||
| <div class="au-animate main"> | ||
| <div class="cm-less"> | ||
| <div class="code-wrap left"> | ||
| <h2 class="code-label left">LESS</h2> | ||
| <cmeditor value.two-way="lessSrc" /> | ||
| </div> | ||
| </div> | ||
| <div class="cm-css"> | ||
| <div class="code-wrap right"> | ||
| <h2 class="code-label right">CSS</h2> | ||
| <cmeditor readonly="true" value.bind="css" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <footer class="page-footer"> | ||
| <p> | ||
| © 2015 Luke Page, Brian Frichette & Contributors. License <a href="http://opensource.org/licenses/MIT" target="_blank">MIT</a>.</p> | ||
| <p class="small">Special thanks for the Open Source technologies that made building this site a pleasure: <a href="http://lesscss.org/" target="_blank">LESS</a>, <a href="http://twitter.github.com/bootstrap/" target="_blank">Twitter Bootstrap</a>, <a href="http://codemirror.net/" target="_blank">CodeMirror</a>, <a href="http://http://aurelia.io/" target="_blank">Aurelia</a>.</p></footer> | ||
|
|
||
| </template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,20 @@ | ||
| import less from './less'; | ||
| import 'bootstrap'; | ||
|
|
||
| export class App { | ||
| configureRouter(config, router){ | ||
| config.title = 'less2css'; | ||
| config.map([ | ||
| { route: [''], moduleId: './main', nav: true, title:'' } | ||
| ]); | ||
|
|
||
| this.router = router; | ||
| export class Main { | ||
| constructor() { | ||
| const lessVersions = less.getVersions(); | ||
| this.lessVersion = lessVersions[lessVersions.length - 1]; | ||
| less.loadVersion(this.lessVersion); | ||
| } | ||
| get lessSrc() { | ||
| return this._lessSrc; | ||
| } | ||
| set lessSrc(value) { | ||
| this._lessSrc = value; | ||
| less.convert(value) | ||
| .then((cssResp) => { | ||
| this.css = cssResp.css; | ||
| }); | ||
| } | ||
| } |
Oops, something went wrong.