You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2022/03/18 02:38:28 UTC
[tapestry-5] 03/03: TAP5-2703: Quickstart navbar collapse button not working
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit 54622bbe7123f5b399b0a7751816b07b4ae391ef
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Thu Mar 17 23:38:15 2022 -0300
TAP5-2703: Quickstart navbar collapse button not working
---
quickstart/build.gradle | 4 ++--
.../main/resources/META-INF/maven/archetype-metadata.xml | 1 +
.../src/main/java/components/Layout.java | 2 +-
.../main/resources/META-INF/modules/components/Layout.js | 3 +++
.../src/test/java/tapestry/RunWithJetty.java | 14 ++++++++++++++
5 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/quickstart/build.gradle b/quickstart/build.gradle
index 9f0174e..07feb5e 100644
--- a/quickstart/build.gradle
+++ b/quickstart/build.gradle
@@ -48,8 +48,8 @@ task processFiltered(type: Copy) {
filter(FixCrLfFilter)
filter(ReplaceTokens, tokens: [
- quickstartVersion: version,
- tapestryVersion: version,
+ quickstartVersion: project.parent.version,
+ tapestryVersion: project.parent.version,
springBootVersion: '2.5.4',
junitVersion: '5.8.2',
jacksonVersion: '2.13.1',
diff --git a/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml b/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
index 952d25a..79c2851 100644
--- a/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -31,6 +31,7 @@
<directory>src/main/resources</directory>
<includes>
<include>log4j2.yml</include>
+ <include>META-INF/**</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true">
diff --git a/quickstart/src/main/resources/archetype-resources/src/main/java/components/Layout.java b/quickstart/src/main/resources/archetype-resources/src/main/java/components/Layout.java
index 2d06642..213d442 100644
--- a/quickstart/src/main/resources/archetype-resources/src/main/java/components/Layout.java
+++ b/quickstart/src/main/resources/archetype-resources/src/main/java/components/Layout.java
@@ -14,7 +14,7 @@ import java.time.LocalDate;
/**
* Layout component for pages of application test-project.
*/
-@Import(stylesheet = "context:css/app.css",module = { "bootstrap/collapse", "bootstrap/dropdown"})
+@Import(stylesheet = "context:css/app.css", module = "components/Layout")
public class Layout {
@Inject
diff --git a/quickstart/src/main/resources/archetype-resources/src/main/resources/META-INF/modules/components/Layout.js b/quickstart/src/main/resources/archetype-resources/src/main/resources/META-INF/modules/components/Layout.js
new file mode 100644
index 0000000..3a4d0d8
--- /dev/null
+++ b/quickstart/src/main/resources/archetype-resources/src/main/resources/META-INF/modules/components/Layout.js
@@ -0,0 +1,3 @@
+define(["jquery", "bootstrap/dropdown"], function($) {
+ $('.navbar-toggler').dropdown();
+});
\ No newline at end of file
diff --git a/quickstart/src/main/resources/archetype-resources/src/test/java/tapestry/RunWithJetty.java b/quickstart/src/main/resources/archetype-resources/src/test/java/tapestry/RunWithJetty.java
new file mode 100644
index 0000000..2e2b5e5
--- /dev/null
+++ b/quickstart/src/main/resources/archetype-resources/src/test/java/tapestry/RunWithJetty.java
@@ -0,0 +1,14 @@
+package ${package}.tapestry;
+
+import org.apache.tapestry5.test.JettyRunner;
+
+/**
+ * Runs this webapp using Jetty in the 8080 port.
+ */
+public class RunWithJetty {
+
+ public static void main(String[] args) throws Exception {
+ new JettyRunner("src/main/webapp", "/", 8080, 8443);
+ }
+
+}