Skip to content

Commit

Permalink
add icon support
Browse files Browse the repository at this point in the history
  • Loading branch information
chase authored and shanzi committed Apr 12, 2015
1 parent a33d7a5 commit 78c8062
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 28 deletions.
20 changes: 19 additions & 1 deletion www/md_base/guanlecoja/config.coffee
Expand Up @@ -5,7 +5,12 @@
### ###############################################################################################
ANGULAR_TAG = "~1.3.15"
ANGULAR_MATERIAL_TAG = "~0.8.3"
module.exports =

path = require 'path'
gulp = require 'gulp'
svgSymbols = require 'gulp-svg-symbols'

config =

### ###########################################################################################
# Directories
Expand Down Expand Up @@ -45,3 +50,16 @@ module.exports =
"angular-mocks":
version: "~1.3.15"
files: "angular-mocks.js"

buildtasks: ['scripts', 'styles', 'index', 'icons', 'tests']


gulp.task 'icons', ->
gulp.src(['src/icons/*.svg', '!src/icons/iconset.svg'])
.pipe(svgSymbols(
title: false
templates: ['src/icons/iconset.svg']
))
.pipe(gulp.dest(path.join(config.dir.build, 'icons')))

module.exports = config
15 changes: 8 additions & 7 deletions www/md_base/package.json
@@ -1,9 +1,10 @@
{
"version" : "0.1.0",
"devDependencies" : {
"guanlecoja" : "latest"
},
"name" : "md-base",
"dependencies" : {},
"description" : "md_base"
"version": "0.1.0",
"devDependencies": {
"guanlecoja": "latest",
"gulp-svg-symbols": "^0.3.1"
},
"name": "md-base",
"dependencies": {},
"description": "md_base"
}
5 changes: 5 additions & 0 deletions www/md_base/src/app/app.controller.coffee
@@ -0,0 +1,5 @@
class App extends Controller

constructor: ($scope)->
$scope.title = 'index'
$scope.subtitle = 'subtitle'
10 changes: 8 additions & 2 deletions www/md_base/src/app/app.module.coffee
Expand Up @@ -3,6 +3,12 @@ angular.module 'app', [
'ngAnimate',
'ngMaterial',
]
.config ($mdThemingProvider) ->
$mdThemingProvider.theme('default')
.primaryPalette('deep-purple')
.accentPalette('blue')
.warnPalette('orange')

.config ($mdIconProvider) ->
$mdIconProvider.defaultIconSet('/icons/iconset.svg', 512)

#angular.module('app').config [
#]
51 changes: 47 additions & 4 deletions www/md_base/src/app/index.jade
@@ -1,4 +1,47 @@
extends layout
block content
h1 Hello Material Design!
ui-view
doctype html
html(ng-app="app", ng-controller="appController")
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='initial-scale=1, minimum-scale=1, user-scalable=no, maximum-scale=1, width=device-width')

| {% raw %}
title(ng-bind-template="Buildbot | {{ title }}")
| {% endraw %}

link(rel='stylesheet', href='styles.css')

body(ng-cloak, flex, layout="row")
md-sidenav.md-sidenav-left.md-whiteframe-z2(
md-component-id="left",
md-is-locked-open="$mdMedia('gt-md')"
)
md-toolbar
h1.md-toolbar-tools Buildbot
md-content(flex, layout="column")
md-list
md-list-item
md-icon.md-avatar(md-svg-icon="home-outline")
div.md-list-item-text
h3 Home
md-list-item
md-icon.md-avatar(md-svg-icon="gear-outline")
div.md-list-item-text
h3 Build
md-list-item
md-icon.md-avatar(md-svg-icon="toggle-outline")
div.md-list-item-text
h3 Settings
md-list-item
md-icon.md-avatar(md-svg-icon="info-outline")
div.md-list-item-text
h3 Info
div(layout="column", role="main", flex)
md-toolbar
div.md-toolbar-tools(ng-bind="subtitle")
md-content.md-padding(flex)
h1 Hello buildbot!

script(src="scripts.js?_#{(new Date()).getTime()}")
script
| angular.module("app").constant("config", {{configjson|safe}})
14 changes: 0 additions & 14 deletions www/md_base/src/app/layout.jade

This file was deleted.

40 changes: 40 additions & 0 deletions www/md_base/src/icons/gear-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions www/md_base/src/icons/home-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions www/md_base/src/icons/iconset.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions www/md_base/src/icons/info-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions www/md_base/src/icons/toggle-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 78c8062

Please sign in to comment.