diff --git a/images/body-bg.png b/images/body-bg.png new file mode 100644 index 00000000..5e8c4c29 Binary files /dev/null and b/images/body-bg.png differ diff --git a/images/highlight-bg.jpg b/images/highlight-bg.jpg new file mode 100644 index 00000000..355e089b Binary files /dev/null and b/images/highlight-bg.jpg differ diff --git a/images/hr.png b/images/hr.png new file mode 100644 index 00000000..d32f689c Binary files /dev/null and b/images/hr.png differ diff --git a/images/octocat-icon.png b/images/octocat-icon.png new file mode 100644 index 00000000..24066080 Binary files /dev/null and b/images/octocat-icon.png differ diff --git a/images/tar-gz-icon.png b/images/tar-gz-icon.png new file mode 100644 index 00000000..502e67d4 Binary files /dev/null and b/images/tar-gz-icon.png differ diff --git a/images/zip-icon.png b/images/zip-icon.png new file mode 100644 index 00000000..732aced6 Binary files /dev/null and b/images/zip-icon.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..01386b1a --- /dev/null +++ b/index.html @@ -0,0 +1,250 @@ + + + + + + + + + + + Roaster by forge + + + +
+
+ +
+

Roaster

+

A Java Parser library that allows easy parsing and formatting of Java source files

+
+ +
+ Download .zip + Download .tar.gz + View on GitHub +
+ +
+ +
+

+Roaster - The only Java source parser library you'll ever need

+ +

Roaster (formerly known as java-parser) is a library that allows easy parsing and formatting of java source files. +Roaster introduces a fluent interface to manipulate Java source files, like adding fields, methods, annotations and so on.

+ +

+Installation

+ +
    +
  • If you are using Maven, add the following dependencies to your project:
  • +
+ +
<dependency>
+  <groupId>org.jboss.forge.roaster</groupId>
+  <artifactId>roaster-api</artifactId>
+  <version>${version.roaster}</version>
+</dependency>
+<dependency>
+  <groupId>org.jboss.forge.roaster</groupId>
+  <artifactId>roaster-jdt</artifactId>
+  <version>${version.roaster}</version>
+  <scope>runtime</scope>
+</dependency>
+ +
    +
  • Otherwise, download and extract (or build from sources) the most recent distribution containing the Roaster distribution and command line tools
  • +
+ +

+Usage

+ +

+CLI

+ +

Execute roaster by running the following script (add these to your $PATH for convenience):

+ +
bin/roaster     (Unix/Linux/OSX)
+bin/roaster.bat (Windows)
+
+ +

Options described here:

+ +
$ roaster -h
+
+Usage: roaster [OPTION]... FILES ... 
+The fastest way to build applications, share your software, and enjoy doing it. 
+
+-c, --config [CONFIG_FILE]
+     specify the path to the Eclipse code format profile (usually found at '$PROJECT/.settings/org.eclipse.jdt.core.prefs') 
+
+-r, --recursive
+     format files in found sub-directories recursively 
+
+FILES... 
+     specify one or more space-separated files or directories to format 
+
+-h, --help
+     display this help and exit 
+
+ +

+Java Parser API

+ +

Example:

+ +
Roaster.parse(JavaClassSource.class, "public class HelloWorld {}");
+ +

+Java Source Code Generation API

+ +

Roaster provides a fluent API to generate java classes. Here an example:

+ +
final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
+javaClass.setPackage("com.company.example").setName("Person");
+
+javaClass.addInterface(Serializable.class);
+javaClass.addField()
+  .setName("serialVersionUID")
+  .setType("long")
+  .setLiteralInitializer("1L")
+  .setPrivate()
+  .setStatic(true)
+  .setFinal(true);
+
+javaClass.addProperty(Integer.class, "id").setMutable(false);
+javaClass.addProperty(String.class, "firstName");
+javaClass.addProperty("String", "lastName");
+
+javaClass.addMethod()
+  .setConstructor(true)
+  .setPublic()
+  .setBody("this.id = id;")
+  .addParameter(Integer.class, "id");
+ +

Will produce:

+ +
package com.company.example;
+
+import java.io.Serializable;
+
+public class Person implements Serializable {
+
+   private static final long serialVersionUID = 1L;
+   private final Integer id;
+   private String firstName;
+   private String lastName;
+
+   public Integer getId() {
+      return id;
+   }
+
+   public String getFirstName() {
+      return firstName;
+   }
+
+   public void setFirstName(String firstName) {
+      this.firstName = firstName;
+   }
+
+   public String getLastName() {
+      return lastName;
+   }
+
+   public void setLastName(String lastName) {
+      this.lastName = lastName;
+   }
+
+   public Person(Integer id) {
+      this.id = id;
+   }
+}
+ +

+Java Source Code Modification API

+ +

Of course it is possible to mix both approaches (parser and writer) to modify Java code programmatically:

+ +
JavaClassSource javaClass = 
+  Roaster.parse(JavaClassSource.class, "public class SomeClass {}");
+javaClass.addMethod()
+  .setPublic()
+  .setStatic(true)
+  .setName("main")
+  .setReturnTypeVoid()
+  .setBody("System.out.println(\"Hello World\");")
+  .addParameter("java.lang.String[]", "args");
+System.out.println(javaClass);
+ +

+JavaDoc creation and parsing

+ +

Here is an example on how to add JavaDoc to a class:

+ +
JavaClassSource javaClass = 
+  Roaster.parse(JavaClassSource.class, "public class SomeClass {}");
+JavaDocSource javaDoc = javaClass.getJavaDoc();
+
+javaDoc.setFullText("Full class documentation");
+// or 
+javaDoc.setText("Class documentation text");
+javaDoc.addTagValue("@author","George Gastaldi");
+
+System.out.println(javaClass);
+ +

+Formatting the Java Source Code

+ +

Roaster formats the Java Source Code by calling the format() method:

+ +
String javaCode = "public class MyClass{ private String field;}";
+String formattedCode = Roaster.format(javaCode);
+System.out.println(formattedCode);
+ +

+Parsing the java unit

+ +

The link:http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.3[Java Language Specification] allows you to define multiple classes in the same .java file. Roaster supports parsing the entire unit by calling the parseUnit() method:

+ +
String javaCode = "public class MyClass{ private String field;} public class AnotherClass {}";
+
+JavaUnit unit = Roaster.parseUnit(javaCode);
+
+JavaClassSource myClass = unit.getGoverningType();
+JavaClassSource anotherClass = (JavaClassSource) unit.getTopLevelTypes().get(1);
+ +

+Issue tracker

+ +

ROASTER on JBossDeveloper. You might need to log in, in order to view the issues.

+ +

+Get in touch

+ +

Roaster uses the same forum and mailing lists as the JBoss Forge project. See the JBoss Forge Community page.

+ + + +

+License

+ +

Eclipse Public License - v 1.0

+
+ + + + +
+
+ + diff --git a/javascripts/main.js b/javascripts/main.js new file mode 100644 index 00000000..d8135d37 --- /dev/null +++ b/javascripts/main.js @@ -0,0 +1 @@ +console.log('This would be the main JS file.'); diff --git a/params.json b/params.json new file mode 100644 index 00000000..b44f2aed --- /dev/null +++ b/params.json @@ -0,0 +1,6 @@ +{ + "name": "Roaster", + "tagline": "A Java Parser library that allows easy parsing and formatting of Java source files", + "body": "Roaster - The only Java source parser library you'll ever need\r\n===============================================================\r\n\r\nRoaster (formerly known as java-parser) is a library that allows easy parsing and formatting of java source files. \r\nRoaster introduces a fluent interface to manipulate Java source files, like adding fields, methods, annotations and so on.\r\n\r\nInstallation\r\n============\r\n\r\n* If you are using Maven, add the following dependencies to your project: \r\n\r\n```xml\r\n\r\n org.jboss.forge.roaster\r\n roaster-api\r\n ${version.roaster}\r\n\r\n\r\n org.jboss.forge.roaster\r\n roaster-jdt\r\n ${version.roaster}\r\n runtime\r\n\r\n```\r\n\r\n* Otherwise, download and extract (or build from sources) the most recent [distribution](http://search.maven.org/#search|ga|1|a%3A%22roaster-distribution%22) containing the Roaster distribution and command line tools\r\n\r\nUsage\r\n=====\r\n\r\nCLI\r\n---\r\nExecute roaster by running the following script (add these to your $PATH for convenience):\r\n\r\n```\r\nbin/roaster (Unix/Linux/OSX)\r\nbin/roaster.bat (Windows)\r\n````\r\n\r\nOptions described here:\r\n\r\n```\r\n$ roaster -h\r\n\r\nUsage: roaster [OPTION]... FILES ... \r\nThe fastest way to build applications, share your software, and enjoy doing it. \r\n\r\n-c, --config [CONFIG_FILE]\r\n\t specify the path to the Eclipse code format profile (usually found at '$PROJECT/.settings/org.eclipse.jdt.core.prefs') \r\n\r\n-r, --recursive\r\n\t format files in found sub-directories recursively \r\n\r\nFILES... \r\n\t specify one or more space-separated files or directories to format \r\n\r\n-h, --help\r\n\t display this help and exit \r\n```\r\n\r\nJava Parser API\r\n---------------\r\n\r\nExample:\r\n```java\r\nRoaster.parse(JavaClassSource.class, \"public class HelloWorld {}\");\r\n```\r\n\r\nJava Source Code Generation API\r\n-------------------------------\r\n\r\nRoaster provides a fluent API to generate java classes. Here an example:\r\n\r\n```java\r\nfinal JavaClassSource javaClass = Roaster.create(JavaClassSource.class);\r\njavaClass.setPackage(\"com.company.example\").setName(\"Person\");\r\n\r\njavaClass.addInterface(Serializable.class);\r\njavaClass.addField()\r\n .setName(\"serialVersionUID\")\r\n .setType(\"long\")\r\n .setLiteralInitializer(\"1L\")\r\n .setPrivate()\r\n .setStatic(true)\r\n .setFinal(true);\r\n\r\njavaClass.addProperty(Integer.class, \"id\").setMutable(false);\r\njavaClass.addProperty(String.class, \"firstName\");\r\njavaClass.addProperty(\"String\", \"lastName\");\r\n\r\njavaClass.addMethod()\r\n .setConstructor(true)\r\n .setPublic()\r\n .setBody(\"this.id = id;\")\r\n .addParameter(Integer.class, \"id\");\r\n```\r\n\r\nWill produce:\r\n\r\n```java\r\npackage com.company.example;\r\n\r\nimport java.io.Serializable;\r\n\r\npublic class Person implements Serializable {\r\n\r\n private static final long serialVersionUID = 1L;\r\n private final Integer id;\r\n private String firstName;\r\n private String lastName;\r\n\r\n public Integer getId() {\r\n return id;\r\n }\r\n\r\n public String getFirstName() {\r\n return firstName;\r\n }\r\n\r\n public void setFirstName(String firstName) {\r\n this.firstName = firstName;\r\n }\r\n\r\n public String getLastName() {\r\n return lastName;\r\n }\r\n\r\n public void setLastName(String lastName) {\r\n this.lastName = lastName;\r\n }\r\n\r\n public Person(Integer id) {\r\n this.id = id;\r\n }\r\n}\r\n```\r\n\r\nJava Source Code Modification API\r\n---------------------------------\r\n\r\nOf course it is possible to mix both approaches (parser and writer) to modify Java code programmatically:\r\n\r\n```java\r\nJavaClassSource javaClass = \r\n Roaster.parse(JavaClassSource.class, \"public class SomeClass {}\");\r\njavaClass.addMethod()\r\n .setPublic()\r\n .setStatic(true)\r\n .setName(\"main\")\r\n .setReturnTypeVoid()\r\n .setBody(\"System.out.println(\\\"Hello World\\\");\")\r\n .addParameter(\"java.lang.String[]\", \"args\");\r\nSystem.out.println(javaClass);\r\n```\r\n\r\nJavaDoc creation and parsing\r\n----------------------------\r\n \r\nHere is an example on how to add JavaDoc to a class:\r\n\r\n```java\r\nJavaClassSource javaClass = \r\n Roaster.parse(JavaClassSource.class, \"public class SomeClass {}\");\r\nJavaDocSource javaDoc = javaClass.getJavaDoc();\r\n\r\njavaDoc.setFullText(\"Full class documentation\");\r\n// or \r\njavaDoc.setText(\"Class documentation text\");\r\njavaDoc.addTagValue(\"@author\",\"George Gastaldi\");\r\n\r\nSystem.out.println(javaClass);\r\n```\r\n\r\nFormatting the Java Source Code\r\n-------------------------------\r\n\r\nRoaster formats the Java Source Code by calling the format() method:\r\n\r\n```java\r\nString javaCode = \"public class MyClass{ private String field;}\";\r\nString formattedCode = Roaster.format(javaCode);\r\nSystem.out.println(formattedCode);\r\n```\r\n\r\nParsing the java unit \r\n----------------------\r\n\r\nThe link:http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.3[Java Language Specification] allows you to define multiple classes in the same .java file. Roaster supports parsing the entire unit by calling the parseUnit() method:\r\n\r\n```java\r\nString javaCode = \"public class MyClass{ private String field;} public class AnotherClass {}\";\r\n\r\nJavaUnit unit = Roaster.parseUnit(javaCode);\r\n\r\nJavaClassSource myClass = unit.getGoverningType();\r\nJavaClassSource anotherClass = (JavaClassSource) unit.getTopLevelTypes().get(1);\r\n```\r\n\r\nIssue tracker\r\n=============\r\n\r\n[ROASTER on JBossDeveloper](https://issues.jboss.org/browse/ROASTER). You might need to log in, in order to view the issues.\r\n\r\n\r\nGet in touch\r\n============\r\n\r\nRoaster uses the same forum and mailing lists as the [JBoss Forge](http://forge.jboss.org/) project. See the [JBoss Forge Community](http://forge.jboss.org/community) page.\r\n\r\n* [User forums](https://developer.jboss.org/en/forge)\r\n* [Developer forums](https://developer.jboss.org/en/forge/dev)\r\n\r\nLicense\r\n=======\r\n[Eclipse Public License - v 1.0](http://www.eclipse.org/legal/epl-v10.html)", + "note": "Don't delete this file! It's used internally to help with page regeneration." +} \ No newline at end of file diff --git a/stylesheets/github-dark.css b/stylesheets/github-dark.css new file mode 100644 index 00000000..f8dbbdfb --- /dev/null +++ b/stylesheets/github-dark.css @@ -0,0 +1,124 @@ +/* +The MIT License (MIT) + +Copyright (c) 2016 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +.pl-c /* comment */ { + color: #969896; +} + +.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */, +.pl-s .pl-v /* string variable */ { + color: #0099cd; +} + +.pl-e /* entity */, +.pl-en /* entity.name */ { + color: #9774cb; +} + +.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */, +.pl-s .pl-s1 /* string source */ { + color: #ddd; +} + +.pl-ent /* entity.name.tag */ { + color: #7bcc72; +} + +.pl-k /* keyword, storage, storage.type */ { + color: #cc2372; +} + +.pl-s /* string */, +.pl-pds /* punctuation.definition.string, string.regexp.character-class */, +.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, +.pl-sr /* string.regexp */, +.pl-sr .pl-cce /* string.regexp constant.character.escape */, +.pl-sr .pl-sre /* string.regexp source.ruby.embedded */, +.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ { + color: #3c66e2; +} + +.pl-v /* variable */ { + color: #fb8764; +} + +.pl-id /* invalid.deprecated */ { + color: #e63525; +} + +.pl-ii /* invalid.illegal */ { + color: #f8f8f8; + background-color: #e63525; +} + +.pl-sr .pl-cce /* string.regexp constant.character.escape */ { + font-weight: bold; + color: #7bcc72; +} + +.pl-ml /* markup.list */ { + color: #c26b2b; +} + +.pl-mh /* markup.heading */, +.pl-mh .pl-en /* markup.heading entity.name */, +.pl-ms /* meta.separator */ { + font-weight: bold; + color: #264ec5; +} + +.pl-mq /* markup.quote */ { + color: #00acac; +} + +.pl-mi /* markup.italic */ { + font-style: italic; + color: #ddd; +} + +.pl-mb /* markup.bold */ { + font-weight: bold; + color: #ddd; +} + +.pl-md /* markup.deleted, meta.diff.header.from-file */ { + color: #bd2c00; + background-color: #ffecec; +} + +.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { + color: #55a532; + background-color: #eaffea; +} + +.pl-mdr /* meta.diff.range */ { + font-weight: bold; + color: #9774cb; +} + +.pl-mo /* meta.output */ { + color: #264ec5; +} + diff --git a/stylesheets/print.css b/stylesheets/print.css new file mode 100644 index 00000000..4b19b67d --- /dev/null +++ b/stylesheets/print.css @@ -0,0 +1,228 @@ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + padding: 0; + margin: 0; + font: inherit; + font-size: 100%; + vertical-align: baseline; + border: 0; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +body { + font-family: 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 13px; + line-height: 1.5; + color: #000; +} + +a { + font-weight: bold; + color: #d5000d; +} + +header { + padding-top: 35px; + padding-bottom: 10px; +} + +header h1 { + font-size: 48px; + font-weight: bold; + line-height: 1.2; + color: #303030; + letter-spacing: -1px; +} + +header h2 { + font-size: 24px; + font-weight: normal; + line-height: 1.3; + color: #aaa; + letter-spacing: -1px; +} +#downloads { + display: none; +} +#main_content { + padding-top: 20px; +} + +code, pre { + margin-bottom: 30px; + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal; + font-size: 12px; + color: #222; +} + +code { + padding: 0 3px; +} + +pre { + padding: 20px; + overflow: auto; + border: solid 1px #ddd; +} +pre code { + padding: 0; +} + +ul, ol, dl { + margin-bottom: 20px; +} + + +/* COMMON STYLES */ + +table { + width: 100%; + border: 1px solid #ebebeb; +} + +th { + font-weight: 500; +} + +td { + font-weight: 300; + text-align: center; + border: 1px solid #ebebeb; +} + +form { + padding: 20px; + background: #f2f2f2; + +} + + +/* GENERAL ELEMENT TYPE STYLES */ + +h1 { + font-size: 2.8em; +} + +h2 { + margin-bottom: 8px; + font-size: 22px; + font-weight: bold; + color: #303030; +} + +h3 { + margin-bottom: 8px; + font-size: 18px; + font-weight: bold; + color: #d5000d; +} + +h4 { + font-size: 16px; + font-weight: bold; + color: #303030; +} + +h5 { + font-size: 1em; + color: #303030; +} + +h6 { + font-size: .8em; + color: #303030; +} + +p { + margin-bottom: 20px; + font-weight: 300; +} + +a { + text-decoration: none; +} + +p a { + font-weight: 400; +} + +blockquote { + padding: 0 0 0 30px; + margin-bottom: 20px; + font-size: 1.6em; + border-left: 10px solid #e9e9e9; +} + +ul li { + list-style-position: inside; + list-style: disc; + padding-left: 20px; +} + +ol li { + list-style-position: inside; + list-style: decimal; + padding-left: 3px; +} + +dl dd { + font-style: italic; + font-weight: 100; +} + +footer { + padding-top: 20px; + padding-bottom: 30px; + margin-top: 40px; + font-size: 13px; + color: #aaa; +} + +footer a { + color: #666; +} + +/* MISC */ +.clearfix:after { + display: block; + height: 0; + clear: both; + visibility: hidden; + content: '.'; +} + +.clearfix {display: inline-block;} +* html .clearfix {height: 1%;} +.clearfix {display: block;} diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css new file mode 100644 index 00000000..d58131ab --- /dev/null +++ b/stylesheets/stylesheet.css @@ -0,0 +1,373 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + padding: 0; + margin: 0; + font: inherit; + font-size: 100%; + vertical-align: baseline; + border: 0; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-spacing: 0; + border-collapse: collapse; +} + +/* LAYOUT STYLES */ +body { + font-family: 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 1em; + line-height: 1.5; + color: #6d6d6d; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); + background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat; +} + +a { + color: #d5000d; +} +a:hover { + color: #c5000c; +} + +header { + padding-top: 35px; + padding-bottom: 25px; +} + +header h1 { + font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 48px; font-weight: 900; + line-height: 1.2; + color: #303030; + letter-spacing: -1px; +} + +header h2 { + font-size: 24px; + font-weight: normal; + line-height: 1.3; + color: #aaa; + letter-spacing: -1px; +} + +#container { + min-height: 595px; + background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat; +} + +.inner { + width: 620px; + margin: 0 auto; +} + +#container .inner img { + max-width: 100%; +} + +#downloads { + margin-bottom: 40px; +} + +a.button { + display: block; + float: left; + width: 179px; + padding: 12px 8px 12px 8px; + margin-right: 14px; + font-size: 15px; + font-weight: bold; + line-height: 25px; + color: #303030; + background: #fdfdfd; /* Old browsers */ + background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */ + background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */ + border-top: solid 1px #cbcbcb; + border-right: solid 1px #b7b7b7; + border-bottom: solid 1px #b3b3b3; + border-left: solid 1px #b7b7b7; + border-radius: 30px; + -webkit-box-shadow: 10px 10px 5px #888; + -moz-box-shadow: 10px 10px 5px #888; + box-shadow: 0px 1px 5px #e8e8e8; + -moz-border-radius: 30px; + -webkit-border-radius: 30px; +} +a.button:hover { + background: #fafafa; /* Old browsers */ + background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */ + background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */ + border-top: solid 1px #b7b7b7; + border-right: solid 1px #b3b3b3; + border-bottom: solid 1px #b3b3b3; + border-left: solid 1px #b3b3b3; +} + +a.button span { + display: block; + height: 23px; + padding-left: 50px; +} + +#download-zip span { + background: transparent url(../images/zip-icon.png) 12px 50% no-repeat; +} +#download-tar-gz span { + background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat; +} +#view-on-github span { + background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat; +} +#view-on-github { + margin-right: 0; +} + +code, pre { + margin-bottom: 30px; + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal; + font-size: 14px; + color: #222; +} + +code { + padding: 0 3px; + background-color: #f2f2f2; + border: solid 1px #ddd; +} + +pre { + padding: 20px; + overflow: auto; + color: #f2f2f2; + text-shadow: none; + background: #303030; +} +pre code { + padding: 0; + color: #f2f2f2; + background-color: #303030; + border: none; +} + +ul, ol, dl { + margin-bottom: 20px; +} + + +/* COMMON STYLES */ + +hr { + height: 1px; + padding-bottom: 1em; + margin-top: 1em; + line-height: 1px; + background: transparent url('../images/hr.png') 50% 0 no-repeat; + border: none; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +table { + width: 100%; + border: 1px solid #ebebeb; +} + +th { + font-weight: 500; +} + +td { + font-weight: 300; + text-align: center; + border: 1px solid #ebebeb; +} + +form { + padding: 20px; + background: #f2f2f2; + +} + + +/* GENERAL ELEMENT TYPE STYLES */ + +h1 { + font-size: 32px; +} + +h2 { + margin-bottom: 8px; + font-size: 22px; + font-weight: bold; + color: #303030; +} + +h3 { + margin-bottom: 8px; + font-size: 18px; + font-weight: bold; + color: #d5000d; +} + +h4 { + font-size: 16px; + font-weight: bold; + color: #303030; +} + +h5 { + font-size: 1em; + color: #303030; +} + +h6 { + font-size: .8em; + color: #303030; +} + +p { + margin-bottom: 20px; + font-weight: 300; +} + +a { + text-decoration: none; +} + +p a { + font-weight: 400; +} + +blockquote { + padding: 0 0 0 30px; + margin-bottom: 20px; + font-size: 1.6em; + border-left: 10px solid #e9e9e9; +} + +ul li { + list-style-position: inside; + list-style: disc; + padding-left: 20px; +} + +ol li { + list-style-position: inside; + list-style: decimal; + padding-left: 3px; +} + +dl dt { + color: #303030; +} + +footer { + padding-top: 20px; + padding-bottom: 30px; + margin-top: 40px; + font-size: 13px; + color: #aaa; + background: transparent url('../images/hr.png') 0 0 no-repeat; +} + +footer a { + color: #666; +} +footer a:hover { + color: #444; +} + +/* MISC */ +.clearfix:after { + display: block; + height: 0; + clear: both; + visibility: hidden; + content: '.'; +} + +.clearfix {display: inline-block;} +* html .clearfix {height: 1%;} +.clearfix {display: block;} + +/* #Media Queries +================================================== */ + +/* Smaller than standard 960 (devices and browsers) */ +@media only screen and (max-width: 959px) { } + +/* Tablet Portrait size to standard 960 (devices and browsers) */ +@media only screen and (min-width: 768px) and (max-width: 959px) { } + +/* All Mobile Sizes (devices and browser) */ +@media only screen and (max-width: 767px) { + header { + padding-top: 10px; + padding-bottom: 10px; + } + #downloads { + margin-bottom: 25px; + } + #download-zip, #download-tar-gz { + display: none; + } + .inner { + width: 94%; + margin: 0 auto; + } +} + +/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ +@media only screen and (min-width: 480px) and (max-width: 767px) { } + +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ +@media only screen and (max-width: 479px) { }