cf-elements 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/cf-elements.js +29 -0
- package/package.json +3 -6
- package/bg-styles.css +0 -63
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# cf-elements
|
|
2
2
|
|
|
3
|
-
Zero-dependency
|
|
3
|
+
Zero-dependency markup library that renders ClickFunnels-style HTML with inline styles.
|
|
4
|
+
|
|
5
|
+
It is intended use is for building "ClickFunnels mockups" in LLMs like Claude/ChatGPT/etc, which then can be converted to ClickFunnels ready JSON via the `cf-pagetree-parser` package.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
package/cf-elements.js
CHANGED
|
@@ -70,6 +70,35 @@
|
|
|
70
70
|
}
|
|
71
71
|
})();
|
|
72
72
|
|
|
73
|
+
// ==========================================================================
|
|
74
|
+
// BACKGROUND STYLES - Inject CSS for background image classes
|
|
75
|
+
// ==========================================================================
|
|
76
|
+
|
|
77
|
+
// Inject background styles immediately
|
|
78
|
+
(function injectBgStyles() {
|
|
79
|
+
const style = document.createElement('style');
|
|
80
|
+
style.id = 'cf-bg-styles';
|
|
81
|
+
style.textContent = `
|
|
82
|
+
/* Background style classes - matches ClickFunnels options */
|
|
83
|
+
.bgCover { background-size: cover !important; background-repeat: no-repeat !important; }
|
|
84
|
+
.bgCoverCenter { background-size: cover !important; background-position: center center !important; background-repeat: no-repeat !important; }
|
|
85
|
+
.bgCoverV2 { background-attachment: fixed !important; background-size: cover !important; background-position: center center !important; background-repeat: no-repeat !important; }
|
|
86
|
+
.bgW100 { background-size: 100% auto !important; background-repeat: no-repeat !important; }
|
|
87
|
+
.bgW100H100 { background-size: 100% 100% !important; background-repeat: no-repeat !important; }
|
|
88
|
+
.bgNoRepeat { background-repeat: no-repeat !important; }
|
|
89
|
+
.bgRepeat { background-repeat: repeat !important; }
|
|
90
|
+
.bgRepeatX { background-repeat: repeat-x !important; }
|
|
91
|
+
.bgRepeatY { background-repeat: repeat-y !important; }
|
|
92
|
+
`;
|
|
93
|
+
if (document.head) {
|
|
94
|
+
document.head.appendChild(style);
|
|
95
|
+
} else {
|
|
96
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
97
|
+
document.head.appendChild(style);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})();
|
|
101
|
+
|
|
73
102
|
// ==========================================================================
|
|
74
103
|
// CONSTANTS & MAPPINGS
|
|
75
104
|
// ==========================================================================
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-elements",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Zero-dependency
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Zero-dependency markup library that generates ClickFunnels compatible HTML with inline styles",
|
|
5
5
|
"main": "cf-elements.js",
|
|
6
6
|
"browser": "cf-elements.js",
|
|
7
7
|
"unpkg": "cf-elements.js",
|
|
@@ -14,12 +14,9 @@
|
|
|
14
14
|
"test": "echo \"No tests yet\""
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
|
-
"web-components",
|
|
18
17
|
"clickfunnels",
|
|
19
18
|
"funnelwind",
|
|
20
|
-
"landing-pages"
|
|
21
|
-
"no-code",
|
|
22
|
-
"inline-styles"
|
|
19
|
+
"landing-pages"
|
|
23
20
|
],
|
|
24
21
|
"author": "BarnumPT",
|
|
25
22
|
"license": "MIT",
|
package/bg-styles.css
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ============================================================================
|
|
3
|
-
* FUNNELWIND - Background Style Classes
|
|
4
|
-
* ============================================================================
|
|
5
|
-
*
|
|
6
|
-
* These classes match ClickFunnels background image styling options.
|
|
7
|
-
* Apply via bg-style attribute on cf-* components.
|
|
8
|
-
*
|
|
9
|
-
* ============================================================================
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/* Cover - fills container, may crop */
|
|
13
|
-
.bgCover {
|
|
14
|
-
background-size: cover !important;
|
|
15
|
-
background-repeat: no-repeat !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Cover + Centered (default) */
|
|
19
|
-
.bgCoverCenter {
|
|
20
|
-
background-size: cover !important;
|
|
21
|
-
background-position: center center !important;
|
|
22
|
-
background-repeat: no-repeat !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Parallax - fixed background attachment */
|
|
26
|
-
.bgCoverV2 {
|
|
27
|
-
background-attachment: fixed !important;
|
|
28
|
-
background-size: cover !important;
|
|
29
|
-
background-position: center center !important;
|
|
30
|
-
background-repeat: no-repeat !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* 100% width, auto height */
|
|
34
|
-
.bgW100 {
|
|
35
|
-
background-size: 100% auto !important;
|
|
36
|
-
background-repeat: no-repeat !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* 100% width and height (stretch) */
|
|
40
|
-
.bgW100H100 {
|
|
41
|
-
background-size: 100% 100% !important;
|
|
42
|
-
background-repeat: no-repeat !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* No repeat - original size */
|
|
46
|
-
.bgNoRepeat {
|
|
47
|
-
background-repeat: no-repeat !important;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Repeat/tile in both directions */
|
|
51
|
-
.bgRepeat {
|
|
52
|
-
background-repeat: repeat !important;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Repeat horizontally only */
|
|
56
|
-
.bgRepeatX {
|
|
57
|
-
background-repeat: repeat-x !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Repeat vertically only */
|
|
61
|
-
.bgRepeatY {
|
|
62
|
-
background-repeat: repeat-y !important;
|
|
63
|
-
}
|