You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2018/12/02 11:06:58 UTC
[1/3] tomee-site-generator git commit: Technique for creating a table
of contents
Repository: tomee-site-generator
Updated Branches:
refs/heads/master 95dc035ff -> 0f90a6acf
Technique for creating a table of contents
Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/190bf1f0
Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/190bf1f0
Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/190bf1f0
Branch: refs/heads/master
Commit: 190bf1f0fb04ef044a7a7c5e26d4248a3f2c418d
Parents: 95dc035
Author: dblevins <da...@gmail.com>
Authored: Sun Dec 2 01:37:19 2018 -0800
Committer: dblevins <da...@gmail.com>
Committed: Sun Dec 2 01:37:19 2018 -0800
----------------------------------------------------------------------
.../java/org/apache/tomee/website/Docs.java | 50 +-
.../org/apache/tomee/website/Examples2.java | 25 +-
.../org/apache/tomee/website/GroupedIndex.java | 172 ++
.../java/org/apache/tomee/website/JBake.java | 8 +-
src/main/jbake/assets/css/cardio.css | 1474 +++++++++---------
src/main/jbake/jbake.properties | 2 +
src/main/jbake/templates/docs-index.gsp | 14 +
src/main/jbake/templates/examples-index.gsp | 14 +
8 files changed, 1020 insertions(+), 739 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/java/org/apache/tomee/website/Docs.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/Docs.java b/src/main/java/org/apache/tomee/website/Docs.java
index 9fc6e4b..c03fb6d 100644
--- a/src/main/java/org/apache/tomee/website/Docs.java
+++ b/src/main/java/org/apache/tomee/website/Docs.java
@@ -74,9 +74,7 @@ public class Docs {
.forEach(FixMarkdown::process);
;
- if (!hasIndex(destDocs)) {
- buildIndex(destDocs, docs);
- }
+ GroupedIndex.process(destDocs, "docsindex");
}
private void renameMdtextFile(final File file) {
@@ -90,7 +88,7 @@ public class Docs {
return Stream.of(destDocs.listFiles())
.filter(File::isFile)
.filter(file -> file.getName().startsWith("index."))
- .filter(this::isRendered)
+ .filter(Docs::isRendered)
.findFirst().isPresent();
}
@@ -118,17 +116,23 @@ public class Docs {
}
private Doc toLink(final File base, final File file) {
- final int baseLength = base.getAbsolutePath().length() + 1;
-
- final String href = file.getAbsolutePath().substring(baseLength)
- .replace(".adoc", ".html")
- .replace(".mdtext", ".html")
- .replace(".md", ".html");
+ final String href = href(base, file);
final String name = href.replace(".html", "");
return new Doc(href, name, file);
}
+ public static String href(final File base, final File file) {
+ final String relativePath = relativePath(base, file);
+ return Docs.simpleName(relativePath) + ".html";
+ }
+
+ public static String relativePath(final File base, final File file) {
+ final int baseLength = base.getAbsolutePath().length() + 1;
+
+ return file.getAbsolutePath().substring(baseLength);
+ }
+
public static class Doc {
private final String href;
private final String name;
@@ -162,11 +166,27 @@ public class Docs {
return isRendered(file);
}
- private boolean isRendered(final File file) {
- if (file.getName().endsWith(".mdtext")) return true;
- if (file.getName().endsWith(".md")) return true;
- if (file.getName().endsWith(".adoc")) return true;
- if (file.getName().endsWith(".html")) return true;
+ public static boolean isRendered(final File file) {
+ final String name = file.getName();
+ for (final String extension : extensions) {
+ if (name.endsWith(extension)) return true;
+ }
return false;
}
+
+ private static final String[] extensions = {".html", ".asciidoc", ".adoc", ".ad", ".md"};
+
+ public static String simpleName(final File file) {
+ final String name = file.getName();
+
+ return simpleName(name);
+ }
+
+ public static String simpleName(final String name) {
+ for (final String extension : extensions) {
+ if (name.endsWith(extension)) return name.replace(extension, "");
+ }
+
+ throw new IllegalStateException("Unknown extension: " + name);
+ }
}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/java/org/apache/tomee/website/Examples2.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/Examples2.java b/src/main/java/org/apache/tomee/website/Examples2.java
index 8b3baec..ad0c1aa 100644
--- a/src/main/java/org/apache/tomee/website/Examples2.java
+++ b/src/main/java/org/apache/tomee/website/Examples2.java
@@ -51,30 +51,7 @@ public class Examples2 {
.collect(Collectors.toList());
- // Add any missing JBake headers
-
-
- // Create an index.adoc file
- final StringBuilder index = new StringBuilder();
- index.append(":jbake-type: page\n")
- .append(":jbake-status: published\n")
- .append(":jbake-title: Examples\n");
-
- for (final Example example : examples) {
- index.append(" - link:")
- .append(example.getHref())
- .append("[")
- .append(example.getName())
- .append("]")
- .append("\n")
- ;
- }
-
- try {
- IO.copy(IO.read(index.toString()), new File(destDir, "index.adoc"));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
+ GroupedIndex.process(destDir, "examplesindex");
// https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletMapping.html
}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/java/org/apache/tomee/website/GroupedIndex.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/GroupedIndex.java b/src/main/java/org/apache/tomee/website/GroupedIndex.java
new file mode 100644
index 0000000..b73e1ab
--- /dev/null
+++ b/src/main/java/org/apache/tomee/website/GroupedIndex.java
@@ -0,0 +1,172 @@
+/*
+ * 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.tomee.website;
+
+import org.apache.commons.configuration.CompositeConfiguration;
+import org.apache.openejb.loader.IO;
+import org.jbake.app.Parser;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+public class GroupedIndex {
+
+ private final File directory;
+ private final String type;
+
+ public GroupedIndex(final File directory, final String type) {
+ this.directory = directory;
+ this.type = type;
+ }
+
+ public static void process(final File directory, final String type) {
+ new GroupedIndex(directory, type).process();
+ }
+
+ public void process() {
+
+ final List<String> sectionsFormatted = new ArrayList<>();
+
+
+ final List<Doc> docs = list(directory);
+ final Map<String, List<Doc>> sections = docs.stream().collect(Collectors.groupingBy(Doc::getGroup));
+
+ for (final Map.Entry<String, List<Doc>> entry : sections.entrySet()) {
+ final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ final PrintStream out = new PrintStream(bytes);
+
+ out.printf(" <div class=\"group-title\">%s</div>\n", entry.getKey());
+ out.printf(" <ul class=\"group\">\n");
+ entry.getValue().stream().sorted().forEach(doc -> {
+ out.printf(" <li class=\"group-item\"><span class=\"group-item-i\" ><i class=\"fa fa-angle-right\"></i></span><a href=\"%s\">%s</a></li>\n", doc.getHref(), doc.getTitle());
+ });
+ out.printf(" </ul>\n");
+
+ sectionsFormatted.add(new String(bytes.toByteArray()));
+ }
+
+ try (final PrintStream out = print(directory, "index.html")) {
+ out.printf("type=%s\n", type);
+ out.printf("status=published\n");
+ out.printf("~~~~~~\n");
+
+ final ListIterator<String> iterator = sectionsFormatted.listIterator();
+ while (iterator.hasNext()) {
+ out.printf(" <div class=\"row\">\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" </div>\n");
+ }
+ }
+ }
+
+ public static PrintStream print(final File directory, final String child) {
+ try {
+ return new PrintStream(IO.write(new File(directory, child)));
+ } catch (FileNotFoundException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public List<Doc> list(final File directory) {
+ try {
+ return Files.walk(directory.toPath())
+ .map(Path::toFile)
+ .filter(File::isFile)
+ .filter(Docs::isRendered)
+ .map(this::parse)
+ .collect(Collectors.toList());
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public Doc parse(final File file) {
+ final Parser parser = new Parser(new CompositeConfiguration(), file.getAbsolutePath());
+ final Map<String, Object> map = parser.processFile(file);
+
+ if (map == null) {
+ return new Doc("Unknown", Docs.simpleName(file), Docs.href(directory, file), file);
+ }
+
+ final String title = getTitle(map, file);
+ final String group = Optional.ofNullable(map.get("index-group")).orElse("Unknown") + "";
+
+
+ return new Doc(group, title, Docs.href(directory, file), file);
+ }
+
+ private String getTitle(final Map<String, Object> map, final File file) {
+ if (map.get("short-title") != null) return map.get("short-title") + "";
+ if (map.get("title") != null) return map.get("title") + "";
+ return Docs.simpleName(file);
+ }
+
+ public static class Doc implements Comparable<Doc> {
+
+ private final String group;
+ private final String title;
+ private final String href;
+ private final File source;
+
+ public Doc(final String group, final String title, final String href, final File source) {
+ this.group = group;
+ this.title = title;
+ this.href = href;
+ this.source = source;
+ }
+
+ public String getGroup() {
+ return group;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getHref() {
+ return href;
+ }
+
+ public File getSource() {
+ return source;
+ }
+
+ @Override
+ public int compareTo(final Doc o) {
+ return this.title.toLowerCase().compareTo(o.title.toLowerCase());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/java/org/apache/tomee/website/JBake.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/JBake.java b/src/main/java/org/apache/tomee/website/JBake.java
index e397968..627ee4c 100755
--- a/src/main/java/org/apache/tomee/website/JBake.java
+++ b/src/main/java/org/apache/tomee/website/JBake.java
@@ -42,10 +42,10 @@ public class JBake {
new File("target/jbake"),
new File("repos"),
new File("src/main/jbake"),
- new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "master", "tomee-8.0", true),
- new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "tomee-7.1.0", "tomee-7.1"),
- new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "tomee-7.0.5", "tomee-7.0"),
- new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "master", "master")
+ new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "master", "tomee-8.0")
+// new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "tomee-7.1.0", "tomee-7.1"),
+// new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "tomee-7.0.5", "tomee-7.0"),
+// new Source("https://git-wip-us.apache.org/repos/asf/tomee.git", "master", "master")
);
sources.prepare();
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/jbake/assets/css/cardio.css
----------------------------------------------------------------------
diff --git a/src/main/jbake/assets/css/cardio.css b/src/main/jbake/assets/css/cardio.css
index 4225162..84cabc1 100755
--- a/src/main/jbake/assets/css/cardio.css
+++ b/src/main/jbake/assets/css/cardio.css
@@ -1,1289 +1,1371 @@
@import url(http://fonts.googleapis.com/css?family=Roboto:300,400,500,700);
.parallax {
- position: absolute;
- overflow: hidden;
- width: 100%;
- -webkit-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
+ position: absolute;
+ overflow: hidden;
+ width: 100%;
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
}
.parallax img {
- width: 100%;
- height: 100%;
+ width: 100%;
+ height: 100%;
}
+
/* Preloader */
.preloader {
- position: fixed;
- z-index: 9999;
- width: 100%;
- height: 100%;
- background-color: white;
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ height: 100%;
+ background-color: white;
}
.preloader img {
- position: absolute;
- top: calc(50% - 32px);
- left: calc(50% - 32px);
+ position: absolute;
+ top: calc(50% - 32px);
+ left: calc(50% - 32px);
}
.preloader div {
- display: none;
- /* Preload the Second Pricing Image */
- background: url(../img/pricing2.jpg) no-repeat 9999px 9999px;
- background-position: 9999px 9999px;
+ display: none;
+ /* Preload the Second Pricing Image */
+ background: url(../img/pricing2.jpg) no-repeat 9999px 9999px;
+ background-position: 9999px 9999px;
}
/* Typography */
.bigp {
- font-size: 18px;
- line-height: 1.5;
- color: #80287a;
+ font-size: 18px;
+ line-height: 1.5;
+ color: #80287a;
}
ul.white-list {
- padding: 0;
- list-style-type: none;
+ padding: 0;
+ list-style-type: none;
}
ul.white-list li {
- font-size: 18px;
- margin: 10px 0;
- color: #fff;
+ font-size: 18px;
+ margin: 10px 0;
+ color: #fff;
}
ul.white-list li:before {
- content: ' ';
- position: relative;
- top: -3px;
- display: inline-block;
- width: 6px;
- height: 6px;
- margin-right: 15px;
- background: white;
+ content: ' ';
+ position: relative;
+ top: -3px;
+ display: inline-block;
+ width: 6px;
+ height: 6px;
+ margin-right: 15px;
+ background: white;
}
header {
- position: relative;
- width: 100%;
- color: #80287a;
- background: rgba(28, 36, 65, 0.93);
- background: url('../img/header.jpg');
- background-size: cover;
+ position: relative;
+ width: 100%;
+ color: #80287a;
+ background: rgba(28, 36, 65, 0.93);
+ background: url('../img/header.jpg');
+ background-size: cover;
}
header .table {
- display: table;
- height: 100%;
+ display: table;
+ height: 100%;
}
header .container {
- height: 100%;
+ height: 100%;
}
header .header-text {
- display: table-cell;
- text-align: center;
- vertical-align: middle;
- color: #80287a;
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ color: #80287a;
}
header .typed {
- display: inline-block;
- margin: 0;
+ display: inline-block;
+ margin: 0;
}
header .typed-cursor {
- font-size: 60px;
- display: inline-block;
- margin: 0 10px;
- color: #80287a;
- -webkit-animation-name: flash;
- animation-name: flash;
- -webkit-animation-duration: 1s;
- animation-duration: 1s;
- -webkit-animation-iteration-count: infinite;
- animation-iteration-count: infinite;
+ font-size: 60px;
+ display: inline-block;
+ margin: 0 10px;
+ color: #80287a;
+ -webkit-animation-name: flash;
+ animation-name: flash;
+ -webkit-animation-duration: 1s;
+ animation-duration: 1s;
+ -webkit-animation-iteration-count: infinite;
+ animation-iteration-count: infinite;
}
+ul, ol {
+ margin-bottom: 20px;
+}
pre {
- border: 0px solid #ccc;
- margin: 0 0 20px;
+ border: 0px solid #ccc;
+ margin: 0 0 20px;
}
+
code {
- color: #8a6d3b;
- background-color: #f5f5f5;
+ color: #8a6d3b;
+ background-color: #f5f5f5;
}
+
p {
- margin: 0px 0 20px;
+ margin: 0px 0 20px;
}
+
td p {
- margin: 0px;
+ margin: 0px;
}
body {
- font-size: 17px;
- line-height: 1.5;
- -webkit-font-smoothing: antialiased;
+ font-size: 17px;
+ line-height: 1.5;
+ -webkit-font-smoothing: antialiased;
}
-h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
- margin-top: 20px;
- margin-bottom: 20px;
+
+h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
+ margin-top: 20px;
+ margin-bottom: 20px;
}
+
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
- font-weight: 300;
+ font-weight: 300;
}
+
h5, .h5, h6, .h6 {
- margin-top: 25px;
- font-weight: 600;
+ margin-top: 25px;
+ font-weight: 600;
}
+
.page-header h1 {
- font-weight: 500;
+ font-weight: 500;
}
+
.page-header {
- margin: 40px 0 20px;
+ margin: 40px 0 20px;
}
+
li {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
.nav > li {
- margin: 0px;
+ margin: 0px;
}
+
/*a {*/
- /*text-decoration: none;*/
- /*color: #80287a;*/
- /*-webkit-transition: all 0.3s ease;*/
- /*transition: all 0.3s ease;*/
+/*text-decoration: none;*/
+/*color: #80287a;*/
+/*-webkit-transition: all 0.3s ease;*/
+/*transition: all 0.3s ease;*/
/*}*/
/* Navigation Bar ( Navbar ) */
nav.navbar {
- position: absolute;
- z-index: 9500;
- width: 100%;
- width: 100vw;
- -webkit-transition: all 0.3s ease;
- transition: all 0.3s ease;
+ position: absolute;
+ z-index: 9500;
+ width: 100%;
+ width: 100vw;
+ -webkit-transition: all 0.3s ease;
+ transition: all 0.3s ease;
}
nav.navbar .navbar-nav li.active a:not(.btn) {
- color: #80287a !important;
+ color: #80287a !important;
}
nav.navbar-fixed-top {
- z-index: 9499;
- top: 0;
- padding-top: 10px;
- padding-bottom: 10px;
- opacity: 1;
- background: white;
- box-shadow: 0px 4px 3px rgba(0, 0, 0, 0.05);
+ z-index: 9499;
+ top: 0;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ opacity: 1;
+ background: white;
+ box-shadow: 0px 4px 3px rgba(0, 0, 0, 0.05);
}
nav.navbar-fixed-top .navbar-nav > li > a:not(.btn) {
- color: #bbb;
+ color: #bbb;
}
.icon-bar {
- background: #bbb;
+ background: #bbb;
}
+
/* Buttons */
.btn {
- font-size: 18px;
- display: inline-block;
- padding: 15px 30px;
- color: #80287a;
- border: 2px solid transparent;
- border-radius: 2px;
- background: transparent;
- -webkit-transition: all 0.3s ease;
- transition: all 0.3s ease;
+ font-size: 18px;
+ display: inline-block;
+ padding: 15px 30px;
+ color: #80287a;
+ border: 2px solid transparent;
+ border-radius: 2px;
+ background: transparent;
+ -webkit-transition: all 0.3s ease;
+ transition: all 0.3s ease;
}
.btn:hover,
.btn:focus {
- color: #CE2D34;
+ color: #CE2D34;
}
.btn.btn-blue {
- background: #80287a;
- color: #fff;
+ background: #80287a;
+ color: #fff;
}
.btn.btn-blue:hover {
- background: #31b9ff;
+ background: #31b9ff;
}
.btn.btn-blue-fill {
- color: #80287a;
- border-color: #80287a;
- background: transparent;
+ color: #80287a;
+ border-color: #80287a;
+ background: transparent;
}
.btn.btn-blue-fill:hover {
- color: white;
- background: #80287a;
+ color: white;
+ background: #80287a;
}
.btn.btn-white-fill {
- color: #fff;
- border-color: #fff;
- background: transparent;
+ color: #fff;
+ border-color: #fff;
+ background: transparent;
}
.btn.btn-white-fill:hover {
- color: #80287a;
- background: #fff;
+ color: #80287a;
+ background: #fff;
}
.btn.btn-gray-fill {
- color: #fff;
- border-color: #fff;
- background: transparent;
+ color: #fff;
+ border-color: #fff;
+ background: transparent;
}
.btn.btn-gray-fill:hover {
- border-color: #bbb;
- background: #bbb;
+ border-color: #bbb;
+ background: #bbb;
}
/* Blink Cursor */
.blink {
- position: relative;
- top: 4px;
- display: inline-block;
- width: 4px;
- height: 50px;
- height: 5vh;
- margin: 0 10px;
+ position: relative;
+ top: 4px;
+ display: inline-block;
+ width: 4px;
+ height: 50px;
+ height: 5vh;
+ margin: 0 10px;
}
.navbar {
- top: 50px;
+ top: 50px;
}
.container {
- position: relative;
- z-index: 1;
+ position: relative;
+ z-index: 1;
}
+
/* Sections */
section {
- position: relative;
+ position: relative;
}
.section {
- padding: 40px 0;
- background: #fff;
+ padding: 40px 0;
+ background: #fff;
}
.section-padded {
- padding: 50px 0 40px;
+ padding: 50px 0 40px;
}
.cut-top {
- content: ' ';
- position: absolute;
- z-index: 1;
- top: -80px;
- left: 0;
- width: 0;
- height: 0;
- border-top: 80px solid transparent;
- border-right: 30px solid white;
+ content: ' ';
+ position: absolute;
+ z-index: 1;
+ top: -80px;
+ left: 0;
+ width: 0;
+ height: 0;
+ border-top: 80px solid transparent;
+ border-right: 30px solid white;
}
.cut-bottom {
- content: ' ';
- position: absolute;
- z-index: 1;
- bottom: -80px;
- left: 0;
- width: 0;
- height: 0;
- border-bottom: 80px solid transparent;
- border-left: 30px solid white;
+ content: ' ';
+ position: absolute;
+ z-index: 1;
+ bottom: -80px;
+ left: 0;
+ width: 0;
+ height: 0;
+ border-bottom: 80px solid transparent;
+ border-left: 30px solid white;
}
.intro-tables {
- top: -130px;
- position: relative;
+ top: -130px;
+ position: relative;
}
.intro-table {
- -webkit-background-size: cover;
- background-size: cover;
- background-repeat: repeat;
- background-position: 0% 0%;
+ -webkit-background-size: cover;
+ background-size: cover;
+ background-repeat: repeat;
+ background-position: 0% 0%;
}
-
.intro-table-hover:hover {
- -webkit-transition: background-image 0.3s ease, background-position 0.3s;
- transition: background-image 0.3s ease, background-position 0.3s;
+ -webkit-transition: background-image 0.3s ease, background-position 0.3s;
+ transition: background-image 0.3s ease, background-position 0.3s;
}
-
.intro-table1 {
- background-image: url('../img/table-1.jpg');
+ background-image: url('../img/table-1.jpg');
}
.intro-table2 {
- background-image: url('../img/table-2.jpg');
+ background-image: url('../img/table-2.jpg');
}
.intro-table3 {
- background-image: url('../img/table-3.jpg');
+ background-image: url('../img/table-3.jpg');
}
.intro-table-hover1:hover {
- background-image: url('../img/table-1-hover.jpg');
+ background-image: url('../img/table-1-hover.jpg');
}
.intro-table-hover2:hover {
- background-image: url('../img/table-2-hover.jpg');
+ background-image: url('../img/table-2-hover.jpg');
}
.intro-table-hover3:hover {
- background-image: url('../img/table-3-hover.jpg');
+ background-image: url('../img/table-3-hover.jpg');
}
.intro-table-hover h4 {
- -webkit-transform: translateY(170px);
- transform: translateY(170px);
- -webkit-transition: -webkit-transform 0.3s;
- transition: transform 0.3s;
+ -webkit-transform: translateY(170px);
+ transform: translateY(170px);
+ -webkit-transition: -webkit-transform 0.3s;
+ transition: transform 0.3s;
}
.intro-table-hover {
- background-position: 50% 50%;
+ background-position: 50% 50%;
}
-
.intro-table-hover .expand {
- margin-top: 120px;
- margin: 30px;
- opacity: 0;
- -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
- transition: transform 0.3s ease, opacity 0.3s;
- -webkit-transform: scale(0.6);
- -ms-transform: scale(0.6);
- transform: scale(0.6);
+ margin-top: 120px;
+ margin: 30px;
+ opacity: 0;
+ -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
+ transition: transform 0.3s ease, opacity 0.3s;
+ -webkit-transform: scale(0.6);
+ -ms-transform: scale(0.6);
+ transform: scale(0.6);
}
.intro-table-hover:hover h4 {
- -webkit-transform: translateY(0);
- transform: translateY(0);
+ -webkit-transform: translateY(0);
+ transform: translateY(0);
}
.intro-table-hover:hover .expand {
- opacity: 1;
- -webkit-transform: scale(1);
- -ms-transform: scale(1);
- transform: scale(1);
+ opacity: 1;
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
}
.intro-table-hover .hide-hover {
- -webkit-transition: opacity 0.3s ease;
- transition: opacity 0.3s ease;
+ -webkit-transition: opacity 0.3s ease;
+ transition: opacity 0.3s ease;
}
.intro-table-hover:hover .hide-hover {
- opacity: 0;
+ opacity: 0;
}
.intro-tables .intro-table {
- position: relative;
- width: 100%;
- height: 300px;
- margin: 20px 0;
+ position: relative;
+ width: 100%;
+ height: 300px;
+ margin: 20px 0;
}
header h2 {
- font-size: 48px;
- font-weight: 500;
+ font-size: 48px;
+ font-weight: 500;
}
section h5 {
- font-weight: 500;
- font-size: 20px;
+ font-weight: 500;
+ font-size: 20px;
}
.intro-tables .intro-table .heading {
- margin: 0;
- padding: 30px;
+ margin: 0;
+ padding: 30px;
}
.intro-tables .intro-table .small-heading {
- margin: 0;
- padding: 0 30px;
+ margin: 0;
+ padding: 0 30px;
}
.intro-tables .intro-table .bottom {
- position: absolute;
- bottom: 0;
+ position: absolute;
+ bottom: 0;
}
.intro-tables .intro-table .owl-schedule .schedule-row {
- padding: 10px 30px;
- color: #80287a;
- transition: all 0.3s ease;
+ padding: 10px 30px;
+ color: #80287a;
+ transition: all 0.3s ease;
}
.owl-schedule .schedule-row:not(:last-child) {
- border-bottom: 1px solid rgba(255, 255, 255, 0.4);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.owl-testimonials .author {
- margin-top: 50px;
+ margin-top: 50px;
}
.ripple-effect {
- position: absolute;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- background: #80287a;
- -webkit-animation: ripple-animation 2s;
- animation: ripple-animation 2s;
+ position: absolute;
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ background: #80287a;
+ -webkit-animation: ripple-animation 2s;
+ animation: ripple-animation 2s;
}
@-webkit-keyframes ripple-animation {
- from {
- opacity: 0.2;
- -webkit-transform: scale(1);
- transform: scale(1);
- }
- to {
- opacity: 0;
- -webkit-transform: scale(100);
- transform: scale(100);
- }
+ from {
+ opacity: 0.2;
+ -webkit-transform: scale(1);
+ transform: scale(1);
+ }
+ to {
+ opacity: 0;
+ -webkit-transform: scale(100);
+ transform: scale(100);
+ }
}
@keyframes ripple-animation {
- from {
- opacity: 0.2;
- -webkit-transform: scale(1);
- transform: scale(1);
- }
- to {
- opacity: 0;
- -webkit-transform: scale(100);
- transform: scale(100);
- }
+ from {
+ opacity: 0.2;
+ -webkit-transform: scale(1);
+ transform: scale(1);
+ }
+ to {
+ opacity: 0;
+ -webkit-transform: scale(100);
+ transform: scale(100);
+ }
}
.services {
- margin: 40px 0;
+ margin: 40px 0;
}
.service {
- width: 100%;
- height: 320px;
- margin: 80px 0;
- text-align: center;
- border: 1px solid #ddd;
- -webkit-transition: all 0.3s ease;
- transition: all 0.3s ease;
+ width: 100%;
+ height: 320px;
+ margin: 80px 0;
+ text-align: center;
+ border: 1px solid #ddd;
+ -webkit-transition: all 0.3s ease;
+ transition: all 0.3s ease;
}
.service .icon-holder {
- position: relative;
- top: 100px;
- display: inline-block;
- margin-bottom: 40px;
- padding: 10px;
- background: #80287a;
- -webkit-transition: all 0.3s ease;
- transition: all 0.3s ease;
+ position: relative;
+ top: 100px;
+ display: inline-block;
+ margin-bottom: 40px;
+ padding: 10px;
+ background: #80287a;
+ -webkit-transition: all 0.3s ease;
+ transition: all 0.3s ease;
}
.service .heading {
- position: relative;
- top: 80px;
- -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
- transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ position: relative;
+ top: 80px;
+ -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.service .icon-holder > img.icon {
- width: 40px;
+ width: 40px;
}
.service:hover {
- border-color: #80287a;
+ border-color: #80287a;
}
.service:hover .icon-holder {
- top: -30px;
+ top: -30px;
}
.service:hover .heading {
- top: -30px;
+ top: -30px;
}
.service .description {
- width: 80%;
- margin: 0 auto;
- opacity: 0;
- -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
- transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
- -webkit-transform: scale(0);
- -ms-transform: scale(0);
- transform: scale(0);
+ width: 80%;
+ margin: 0 auto;
+ opacity: 0;
+ -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
}
.service:hover .description {
- opacity: 1;
- -webkit-transform: scale(1);
- -ms-transform: scale(1);
- transform: scale(1);
+ opacity: 1;
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
}
.team {
- margin: 80px 0;
- padding-bottom: 60px;
- background: #80287a;
- box-shadow: 0 2px 3px rgba(0, 0, 0, 0.07);
+ margin: 80px 0;
+ padding-bottom: 60px;
+ background: #80287a;
+ box-shadow: 0 2px 3px rgba(0, 0, 0, 0.07);
}
.team .cover .overlay {
- height: 250px;
- padding-top: 60px;
- opacity: 0;
- background: rgba(0, 168, 255, 0.9);
- -webkit-transition: opacity 0.45s ease;
- transition: opacity 0.45s ease;
+ height: 250px;
+ padding-top: 60px;
+ opacity: 0;
+ background: rgba(0, 168, 255, 0.9);
+ -webkit-transition: opacity 0.45s ease;
+ transition: opacity 0.45s ease;
}
.team:hover .cover .overlay {
- opacity: 1;
+ opacity: 1;
}
.team .avatar {
- position: relative;
- z-index: 2;
- margin-top: -60px;
- border-radius: 50%;
+ position: relative;
+ z-index: 2;
+ margin-top: -60px;
+ border-radius: 50%;
}
.team .title {
- margin: 50px 0;
+ margin: 50px 0;
}
+
/* Pricing */
#pricing {
- background: #80287a url('../img/pricing1.jpg') no-repeat center center;
- -webkit-background-size: cover;
- background-size: cover;
- -webkit-transition: background-image 0.6s linear 0.3s;
- transition: background-image 0.6s linear 0.3s;
+ background: #80287a url('../img/pricing1.jpg') no-repeat center center;
+ -webkit-background-size: cover;
+ background-size: cover;
+ -webkit-transition: background-image 0.6s linear 0.3s;
+ transition: background-image 0.6s linear 0.3s;
}
.owl-pricing img {
- width: 100%;
+ width: 100%;
}
.owl-pricing,
.pricings {
- margin-top: 100px;
- margin-bottom: 100px;
+ margin-top: 100px;
+ margin-bottom: 100px;
}
.pricing {
- position: relative;
- width: 100%;
+ position: relative;
+ width: 100%;
}
.pricings .pricing .box-main,
.pricings .pricing .box-second {
- position: relative;
- left: 25%;
- display: inline-block;
- width: 50%;
- height: 300px;
- padding: 50px 40px;
- background: #bbb;
- -webkit-transition: -webkit-transform 0.3s, background-image 0.3s, opacity 0.3s;
- transition: transform 0.3s, background-image 0.3s, opacity 0.3s;
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
+ position: relative;
+ left: 25%;
+ display: inline-block;
+ width: 50%;
+ height: 300px;
+ padding: 50px 40px;
+ background: #bbb;
+ -webkit-transition: -webkit-transform 0.3s, background-image 0.3s, opacity 0.3s;
+ transition: transform 0.3s, background-image 0.3s, opacity 0.3s;
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
}
.pricings .pricing .box-main {
- z-index: 10;
- padding-top: 40px;
+ z-index: 10;
+ padding-top: 40px;
}
.pricings .pricing .box-main:not(.active) {
- cursor: pointer;
+ cursor: pointer;
}
.pricings .pricing .box-main .info-icon {
- font-size: 14px;
- position: absolute;
- top: 20px;
- right: 20px;
- pointer-events: none;
- opacity: 0;
- color: #fff;
- -webkit-transition: opacity 0.3s;
- transition: opacity 0.3s;
+ font-size: 14px;
+ position: absolute;
+ top: 20px;
+ right: 20px;
+ pointer-events: none;
+ opacity: 0;
+ color: #fff;
+ -webkit-transition: opacity 0.3s;
+ transition: opacity 0.3s;
}
.pricings .pricing .box-main:not(.active) .info-icon {
- opacity: 1;
- -webkit-transition-delay: 0.2s;
- transition-delay: 0.2s;
+ opacity: 1;
+ -webkit-transition-delay: 0.2s;
+ transition-delay: 0.2s;
}
.pricings .pricing .box-main:not(.active):hover {
- background: #afafaf;
+ background: #afafaf;
}
.pricings .pricing .box-main.active {
- background: #80287a;
- -webkit-transform: translateX(-99%);
- -ms-transform: translateX(-99%);
- transform: translateX(-99%);
+ background: #80287a;
+ -webkit-transform: translateX(-99%);
+ -ms-transform: translateX(-99%);
+ transform: translateX(-99%);
}
.pricings .pricing .box-second {
- position: absolute;
- top: 0;
- right: 0% !important;
- left: auto;
- opacity: 0;
- background: #afafaf;
+ position: absolute;
+ top: 0;
+ right: 0% !important;
+ left: auto;
+ opacity: 0;
+ background: #afafaf;
}
.pricings .pricing .box-second.active {
- opacity: 1;
- background: #80287a;
+ opacity: 1;
+ background: #80287a;
}
.pricings .pricing.active .box-main,
.pricings .pricing .box-second {
- background: #80287a;
+ background: #80287a;
}
.pricings .pricing .box-main a.btn {
- margin-top: 50px;
+ margin-top: 50px;
}
.owl-twitter i.icon {
- font-size: 36px;
- margin-bottom: 60px;
- color: #80287a;
+ font-size: 36px;
+ margin-bottom: 60px;
+ color: #80287a;
}
+
/* Footer */
footer {
- padding: 60px 0 40px;
- background-image:linear-gradient(to right, #f59423, #e2632a, #ca2136, #832778);
- -webkit-background-size: cover;
- background-size: cover;
+ padding: 60px 0 40px;
+ background-image: linear-gradient(to right, #f59423, #e2632a, #ca2136, #832778);
+ -webkit-background-size: cover;
+ background-size: cover;
}
footer .trial-button {
- overflow: hidden !important;
- margin: 40px 0;
+ overflow: hidden !important;
+ margin: 40px 0;
}
footer .open-blink {
- content: ' ';
- position: relative;
- display: inline-block;
- width: 14px;
- height: 14px;
- margin: 0 20px;
- border-radius: 50%;
- background-color: #4caf50;
- -webkit-animation-name: flash;
- animation-name: flash;
- -webkit-animation-duration: 1s;
- animation-duration: 1s;
- -webkit-animation-iteration-count: infinite;
- animation-iteration-count: infinite;
+ content: ' ';
+ position: relative;
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ margin: 0 20px;
+ border-radius: 50%;
+ background-color: #4caf50;
+ -webkit-animation-name: flash;
+ animation-name: flash;
+ -webkit-animation-duration: 1s;
+ animation-duration: 1s;
+ -webkit-animation-iteration-count: infinite;
+ animation-iteration-count: infinite;
}
footer .open-blink:before {
- content: ' ';
- position: absolute;
- top: -8px;
- left: -8px;
- display: inline-block;
- width: 30px;
- height: 30px;
- opacity: 0.1;
- border-radius: 50%;
- background-color: #4caf50;
+ content: ' ';
+ position: absolute;
+ top: -8px;
+ left: -8px;
+ display: inline-block;
+ width: 30px;
+ height: 30px;
+ opacity: 0.1;
+ border-radius: 50%;
+ background-color: #4caf50;
}
-
footer .social-footer {
- padding: 0;
- margin-left: -.5em;
- list-style: none;
+ padding: 0;
+ margin-left: -.5em;
+ list-style: none;
}
footer .social-footer li {
- display: inline-block;
- margin: 0 10px;
+ display: inline-block;
+ margin: 0 10px;
}
footer .social-footer li a {
- font-size: 24px;
- color: #fff;
+ font-size: 24px;
+ color: #fff;
}
footer .social-footer li:hover a {
- color: #80287a;
+ color: #80287a;
}
+
/* Form Control */
.form-control {
- font-size: 18px;
- position: relative;
- left: 0;
- height: auto;
- padding: 20px 30px;
- border: 1px;
- border-radius: 0;
- box-shadow: 0;
+ font-size: 18px;
+ position: relative;
+ left: 0;
+ height: auto;
+ padding: 20px 30px;
+ border: 1px;
+ border-radius: 0;
+ box-shadow: 0;
}
.form-control.form-white {
- color: #fff;
- border: 2px solid white;
- background: transparent;
- -webkit-transition: background-color 0.3s;
- transition: background-color 0.3s;
+ color: #fff;
+ border: 2px solid white;
+ background: transparent;
+ -webkit-transition: background-color 0.3s;
+ transition: background-color 0.3s;
}
.form-control.form-white::-webkit-input-placeholder {
- /* WebKit browsers */
- color: #fff;
+ /* WebKit browsers */
+ color: #fff;
}
.form-control.form-white:-moz-placeholder {
- opacity: 1;
- /* Mozilla Firefox 4 to 18 */
- color: #fff;
+ opacity: 1;
+ /* Mozilla Firefox 4 to 18 */
+ color: #fff;
}
.form-control.form-white::-moz-placeholder {
- opacity: 1;
- /* Mozilla Firefox 19+ */
- color: #fff;
+ opacity: 1;
+ /* Mozilla Firefox 19+ */
+ color: #fff;
}
.form-control.form-white:-ms-input-placeholder {
- /* Internet Explorer 10+ */
- color: #fff;
+ /* Internet Explorer 10+ */
+ color: #fff;
}
.form-control.form-white:focus {
- background: rgba(255,255,255,0.2);
+ background: rgba(255, 255, 255, 0.2);
}
/* Popup */
.modal {
- padding: 0 25px !important;
+ padding: 0 25px !important;
}
.modal-dialog {
- width: 100%;
- max-width: 560px;
- margin: 0 auto;
+ width: 100%;
+ max-width: 560px;
+ margin: 0 auto;
}
.modal-popup {
- position: relative;
- padding: 45px 30px;
- text-align: center;
- background: url('../img/popup.jpg');
- box-shadow: none;
- border-radius: 2px;
+ position: relative;
+ padding: 45px 30px;
+ text-align: center;
+ background: url('../img/popup.jpg');
+ box-shadow: none;
+ border-radius: 2px;
}
.modal-popup a.close-link {
- font-size: 22px;
- position: absolute;
- top: 20px;
- right: 30px;
- color: #fff;
+ font-size: 22px;
+ position: absolute;
+ top: 20px;
+ right: 30px;
+ color: #fff;
}
.popup-form {
- width: 90%;
- max-width: 375px;
- margin: 60px auto;
+ width: 90%;
+ max-width: 375px;
+ margin: 60px auto;
}
.popup-form .form-control {
- margin: 20px 0;
+ margin: 20px 0;
}
.popup-form .form-control.dropdown {
- text-align: left;
+ text-align: left;
}
.popup-form .form-control.dropdown:after {
- content: '\f0d7';
- font-family: 'FontAwesome';
- display: inline-block;
- float: right;
- color: white;
+ content: '\f0d7';
+ font-family: 'FontAwesome';
+ display: inline-block;
+ float: right;
+ color: white;
}
.popup-form .dropdown .dropdown-menu {
- top: 65px;
- width: 100%;
- padding: 0;
- border: 2px solid white;
- border-top: 0;
- border-radius: 0;
- background: white;
- box-shadow: none;
+ top: 65px;
+ width: 100%;
+ padding: 0;
+ border: 2px solid white;
+ border-top: 0;
+ border-radius: 0;
+ background: white;
+ box-shadow: none;
}
.popup-form .dropdown .dropdown-menu li {
- font-size: 16px;
- width: 100%;
- background: transparent;
+ font-size: 16px;
+ width: 100%;
+ background: transparent;
}
.popup-form .dropdown .dropdown-menu li a {
- width: 100%;
- padding: 15px 30px;
- color: #80287a;
+ width: 100%;
+ padding: 15px 30px;
+ color: #80287a;
}
.popup-form .dropdown .dropdown-menu li:hover a {
- color: #fff;
- background: #80287a;
+ color: #fff;
+ background: #80287a;
}
/* Checkbox */
.checkbox-holder {
- white-space: nowrap;
+ white-space: nowrap;
}
.checkbox {
- position: relative;
- display: block;
+ position: relative;
+ display: block;
}
.checkbox {
- position: relative;
+ position: relative;
}
.checkbox label:before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 20px;
- height: 20px;
- cursor: pointer;
- border: 2px solid white;
- background: transparent;
- -webkit-transition: background-color 0.3s;
- transition: background-color 0.3s;
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+ border: 2px solid white;
+ background: transparent;
+ -webkit-transition: background-color 0.3s;
+ transition: background-color 0.3s;
}
.checkbox input[type=checkbox]:focus + label:before {
- background: rgba(255,255,255,0.2);
+ background: rgba(255, 255, 255, 0.2);
}
.checkbox label:after {
- content: '';
- position: absolute;
- top: 6px;
- left: 6px;
- width: 8px;
- height: 8px;
- opacity: 0;
- background: white;
- -webkit-transition: all 0.3s ease;
- transition: all 0.3s ease;
+ content: '';
+ position: absolute;
+ top: 6px;
+ left: 6px;
+ width: 8px;
+ height: 8px;
+ opacity: 0;
+ background: white;
+ -webkit-transition: all 0.3s ease;
+ transition: all 0.3s ease;
}
.checkbox input[type=checkbox] {
- opacity: 0;
- position: absolute;
- width: 0;
- height: 0;
+ opacity: 0;
+ position: absolute;
+ width: 0;
+ height: 0;
}
.checkbox input[type=checkbox]:checked + label:after {
- opacity: 1;
+ opacity: 1;
}
.checkbox-holder span {
- position: relative;
- display: inline-block;
- margin: 0 0 0 10px;
- white-space: normal;
- color: #fff;
+ position: relative;
+ display: inline-block;
+ margin: 0 0 0 10px;
+ white-space: normal;
+ color: #fff;
}
.btn.btn-submit {
- width: 100%;
- margin-top: 30px;
- color: #80287a;
- border: 2px solid #fff;
- background: #fff;
+ width: 100%;
+ margin-top: 30px;
+ color: #80287a;
+ border: 2px solid #fff;
+ background: #fff;
}
.btn.btn-submit:focus {
- font-weight: bold;
+ font-weight: bold;
}
.btn.btn-submit:hover {
- color: #80287a;
- background: #fff;
+ color: #80287a;
+ background: #fff;
}
/* Mobile Nav */
.mobile-nav {
- position: fixed;
- z-index: 9999;
- top: 0;
- left: 0;
- display: table;
- width: 100%;
- height: 100%;
- text-align: center;
- opacity: 0;
- background: rgba(255, 255, 255, 0.98);
- -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
- transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
- -webkit-transform: scale(0);
- -ms-transform: scale(0);
- transform: scale(0);
+ position: fixed;
+ z-index: 9999;
+ top: 0;
+ left: 0;
+ display: table;
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ opacity: 0;
+ background: rgba(255, 255, 255, 0.98);
+ -webkit-transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
}
.mobile-nav.active {
- opacity: 1;
- -webkit-transform: scale(1);
- -ms-transform: scale(1);
- transform: scale(1);
+ opacity: 1;
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
}
.mobile-nav ul {
- display: table-cell;
- padding: 0;
- list-style: none;
- vertical-align: middle;
+ display: table-cell;
+ padding: 0;
+ list-style: none;
+ vertical-align: middle;
}
.mobile-nav ul li {
- margin: 25px 0;
+ margin: 25px 0;
}
.mobile-nav ul li a:not(.btn) {
- color: #aaa;
+ color: #aaa;
}
.mobile-nav a.close-link {
- font-size: 24px;
- position: absolute;
- bottom: 0px;
- left: calc(50% - 10px);
- left: 0;
- width: 100%;
- padding: 15px 0;
- color: #fff;
- background: #80287a;
+ font-size: 24px;
+ position: absolute;
+ bottom: 0px;
+ left: calc(50% - 10px);
+ left: 0;
+ width: 100%;
+ padding: 15px 0;
+ color: #fff;
+ background: #80287a;
}
.light {
- font-weight: 300;
+ font-weight: 300;
}
.regular {
- font-weight: 400;
+ font-weight: 400;
}
.bold {
- font-weight: bold;
+ font-weight: bold;
}
+
/* Colors */
.white {
- color: white;
+ color: white;
}
.light-white {
- color: rgba(255, 255, 255, 0.5);
+ color: rgba(255, 255, 255, 0.5);
}
.white-bg {
- background: white;
+ background: white;
}
.gray-bg {
- background: #f7f7f7;
+ background: #f7f7f7;
}
.blue {
- color: #80287a;
+ color: #80287a;
}
.blue-bg {
- background: #80287a;
+ background: #80287a;
}
.muted {
- color: #989da0;
+ color: #989da0;
}
.margin-top {
- margin-top: 150px;
-}
-
-@media(max-width:992px) {
- h1 {
- font-size: 36px;
- }
- h2 {
- font-size: 28px;
- }
- h3 {
- font-size: 24px;
- }
- h4 {
- font-size: 20px;
- }
- h5 {
- font-size: 16px;
- }
- h6 {
- font-size: 12px;
- }
- .section {
- padding: 30px 0;
- }
+ margin-top: 150px;
+}
+
+@media (max-width: 992px) {
+ h1 {
+ font-size: 36px;
+ }
+
+ h2 {
+ font-size: 28px;
+ }
+
+ h3 {
+ font-size: 24px;
+ }
+
+ h4 {
+ font-size: 20px;
+ }
+
+ h5 {
+ font-size: 16px;
+ }
+
+ h6 {
+ font-size: 12px;
+ }
+
+ .section {
+ padding: 30px 0;
+ }
}
/* Media Queries */
-@media(max-width:991px) {
- .text-center-mobile {
- text-align: center !important;
- }
-}
-
-@media(max-width: 768px) {
- .pricing {
- margin-bottom: 30px;
- }
- .pricings .pricing .info-icon {
- display: none;
- }
- .pricings .pricing .box-main,
- .pricings .pricing .box-second {
- left: 0;
- width: 100%;
- padding: 50px 50px 0;
- text-align: left;
- background: #80287a;
- }
- .pricings .pricing .box-main.active {
- background: #80287a;
- -webkit-transform: translateX(0%);
- -ms-transform: translateX(0%);
- transform: translateX(0%);
- }
- .pricings .pricing .box-second {
- position: relative;
- opacity: 1;
- }
- .popup-form {
- width: 100%;
- margin: 60px auto;
- }
- .modal {
- padding: 0 10px !important;
- }
- .popup-form .form-control:not(.dropdown):focus {
- position: relative;
- padding-right: 30px;
- padding-left: 30px;
- }
-}
-
-@media(max-width: 400px) {
- header .typed-cursor {
- display: none;
- }
- .pricings .pricing .box-second {
- padding-top: 0;
- }
+@media (max-width: 991px) {
+ .text-center-mobile {
+ text-align: center !important;
+ }
}
-.index-title {
- font-size: 80px;
+@media (max-width: 768px) {
+ .pricing {
+ margin-bottom: 30px;
+ }
+
+ .pricings .pricing .info-icon {
+ display: none;
+ }
+
+ .pricings .pricing .box-main,
+ .pricings .pricing .box-second {
+ left: 0;
+ width: 100%;
+ padding: 50px 50px 0;
+ text-align: left;
+ background: #80287a;
+ }
+
+ .pricings .pricing .box-main.active {
+ background: #80287a;
+ -webkit-transform: translateX(0%);
+ -ms-transform: translateX(0%);
+ transform: translateX(0%);
+ }
+
+ .pricings .pricing .box-second {
+ position: relative;
+ opacity: 1;
+ }
+
+ .popup-form {
+ width: 100%;
+ margin: 60px auto;
+ }
+
+ .modal {
+ padding: 0 10px !important;
+ }
+
+ .popup-form .form-control:not(.dropdown):focus {
+ position: relative;
+ padding-right: 30px;
+ padding-left: 30px;
+ }
}
+@media (max-width: 400px) {
+ header .typed-cursor {
+ display: none;
+ }
+
+ .pricings .pricing .box-second {
+ padding-top: 0;
+ }
+}
+
+.index-title {
+ font-size: 80px;
+}
.contributor-name {
- color: #80287a;
- font-size: 1.7em;
- margin-bottom: 0.5em;
+ color: #80287a;
+ font-size: 1.7em;
+ margin-bottom: 0.5em;
}
.photo {
- border: 1px solid #ddd;
- box-shadow: 0 1px 3px rgba(0,0,0,0.055);
- border-radius: 4px;
- padding: 4px;
+ border: 1px solid #ddd;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
+ border-radius: 4px;
+ padding: 4px;
}
-
.bs-callout {
- min-height: 160px;
- padding: 20px;
- border: 1px solid #eee;
- border-left-width: 5px;
- border-radius: 3px;
+ min-height: 160px;
+ padding: 20px;
+ border: 1px solid #eee;
+ border-left-width: 5px;
+ border-radius: 3px;
}
+
.bs-callout h4 {
- margin-top: 0;
- margin-bottom: 5px;
+ margin-top: 0;
+ margin-bottom: 5px;
}
+
.bs-callout p:last-child {
- margin-bottom: 0;
+ margin-bottom: 0;
}
+
.bs-callout code {
- border-radius: 3px;
+ border-radius: 3px;
}
-.bs-callout+.bs-callout {
- margin-top: -5px;
+
+.bs-callout + .bs-callout {
+ margin-top: -5px;
}
+
.bs-callout-primary {
- border-left-color: #80287a;
+ border-left-color: #80287a;
}
+
.bs-callout-primary h4 {
- color: #80287a;
+ color: #80287a;
}
-h2 { /*ensure downlooad as PDF are clickable*/
- z-index: -1;
+
+h2 {
+ /*ensure downlooad as PDF are clickable*/
+ z-index: -1;
}
+
vspace {
- height: 1em;
+ height: 1em;
}
-.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; }
+.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
+ text-align: left;
+ font-weight: bold;
+}
-.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; }
+.tableblock > caption {
+ text-align: left;
+ font-weight: bold;
+ white-space: nowrap;
+ overflow: visible;
+ max-width: 0;
+}
-table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; }
+table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p {
+ font-size: inherit;
+}
.admonitionblock > table {
- border: 0;
- background: none;
- width: 100%;
- margin: 0px 0px 20px;
+ border: 0;
+ background: none;
+ width: 100%;
+ margin: 0px 0px 20px;
}
.admonitionblock > table td.icon {
- text-align: center;
- width: 80px;
+ text-align: center;
+ width: 80px;
}
.admonitionblock > table td.icon img {
- max-width: none;
+ max-width: none;
}
.admonitionblock > table td.icon .title {
- font-weight: bold;
- text-transform: uppercase;
+ font-weight: bold;
+ text-transform: uppercase;
}
.admonitionblock > table td.content {
- padding-left: 1.125em;
- padding-right: 1.25em;
- border-left: 1px solid #dddddd;
- color: #6f6f6f;
- font-size: 15px;
+ padding-left: 1.125em;
+ padding-right: 1.25em;
+ border-left: 1px solid #dddddd;
+ color: #6f6f6f;
+ font-size: 15px;
}
.admonitionblock > table td.content > :last-child > :last-child {
- margin-bottom: 0;
+ margin-bottom: 0;
}
[class^="icon-"], [class*=" icon-"] {
- display: inline-block;
- vertical-align: middle;
- background-position: 14px 14px;
- background-repeat: no-repeat;
+ display: inline-block;
+ vertical-align: middle;
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+}
+
+span.icon > [class^="icon-"], span.icon > [class*=" icon-"] {
+ cursor: default;
}
-span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
.admonitionblock td.icon [class^="fa icon-"]:before {
- font-size: 2.5em;
- text-shadow: 1px 1px 2px #e6e6e6;
- cursor: default; /* -webkit-font-smoothing: antialiased; */
+ font-size: 2.5em;
+ text-shadow: 1px 1px 2px #e6e6e6;
+ cursor: default; /* -webkit-font-smoothing: antialiased; */
}
.admonitionblock td.icon .icon-note:before {
- content: "\f05a";
- color: #005498;
- color: #80a8c7;
+ content: "\f05a";
+ color: #005498;
+ color: #80a8c7;
}
.admonitionblock td.icon .icon-tip:before {
- content: "\f0eb";
- text-shadow: 1px 1px 2px rgba(222, 222, 68, 0.8);
- color: #c7ba71;
+ content: "\f0eb";
+ text-shadow: 1px 1px 2px rgba(222, 222, 68, 0.8);
+ color: #c7ba71;
}
.admonitionblock td.icon .icon-warning:before {
- content: "\f071";
- color: #da8f33;
+ content: "\f071";
+ color: #da8f33;
}
.admonitionblock td.icon .icon-caution:before {
- content: "\f06d";
- color: #af5e40;
+ content: "\f06d";
+ color: #af5e40;
}
.admonitionblock td.icon .icon-important:before {
- content: "\f06a";
- color: #bd5a5a;
+ content: "\f06a";
+ color: #bd5a5a;
}
/* Markdown table */
.mdtable {
- border: 1px solid #ddd;
- width: 100%;
- max-width: 100%;
- margin-bottom: 20px;
+ border: 1px solid #ddd;
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: 20px;
}
+
.mdtable > thead > tr > th, .mdtable > thead > tr > td {
- border-bottom-width: 2px;
+ border-bottom-width: 2px;
}
+
.mdtable > thead > tr > th, .mdtable > tbody > tr > th, .mdtable > tfoot > tr > th, .mdtable > thead > tr > td, .mdtable > tbody > tr > td, .mdtable > tfoot > tr > td {
- border: 1px solid #ddd;
+ border: 1px solid #ddd;
}
+
.mdtable > thead > tr > th {
- vertical-align: bottom;
- border-bottom: 2px solid #ddd;
+ vertical-align: bottom;
+ border-bottom: 2px solid #ddd;
}
+
.mdtable > thead > tr > th, .mdtable > tbody > tr > th, .mdtable > tfoot > tr > th, .mdtable > thead > tr > td, .mdtable > tbody > tr > td, .mdtable > tfoot > tr > td {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: top;
- border-top: 1px solid #ddd;
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ border-top: 1px solid #ddd;
+}
+
+.group {
+ font-size: 17px;
+ padding-left: 0;
+ list-style-type: none;
+}
+
+.group-title {
+ font-size: 17px;
+ margin-bottom: 10px;
+ font-weight: 500;
+}
+
+.group-item {
+ font-size: 15px;
+ margin: 0px 0px 5px 0px;
+}
+
+.group-item-i {
+ margin-right: 5px;
+ margin-left: 3px;
+ color: #8c8c8c;
+ /* height: 100%; */
+ position: relative;
+ float: left;
+ /* margin-inline-start: 40px; */
}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/jbake/jbake.properties
----------------------------------------------------------------------
diff --git a/src/main/jbake/jbake.properties b/src/main/jbake/jbake.properties
index b40573c..1e3a740 100755
--- a/src/main/jbake/jbake.properties
+++ b/src/main/jbake/jbake.properties
@@ -8,6 +8,8 @@ template.folder = templates
template.index.file = index.gsp
template.sitemap.file = sitemap.gsp
template.page.file = page.gsp
+template.docsindex.file = docs-index.gsp
+template.examplesindex.file = docs-index.gsp
template.post.file = post.gsp
template.contributors.file = contributors.gsp
template.examples.file = examples.gsp
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/jbake/templates/docs-index.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/docs-index.gsp b/src/main/jbake/templates/docs-index.gsp
new file mode 100755
index 0000000..c45b3e1
--- /dev/null
+++ b/src/main/jbake/templates/docs-index.gsp
@@ -0,0 +1,14 @@
+<%include "header.gsp"%>
+ <%include "menu.gsp"%>
+
+ <div id="main-block" class="container section-padded">
+ <div class="row title">
+ <div class="col-md-12">
+ <div class='page-header'>
+ <h1>Documentation</h1>
+ </div>
+ </div>
+ </div>
+ ${content.body}
+ </div>
+<%include "footer.gsp"%>
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/190bf1f0/src/main/jbake/templates/examples-index.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/examples-index.gsp b/src/main/jbake/templates/examples-index.gsp
new file mode 100755
index 0000000..c45b3e1
--- /dev/null
+++ b/src/main/jbake/templates/examples-index.gsp
@@ -0,0 +1,14 @@
+<%include "header.gsp"%>
+ <%include "menu.gsp"%>
+
+ <div id="main-block" class="container section-padded">
+ <div class="row title">
+ <div class="col-md-12">
+ <div class='page-header'>
+ <h1>Documentation</h1>
+ </div>
+ </div>
+ </div>
+ ${content.body}
+ </div>
+<%include "footer.gsp"%>
[2/3] tomee-site-generator git commit: Smarter grouping for large
sections
Posted by db...@apache.org.
Smarter grouping for large sections
Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/11df0fda
Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/11df0fda
Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/11df0fda
Branch: refs/heads/master
Commit: 11df0fda60233d6d2040eb60bd8ac7e093b0beb2
Parents: 190bf1f
Author: dblevins <da...@gmail.com>
Authored: Sun Dec 2 02:53:41 2018 -0800
Committer: dblevins <da...@gmail.com>
Committed: Sun Dec 2 02:53:41 2018 -0800
----------------------------------------------------------------------
.../org/apache/tomee/website/AddGroups.java | 47 ++++++++
.../org/apache/tomee/website/GroupedIndex.java | 109 ++++++++++++++-----
src/main/jbake/assets/css/cardio.css | 1 +
src/main/jbake/templates/examples-index.gsp | 2 +-
4 files changed, 130 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/11df0fda/src/main/java/org/apache/tomee/website/AddGroups.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/AddGroups.java b/src/main/java/org/apache/tomee/website/AddGroups.java
new file mode 100644
index 0000000..cce6566
--- /dev/null
+++ b/src/main/java/org/apache/tomee/website/AddGroups.java
@@ -0,0 +1,47 @@
+/*
+ * 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.tomee.website;
+
+import org.apache.openejb.loader.IO;
+
+import java.io.File;
+import java.io.IOException;
+
+public class AddGroups {
+
+ public static void main(String[] args) throws IOException {
+ final String[] lines = IO.slurp(new File("repos/tomee-8.0/examples/index.md")).split("\n");
+
+ String group = "";
+ for (final String line : lines) {
+ if (line.startsWith("###")) {
+ group = line.replace("###", "").trim();
+ }
+
+
+ if (line.startsWith("[")) {
+ final String s = line.replaceAll(".*\\(|\\).*", "").replaceAll(".html", ".md");
+
+ final File file = new File("repos/tomee-8.0/examples/" + s);
+ final String content = IO.slurp(file);
+ final String updated = content.replace("index-group=Unrevised", "index-group=" + group);
+
+ IO.copy(IO.read(updated), file);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/11df0fda/src/main/java/org/apache/tomee/website/GroupedIndex.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/GroupedIndex.java b/src/main/java/org/apache/tomee/website/GroupedIndex.java
index b73e1ab..adcaa36 100644
--- a/src/main/java/org/apache/tomee/website/GroupedIndex.java
+++ b/src/main/java/org/apache/tomee/website/GroupedIndex.java
@@ -56,39 +56,86 @@ public class GroupedIndex {
final List<Doc> docs = list(directory);
final Map<String, List<Doc>> sections = docs.stream().collect(Collectors.groupingBy(Doc::getGroup));
- for (final Map.Entry<String, List<Doc>> entry : sections.entrySet()) {
- final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- final PrintStream out = new PrintStream(bytes);
-
- out.printf(" <div class=\"group-title\">%s</div>\n", entry.getKey());
- out.printf(" <ul class=\"group\">\n");
- entry.getValue().stream().sorted().forEach(doc -> {
- out.printf(" <li class=\"group-item\"><span class=\"group-item-i\" ><i class=\"fa fa-angle-right\"></i></span><a href=\"%s\">%s</a></li>\n", doc.getHref(), doc.getTitle());
- });
- out.printf(" </ul>\n");
-
- sectionsFormatted.add(new String(bytes.toByteArray()));
- }
+ /**
+ * We want to sort the sections with the most entries towards the top.
+ * Unless it is crazy big, then we put it in a special section at the bottom.
+ */
+ sections.entrySet().stream()
+ .filter(entry -> entry.getValue().size() < 10)
+ .sorted((o1, o2) -> new Integer(o2.getValue().size()).compareTo(o1.getValue().size()))
+ .forEach(entry -> {
+
+ final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ final PrintStream out = new PrintStream(bytes);
+
+ out.printf(" <div class=\"group-title\">%s</div>\n", entry.getKey());
+ out.printf(" <ul class=\"group\">\n");
+ entry.getValue().stream().sorted().forEach(doc -> {
+ out.printf(" <li class=\"group-item\"><span class=\"group-item-i\" ><i class=\"fa fa-angle-right\"></i></span><a href=\"%s\">%s</a></li>\n", doc.getHref(), doc.getTitle());
+ });
+ out.printf(" </ul>\n");
+
+ sectionsFormatted.add(new String(bytes.toByteArray()));
+
+ });
try (final PrintStream out = print(directory, "index.html")) {
out.printf("type=%s\n", type);
out.printf("status=published\n");
out.printf("~~~~~~\n");
- final ListIterator<String> iterator = sectionsFormatted.listIterator();
- while (iterator.hasNext()) {
- out.printf(" <div class=\"row\">\n");
- out.printf(" <div class=\"col-md-4\">\n");
- out.printf(iterator.hasNext() ? iterator.next() : "");
- out.printf(" </div>\n");
- out.printf(" <div class=\"col-md-4\">\n");
- out.printf(iterator.hasNext() ? iterator.next() : "");
- out.printf(" </div>\n");
- out.printf(" <div class=\"col-md-4\">\n");
- out.printf(iterator.hasNext() ? iterator.next() : "");
- out.printf(" </div>\n");
- out.printf(" </div>\n");
+ {
+ final ListIterator<String> iterator = sectionsFormatted.listIterator();
+ while (iterator.hasNext()) {
+ out.printf(" <div class=\"row\">\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(iterator.hasNext() ? iterator.next() : "");
+ out.printf(" </div>\n");
+ out.printf(" </div>\n");
+ }
}
+
+ sections.entrySet().stream()
+ .filter(entry -> entry.getValue().size() >= 10)
+ .sorted((o1, o2) -> new Integer(o1.getValue().size()).compareTo(o2.getValue().size()))
+ .forEach(entry -> {
+
+ out.printf(" <div class=\"row\">\n");
+ out.printf(" <div class=\"col-md-12\">\n");
+ out.printf(" <div class=\"group-title large\">%s</div>\n", entry.getKey());
+ out.printf(" </div>\n");
+ out.printf(" </div>\n");
+
+ final ListIterator<Doc> iterator = entry.getValue().stream()
+ .sorted()
+ .collect(Collectors.toList())
+ .listIterator();
+
+ final int i = (int) Math.ceil(entry.getValue().size() / 3f);
+
+ out.printf(" <div class=\"row\">\n");
+ while (iterator.hasNext()) {
+ int count = 0;
+
+ out.printf(" <div class=\"col-md-4\">\n");
+ out.printf(" <ul class=\"group\">\n");
+ while (iterator.hasNext() && count++ < i) {
+ final Doc doc = iterator.next();
+ out.printf(" <li class=\"group-item\"><span class=\"group-item-i\" ><i class=\"fa fa-angle-right\"></i></span><a href=\"%s\">%s</a></li>\n", doc.getHref(), doc.getTitle());
+
+ }
+ out.printf(" </ul>\n");
+ out.printf(" </div>\n");
+ }
+ out.printf(" </div>\n");
+ });
+
}
}
@@ -129,11 +176,17 @@ public class GroupedIndex {
}
private String getTitle(final Map<String, Object> map, final File file) {
- if (map.get("short-title") != null) return map.get("short-title") + "";
- if (map.get("title") != null) return map.get("title") + "";
+ if (hasValue(map.get("short-title"))) return map.get("short-title") + "";
+ if (hasValue(map.get("title"))) return map.get("title") + "";
return Docs.simpleName(file);
}
+ private boolean hasValue(final Object o) {
+ if (o == null) return false;
+ if ("".equals(o + ""))return false;
+ return true;
+ }
+
public static class Doc implements Comparable<Doc> {
private final String group;
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/11df0fda/src/main/jbake/assets/css/cardio.css
----------------------------------------------------------------------
diff --git a/src/main/jbake/assets/css/cardio.css b/src/main/jbake/assets/css/cardio.css
index 84cabc1..fe10969 100755
--- a/src/main/jbake/assets/css/cardio.css
+++ b/src/main/jbake/assets/css/cardio.css
@@ -1347,6 +1347,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] {
font-size: 17px;
padding-left: 0;
list-style-type: none;
+ margin-bottom: 30px;
}
.group-title {
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/11df0fda/src/main/jbake/templates/examples-index.gsp
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/examples-index.gsp b/src/main/jbake/templates/examples-index.gsp
index c45b3e1..682c66a 100755
--- a/src/main/jbake/templates/examples-index.gsp
+++ b/src/main/jbake/templates/examples-index.gsp
@@ -5,7 +5,7 @@
<div class="row title">
<div class="col-md-12">
<div class='page-header'>
- <h1>Documentation</h1>
+ <h1>Examples</h1>
</div>
</div>
</div>
[3/3] tomee-site-generator git commit: Fix the listing for what
resources a version has
Posted by db...@apache.org.
Fix the listing for what resources a version has
Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/0f90a6ac
Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/0f90a6ac
Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/0f90a6ac
Branch: refs/heads/master
Commit: 0f90a6acf1f80ae0d6d0ab9b9602842390938965
Parents: 11df0fd
Author: dblevins <da...@gmail.com>
Authored: Sun Dec 2 03:06:36 2018 -0800
Committer: dblevins <da...@gmail.com>
Committed: Sun Dec 2 03:06:36 2018 -0800
----------------------------------------------------------------------
src/main/java/org/apache/tomee/website/VersionIndex.java | 10 ++--------
src/main/java/org/apache/tomee/website/VersionsIndex.java | 4 ++--
2 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/0f90a6ac/src/main/java/org/apache/tomee/website/VersionIndex.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/VersionIndex.java b/src/main/java/org/apache/tomee/website/VersionIndex.java
index 68960aa..462b1d0 100644
--- a/src/main/java/org/apache/tomee/website/VersionIndex.java
+++ b/src/main/java/org/apache/tomee/website/VersionIndex.java
@@ -17,15 +17,9 @@
package org.apache.tomee.website;
import org.apache.openejb.loader.IO;
-import org.apache.openejb.util.Join;
import java.io.File;
import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
public class VersionIndex {
@@ -50,10 +44,10 @@ public class VersionIndex {
.append("\n")
;
- if (docs.exists()) {
+ if (docs.exists() && docs.listFiles().length > 0) {
index.append(" - link:docs[Documentation]\n");
}
- if (examples.exists()) {
+ if (examples.exists() && examples.listFiles().length > 0) {
index.append(" - link:examples[Examples]\n");
}
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/0f90a6ac/src/main/java/org/apache/tomee/website/VersionsIndex.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tomee/website/VersionsIndex.java b/src/main/java/org/apache/tomee/website/VersionsIndex.java
index d44def4..8d73ccc 100644
--- a/src/main/java/org/apache/tomee/website/VersionsIndex.java
+++ b/src/main/java/org/apache/tomee/website/VersionsIndex.java
@@ -50,10 +50,10 @@ public class VersionsIndex {
final File docs = sources.getDestinationFor(source, "docs");
final File examples = sources.getDestinationFor(source, "examples");
- if (docs.exists()) {
+ if (docs.exists() && docs.listFiles().length > 0) {
index.append(" - link:").append(source.getName()).append("/docs[Documentation]\n");
}
- if (examples.exists()) {
+ if (examples.exists() && examples.listFiles().length > 0) {
index.append(" - link:").append(source.getName()).append("/examples[Examples]\n");
}
index.append("\n\n");