@awesomeness-js/server 1.1.1 → 1.1.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/index.js +101 -101
- package/package.json +36 -36
- package/src/componentDependencies.js +2 -2
- package/ui/core/public/app.js +23 -23
- package/example-site/example.awesomenessjs.com/api/readme.md +0 -1
- package/example-site/example.awesomenessjs.com/pages/_md/_info.js +0 -15
- package/example-site/example.awesomenessjs.com/pages/_md/css/example.css +0 -4
- package/example-site/example.awesomenessjs.com/pages/_md/drafts/example.md +0 -32
- package/example-site/example.awesomenessjs.com/pages/_md/getBlogData.js +0 -117
- package/example-site/example.awesomenessjs.com/pages/_md/getData.js +0 -36
- package/example-site/example.awesomenessjs.com/pages/_md/js/callToAction.js +0 -43
- package/example-site/example.awesomenessjs.com/pages/_md/js/init.js +0 -88
- package/example-site/example.awesomenessjs.com/pages/_md/meta.template.md +0 -33
- package/example-site/example.awesomenessjs.com/pages/_md/pages/mission.md +0 -345
- package/example-site/example.awesomenessjs.com/pages/_template/_info.js +0 -9
- package/example-site/example.awesomenessjs.com/pages/_template/css/_.css +0 -4
- package/example-site/example.awesomenessjs.com/pages/_template/getData.js +0 -6
- package/example-site/example.awesomenessjs.com/pages/_template/js/init.js +0 -3
- package/example-site/example.awesomenessjs.com/pages/blog/_info.js +0 -14
- package/example-site/example.awesomenessjs.com/pages/blog/css/topics.css +0 -17
- package/example-site/example.awesomenessjs.com/pages/blog/getData.js +0 -22
- package/example-site/example.awesomenessjs.com/pages/blog/js/colors.js +0 -159
- package/example-site/example.awesomenessjs.com/pages/blog/js/init.js +0 -242
- package/example-site/example.awesomenessjs.com/pages/blog/js/tag.js +0 -111
- package/example-site/example.awesomenessjs.com/pages/examples/_info.js +0 -9
- package/example-site/example.awesomenessjs.com/pages/examples/css/footer.css +0 -6
- package/example-site/example.awesomenessjs.com/pages/examples/css/intro.css +0 -67
- package/example-site/example.awesomenessjs.com/pages/examples/css/nav.css +0 -221
- package/example-site/example.awesomenessjs.com/pages/examples/getData.js +0 -8
- package/example-site/example.awesomenessjs.com/pages/examples/js/init.js +0 -15
- package/example-site/example.awesomenessjs.com/pages/examples/js/updateState.js +0 -14
- package/example-site/example.awesomenessjs.com/pages/start/_info.js +0 -11
- package/example-site/example.awesomenessjs.com/pages/start/css/footer.css +0 -6
- package/example-site/example.awesomenessjs.com/pages/start/css/intro.css +0 -67
- package/example-site/example.awesomenessjs.com/pages/start/css/nav.css +0 -221
- package/example-site/example.awesomenessjs.com/pages/start/getData.js +0 -8
- package/example-site/example.awesomenessjs.com/pages/start/js/init.js +0 -30
- package/example-site/example.awesomenessjs.com/pages/start/js/updateState.js +0 -14
- package/example-site/example.awesomenessjs.com/public/images/awesomeness.webp +0 -0
- package/example-site/example.awesomenessjs.com/public/manifest.webmanifest.json +0 -8
- package/example-site/example.awesomenessjs.com/specialRoutes.js +0 -14
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
.introPage{
|
|
2
|
-
background-image: url('/tools/images/awesomeness.webp');
|
|
3
|
-
background-repeat: no-repeat;
|
|
4
|
-
background-size: cover;
|
|
5
|
-
background-position: 50% 50%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.landing-area {
|
|
9
|
-
overflow: auto;
|
|
10
|
-
position: relative;
|
|
11
|
-
width: 40%;
|
|
12
|
-
text-align: center;
|
|
13
|
-
color: #fff;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.app-size-xl .landing-area { width: 60%; }
|
|
17
|
-
.app-size-d .landing-area { width: 60%; }
|
|
18
|
-
.app-size-t .landing-area { width: 70%; }
|
|
19
|
-
.app-size-p .landing-area { width: 95%; }
|
|
20
|
-
|
|
21
|
-
.landing-area h1{
|
|
22
|
-
color: #fff;
|
|
23
|
-
text-transform: uppercase;
|
|
24
|
-
font-weight: 700;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.landing-area h2{
|
|
28
|
-
margin-bottom: 10px;
|
|
29
|
-
font-weight: 300;
|
|
30
|
-
font-size: 1.4em;
|
|
31
|
-
text-transform: capitalize;
|
|
32
|
-
color: #fff;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.landing-area button {
|
|
36
|
-
width: 46%;
|
|
37
|
-
margin: 2%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.landing-area button i{
|
|
41
|
-
text-align: center;
|
|
42
|
-
font-size: 2em;
|
|
43
|
-
position: relative;
|
|
44
|
-
display: block;
|
|
45
|
-
width: 100%;
|
|
46
|
-
padding-bottom: 23px;
|
|
47
|
-
right:auto;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.landing-area .a-button {
|
|
51
|
-
background-color: #fff;
|
|
52
|
-
color: #13408d;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.landing-area .b-button {
|
|
56
|
-
background-color: #13408d;
|
|
57
|
-
color: #fff;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.divider{
|
|
61
|
-
width: 50%;
|
|
62
|
-
height: 1px;
|
|
63
|
-
display: block;
|
|
64
|
-
margin-left: 25%;
|
|
65
|
-
background-color: #fff;
|
|
66
|
-
margin: 19px 25%;
|
|
67
|
-
}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
.main-nav {
|
|
2
|
-
background-color: #010816;
|
|
3
|
-
overflow: auto;
|
|
4
|
-
z-index: 3;
|
|
5
|
-
position: absolute;
|
|
6
|
-
width: 100%;
|
|
7
|
-
top: 62px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.main{
|
|
11
|
-
padding-top: 137px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.nav-container {
|
|
15
|
-
background-color: #010816;
|
|
16
|
-
color: #fff;
|
|
17
|
-
opacity: 1;
|
|
18
|
-
position: fixed;
|
|
19
|
-
right: 0;
|
|
20
|
-
top: -63px;
|
|
21
|
-
transition: all 420ms;
|
|
22
|
-
width: 100%;
|
|
23
|
-
z-index: 3;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.nav-container.showExtra{
|
|
27
|
-
top:0px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.nav-logo {
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
float: left;
|
|
33
|
-
font-size: 2em;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
height: 75px;
|
|
36
|
-
padding-top: 15px;
|
|
37
|
-
text-align: center;
|
|
38
|
-
width: 300px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.nav-list {
|
|
42
|
-
float: right;
|
|
43
|
-
height: 75px;
|
|
44
|
-
margin: 0px;
|
|
45
|
-
padding: 25px 45px 25px 0px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.app-size-p .nav-list,
|
|
49
|
-
.app-size-t .nav-list{
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: inherit;
|
|
52
|
-
padding-top: 0px;
|
|
53
|
-
display: none;
|
|
54
|
-
}
|
|
55
|
-
.app-size-p .nav-list.active,
|
|
56
|
-
.app-size-t .nav-list.active{
|
|
57
|
-
display: block;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.app-size-p .nav-list li,
|
|
62
|
-
.app-size-t .nav-list li{
|
|
63
|
-
width: 100%;
|
|
64
|
-
height: inherit;
|
|
65
|
-
text-align: right;
|
|
66
|
-
padding: 10px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.nav-list li {
|
|
71
|
-
-webkit-touch-callout: none;
|
|
72
|
-
-webkit-user-select: none;
|
|
73
|
-
-khtml-user-select: none;
|
|
74
|
-
-moz-user-select: none;
|
|
75
|
-
-ms-user-select: none;
|
|
76
|
-
user-select: none;
|
|
77
|
-
border-bottom: solid 1px #00000000;
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
display: block;
|
|
80
|
-
float: left;
|
|
81
|
-
font-size: 1.3em;
|
|
82
|
-
font-weight: 300;
|
|
83
|
-
margin-left: 30px;
|
|
84
|
-
padding-bottom: 3px;
|
|
85
|
-
transition: all 420ms;
|
|
86
|
-
position: relative;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.nav-list li:hover,
|
|
90
|
-
.nav-sub-list li:hover,
|
|
91
|
-
.nav-button:hover,
|
|
92
|
-
.nav-logo:hover{
|
|
93
|
-
color:#ffab55;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.app-size-xl .nav-list li.active,
|
|
97
|
-
.app-size-d .nav-list li.active{
|
|
98
|
-
border-bottom: solid 1px #0858e1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.app-size-t .nav-list li,
|
|
102
|
-
.app-size-p .nav-list li{
|
|
103
|
-
padding-right:45px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.nav-button {
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
float: right;
|
|
109
|
-
height: 75px;
|
|
110
|
-
padding: 19px 12px 19px 0px;
|
|
111
|
-
text-align: center;
|
|
112
|
-
width: 60px;
|
|
113
|
-
display: none;
|
|
114
|
-
font-size: 2.3em;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.app-size-p .nav-button,
|
|
118
|
-
.app-size-t .nav-button{
|
|
119
|
-
display: block;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.nav-top {
|
|
124
|
-
position: absolute;
|
|
125
|
-
z-index: 3;
|
|
126
|
-
top: 0px;
|
|
127
|
-
width:100%;
|
|
128
|
-
display: block;
|
|
129
|
-
overflow: auto;
|
|
130
|
-
font-size: .85em;
|
|
131
|
-
padding: 13px 32px 13px 0px;
|
|
132
|
-
background-color: #0858e1;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.app-size-p .nav-top,
|
|
136
|
-
.app-size-p .nav-call-to-action {
|
|
137
|
-
padding-right: 15px;
|
|
138
|
-
}
|
|
139
|
-
.app-size-p .nav-action{
|
|
140
|
-
padding-left: 15px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
.nav-action{
|
|
145
|
-
float: right;
|
|
146
|
-
background-color: #d92c2c;
|
|
147
|
-
padding: 10px 40px 10px 25px;
|
|
148
|
-
position: relative;
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
transition: all 420ms;
|
|
151
|
-
}
|
|
152
|
-
.nav-action:hover{
|
|
153
|
-
background-color:#053587;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.nav-action i {
|
|
157
|
-
font-size: 1em;
|
|
158
|
-
float: right;
|
|
159
|
-
position: absolute;
|
|
160
|
-
top: 12px;
|
|
161
|
-
right: 13px;
|
|
162
|
-
}
|
|
163
|
-
.nav-call-to-action{
|
|
164
|
-
float: right;
|
|
165
|
-
padding: 10px 25px 10px 0px;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.nav-sub-list{
|
|
169
|
-
transition: all 420ms;
|
|
170
|
-
display: block;
|
|
171
|
-
width: 100%;
|
|
172
|
-
overflow: auto;
|
|
173
|
-
background-color:#182a4d;
|
|
174
|
-
margin-bottom: 0px;
|
|
175
|
-
top: 0px;
|
|
176
|
-
position: absolute;
|
|
177
|
-
padding-right: 10px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.nav-sub-list li{
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
z-index: 0;
|
|
183
|
-
transition: all 420ms;
|
|
184
|
-
display: inline-block;
|
|
185
|
-
overflow: auto;
|
|
186
|
-
background-color: #182a4d;
|
|
187
|
-
float: left;
|
|
188
|
-
padding: 20px 22px;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.nav-sub-list.active{
|
|
192
|
-
top: 120px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.app-size-t .nav-sub-list,
|
|
196
|
-
.app-size-p .nav-sub-list{
|
|
197
|
-
top: -235px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.app-size-t .nav-sub-list li,
|
|
201
|
-
.app-size-p .nav-sub-list li{
|
|
202
|
-
padding-right: 50px;
|
|
203
|
-
text-align: right;
|
|
204
|
-
width: 100%;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.app-size-p .nav-sub-list.active,
|
|
208
|
-
.app-size-t .nav-sub-list.active{
|
|
209
|
-
top: 415px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.app-size-p .nav-list li i,
|
|
213
|
-
.app-size-t .nav-list li i {
|
|
214
|
-
position: absolute;
|
|
215
|
-
right: 4px;
|
|
216
|
-
top: 14px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.nav-list li i {
|
|
220
|
-
position: relative;
|
|
221
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import ui from '#ui';
|
|
2
|
-
|
|
3
|
-
app.pages.start.init = function(data, options){
|
|
4
|
-
|
|
5
|
-
app.pages.start.updateState();
|
|
6
|
-
|
|
7
|
-
// create HTML first
|
|
8
|
-
// could be done in parts broken down in the scripts folder
|
|
9
|
-
var $body = $('body');
|
|
10
|
-
|
|
11
|
-
// good idea to keep everything #app
|
|
12
|
-
// css that gets updated dynamically will be in the body via the #css div
|
|
13
|
-
// so replacing the whole body is generally not good idea
|
|
14
|
-
var $app = $('<div id="app"></div>').appendTo($body);
|
|
15
|
-
|
|
16
|
-
// Do whatever you want
|
|
17
|
-
$(`<div style="padding-top: 40vh; text-align: center;">
|
|
18
|
-
<div class="text-xl">Awesomeness</div>
|
|
19
|
-
<div class="text-xs">Build something awesome</div>
|
|
20
|
-
</div>`)
|
|
21
|
-
.appendTo($app);
|
|
22
|
-
|
|
23
|
-
ui._example();
|
|
24
|
-
ui.notCommonExample();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
window.dispatchEvent(new Event('resize'));
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
app.pages.start.updateState = function(){
|
|
2
|
-
|
|
3
|
-
// set initial
|
|
4
|
-
history.replaceState(0,'Awesomeness PWA', '/');
|
|
5
|
-
document.title = 'Awesomeness | Vanilla JS to build PWAs';
|
|
6
|
-
|
|
7
|
-
var startData = {};
|
|
8
|
-
|
|
9
|
-
startData.title = 'Awesomeness | Vanilla JS to build PWA';
|
|
10
|
-
startData.url = '/';
|
|
11
|
-
|
|
12
|
-
app.state.state[0] = startData;
|
|
13
|
-
|
|
14
|
-
};
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
pattern: '/blog/:tag',
|
|
4
|
-
handler: async (awesomenessRequest, params) => {
|
|
5
|
-
|
|
6
|
-
// test by returning json 200
|
|
7
|
-
awesomenessRequest.data.tag = params.tag;
|
|
8
|
-
awesomenessRequest.pageRoute = 'blog';
|
|
9
|
-
|
|
10
|
-
awesomenessRequest.pageInit = 'blog';
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
];
|