Skip to content

Commit

Permalink
doc: Stylguide got its own dir in example
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Mar 4, 2015
1 parent 15a4b5d commit 8e609ef
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ packages
pubspec.lock
.sass-cache
lib/sass/*/*.css
.bs
3 changes: 3 additions & 0 deletions WskMaterial.iml
Expand Up @@ -43,6 +43,9 @@
<excludeFolder url="file://$MODULE_DIR$/example/slider/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/spinner/packages/wsk_material" />
<excludeFolder url="file://$MODULE_DIR$/example/spinner/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/styleguide/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/styleguide/packages/wsk_material" />
<excludeFolder url="file://$MODULE_DIR$/example/styleguide/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/switch/packages/wsk_material" />
<excludeFolder url="file://$MODULE_DIR$/example/switch/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/tabs/packages/wsk_material" />
Expand Down
2 changes: 1 addition & 1 deletion example/index.html
Expand Up @@ -37,7 +37,7 @@ <h1>Web Starter Kit - Material Design, Dart version</h1>

<div class="PreviewBlock">
<h2>WSK-Material</h2>
<ul><li><a href="styleguide.html">Styleguide</a> (takes a while - loads all other samples in iframes)</li></ul>
<ul><li><a href="styleguide/web/index.html">Styleguide</a> (takes a while - loads all other samples in iframes)</li></ul>
<h2>WSK-Material-Samples</h2>
<ol>
<li><a href="accordion/web/index.html">accordion/web/index.html</a><span class="script">[ with main.dart ]</span></li>
Expand Down
23 changes: 23 additions & 0 deletions example/styleguide/pubspec.yaml
@@ -0,0 +1,23 @@
name: wsk_material_styleguide
description: WSK Sample 'styleguide' - Material Design
version: 0.1.0
author: Mike Mitterer <office@mikemitterer.at>
homepage: https://github.com/MikeMitterer/dart-wsk-material

dependencies:
browser: any

intl: any
args: any
validate: any
browser_detect: any

logging: any
logging_handlers: any
console_log_handler: any
# path: /Volumes/Daten/DevLocal/DevDart/ConsoleLogHandler

wsk_material:
path: ../../


46 changes: 23 additions & 23 deletions example/styleguide.html → example/styleguide/web/index.html
Expand Up @@ -16,7 +16,7 @@
<meta name=msapplication-TileColor content=#3372DF>
<link href="//fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en"
rel=stylesheet type=text/css>
<link rel=stylesheet href=./styleguide.css>
<link rel=stylesheet href=styleguide.css>
</head>
<body class="loadingDemos">
<div class="wsk-layout wsk-js-layout wsk-layout--fixed-drawer wsk-styleguide">
Expand All @@ -28,74 +28,74 @@
<div class="loader">Wait! Loading more than 20 iframes...</div>

<div class=styleguide-demo><h1>Typography</h1>
<iframe src=./typography/web/index.html scrolling=no></iframe>
<iframe src=../../typography/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>List</h1>
<iframe src=./list/web/index.html scrolling=no></iframe>
<iframe src=../../list/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Palette</h1>
<iframe src=./palette/web/index.html scrolling=no></iframe>
<iframe src=../../palette/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Shadows</h1>
<iframe src=./shadow/web/index.html scrolling=no></iframe>
<iframe src=../../shadow/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Cards</h1>
<iframe src=./card/web/index.html scrolling=no></iframe>
<iframe src=../../card/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Animation</h1>
<iframe src=./animation/web/index.html scrolling=no></iframe>
<iframe src=../../animation/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Button</h1>
<iframe src=./button/web/index.html scrolling=no></iframe>
<iframe src=../../button/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Dropdown Menu</h1>
<iframe src=./dropdown-menu/web/index.html scrolling=no></iframe>
<iframe src=../../dropdown-menu/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Item</h1>
<iframe src=./item/web/index.html scrolling=no></iframe>
<iframe src=../../item/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Text Field</h1>
<iframe src=./textfield/web/index.html scrolling=no></iframe>
<iframe src=../../textfield/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Radio Buttons</h1>
<iframe src=./radio/web/index.html scrolling=no></iframe>
<iframe src=../../radio/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Checkbox</h1>
<iframe src=./checkbox/web/index.html scrolling=no></iframe>
<iframe src=../../checkbox/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Switch</h1>
<iframe src=./switch/web/index.html scrolling=no></iframe>
<iframe src=../../switch/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Accordion</h1>
<iframe src=./accordion/web/index.html scrolling=no></iframe>
<iframe src=../../accordion/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Icon Toggle</h1>
<iframe src=./icon-toggle/web/index.html scrolling=no></iframe>
<iframe src=../../icon-toggle/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Slider</h1>
<iframe src=./slider/web/index.html scrolling=no></iframe>
<iframe src=../../slider/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Spinner</h1>
<iframe src=./spinner/web/index.html scrolling=no></iframe>
<iframe src=../../spinner/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Layout</h1>
<iframe src=./layout/web/index.html scrolling=no></iframe>
<iframe src=../../layout/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Content Tabs</h1>
<iframe src=./tabs/web/index.html scrolling=no></iframe>
<iframe src=../../tabs/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Icons</h1>

<p>See the material-design-icons pack that can be installed in your node_modules directory after running
<code>npm install</code></p></div>
<div class=styleguide-demo><h1>Tooltip</h1>
<iframe src=./tooltip/web/index.html scrolling=no></iframe>
<iframe src=../../tooltip/web/index.html scrolling=no></iframe>
</div>
<div class=styleguide-demo><h1>Column Layout</h1>
<iframe src=./column-layout/web/index.html></iframe>
<iframe src=../../column-layout/web/index.html></iframe>
</div>
<div class=styleguide-demo><h1>Footer</h1>
<iframe src=./footer/web/index.html></iframe>
<iframe src=../../footer/web/index.html></iframe>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion example/main.dart → example/styleguide/web/main.dart
@@ -1,6 +1,7 @@
import 'dart:html' as html;
import "dart:async";
import 'dart:js';
import "dart:math" as Math;

import 'package:logging/logging.dart';
import 'package:console_log_handler/console_log_handler.dart';
Expand Down Expand Up @@ -42,7 +43,9 @@ void loadDemos() {

var jsIFrame = new JsObject.fromBrowserObject(iframe);
// contentDocument.documentElement is not implemented in Dart!!!!!
final int contentHeight = jsIFrame["contentDocument"]["documentElement"]["scrollHeight"];
int contentHeight = jsIFrame["contentDocument"]["documentElement"]["scrollHeight"];
// Durch den Loader stimmt die Höhe nicht mehr - default auf 4500!
contentHeight = Math.max(4500,contentHeight);

iframe.style.height = "${contentHeight * 1.2}px";
iframe.classes.add("heightSet");
Expand Down
File renamed without changes.
File renamed without changes.
23 changes: 0 additions & 23 deletions tools/gensamples.dart
Expand Up @@ -22,7 +22,6 @@ class Application {
static const _ARG_GENERATE = 'gen';
static const _ARG_MK_BACKUP = 'makebackup';
static const _ARG_SHOW_DIRS = 'showdirs';
static const _ARG_RSYNC = 'rsync';

ArgParser _parser;

Expand All @@ -47,9 +46,6 @@ class Application {
_logger.info(file.path);
});
}
else if(argResults[_ARG_RSYNC]) {
rsyncBuildExample();
}
else if(argResults[_ARG_GENERATE]) {
final List<_LinkInfo> links = new List<_LinkInfo>();
final List<String> foldersToExclude = config.folderstoexclude.split("[,;]");
Expand Down Expand Up @@ -162,24 +158,6 @@ class Application {
}
}

void rsyncBuildExample() {
_logger.info("RSync build/web...");

// rsync -avz -e ssh build/example/ bcadmin@vhost2.mikemitterer.at:/home/wskan82301/www/
Process.start("rsync", [ '-avz', '-e', 'ssh', 'build/example/', 'bcadmin@vhost2.mikemitterer.at:/home/wskmt81408/www/' ])
.then((final Process process) {

process.stdout.transform(UTF8.decoder).listen((final String data) {
_logger.info(data);
});

// Get the exit code from the new process.
process.exitCode.then((exitCode) {
_logger.info('Exit code: $exitCode'); // Prints 'exit code: 0'.
});

});
}

// -- private -------------------------------------------------------------
void _copySubdirs(final File sourceDir, final File targetDir, { int level: 0 } ) {
Expand Down Expand Up @@ -559,7 +537,6 @@ class Application {
..addFlag(_ARG_GENERATE, abbr: 'g', negatable: false, help: "Generate samples")
..addFlag(_ARG_MK_BACKUP, abbr: 'b', negatable: false, help: "Make backup")
..addFlag(_ARG_SHOW_DIRS, abbr: 'd', negatable: false, help: "Show source-Dirs")
..addFlag(_ARG_RSYNC, abbr: 'r', negatable: false, help: "RSync's build/example")

..addOption(_ARG_LOGLEVEL, abbr: 'v', help: "[ info | debug | warning ]")
;
Expand Down

0 comments on commit 8e609ef

Please sign in to comment.