diff --git a/public/index.jade b/public/index.jade index 8a7653dd80..d64acbcfb7 100644 --- a/public/index.jade +++ b/public/index.jade @@ -1,6 +1,6 @@ .grid-fluid.l-space-bottom-8 .c7 - h3.text-headline Build Incredible Applications + h3.text-headline Build Incredible Applications p.text-body Angular is a development platform for creating applications using modern web standards. Angular includes a wealth of essential features such as mobile gestures, animations, filtering, routing, data binding, security, internationalization, and beautiful UI components. It's extremely modular, lightweight, and easy to learn. .c5.text-center img(src="/resources/images/logos/html5/html5.png" alt="Modern Web Standards") @@ -11,17 +11,16 @@ h3.text-headline Start Quick, Build Fast p.text-body Express your ideas with clean, understandable code. Angular is simple to build on, easy to change, and friendly to the way UX designers work. Create a UI that is beautiful by default, with material design and support for web components. Angular takes just minutes to learn. .c6 - pre.prettyprint.linenums.is-showcase - code. - @Component({selector: 'my-app'}) - @View({template: '<h1>Hi {{ name }}</h1>'}) + code-example(language="javascript" format="linenums" showcase="true"). + @Component({selector: 'my-app'}) + @View({template: '<h1>Hi {{ name }}</h1>'}) - // Component controller - class MyAppComponent { - constructor() { - this.name = 'Ali'; - } + // Component controller + class MyAppComponent { + constructor() { + this.name = 'Ali'; } + } .grid-fluid.l-space-bottom-8 .c7 diff --git a/public/resources/js/directives/code-example.js b/public/resources/js/directives/code-example.js index d279203141..05fc80ff7e 100644 --- a/public/resources/js/directives/code-example.js +++ b/public/resources/js/directives/code-example.js @@ -11,7 +11,9 @@ angularIO.directive('codeExample', function() { compile: function(tElement, attrs) { var html = (attrs.escape === "html") ? _.escape(tElement.html()) : tElement.html(); - var template = '
' +
+      var classes = 'prettyprint ' + attrs.format + ' lang-' + attrs.language +
+          (attrs.showcase === 'true' ? ' is-showcase' : '');
+      var template =  '
' +
                       '' + html + '' +
                       '
';