diff --git a/README.md b/README.md index 9dd2810..82b947d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Grunt plugin to create a documentation like [AngularJS](http://docs.angularjs.org) NOTE: this plugin requires Grunt 0.4.x +ATTENTION: grunt-ngdocs 0.2+ is for angularjs 1.2+ +If you use on older version stay with grunt-ngdocs 0.1+ +Please clear your old docs js and css folders after upgrade. + ##Getting Started From the same directory as your project's Gruntfile and package.json, install this plugin with the following command: @@ -116,10 +120,6 @@ Wraps the navbar image in an anchor tag with the provided URL. The best matching page for a search query is highlighted and get selected on return. If this option is set to true the best match is shown below the search field in an dropdown menu. Use this for long lists where the highlight is often not visible. -####animation -[default] 'false' or 'true' for the included angularjs, angularjs 1.1.5+ from CDN or a folder like /vendor/angular-1.1.5/angular.js. -Set to 'true' to enable animations in the sidebar. - ####navTemplate [default] null Path to a template of a nav HTML template to include. The css for it diff --git a/src/templates/css/animations.css b/src/templates/css/animations.css index 1f5bb95..678d9ff 100644 --- a/src/templates/css/animations.css +++ b/src/templates/css/animations.css @@ -1,32 +1,20 @@ -.reveal { - -webkit-transition:1s linear all; - -moz-transition:1s linear all; - -o-transition:1s linear all; - transition:1s linear all; - - opacity:0; -} -.reveal.reveal-active { - opacity:1; -} - -.slide-reveal { +.slide-reveal.ng-enter { -webkit-transition:0.5s linear all; -moz-transition:0.5s linear all; -o-transition:0.5s linear all; transition:0.5s linear all; - opacity:0.5; + opacity:0.5; position:relative; opacity:0; top:10px; } -.slide-reveal.slide-reveal-active { +.slide-reveal.ng-enter-active { top:0; opacity:1; } -.expand-enter { +.expand.ng-enter { -webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; @@ -36,12 +24,12 @@ max-height:0; overflow:hidden; } -.expand-enter.expand-enter-active { +.expand.ng-enter-active { opacity:1; max-height:40px; } -.expand-leave { +.expand.ng-leave { -webkit-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -moz-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; -o-transition:0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940) all; @@ -51,26 +39,7 @@ max-height:40px; overflow:hidden; } -.expand-leave.expand-leave-active { +.expand.ng-leave-active { opacity:0; max-height:0; } - -.example-animate-container { - position:relative; - background:white; - border:1px solid black; - height:40px; - overflow:hidden; -} - -.example-animate-container > div { - padding:1em; -} - -.animator-container.animations-off * { - -webkit-transition: none; - -moz-transition: none; - -o-transition: color 0 ease-in; /* opera is special :) */ - transition: none; -} diff --git a/src/templates/css/doc_widgets.css b/src/templates/css/doc_widgets.css index b0348b2..587d5a7 100644 --- a/src/templates/css/doc_widgets.css +++ b/src/templates/css/doc_widgets.css @@ -15,7 +15,7 @@ ul.doc-example > li { ul.doc-example > li.doc-example-heading { border: none; - border-radius: none; + border-radius: 0; margin-bottom: -10px; } diff --git a/src/templates/css/prettify.css b/src/templates/css/prettify.css new file mode 100644 index 0000000..16e0caf --- /dev/null +++ b/src/templates/css/prettify.css @@ -0,0 +1,51 @@ +.pln { color: #000 } /* plain text */ + +@media screen { + .str { color: #080 } /* string content */ + .kwd { color: #008 } /* a keyword */ + .com { color: #800 } /* a comment */ + .typ { color: #606 } /* a type name */ + .lit { color: #066 } /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + .pun, .opn, .clo { color: #660 } + .tag { color: #008 } /* a markup tag name */ + .atn { color: #606 } /* a markup attribute name */ + .atv { color: #080 } /* a markup attribute value */ + .dec, .var { color: #606 } /* a declaration; a variable name */ + .fun { color: red } /* a function name */ +} + +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { color: #060 } + .kwd { color: #006; font-weight: bold } + .com { color: #600; font-style: italic } + .typ { color: #404; font-weight: bold } + .lit { color: #044 } + .pun, .opn, .clo { color: #440 } + .tag { color: #006; font-weight: bold } + .atn { color: #404 } + .atv { color: #060 } +} + +pre.prettyprint { + padding: 8px; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} +pre.prettyprint.linenums { + -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; +} +ol.linenums { + margin: 0 0 0 33px; /* IE indents via margin-left */ +} +ol.linenums li { + padding-left: 12px; + font-size:12px; + color: #bebec5; + line-height: 18px; + text-shadow: 0 1px 0 #fff; + list-style-type:decimal!important; +} diff --git a/src/templates/index.tmpl b/src/templates/index.tmpl index 3b23cb5..d50b8cc 100644 --- a/src/templates/index.tmpl +++ b/src/templates/index.tmpl @@ -26,6 +26,7 @@ addTag('base', {href: baseUrl}); addTag('link', {rel: 'stylesheet', href: 'css/bootstrap.min.css', type: 'text/css'}); addTag('link', {rel: 'stylesheet', href: 'css/font-awesome.css', type: 'text/css'}); + addTag('link', {rel: 'stylesheet', href: 'css/prettify.css', type: 'text/css'}); addTag('link', {rel: 'stylesheet', href: 'css/docs.css', type: 'text/css'}); addTag('link', {rel: 'stylesheet', href: 'css/animations.css', type: 'text/css'}); <% _.forEach(styles, function(url) { %> @@ -34,8 +35,10 @@ <% _.forEach(scripts, function(url) { %> addTag('script', {src: '<%= url %>'}, sync); <% }); %> - addTag('script', {src: 'js/angular-bootstrap.min.js'}, sync); - addTag('script', {src: 'js/angular-bootstrap-prettify.min.js'}, sync); + addTag('script', {src: 'js/angular-bootstrap.js'}, sync); + addTag('script', {src: 'js/angular-bootstrap-prettify.js'}, sync); + addTag('script', {src: 'js/google-code-prettify.js'}, sync); + addTag('script', {src: 'js/marked.js'}, sync); addTag('script', {src: 'js/docs-setup.js'}, sync); addTag('script', {src: 'js/docs.js'}, sync); @@ -150,39 +153,39 @@
-