Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/JBake.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/JBake.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/JBake.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/JBake.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,225 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc; + +import com.orientechnologies.orient.core.Orient; +import org.apache.commons.configuration.CompositeConfiguration; +import org.apache.commons.configuration.MapConfiguration; +import org.apache.meecrowave.Meecrowave; +import org.apache.meecrowave.doc.generator.ArquillianConfiguration; +import org.apache.meecrowave.doc.generator.CliConfiguration; +import org.apache.meecrowave.doc.generator.Configuration; +import org.apache.meecrowave.doc.generator.MavenConfiguration; +import org.jbake.app.ConfigUtil; +import org.jbake.app.Oven; + +import java.io.File; +import java.io.IOException; +import java.nio.file.ClosedWatchServiceException; +import java.nio.file.Path; +import java.nio.file.WatchEvent; +import java.nio.file.WatchKey; +import java.nio.file.WatchService; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Scanner; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Stream; + +import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE; +import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE; +import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY; + +public class JBake { + private JBake() { + // no-op + } + + // if you want to switch off PDF generation use as arguments: src/main/jbake target/site-tmp true false + public static void main(final String[] args) throws Exception { + System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "64"); // try to have parallelStream better than default + + final File source = args == null || args.length < 1 ? new File("src/main/jbake") : new File(args[0]); + final File pdfSource = new File(source, "content"); + final File destination = args == null || args.length < 2 ? new File("target/site-tmp") : new File(args[1]); + final boolean startHttp = args == null || args.length < 2 || Boolean.parseBoolean(args[2]); // by default we dev + final boolean skipPdf = args != null && args.length > 3 && !Boolean.parseBoolean(args[3]); // by default...too slow sorry + + // generation of dynamic content + new Configuration().run(); + new CliConfiguration().run(); + new ArquillianConfiguration().run(); + new MavenConfiguration().run(); + + final Runnable build = () -> { + System.out.println("Building Meecrowave website in " + destination); + final Orient orient = Orient.instance(); + try { + orient.startup(); + + final Oven oven = new Oven(source, destination, new CompositeConfiguration() {{ + final CompositeConfiguration config = new CompositeConfiguration(); + config.addConfiguration(new MapConfiguration(new HashMap<String, Object>() {{ + put("asciidoctor.attributes", new ArrayList<String>() {{ + add("source-highlighter=coderay"); + add("context_rootpath=/meecrowave"); + }}); + }})); + config.addConfiguration(ConfigUtil.load(source)); + addConfiguration(config); + }}, true); + oven.setupPaths(); + + System.out.println(" > baking"); + oven.bake(); + + if (!skipPdf) { + System.out.println(" > pdfifying"); + PDFify.generatePdf(pdfSource, destination); + } + + System.out.println(" > done :)"); + } catch (final Exception e) { + e.printStackTrace(); + } finally { + orient.shutdown(); + } + }; + + build.run(); + if (startHttp) { + final Path watched = source.toPath(); + final WatchService watchService = watched.getFileSystem().newWatchService(); + watched.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY); + final AtomicBoolean run = new AtomicBoolean(true); + final AtomicLong render = new AtomicLong(-1); + final Thread renderingThread = new Thread() { + { + setName("jbake-renderer"); + } + + @Override + public void run() { + long last = System.currentTimeMillis(); + while (run.get()) { + if (render.get() > last) { + last = System.currentTimeMillis(); + try { + build.run(); + } catch (final Throwable oops) { + oops.printStackTrace(); + } + } + try { + sleep(TimeUnit.SECONDS.toMillis(1)); + } catch (final InterruptedException e) { + Thread.interrupted(); + break; + } + } + System.out.println("Exiting renderer"); + } + }; + final Thread watcherThread = new Thread() { + { + setName("jbake-file-watcher"); + } + + @Override + public void run() { + while (run.get()) { + try { + final WatchKey key = watchService.poll(1, TimeUnit.SECONDS); + if (key == null) { + continue; + } + + for (final WatchEvent<?> event : key.pollEvents()) { + final WatchEvent.Kind<?> kind = event.kind(); + if (kind != ENTRY_CREATE && kind != ENTRY_DELETE && kind != ENTRY_MODIFY) { + continue; // unlikely but better to protect ourself + } + + final Path updatedPath = Path.class.cast(event.context()); + if (kind == ENTRY_DELETE || updatedPath.toFile().isFile()) { + final String path = updatedPath.toString(); + if (!path.contains("___jb") && !path.endsWith("~")) { + render.set(System.currentTimeMillis()); + } + } + } + key.reset(); + } catch (final InterruptedException e) { + Thread.interrupted(); + run.compareAndSet(true, false); + } catch (final ClosedWatchServiceException cwse) { + if (!run.get()) { + throw new IllegalStateException(cwse); + } + } + } + System.out.println("Exiting file watcher"); + } + }; + + renderingThread.start(); + watcherThread.start(); + + final Runnable onQuit = () -> { + run.compareAndSet(true, false); + Stream.of(watcherThread, renderingThread).forEach(thread -> { + try { + thread.join(); + } catch (final InterruptedException e) { + Thread.interrupted(); + } + }); + try { + watchService.close(); + } catch (final IOException ioe) { + // not important + } + }; + + try (final Meecrowave container = new Meecrowave(new Meecrowave.Builder() {{ + setWebResourceCached(false); + }}) {{ + start(); + deployWebapp("/meecrowave", destination); + }}) { + System.out.println("Started on http://localhost:" + container.getConfiguration().getHttpPort() + "/meecrowave"); + + final Scanner console = new Scanner(System.in); + String cmd; + while (((cmd = console.nextLine())) != null) { + if ("quit".equals(cmd)) { + break; + } else if ("r".equals(cmd) || "rebuild".equals(cmd) || "build".equals(cmd) || "b".equals(cmd)) { + render.set(System.currentTimeMillis()); + } else { + System.err.println("Ignoring " + cmd + ", please use 'build' or 'quit'"); + } + } + } + onQuit.run(); + } + } +}
Propchange: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/JBake.java ------------------------------------------------------------------------------ svn:executable = * Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/PDFify.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/PDFify.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/PDFify.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/PDFify.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.meecrowave.doc; + +import org.asciidoctor.Asciidoctor; +import org.asciidoctor.AttributesBuilder; + +import java.io.File; +import java.io.IOException; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +import static org.asciidoctor.OptionsBuilder.options; +import static org.asciidoctor.SafeMode.UNSAFE; + +public class PDFify { + private PDFify() { + // no-op + } + + public static void generatePdf(final File from, final File targetBase) throws IOException { + final Path sourceBase = from.toPath(); + final Asciidoctor asciidoctor = Asciidoctor.Factory.create(); + final ExecutorService pool = Executors.newFixedThreadPool(16); + Files.walkFileTree(sourceBase, new SimpleFileVisitor<Path>() { + @Override + public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { + final String fileName = file.getFileName().toString(); + if (fileName.endsWith(".adoc")) { + pool.submit(() -> { + final String path = sourceBase.relativize(file).toString(); + final File target = new File(targetBase, path.substring(0, path.length() - "adoc".length()) + "pdf"); + final File asFile = file.toFile(); + final Map<String, Object> attributes = asciidoctor.readDocumentHeader(asFile).getAttributes(); + // if we generate the PDF link we need to create the PDF excepted if it is expected to be manual + if (attributes.containsKey("jbake-meecrowavepdf") && !attributes.containsKey("jbake-meecrowavepdf-manual")) { + target.getParentFile().mkdirs(); + asciidoctor.convertFile( + asFile, + options() + //.baseDir(asFile.getParentFile()) + .safe(UNSAFE) + .backend("pdf") + .attributes(AttributesBuilder.attributes() + .attribute("source-highlighter", "coderay") + .attribute("context_rootpath", "http://openwebbeans.apache.org/meecrowave")) + .toFile(target).get()); + System.out.println("Generated " + target); + } + }); + } + return super.visitFile(file, attrs); + } + }); + pool.shutdown(); + try { + pool.awaitTermination(1, TimeUnit.HOURS); + } catch (final InterruptedException e) { + Thread.interrupted(); + } + } +} Propchange: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/PDFify.java ------------------------------------------------------------------------------ svn:executable = * Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/ArquillianConfiguration.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc.generator; + +import org.apache.meecrowave.arquillian.MeecrowaveConfiguration; + +import java.lang.reflect.Field; +import java.util.stream.Stream; + +import static java.util.Optional.ofNullable; +import static java.util.stream.Collectors.joining; + +public class ArquillianConfiguration extends BaseGenerator { + @Override + protected String generate() { + return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + + "<arquillian xmlns=\"http://jboss.org/schema/arquillian\"\n" + + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" + + " xsi:schemaLocation=\"http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd\">\n" + + " <container qualifier=\"tomee-embedded\" default=\"true\">\n" + + " <configuration>\n" + + Stream.of(MeecrowaveConfiguration.class.getDeclaredFields()) + .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) + .map(opt -> " <property name=\"" + opt.getName() + "\">" + valueFor(opt) + "</property>") + .collect(joining("\n")) + + "\n </configuration>\n" + + " </container>\n" + + "</arquillian>\n"; + } + + private String valueFor(final Field opt) { + switch (opt.getName()) { + case "properties": + return "\n jpa.property.openjpa.RuntimeUnenhancedClasses=supported\n" + + " jpa.property.openjpa.jdbc.SynchronizeMappings=buildSchema\n" + + " "; + case "users": + return "\n admin=adminpwd\n" + + " other=secret\n" + + " "; + case "roles": + return "\n admin=admin\n" + + " limited=admin,other\n" + + " "; + case "cxfServletParams": + return "\n hide-service-list-page=true\n" + + " "; + case "realm": + return "org.apache.catalina.realm.JAASRealm:configFile=jaas.config;appName=app"; + case "securityConstraints": + return "collection=sc1:/api/*:POST;authRole=**|collection=sc2:/priv/*:GET;authRole=*"; + case "loginConfig": + return "authMethod=BASIC;realmName=app"; + default: + } + + opt.setAccessible(true); + try { + return ofNullable(opt.get(new MeecrowaveConfiguration())).map(v -> v == null ? "" : v.toString()).orElse(""); + } catch (final IllegalAccessException e) { + throw new IllegalStateException(e); + } + } +} Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/BaseGenerator.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/BaseGenerator.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/BaseGenerator.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/BaseGenerator.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc.generator; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; + +import static org.apache.ziplock.JarLocation.jarLocation; + +public abstract class BaseGenerator implements Runnable { + @Override + public void run() { + final File output = new File(jarLocation(BaseGenerator.class).getParentFile()/*target*/, "generated-doc/" + getClass().getSimpleName() + ".adoc"); + output.getParentFile().mkdirs(); + try (final Writer w = new FileWriter(output)) { + w.write(generate()); + } catch (final IOException e) { + throw new IllegalStateException(e); + } + } + + protected abstract String generate(); + + protected String tableConfig() { + return "[opts=\"header\",role=\"table table-bordered\"]\n"; + } +} Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/CliConfiguration.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/CliConfiguration.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/CliConfiguration.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/CliConfiguration.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc.generator; + +import org.apache.meecrowave.Meecrowave; +import org.apache.meecrowave.runner.cli.CliOption; + +import java.util.stream.Stream; + +import static java.util.stream.Collectors.joining; + +public class CliConfiguration extends BaseGenerator { + @Override + protected String generate() { + return super.tableConfig() + "|===\n|Name|Description\n" + + Stream.of(Meecrowave.Builder.class.getDeclaredFields()) + .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) + .map(f -> f.getAnnotation(CliOption.class)) + .map(opt -> "|--" + opt.name() + "|" + opt.description()) + .collect(joining("\n")) + "\n|===\n"; + } +} Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/Configuration.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/Configuration.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/Configuration.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/Configuration.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc.generator; + +import org.apache.meecrowave.Meecrowave; +import org.apache.meecrowave.runner.cli.CliOption; + +import java.util.stream.Stream; + +import static java.util.stream.Collectors.joining; + +public class Configuration extends BaseGenerator { + @Override + protected String generate() { + return super.tableConfig() + "|===\n|Name|Description\n" + + Stream.of(Meecrowave.Builder.class.getDeclaredFields()) + .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) + .map(f -> "|" + f.getName() + "|" + f.getAnnotation(CliOption.class).description()) + .collect(joining("\n")) + "\n|===\n"; + } +} Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/MavenConfiguration.java URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/MavenConfiguration.java?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/MavenConfiguration.java (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/java/org/apache/meecrowave/doc/generator/MavenConfiguration.java Sun Nov 13 09:34:07 2016 @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.meecrowave.doc.generator; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.stream.Stream; + +import static java.util.Optional.ofNullable; +import static java.util.stream.Collectors.joining; +import static org.apache.ziplock.JarLocation.jarLocation; + +public class MavenConfiguration extends BaseGenerator { + @Override + protected String generate() { + return super.tableConfig() + "|===\n|Name|Default|Property\n" + + loadConfiguration() + .sorted((o1, o2) -> o1.name.compareTo(o2.name)) + .map(opt -> "|--" + opt.name + "|" + ofNullable(opt.defaultValue).orElse("-") + '|' + opt.property) + .collect(joining("\n")) + "\n|===\n"; + } + + private Stream<Config> loadConfiguration() { + try (final InputStream stream = new FileInputStream(new File( + jarLocation(MavenConfiguration.class).getParentFile().getParentFile().getParentFile(), + "meecrowave-maven-plugin/target/classes/META-INF/maven/plugin.xml"))) { + final SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setValidating(false); + final SAXParser parser = factory.newSAXParser(); + final Collection<Config> configs = new ArrayList<>(); + parser.parse(stream, new DefaultHandler() { + public Config config; + private boolean inMojo; + private boolean inConfiguration; + private StringBuilder builder; + private String goal; + + @Override + public void startElement(final String uri, final String localName, + final String qName, final Attributes attributes) throws SAXException { + if ("mojo".equals(localName)) { + inMojo = true; + } else if ("goal".equals(localName)) { + builder = new StringBuilder(); + } else if ("run".equals(goal) && "configuration".equals(localName)) { + inConfiguration = true; + } else if (inConfiguration) { + config = new Config(); + configs.add(config); + config.name = localName; + config.defaultValue = attributes.getValue("default-value"); + builder = new StringBuilder(); + } + } + + @Override + public void characters(final char[] ch, final int start, final int length) throws SAXException { + if (builder != null) { + builder.append(ch, start, length); + } + } + + @Override + public void endElement(final String uri, final String localName, final String qName) throws SAXException { + if ("mojo".equals(localName)) { + inMojo = false; + goal = null; + } else if ("goal".equals(localName)) { + goal = builder.toString(); + builder = null; + } else if ("run".equals(goal) && "configuration".equals(localName)) { + inConfiguration = false; + } else if (inConfiguration) { + config.property = builder.toString(); + builder = null; + config = null; + } + } + }); + return configs.stream(); + } catch (final Exception e) { + throw new IllegalStateException(e); + } + } + + public static final class Config { + private String name; + private String defaultValue; + private String property; + } +} Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/css/styles.css URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/css/styles.css?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/css/styles.css (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/css/styles.css Sun Nov 13 09:34:07 2016 @@ -0,0 +1,1268 @@ +/* + * Template Name: PrettyDocs - Responsive Website Template for documentations + * Version: 1.0 + * Author: Xiaoying Riley + * License: Creative Commons Attribution 3.0 License - https://creativecommons.org/licenses/by/3.0/ + * Twitter: @3rdwave_themes + * Website: http://themes.3rdwavemedia.com/ +*/ +/* Theme default */ +/* ======= Base ======= */ +body { + font-family: 'Open Sans', arial, sans-serif; + color: #494d55; + font-size: 14px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +html, +body { + height: 100%; +} +.page-wrapper { + min-height: 100%; + /* equal to footer height */ + margin-bottom: -50px; +} +.page-wrapper:after { + content: ""; + display: block; + height: 50px; +} +.footer { + height: 50px; +} +p { + line-height: 1.5; +} +a { + color: #3aa7aa; + -webkit-transition: all 0.4s ease-in-out; + -moz-transition: all 0.4s ease-in-out; + -ms-transition: all 0.4s ease-in-out; + -o-transition: all 0.4s ease-in-out; +} +a:hover { + text-decoration: underline; + color: #339597; +} +a:focus { + text-decoration: none; +} +code { + background: #222; + color: #fff; + font-size: 14px; + font-weight: bold; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + padding: 2px 8px; + padding-top: 4px; + display: inline-block; +} +.btn, +a.btn { + -webkit-transition: all 0.4s ease-in-out; + -moz-transition: all 0.4s ease-in-out; + -ms-transition: all 0.4s ease-in-out; + -o-transition: all 0.4s ease-in-out; + font-weight: 600; + font-size: 14px; + line-height: 1.5; +} +.btn .fa, +a.btn .fa { + margin-right: 5px; +} +.btn-primary, +a.btn-primary { + background: #40babd; + border: 1px solid #40babd; + color: #fff !important; +} +.btn-primary:hover, +a.btn-primary:hover, +.btn-primary:focus, +a.btn-primary:focus, +.btn-primary:active, +a.btn-primary:active, +.btn-primary.active, +a.btn-primary.active, +.btn-primary.hover, +a.btn-primary.hover { + background: #3aa7aa; + color: #fff !important; + border: 1px solid #3aa7aa; +} +.btn-green, +a.btn-green { + background: #75c181; + border: 1px solid #75c181; + color: #fff !important; +} +.btn-green:hover, +a.btn-green:hover, +.btn-green:focus, +a.btn-green:focus, +.btn-green:active, +a.btn-green:active, +.btn-green.active, +a.btn-green.active, +.btn-green.hover, +a.btn-green.hover { + background: #63b971; + color: #fff !important; + border: 1px solid #63b971; +} +.body-green .btn-green, +.body-green a.btn-green { + color: #fff !important; +} +.body-green .btn-green:hover, +.body-green a.btn-green:hover, +.body-green .btn-green:focus, +.body-green a.btn-green:focus, +.body-green .btn-green:active, +.body-green a.btn-green:active, +.body-green .btn-green.active, +.body-green a.btn-green.active, +.body-green .btn-green.hover, +.body-green a.btn-green.hover { + color: #fff !important; +} +.btn-blue, +a.btn-blue { + background: #58bbee; + border: 1px solid #58bbee; + color: #fff !important; +} +.btn-blue:hover, +a.btn-blue:hover, +.btn-blue:focus, +a.btn-blue:focus, +.btn-blue:active, +a.btn-blue:active, +.btn-blue.active, +a.btn-blue.active, +.btn-blue.hover, +a.btn-blue.hover { + background: #41b2ec; + color: #fff !important; + border: 1px solid #41b2ec; +} +.btn-orange, +a.btn-orange { + background: #F88C30; + border: 1px solid #F88C30; + color: #fff !important; +} +.btn-orange:hover, +a.btn-orange:hover, +.btn-orange:focus, +a.btn-orange:focus, +.btn-orange:active, +a.btn-orange:active, +.btn-orange.active, +a.btn-orange.active, +.btn-orange.hover, +a.btn-orange.hover { + background: #f77e17; + color: #fff !important; + border: 1px solid #f77e17; +} +.btn-red, +a.btn-red { + background: #f77b6b; + border: 1px solid #f77b6b; + color: #fff !important; +} +.btn-red:hover, +a.btn-red:hover, +.btn-red:focus, +a.btn-red:focus, +.btn-red:active, +a.btn-red:active, +.btn-red.active, +a.btn-red.active, +.btn-red.hover, +a.btn-red.hover { + background: #f66553; + color: #fff !important; + border: 1px solid #f66553; +} +.btn-pink, +a.btn-pink { + background: #EA5395; + border: 1px solid #EA5395; + color: #fff !important; +} +.btn-pink:hover, +a.btn-pink:hover, +.btn-pink:focus, +a.btn-pink:focus, +.btn-pink:active, +a.btn-pink:active, +.btn-pink.active, +a.btn-pink.active, +.btn-pink.hover, +a.btn-pink.hover { + background: #e73c87; + color: #fff !important; + border: 1px solid #e73c87; +} +.btn-purple, +a.btn-purple { + background: #8A40A7; + border: 1px solid #8A40A7; + color: #fff !important; +} +.btn-purple:hover, +a.btn-purple:hover, +.btn-purple:focus, +a.btn-purple:focus, +.btn-purple:active, +a.btn-purple:active, +.btn-purple.active, +a.btn-purple.active, +.btn-purple.hover, +a.btn-purple.hover { + background: #7b3995; + color: #fff !important; + border: 1px solid #7b3995; +} +.btn-cta { + padding: 7px 15px; +} +.form-control { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + height: 40px; + border-color: #f0f0f0; +} +.form-control::-webkit-input-placeholder { + /* WebKit browsers */ + color: #afb3bb; +} +.form-control:-moz-placeholder { + /* Mozilla Firefox 4 to 18 */ + color: #afb3bb; +} +.form-control::-moz-placeholder { + /* Mozilla Firefox 19+ */ + color: #afb3bb; +} +.form-control:-ms-input-placeholder { + /* Internet Explorer 10+ */ + color: #afb3bb; +} +.form-control:focus { + border-color: #e3e3e3; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +input[type="text"], +input[type="email"], +input[type="password"], +input[type="submit"], +input[type="button"], +textarea, +select { + appearance: none; + /* for mobile safari */ + -webkit-appearance: none; +} +#topcontrol { + background: #40babd; + color: #fff; + text-align: center; + display: inline-block; + width: 35px; + height: 35px; + border: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; + -webkit-transition: all 0.4s ease-in-out; + -moz-transition: all 0.4s ease-in-out; + -ms-transition: all 0.4s ease-in-out; + -o-transition: all 0.4s ease-in-out; + z-index: 30; +} +#topcontrol:hover { + background: #52c2c4; +} +#topcontrol .fa { + position: relative; + top: 3px; + font-size: 25px; +} +.video-container iframe { + max-width: 100%; +} +/* ====== Header ====== */ +.header { + background: #494d55; + color: rgba(255, 255, 255, 0.85); + border-top: 5px solid #40babd; + padding: 30px 0; +} +.header a { + color: #fff; +} +.branding { + text-transform: uppercase; + margin-bottom: 10px; +} +.branding .logo { + font-size: 28px; + margin-top: 0; + margin-bottom: 0; +} +.branding .logo a { + text-decoration: none; +} +.branding .text-highlight { + color: #40babd; +} +.body-green .branding .text-highlight { + color: #75c181; +} +.body-blue .branding .text-highlight { + color: #58bbee; +} +.body-orange .branding .text-highlight { + color: #F88C30; +} +.body-red .branding .text-highlight { + color: #f77b6b; +} +.body-pink .branding .text-highlight { + color: #EA5395; +} +.body-purple .branding .text-highlight { + color: #8A40A7; +} +.branding .text-bold { + font-weight: 800; + color: #fff; +} +.branding .icon { + font-size: 24px; + color: #40babd; +} +.body-green .branding .icon { + color: #75c181; +} +.body-blue .branding .icon { + color: #58bbee; +} +.body-orange .branding .icon { + color: #F88C30; +} +.body-red .branding .icon { + color: #f77b6b; +} +.body-pink .branding .icon { + color: #EA5395; +} +.body-purple .branding .icon { + color: #8A40A7; +} +.breadcrumb { + background: none; + margin-bottom: 0; + padding: 0; +} +.breadcrumb li { + color: rgba(255, 255, 255, 0.5); +} +.breadcrumb li.active { + color: rgba(255, 255, 255, 0.5); +} +.breadcrumb li a { + color: rgba(255, 255, 255, 0.5); +} +.breadcrumb li a:hover { + color: #fff; +} +.breadcrumb > li + li:before { + color: rgba(0, 0, 0, 0.4); +} +/* ====== Footer ====== */ +.footer { + background: #26282c; + color: rgba(255, 255, 255, 0.6); + padding: 15px 0; +} +.footer a { + color: #40babd; +} +.footer .fa-heart { + color: #EA5395; +} +/* ======= Doc Styling ======= */ +.doc-wrapper { + padding: 45px 0; + background: #f9f9fb; +} +.doc-body { + position: relative; + min-height: 200px; +} +.doc-header { + margin-bottom: 30px; +} +.doc-header .doc-title { + color: #40babd; + margin-top: 0; + font-size: 36px; +} +.body-green .doc-header .doc-title { + color: #75c181; +} +.body-blue .doc-header .doc-title { + color: #58bbee; +} +.body-orange .doc-header .doc-title { + color: #F88C30; +} +.body-red .doc-header .doc-title { + color: #f77b6b; +} +.body-pink .doc-header .doc-title { + color: #EA5395; +} +.body-purple .doc-header .doc-title { + color: #8A40A7; +} +.doc-header .icon { + font-size: 30px; +} +.doc-header .meta { + color: #a2a6af; +} +.doc-content { + margin-left: 230px; +} +.doc-section { + padding-top: 15px; + padding-bottom: 15px; +} +.doc-section .section-title { + font-size: 26px; + margin-top: 0; + margin-bottom: 0; + font-weight: bold; + padding-bottom: 10px; + border-bottom: 1px solid #d7d7d7; +} +.doc-section h1 { + font-size: 24px; + font-weight: bold; +} +.doc-section h2 { + font-size: 22px; + font-weight: bold; +} +.doc-section h3 { + font-size: 20px; + font-weight: bold; +} +.doc-section h4 { + font-size: 18px; + font-weight: bold; +} +.doc-section h5 { + font-size: 16px; + font-weight: bold; +} +.doc-section h6 { + font-size: 14px; + font-weight: bold; +} +.section-block { + padding-top: 15px; + padding-bottom: 15px; +} +.section-block .block-title { + margin-top: 0; +} +.section-block .list > li { + margin-bottom: 10px; +} +.section-block .list ul > li { + margin-top: 5px; +} +.question { + font-weight: 400 !important; + color: #3aa7aa; +} +.question .body-green { + color: #63b971; +} +.body-blue .question { + color: #41b2ec; +} +.body-orange .question { + color: #f77e17; +} +.body-pink .question { + color: #e73c87; +} +.body-purple .question { + color: #7b3995; +} +.question .fa { + -webkit-opacity: 0.6; + -moz-opacity: 0.6; + opacity: 0.6; +} +.question .label { + font-size: 11px; + vertical-align: middle; +} +.answer { + color: #616670; +} +.code-block { + margin-top: 30px; + margin-bottom: 30px; +} +.callout-block { + padding: 30px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; + position: relative; + margin-bottom: 30px; +} +.callout-block a { + color: rgba(0, 0, 0, 0.55) !important; +} +.callout-block a:hover { + color: rgba(0, 0, 0, 0.65) !important; +} +.callout-block .icon-holder { + font-size: 30px; + position: absolute; + left: 30px; + top: 30px; + color: rgba(0, 0, 0, 0.25); +} +.callout-block .content { + margin-left: 60px; +} +.callout-block .content p:last-child { + margin-bottom: 0; +} +.callout-block .callout-title { + margin-top: 0; + margin-bottom: 5px; + color: rgba(0, 0, 0, 0.65); +} +.callout-info { + background: #58bbee; + color: #fff; +} +.callout-success { + background: #75c181; + color: #fff; +} +.callout-warning { + background: #F88C30; + color: #fff; +} +.callout-danger { + background: #f77b6b; + color: #fff; +} +.table > thead > tr > th { + border-bottom-color: #8bd6d8; +} +.body-green .table > thead > tr > th { + border-bottom-color: #bbe1c1; +} +.body-blue .table > thead > tr > th { + border-bottom-color: #b5e1f7; +} +.body-orange .table > thead > tr > th { + border-bottom-color: #fbc393; +} +.body-pink .table > thead > tr > th { + border-bottom-color: #f5aecd; +} +.body-purple .table > thead > tr > th { + border-bottom-color: #b87fce; +} +.table-bordered > thead > tr > th { + border-bottom-color: inherit; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f5f5f5; +} +.screenshot-holder { + margin-top: 15px; + margin-bottom: 15px; + position: relative; + text-align: center; +} +.screenshot-holder img { + border: 1px solid #f0f0f0; +} +.screenshot-holder .mask { + display: block; + visibility: hidden; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.25); + cursor: pointer; + text-decoration: none; +} +.screenshot-holder .mask .icon { + color: #fff; + font-size: 42px; + display: block; + position: absolute; + width: 100%; + height: 100%; + top: 50%; + margin-top: -21px; +} +.screenshot-holder:hover .mask { + visibility: visible; +} +.jumbotron h1 { + font-size: 28px; + margin-top: 0; + margin-bottom: 30px; +} +.author-profile { + margin-top: 30px; +} +.author-profile img { + width: 100px; + height: 100px; +} +.speech-bubble { + background: #fff; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; + padding: 30px; + margin-top: 20px; + margin-bottom: 30px; + position: relative; +} +.speech-bubble .speech-title { + font-size: 16px; +} +.jumbotron .speech-bubble p { + font-size: 14px; + font-weight: normal; + color: #616670; +} +.speech-bubble:before { + content: ""; + display: inline-block; + position: absolute; + left: 50%; + top: -10px; + margin-left: -10px; + width: 0; + height: 0; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-bottom: 10px solid #fff; +} +.card { + text-align: center; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; + margin-bottom: 30px; + position: relative; +} +.card .card-block { + padding: 15px; +} +.card .mask { + display: block; + visibility: hidden; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.25); + cursor: pointer; + text-decoration: none; +} +.card .mask .icon { + color: #fff; + font-size: 42px; + margin-top: 25%; +} +.card:hover .mask { + visibility: visible; +} +/* Color Schemes */ +.body-green .header { + border-color: #75c181; +} +.body-green a { + color: #75c181; +} +.body-green a:hover { + color: #52b161; +} +.body-blue .header { + border-color: #58bbee; +} +.body-blue a { + color: #58bbee; +} +.body-blue a:hover { + color: #2aa8e9; +} +.body-orange .header { + border-color: #F88C30; +} +.body-orange a { + color: #F88C30; +} +.body-orange a:hover { + color: #ed7108; +} +.body-pink .header { + border-color: #EA5395; +} +.body-pink a { + color: #EA5395; +} +.body-pink a:hover { + color: #e42679; +} +.body-purple .header { + border-color: #8A40A7; +} +.body-purple a { + color: #8A40A7; +} +.body-purple a:hover { + color: #6c3282; +} +.body-red .header { + border-color: #f77b6b; +} +.body-red a { + color: #f77b6b; +} +.body-red a:hover { + color: #f4503b; +} +/* Sidebar */ +.doc-sidebar { + width: 200px; +} +.doc-menu { + list-style: none; + padding-left: 0; +} +.doc-menu > li { + margin-bottom: 5px; +} +.doc-menu > li > a { + display: block; + padding: 5px 15px; + border-left: 4px solid transparent; + color: #616670; +} +.doc-menu > li > a:hover, +.doc-menu > li > a:focus { + color: #40babd; + text-decoration: none; + background: none; +} +.body-green .doc-menu > li > a:hover, +.body-green .doc-menu > li > a:focus { + color: #75c181; +} +.body-blue .doc-menu > li > a:hover, +.body-blue .doc-menu > li > a:focus { + color: #58bbee; +} +.body-orange .doc-menu > li > a:hover, +.body-orange .doc-menu > li > a:focus { + color: #F88C30; +} +.body-red .doc-menu > li > a:hover, +.body-red .doc-menu > li > a:focus { + color: #f77b6b; +} +.body-pink .doc-menu > li > a:hover, +.body-pink .doc-menu > li > a:focus { + color: #EA5395; +} +.body-purple .doc-menu > li > a:hover, +.body-purple .doc-menu > li > a:focus { + color: #8A40A7; +} +.doc-menu > li.active > a { + background: none; + border-left: 4px solid #40babd; + color: #40babd; + font-weight: 600; +} +.body-green .doc-menu > li.active > a { + color: #75c181; + border-color: #75c181; +} +.body-blue .doc-menu > li.active > a { + color: #58bbee; + border-color: #58bbee; +} +.body-orange .doc-menu > li.active > a { + color: #F88C30; + border-color: #F88C30; +} +.body-red .doc-menu > li.active > a { + color: #f77b6b; + border-color: #f77b6b; +} +.body-pink .doc-menu > li.active > a { + color: #EA5395; + border-color: #EA5395; +} +.body-purple .doc-menu > li.active > a { + color: #8A40A7; + border-color: #8A40A7; +} +.doc-sub-menu { + list-style: none; + padding-left: 0; +} +.doc-sub-menu > li { + margin-bottom: 10px; + font-size: 12px; +} +.doc-sub-menu > li:first-child { + padding-top: 5px; +} +.doc-sub-menu > li > a { + display: block; + color: #616670; + padding: 0; + padding-left: 34px; + background: none; +} +.doc-sub-menu > li > a:hover { + color: #40babd; + text-decoration: none; + background: none; +} +.body-green .doc-sub-menu > li > a:hover { + color: #75c181; +} +.body-blue .doc-sub-menu > li > a:hover { + color: #58bbee; +} +.body-orange .doc-sub-menu > li > a:hover { + color: #F88C30; +} +.body-red .doc-sub-menu > li > a:hover { + color: #f77b6b; +} +.body-pink .doc-sub-menu > li > a:hover { + color: #EA5395; +} +.body-purple .doc-sub-menu > li > a:hover { + color: #8A40A7; +} +.doc-sub-menu > li > a:focus { + background: none; +} +.doc-sub-menu > li.active > a { + background: none; + color: #40babd; +} +.body-green .doc-sub-menu > li.active > a { + color: #75c181; +} +.body-blue .doc-sub-menu > li.active > a { + color: #58bbee; +} +.body-orange .doc-sub-menu > li.active > a { + color: #F88C30; +} +.body-red .doc-sub-menu > li.active > a { + color: #f77b6b; +} +.body-pink .doc-sub-menu > li.active > a { + color: #EA5395; +} +.body-purple .doc-sub-menu > li.active > a { + color: #8A40A7; +} +.affix-top { + position: absolute; + top: 15px; +} +.affix { + top: 15px; +} +.affix, +.affix-bottom { + width: 230px; +} +.affix-bottom { + position: absolute; +} +/* ===== Promo block ===== */ +.promo-block { + background: #3aa7aa; +} +.body-green .promo-block { + background: #63b971; +} +.body-blue .promo-block { + background: #41b2ec; +} +.body-orange .promo-block { + background: #f77e17; +} +.body-pink .promo-block { + background: #e73c87; +} +.body-purple .promo-block { + background: #7b3995; +} +.promo-block a { + color: rgba(0, 0, 0, 0.5); +} +.promo-block a:hover { + color: rgba(0, 0, 0, 0.6); +} +.promo-block .promo-block-inner { + padding: 45px; + color: #fff; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; +} +.promo-block .promo-title { + font-size: 20px; + font-weight: 800; + margin-top: 0; + margin-bottom: 45px; +} +.promo-block .promo-title .fa { + color: rgba(0, 0, 0, 0.5); +} +.promo-block .figure-holder-inner { + background: #fff; + margin-bottom: 30px; + position: relative; + text-align: center; +} +.promo-block .figure-holder-inner img { + border: 5px solid #fff; +} +.promo-block .figure-holder-inner .mask { + display: block; + visibility: hidden; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(255, 255, 255, 0.65); + cursor: pointer; + text-decoration: none; +} +.promo-block .figure-holder-inner .mask .icon { + color: #fff; + font-size: 42px; + display: block; + position: absolute; + width: 100%; + height: 100%; + top: 50%; + margin-top: -21px; +} +.promo-block .figure-holder-inner .mask .icon.pink { + color: #EA5395; +} +.promo-block .figure-holder-inner:hover .mask { + visibility: visible; +} +.promo-block .content-holder-inner { + padding-left: 15px; + padding-right: 15px; +} +.promo-block .content-title { + font-size: 16px; + font-weight: 600; + margin-top: 0; +} +.promo-block .highlight { + color: rgba(0, 0, 0, 0.4); +} +.promo-block .btn-cta { + background: rgba(0, 0, 0, 0.35); + border: none; + color: #fff !important; + margin-bottom: 15px; +} +.promo-block .btn-cta:hover { + background: rgba(0, 0, 0, 0.5); + border: none; + color: #fff !important; +} +/* Extra small devices (phones, less than 768px) */ +@media (max-width: 767px) { + .doc-content { + margin-left: 0; + } + .jumbotron { + padding: 30px 15px; + } + .jumbotron h1 { + font-size: 24px; + margin-bottom: 15px; + } + .jumbotron p { + font-size: 18px; + } + .promo-block .promo-block-inner { + padding: 30px 15px; + } + .promo-block .content-holder-inner { + padding: 0; + } + .promo-block .promo-title { + margin-bottom: 30px; + } +} +/* Small devices (tablets, 768px and up) */ +/* Medium devices (desktops, 992px and up) */ +/* Large devices (large desktops, 1200px and up) */ +/* ======= Landing Page ======= */ +.landing-page .header { + background: #494d55; + color: rgba(255, 255, 255, 0.85); + padding: 60px 0; +} +.landing-page .header a { + color: #fff; +} +.landing-page .branding { + text-transform: uppercase; + margin-bottom: 20px; +} +.landing-page .branding .logo { + font-size: 38px; + margin-top: 0; + margin-bottom: 0; +} +.landing-page .branding .text-bold { + font-weight: 800; + color: #fff; +} +.landing-page .branding .icon { + font-size: 32px; + color: #40babd; +} +.landing-page .tagline { + font-weight: 600; + font-size: 20px; +} +.landing-page .tagline p { + margin-bottom: 5px; +} +.landing-page .tagline .text-highlight { + color: #266f71; +} +.landing-page .fa-heart { + color: #EA5395; +} +.landing-page .cta-container { + margin-top: 30px; +} +.landing-page .social-container { + margin-top: 30px; +} +.landing-page .social-container .twitter-tweet { + display: inline-block; + margin-right: 5px; + position: relative; + top: 5px; +} +.landing-page .social-container .fab-like { + display: inline-block; +} +.cards-section { + padding: 60px 0; + background: #f9f9fb; +} +.cards-section .title { + margin-top: 0; + margin-bottom: 15px; + font-size: 24px; + font-weight: 600; +} +.cards-section .intro { + margin: 0 auto; + max-width: 800px; + margin-bottom: 60px; + color: #616670; +} +.cards-section .cards-wrapper { + max-width: 860px; + margin-left: auto; + margin-right: auto; +} +.cards-section .item { + margin-bottom: 30px; +} +.cards-section .item .icon-holder { + margin-bottom: 15px; +} +.cards-section .item .icon { + font-size: 36px; +} +.cards-section .item .title { + font-size: 16px; + font-weight: 600; +} +.cards-section .item .intro { + margin-bottom: 15px; +} +.cards-section .item-inner { + padding: 45px 30px; + background: #fff; + position: relative; + border: 1px solid #f0f0f0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -moz-background-clip: padding; + -webkit-background-clip: padding-box; + background-clip: padding-box; +} +.cards-section .item-inner .link { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 1; + background-image: url("../images/empty.gif"); + /* for IE8 */ +} +.cards-section .item-inner:hover { + background: #f5f5f5; +} +.cards-section .item-primary .item-inner { + border-top: 3px solid #40babd; +} +.cards-section .item-primary .item-inner:hover .title { + color: #2d8284; +} +.cards-section .item-primary .icon { + color: #40babd; +} +.cards-section .item-green .item-inner { + border-top: 3px solid #75c181; +} +.cards-section .item-green .item-inner:hover .title { + color: #48a156; +} +.cards-section .item-green .icon { + color: #75c181; +} +.cards-section .item-blue .item-inner { + border-top: 3px solid #58bbee; +} +.cards-section .item-blue .item-inner:hover .title { + color: #179de2; +} +.cards-section .item-blue .icon { + color: #58bbee; +} +.cards-section .item-orange .item-inner { + border-top: 3px solid #F88C30; +} +.cards-section .item-orange .item-inner:hover .title { + color: #d46607; +} +.cards-section .item-orange .icon { + color: #F88C30; +} +.cards-section .item-red .item-inner { + border-top: 3px solid #f77b6b; +} +.cards-section .item-red .item-inner:hover .title { + color: #f33a22; +} +.cards-section .item-red .icon { + color: #f77b6b; +} +.cards-section .item-pink .item-inner { + border-top: 3px solid #EA5395; +} +.cards-section .item-pink .item-inner:hover .title { + color: #d61a6c; +} +.cards-section .item-pink .icon { + color: #EA5395; +} +.cards-section .item-purple .item-inner { + border-top: 3px solid #8A40A7; +} +.cards-section .item-purple .item-inner:hover .title { + color: #5c2b70; +} +.cards-section .item-purple .icon { + color: #8A40A7; +} +/* Extra small devices (phones, less than 768px) */ +@media (max-width: 767px) { + .cards-section .item-inner { + padding: 30px 15px; + } +} +/* Small devices (tablets, 768px and up) */ +/* Medium devices (desktops, 992px and up) */ +/* Large devices (large desktops, 1200px and up) */ Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/images/empty.gif URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/images/empty.gif?rev=1769479&view=auto ============================================================================== Binary file - no diff available. Propchange: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/images/empty.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/js/main.js URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/js/main.js?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/js/main.js (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/js/main.js Sun Nov 13 09:34:07 2016 @@ -0,0 +1,49 @@ +$(document).ready(function() { + + /* ===== Affix Sidebar ===== */ + /* Ref: http://getbootstrap.com/javascript/#affix-examples */ + + + $('#doc-menu').affix({ + offset: { + top: ($('#header').outerHeight(true) + $('#doc-header').outerHeight(true)) + 45, + bottom: ($('#footer').outerHeight(true) + $('#promo-block').outerHeight(true)) + 75 + } + }); + + /* Hack related to: https://github.com/twbs/bootstrap/issues/10236 */ + $(window).on('load resize', function() { + $(window).trigger('scroll'); + }); + + /* Activate scrollspy menu */ + $('body').scrollspy({target: '#doc-nav', offset: 100}); + + /* + // Smooth scrolling + $('a.scrollto').on('click', function(e){ + //store hash + var target = this.hash; + e.preventDefault(); + $('body').scrollTo(target, 800, {offset: 0, 'axis':'y'}); + + }); + */ + + + /* ======= jQuery Responsive equal heights plugin ======= */ + /* Ref: https://github.com/liabru/jquery-match-height */ + + $('#cards-wrapper .item-inner').matchHeight(); + $('#showcase .card').matchHeight(); + + /* Bootstrap lightbox */ + /* Ref: http://ashleydw.github.io/lightbox/ */ + + $(document).delegate('*[data-toggle="lightbox"]', 'click', function(e) { + e.preventDefault(); + $(this).ekkoLightbox(); + }); + + +}); \ No newline at end of file Added: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/plugins/bootstrap/css/bootstrap.min.css URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/plugins/bootstrap/css/bootstrap.min.css?rev=1769479&view=auto ============================================================================== --- openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/plugins/bootstrap/css/bootstrap.min.css (added) +++ openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/plugins/bootstrap/css/bootstrap.min.css Sun Nov 13 09:34:07 2016 @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) [... 4 lines stripped ...] Propchange: openwebbeans/microwave/trunk/meecrowave-doc/src/main/jbake/assets/assets/plugins/bootstrap/css/bootstrap.min.css ------------------------------------------------------------------------------ svn:executable = *