forked from adobe/adobe-dx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adobeGH-24 [flex] get the colors working
this component will not be done in one PR :-) got fore & back ground colors working ( no dialog yet) on docs by: - making responsive configuration more complex (with an instanciation of it for docs in content, - added a FlexModel.getId, even if we might want to move this to some abstract model later, - fixed a few bad resource types here & there
- Loading branch information
Showing
27 changed files
with
221 additions
and
29 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...t/apps/dx-docs/configs/config.author/com.adobe.dx.domtagging.internal.IDTaggerImpl.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
acceptedTypes=["dx/structure/.*","dx-docs/components/.*"] | ||
tagOnPublication=B"true" | ||
tagOnModification=B"true" | ||
referenceTypes=["cq/experience-fragments/editor/components/experiencefragment"] | ||
shouldRewriteComponentHash=B"true" |
1 change: 0 additions & 1 deletion
1
...app/jcr_root/apps/dx-docs/configs/config/com.adobe.dx.domtagging.internal.IDTagger.config
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...jcr_root/apps/dx-docs/configs/config/com.adobe.dx.domtagging.internal.IDTaggerImpl.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
acceptedTypes=["dx/structure/.*","dx-docs/components/.*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
apps/docs/content/jcr_root/conf/dx-docs/_sling_configs/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="sling:Folder"/> |
4 changes: 4 additions & 0 deletions
4
...ling_configs/com.adobe.dx.admin.rendercondition.RenderConditionConfiguration/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured" | ||
passthroughGroups="[test,administrators]"/> |
5 changes: 5 additions & 0 deletions
5
.../conf/dx-docs/_sling_configs/com.adobe.dx.responsive.ResponsiveConfiguration/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured"> | ||
<breakpoints/> | ||
</jcr:root> |
7 changes: 7 additions & 0 deletions
7
...s/_sling_configs/com.adobe.dx.responsive.ResponsiveConfiguration/breakpoints/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:OrderedFolder"> | ||
<_x0031_/> | ||
<_x0032_/> | ||
<_x0033_/> | ||
</jcr:root> |
8 changes: 8 additions & 0 deletions
8
..._sling_configs/com.adobe.dx.responsive.ResponsiveConfiguration/breakpoints/1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured" | ||
end="{Long}599" | ||
key="mobile" | ||
label="Mobile / Default" | ||
propertySuffix="Mobile" | ||
start="{Long}0"/> |
9 changes: 9 additions & 0 deletions
9
..._sling_configs/com.adobe.dx.responsive.ResponsiveConfiguration/breakpoints/2/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured" | ||
end="{Long}1199" | ||
key="tablet" | ||
label="Tablet" | ||
mediaQuery="@media only screen and (min-width: 600px)" | ||
propertySuffix="Tablet" | ||
start="{Long}600"/> |
8 changes: 8 additions & 0 deletions
8
..._sling_configs/com.adobe.dx.responsive.ResponsiveConfiguration/breakpoints/3/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="nt:unstructured" | ||
key="desktop" | ||
label="Desktop" | ||
mediaQuery="@media only screen and (min-width: 1200px)" | ||
propertySuffix="Desktop" | ||
start="{Long}1200"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
apps/structure/app/jcr_root/apps/dx/structure/components/flex/color.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2020 Adobe | ||
~ | ||
~ 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. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/--> | ||
<template data-sly-template.background="${ @ id}"> | ||
<sly data-sly-repeat.bp="${breakpoints}"> | ||
|
||
<sly data-sly-test="${resprops.backgroundColor[bp.key] || resprops.gradient[bp.key]}"> | ||
<sly data-sly-test="${bp.mediaQuery}"> | ||
${bp.mediaQuery}{ | ||
</sly> | ||
${'#{0}' @ format=id, context='styleString'} { | ||
<sly data-sly-test="${resprops.backgroundColor[bp.key]}"> | ||
${'background-color: {0}; ' @ format=resprops.backgroundColor[bp.key], context='styleString'} | ||
</sly> | ||
<sly data-sly-test="${resprops.gradient[bp.key]}"> | ||
${'background-image: {0};' @ format=[resprops.gradient[bp.key]], context='styleString'} | ||
</sly> | ||
} | ||
<sly data-sly-test="${bp.mediaQuery}">}</sly> | ||
</sly> | ||
</sly> | ||
</template> | ||
<template data-sly-template.foreground="${ @ id}"> | ||
<sly data-sly-repeat.bp="${breakpoints}" | ||
data-sly-test="${resprops.foregroundColor[bp.key]}"> | ||
<sly data-sly-test.mediaQuery="${bp.mediaQuery}"> | ||
${bp.mediaQuery}{ | ||
</sly> | ||
${'#{0}' @ format=id, context='styleString'} { | ||
${'color: {0}; ' @ format=resprops.foregroundColor[bp.key], context='styleString'} | ||
} | ||
<sly data-sly-test="${bp.mediaQuery}">}</sly> | ||
</sly> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
bundles/core/src/main/java/com/adobe/dx/responsive/Breakpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2020 Adobe | ||
~ | ||
~ 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.dx.responsive; | ||
|
||
import org.apache.sling.caconfig.annotation.Configuration; | ||
import org.apache.sling.caconfig.annotation.Property; | ||
|
||
@Configuration(collection = true) | ||
public @interface Breakpoint { | ||
@Property(label = "name") | ||
String getLabel(); | ||
|
||
@Property(label = "property suffix", description = "suffix to append to a property to get the responsive version of it") | ||
String propertySuffix(); | ||
|
||
@Property(label = "map key", description = "key from where a value will be available") | ||
String key(); | ||
|
||
@Property(label = "media Query", description = "media query that defines this breakpoint") | ||
String mediaQuery(); | ||
|
||
@Property(label = "start", description = "screen width from which this breakpoint is set") | ||
int start(); | ||
|
||
@Property(label = "end", description = "screen width to which this breakpoint is set") | ||
int end(); | ||
} |
18 changes: 16 additions & 2 deletions
18
bundles/core/src/main/java/com/adobe/dx/responsive/ResponsiveConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
~ Copyright 2020 Adobe | ||
~ | ||
~ 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.dx.responsive; | ||
|
||
import org.apache.sling.caconfig.annotation.Configuration; | ||
|
||
@Configuration(label="Responsive Configuration", description = "sets the responsive behaviour") | ||
public @interface ResponsiveConfiguration { | ||
|
||
String[] breakpoints() default {"Mobile", "Tablet", "Desktop"}; | ||
Breakpoint[] breakpoints(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.