Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summit24 #446

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -123,7 +123,7 @@
<id>analyse-project</id>
<phase>verify</phase>
<goals>
<goal>project-analyse</goal>
<goal>project-analyse</goal>
</goals>
</execution>
</executions>
Expand Down Expand Up @@ -200,7 +200,7 @@
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<finalName>aem-guides-wknd.all-${version}-classic</finalName>
Expand Down Expand Up @@ -257,20 +257,20 @@
<artifactId>aem-guides-wknd-shared.ui.content</artifactId>
<type>zip</type>
<target>/apps/wknd-vendor-packages/content/install</target>
</embedded>
</embedded>
</embeddeds>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependencies>
<!-- WKND Shared -->
<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd-shared.ui.content</artifactId>
<version>${wknd-shared.version}</version>
<type>zip</type>
</dependency>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down Expand Up @@ -316,13 +316,13 @@
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<artifactId>core.wcm.components.core</artifactId>
</dependency>
<!-- WKND Shared -->
<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd-shared.ui.content</artifactId>
<type>zip</type>
</dependency>
</dependency>
</dependencies>
</project>
8 changes: 4 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aem-guides-wknd.core</artifactId>
Expand Down Expand Up @@ -83,7 +83,7 @@ Import-Package: javax.annotation;version=0.0.0,*
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>uk.org.lidalia</groupId>
<artifactId>slf4j-test</artifactId>
Expand Down Expand Up @@ -188,7 +188,7 @@ Import-Package: javax.annotation;version=0.0.0,*

<dependencies>
<!--================
AEM 6.x Dependencies
AEM 6.x Dependencies
====================-->
<!-- Adobe AEM Dependencies -->
<dependency>
Expand Down Expand Up @@ -326,5 +326,5 @@ Import-Package: javax.annotation;version=0.0.0,*
</dependency>
</dependencies>
</profile>
</profiles>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright 2015 Adobe Systems Incorporated
*
* Licensed 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 com.adobe.aem.guides.wknd.core.models;

import javax.annotation.PostConstruct;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.Self;
import org.apache.sling.models.annotations.injectorspecific.SlingObject;

@Model(
adaptables = {SlingHttpServletRequest.class},
adapters = {ContactUsModel.class},
resourceType = {ContactUsModel.RESOURCE_TYPE},
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL
)
public class ContactUsModel {
protected static final String RESOURCE_TYPE = "wknd/components/contactus";

@Self
private SlingHttpServletRequest request;

@SlingObject
private Resource currentResource;
@SlingObject
private ResourceResolver resourceResolver;

private String message;

@PostConstruct
protected void init() {
message = "";

String formUsername = request.getParameter("username");
if(formUsername != null) {
message = "Thank you <b>" + formUsername + "</b> for contacting us.";
}
}

public String getMessage() {
return message;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@org.osgi.annotation.versioning.Version("2.1.0")
@org.osgi.annotation.versioning.Version("2.2.0")
package com.adobe.aem.guides.wknd.core.models;
4 changes: 2 additions & 2 deletions dispatcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>aem-guides-wknd.dispatcher.cloud</artifactId>
<packaging>pom</packaging>
<name>WKND Sites Project - Dispatcher</name>
<description>HTTP &amp; Dispatcher configurations for WKND Sites Project</description>


<build>
<plugins>
Expand Down
16 changes: 13 additions & 3 deletions dispatcher/src/conf.d/available_vhosts/wknd.vhost
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# It has been modified to let Apache handle errors 400, 500
# It uses error pages created in AEM as the 404 and 500x pages defined by variables in custom.vars
#
#

# Include customer defined variables
Include conf.d/variables/custom.vars
Expand Down Expand Up @@ -49,7 +49,7 @@ Include conf.d/variables/custom.vars
# Developer Localhost
SetEnvIfExpr "env('CORSProcessing') == 'true' && req_novary('Origin') =~ m#(http://localhost(:\d+)?$)#" CORSTrusted=true
# Adobe AppBuilder
SetEnvIfExpr "env('CORSProcessing') == 'true' && req_novary('Origin') =~ m#(https://experience\.adobe\.com$)#" CORSTrusted=true
SetEnvIfExpr "env('CORSProcessing') == 'true' && req_novary('Origin') =~ m#(https://experience\.adobe\.com$)#" CORSTrusted=true
# Developer Vercel app
SetEnvIfExpr "env('CORSProcessing') == 'true' && req_novary('Origin') =~ m#(https://.*\.vercel\.app$)#" CORSTrusted=true
# Developer Github.io app
Expand Down Expand Up @@ -133,7 +133,7 @@ Include conf.d/variables/custom.vars
ErrorDocument 502 ${500_PAGE}
ErrorDocument 503 ${500_PAGE}
ErrorDocument 504 ${500_PAGE}

## Default Fastly Cache Settings for AEM - V20220414
# Theme Sources via Clientlib: cache mutable resources for max 24h on CDN and background refresh after 12h to avoid MISS
<LocationMatch "^/etc\.clientlibs/.*\.(?i:json|png|gif|webp|jpe?g|svg)$">
Expand Down Expand Up @@ -188,4 +188,14 @@ Include conf.d/variables/custom.vars
Header set Cache-Control "max-age=300,stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} < 400"
Header set Age 0
</LocationMatch>
<LocationMatch "^/.*/about-us.html$">
Header unset Cache-Control
Header always set Cache-Control "private"
Header set Age 0
</LocationMatch>
<LocationMatch "^/.*/about-us.html$">
Header unset Cache-Control
Header always set Cache-Control "private"
Header set Age 0
</LocationMatch>
</VirtualHost>
4 changes: 2 additions & 2 deletions it.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aem-guides-wknd.it.tests</artifactId>
Expand Down Expand Up @@ -52,7 +52,7 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
</dependency>
<dependency>
<groupId>com.adobe.aem.headless</groupId>
<artifactId>aem-headless-client-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<packaging>pom</packaging>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<name>WKND Sites Project - Reactor Project</name>
<description>WKND Sites Project</description>
<url>https://github.com/adobe/aem-guides-wknd</url>
Expand Down
2 changes: 1 addition & 1 deletion ui.apps.structure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Contact Us Component"
componentGroup="WKND.Content"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Properties"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<text
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Text"
name="./text"/>
</items>
</column>
</items>
</content>
</jcr:root>

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--/*
Copyright 2015 Adobe Systems Incorporated

Licensed 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.
*/-->
<div class="cmp-contactus" data-cmp-is="contactus" data-sly-test="${model.message != ''}">
<div class="cmp-contactus__item" data-sly-use.model="com.adobe.aem.guides.wknd.core.models.ContactUsModel" data-sly-test="${model.message}">
<p class="cmp-contactus__item-output"data-cmp-hook-contactus="model">${model.message @context="unsafe"}</p>
</div>
</div>

<div class="cmp-contactus-error" id="cmp-contactus-error" data-cmp-is="contactus">

</div>

<div data-sly-use.placeholderTemplate="core/wcm/components/commons/v1/templates.html" class="wknd-contact-us-form" data-sly-test="${model.message == ''}">
<div id="wknd-contact-us-form" class="wknd-contact-us-form__form">
<div>
<input type="text" id="wknd-contact-us-form-username" name="username" placeholder="Username"/>
</div>
<div>
<textarea cols="40" id="wknd-contact-us-form-message" rows="5" name="message" placeholder="Your message"></textarea>
</div>
<div>
<input id="wknd-contact-us-form-submit" type="submit" value="Send"/>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion ui.config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion ui.content.sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@
jcr:mixinTypes="[cq:LiveRelationship]"
jcr:primaryType="nt:unstructured"
sling:resourceType="wknd/components/title"/>
<title_393953655
cq:lastRolledout="{Date}2020-07-09T08:54:54.744-07:00"
cq:lastRolledoutBy="admin"
cq:styleIds="[1568996484405]"
jcr:created="{Date}2019-10-18T13:33:09.506-07:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2020-07-09T08:54:54.742-07:00"
jcr:lastModifiedBy="admin"
jcr:mixinTypes="[cq:LiveRelationship]"
jcr:primaryType="nt:unstructured"
jcr:title="Contact Us"
sling:resourceType="wknd/components/title"
type="h2"/>
<contactus
jcr:primaryType="nt:unstructured"
sling:resourceType="wknd/components/contactus"
/>
<title_393953656
cq:lastRolledout="{Date}2020-07-09T08:54:54.744-07:00"
cq:lastRolledoutBy="admin"
Expand Down
Loading
Loading