edge_framework 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +65 -15
- data/assets/kitchen-sink.html +6 -6
- data/assets/sass/edge.scss +1 -1
- data/assets/sass/edge/components/_grid.scss +8 -1
- data/assets/sass/edge/components/_grid_old.scss +346 -0
- data/assets/sass/edge/components/_normalize.scss +1 -1
- data/lib/edge/version.rb +2 -2
- data/template/base/assets/sass/_setting.scss +19 -29
- data/template/base/{.gitignore → gitignore} +2 -0
- data/template/rails/application.html.erb +1 -1
- data/template/wordpress/code/cpt.php +139 -0
- data/template/wordpress/code/inflector.php +28 -23
- data/template/wordpress/code/main.php +2 -132
- data/template/wordpress/code/query.php +31 -0
- data/template/wordpress/code/util.php +27 -0
- data/template/wordpress/functions.php +6 -2
- metadata +7 -6
- data/template/php/_footer.php +0 -17
- data/template/php/_header.php +0 -24
- data/template/php/index.php +0 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGI2ODYzNzA5ZDRiYzBkODQxYTE5YWQyNGNiNDg5NTM1YmU5MjcxMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGU3NzBjMTg5MTI2ZWUzMjMxY2FlMWE4Njk2MGJkN2RmYTYyM2U5YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGJmYjU4YjRmMWM2OWUzZmNiNzdjZTM4OTU2ZmZmNTQ2YmUwYzlhOGQ0YmUy
|
10
|
+
MmUxY2U4MDk5ODdmMmZmNTM5YTFhZjM3ODAwYWRjN2YxMTE2ZjA4ZjRmZTZj
|
11
|
+
NWQ3Y2ZmMTc1NjIxNWZjNjIwZGQwYWU2ZmRmZmMzNWU2OGI0MzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzU2OTlhODhkODcwYzU1OGJlZGNmOGM0ODkxYzkyMGM2YzcwOTU5NDRkMTcw
|
14
|
+
MzZiYjQ5YzYxNTVmODY4YzAxYTQwZWNiMWFjYWYxNDE1YjNmZTE5MjVjZTEx
|
15
|
+
YmI4MmNlODhlOTA4MWNhMWFkOWVjMjU3YzJkODA3Y2JiZjgzYWY=
|
data/README.md
CHANGED
@@ -322,16 +322,16 @@ Example:
|
|
322
322
|
Custom Post Type
|
323
323
|
--------------------
|
324
324
|
|
325
|
-
add_post_type( $name, <$icon>, <$taxonomy> )
|
326
|
-
|
327
325
|
![Wordpress Custom Type](http://cdn.setyono.net/edge/wp-post-type.jpg)
|
328
326
|
|
327
|
+
add_post_type( $name, <$icon>, <$taxonomy> )
|
328
|
+
|
329
329
|
Inside `functions.php`, add these codes:
|
330
330
|
|
331
331
|
add_post_type("Product", "cart", "Brand");
|
332
332
|
add_post_type("Event", "calendar");
|
333
333
|
|
334
|
-
|
334
|
+
The icon name is taken from [melchoyce.github.io/dashicons/](http://melchoyce.github.io/dashicons/).
|
335
335
|
|
336
336
|
To enable custom WP Query, create a class with the Post Type's name that extends `Post`.
|
337
337
|
|
@@ -339,15 +339,29 @@ To enable custom WP Query, create a class with the Post Type's name that extends
|
|
339
339
|
class Product extends Post {}
|
340
340
|
class Event extends Post {}
|
341
341
|
|
342
|
-
Now, you can
|
342
|
+
Now, you can use the custom WP Query:
|
343
343
|
|
344
344
|
$products = Product::find_by("brand", "Microsoft")
|
345
345
|
$events = Event::find()
|
346
346
|
|
347
|
+
Template File
|
348
|
+
---------------
|
349
|
+
|
347
350
|
The template file for custom post is `single-{slug}.php` while custom taxonomy is `taxonomy-{slug}.php`.
|
348
351
|
|
349
352
|
Based on the example above, create `single-product.php` for single **Product** template. If we need to list all products within a brand, create `taxonomy-brand.php` which works the same way as `category.php`.
|
350
353
|
|
354
|
+
Naming Convention
|
355
|
+
-----------------
|
356
|
+
|
357
|
+
All names must be **singular** and no special character.
|
358
|
+
|
359
|
+
Space is the only one allowed but its class name is the **combined words**.
|
360
|
+
|
361
|
+
add_post_type("Photo Gallery", "format-gallery");
|
362
|
+
|
363
|
+
class Photogallery extends Post {}
|
364
|
+
|
351
365
|
COMPASS
|
352
366
|
=================
|
353
367
|
|
@@ -391,9 +405,9 @@ GRID - mixin
|
|
391
405
|
|
392
406
|
Custom grid makes the markup cleaner and less duplication.
|
393
407
|
|
394
|
-
It allows one additional
|
408
|
+
It allows one additional breakpoint: **mini** which is below 480px by default. You can only set mini size when small one is specified.
|
395
409
|
|
396
|
-
We
|
410
|
+
We need to include the base class in the markup (`.row` and `.column`).
|
397
411
|
|
398
412
|
// HTML
|
399
413
|
<div class="row">
|
@@ -401,6 +415,7 @@ We still need to write the base class (`.row` and `.column`).
|
|
401
415
|
<main class="column"></main>
|
402
416
|
</div>
|
403
417
|
|
418
|
+
|
404
419
|
// SCSS
|
405
420
|
aside {
|
406
421
|
@include column(2, 4, 12);
|
@@ -416,7 +431,7 @@ We still need to write the base class (`.row` and `.column`).
|
|
416
431
|
|
417
432
|
**GUTTER**
|
418
433
|
|
419
|
-
|
434
|
+
Custom gutter must be applied to both row and column
|
420
435
|
|
421
436
|
// HTML
|
422
437
|
<div class="my-row row">
|
@@ -424,6 +439,7 @@ If you want to modify all the gutters, change it in Setting file. Otherwise, you
|
|
424
439
|
<main class="column"></main>
|
425
440
|
</div>
|
426
441
|
|
442
|
+
|
427
443
|
// SCSS
|
428
444
|
.my-row {
|
429
445
|
@include row($gutter: 50px);
|
@@ -437,28 +453,62 @@ If you want to modify all the gutters, change it in Setting file. Otherwise, you
|
|
437
453
|
@include column($large: 10, $gutter: 50px);
|
438
454
|
}
|
439
455
|
|
456
|
+
**COLLAPSE**
|
457
|
+
|
458
|
+
Collapse must be applied to both row and column.
|
459
|
+
|
460
|
+
.my-row {
|
461
|
+
@include row($collapse: true);
|
462
|
+
}
|
463
|
+
|
464
|
+
main {
|
465
|
+
@include column($large: 10, $collapse: true);
|
466
|
+
}
|
467
|
+
|
440
468
|
**TOTAL COLUMNS**
|
441
469
|
|
470
|
+
You can either use `$total` parameter or fraction:
|
471
|
+
|
442
472
|
aside {
|
443
|
-
@include column($large:
|
473
|
+
@include column($large: 7, $total: 15);
|
444
474
|
}
|
445
475
|
|
446
|
-
|
447
|
-
|
476
|
+
// or
|
477
|
+
|
478
|
+
aside {
|
479
|
+
@include column($large: 7 / 15);
|
448
480
|
}
|
449
481
|
|
450
|
-
**
|
482
|
+
Custom total columns is useful when you need **to match a given design**.
|
483
|
+
|
484
|
+
Let's say you get this layout that throw off your default grid:
|
451
485
|
|
452
|
-
|
486
|
+
![Pre-given Design](http://cdn.setyono.net/edge/custom-total-column.jpg)
|
487
|
+
|
488
|
+
Here's how you can handle it:
|
453
489
|
|
490
|
+
// HTML
|
491
|
+
<div class="my-row row">
|
492
|
+
<main class="my-col column"> ... </main>
|
493
|
+
<aside class="side-col column"> ... </aside>
|
494
|
+
</div>
|
495
|
+
|
496
|
+
|
497
|
+
// CSS
|
454
498
|
.my-row {
|
455
|
-
@include row($
|
499
|
+
@include row($gutter: 35px);
|
456
500
|
}
|
457
501
|
|
458
|
-
|
459
|
-
@include column($large:
|
502
|
+
.my-col {
|
503
|
+
@include column($large: 500 / 735, $gutter: 35px);
|
460
504
|
}
|
461
505
|
|
506
|
+
.side-col {
|
507
|
+
@include column($large: 200 / 735, $gutter: 35px);
|
508
|
+
}
|
509
|
+
|
510
|
+
Remember that we need to include the `.row` and `.column` class.
|
511
|
+
|
462
512
|
TILE - mixin
|
463
513
|
======================
|
464
514
|
|
data/assets/kitchen-sink.html
CHANGED
@@ -294,7 +294,7 @@
|
|
294
294
|
</div>
|
295
295
|
</div> -->
|
296
296
|
|
297
|
-
|
297
|
+
<div class="row" data-page="code">
|
298
298
|
<div class="large-12 columns">
|
299
299
|
<h1>EDGE Code</h1>
|
300
300
|
<h3>Markup</h3>
|
@@ -341,7 +341,7 @@
|
|
341
341
|
end
|
342
342
|
</code></pre>
|
343
343
|
</div>
|
344
|
-
</div>
|
344
|
+
</div>
|
345
345
|
|
346
346
|
<!-- <div class="row" data-page="tile">
|
347
347
|
<div class="large-12 columns">
|
@@ -380,7 +380,7 @@
|
|
380
380
|
</div>
|
381
381
|
</div> -->
|
382
382
|
|
383
|
-
<div class="row" data-page="custom-tile">
|
383
|
+
<!-- <div class="row" data-page="custom-tile">
|
384
384
|
<div class="large-12 columns">
|
385
385
|
<div class="demo-tile">
|
386
386
|
<h1>Custom Tile</h1>
|
@@ -430,7 +430,7 @@
|
|
430
430
|
</ul>
|
431
431
|
</div>
|
432
432
|
</div>
|
433
|
-
</div>
|
433
|
+
</div> -->
|
434
434
|
|
435
435
|
<!-- <div class="row" data-page="grid">
|
436
436
|
<div class="large-12 columns">
|
@@ -816,7 +816,7 @@
|
|
816
816
|
</div>
|
817
817
|
</section> -->
|
818
818
|
|
819
|
-
<section class="row" data-page="button">
|
819
|
+
<!-- <section class="row" data-page="button">
|
820
820
|
<div class="large-4 column">
|
821
821
|
<h1>Button</h1>
|
822
822
|
<a href="" class="button">Hello World</a>
|
@@ -839,7 +839,7 @@
|
|
839
839
|
<br>
|
840
840
|
<a href="" class="button black-button">Hello World</a>
|
841
841
|
</div>
|
842
|
-
</section>
|
842
|
+
</section> -->
|
843
843
|
|
844
844
|
<!-- <div class="row" data-page="form">
|
845
845
|
<div class="large-6 columns">
|
data/assets/sass/edge.scss
CHANGED
@@ -9,7 +9,14 @@ $column-gutter : 20px !default;
|
|
9
9
|
|
10
10
|
// Calculate percentages for grid
|
11
11
|
@function gridCalc($colNumber, $totalColumns) {
|
12
|
-
|
12
|
+
// If column specified is not fraction
|
13
|
+
@if $colNumber >= 1 {
|
14
|
+
@return percentage($colNumber / $totalColumns);
|
15
|
+
}
|
16
|
+
// If column specified is fraction (like 2/12)
|
17
|
+
@else {
|
18
|
+
@return percentage($colNumber);
|
19
|
+
}
|
13
20
|
}
|
14
21
|
|
15
22
|
// ---------------------------------
|
@@ -0,0 +1,346 @@
|
|
1
|
+
// =============
|
2
|
+
// EDGE GRID
|
3
|
+
// =============
|
4
|
+
// Based on Foundation 4 by ZURB
|
5
|
+
|
6
|
+
$row-max-width : 1140px !default;
|
7
|
+
$total-columns : 12 !default;
|
8
|
+
$column-gutter : 20px !default;
|
9
|
+
|
10
|
+
// Calculate percentages for grid
|
11
|
+
@function gridCalc($colNumber, $totalColumns) {
|
12
|
+
@return percentage($colNumber / $totalColumns);
|
13
|
+
}
|
14
|
+
|
15
|
+
// ---------------------------------
|
16
|
+
// GRID ROW
|
17
|
+
// - Create container for the grid
|
18
|
+
// ---------------------------------
|
19
|
+
|
20
|
+
@mixin row(
|
21
|
+
$gutter : $column-gutter,
|
22
|
+
$width : $row-max-width,
|
23
|
+
$nest : false,
|
24
|
+
$collapse : false,
|
25
|
+
$for-base : false ) {
|
26
|
+
|
27
|
+
@if $for-base {
|
28
|
+
margin: 0 auto;
|
29
|
+
width: 100%;
|
30
|
+
max-width: $width + $gutter;
|
31
|
+
|
32
|
+
@if not $responsive {
|
33
|
+
min-width: $width + $gutter;
|
34
|
+
}
|
35
|
+
@include clearfix;
|
36
|
+
}
|
37
|
+
|
38
|
+
// If gutter is passed as param, calculate it
|
39
|
+
@if $gutter != $column-gutter {
|
40
|
+
max-width: $width + $gutter;
|
41
|
+
|
42
|
+
@if not $responsive {
|
43
|
+
min-width: $width + $gutter;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
@if $nest and $collapse {
|
48
|
+
margin: 0;
|
49
|
+
padding-right: 0;
|
50
|
+
padding-left: 0;
|
51
|
+
width: auto;
|
52
|
+
max-width: none;
|
53
|
+
|
54
|
+
@if not $responsive {
|
55
|
+
min-width: 0;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
@else if $nest {
|
60
|
+
margin-right: -($gutter / 2);
|
61
|
+
margin-left: -($gutter / 2);
|
62
|
+
width: auto;
|
63
|
+
max-width: none;
|
64
|
+
|
65
|
+
@if not $responsive {
|
66
|
+
min-width: 0;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
@else if $collapse {
|
71
|
+
margin: 0 auto;
|
72
|
+
width: 100%;
|
73
|
+
max-width: $width;
|
74
|
+
|
75
|
+
@if not $responsive {
|
76
|
+
min-width: $width;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
@if $external-call {
|
81
|
+
.row & {
|
82
|
+
margin-right: -($gutter / 2);
|
83
|
+
margin-left: -($gutter / 2);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
// ----------------------------------------------
|
89
|
+
// Calculate size for column created externally
|
90
|
+
//-----------------------------------------------
|
91
|
+
@mixin external-call-column(
|
92
|
+
$column : 0,
|
93
|
+
$total : 0,
|
94
|
+
$offset : 0,
|
95
|
+
$parent-offset : 0) {
|
96
|
+
|
97
|
+
@if $column > 0 {
|
98
|
+
width: gridCalc($column, $total);
|
99
|
+
} @else {
|
100
|
+
width: 100%;
|
101
|
+
}
|
102
|
+
|
103
|
+
// Offset is only allowed if the column is specified
|
104
|
+
@if $column > 0 and $offset > 0 {
|
105
|
+
margin-#{$default-float}: gridCalc($offset, $total);
|
106
|
+
}
|
107
|
+
// If parent (larger) column has offset, remove it
|
108
|
+
@else if $parent-offset > 0 {
|
109
|
+
margin-#{$default-float}: 0;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
// ----------------------------------
|
114
|
+
// Prevent duplicate in column
|
115
|
+
// ----------------------------------
|
116
|
+
@mixin source-ordering-column(
|
117
|
+
$push : 0,
|
118
|
+
$pull : 0,
|
119
|
+
$total : 0) {
|
120
|
+
|
121
|
+
@if $push > 0 {
|
122
|
+
#{$default-float}: gridCalc($push, $total);
|
123
|
+
#{$default-opposite}: auto;
|
124
|
+
}
|
125
|
+
@if $pull > 0 {
|
126
|
+
#{$default-opposite}: gridCalc($pull, $total);
|
127
|
+
#{$default-float}: auto;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
// --------------------------------------
|
132
|
+
// Prevent duplicate in the base output
|
133
|
+
// --------------------------------------
|
134
|
+
@mixin source-ordering-output() {
|
135
|
+
@for $i from 1 through $total-columns - 1 {
|
136
|
+
.large-offset-#{$i} {
|
137
|
+
@include column($large-offset:$i);
|
138
|
+
}
|
139
|
+
.push#{-$i} {
|
140
|
+
@include column($push:$i);
|
141
|
+
}
|
142
|
+
.pull#{-$i} {
|
143
|
+
@include column($pull:$i);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
// ------------------------
|
149
|
+
// GRID COLUMN
|
150
|
+
// - Create the grid
|
151
|
+
// ------------------------
|
152
|
+
@mixin column(
|
153
|
+
$large : 0,
|
154
|
+
$small : 0, // For external call only, small size screen
|
155
|
+
$mini : 0, // For external call only, mini size screen
|
156
|
+
$large-offset : 0,
|
157
|
+
$small-offset : 0, // For external call only
|
158
|
+
$mini-offset : 0, // For external call only
|
159
|
+
$push : 0,
|
160
|
+
$pull : 0,
|
161
|
+
$collapse : false,
|
162
|
+
$centered : false,
|
163
|
+
$gutter : $column-gutter,
|
164
|
+
$total : $total-columns,
|
165
|
+
$for-base : false ) {
|
166
|
+
|
167
|
+
@if $for-base {
|
168
|
+
position: relative;
|
169
|
+
float: $default-float;
|
170
|
+
padding-right: $gutter / 2;
|
171
|
+
padding-left: $gutter / 2;
|
172
|
+
}
|
173
|
+
|
174
|
+
// If gutter's value is different from default, it means it is passed as param
|
175
|
+
@if $gutter != $column-gutter {
|
176
|
+
padding-right: $gutter / 2;
|
177
|
+
padding-left: $gutter / 2;
|
178
|
+
}
|
179
|
+
|
180
|
+
// If collapsed, get rid of distance padding
|
181
|
+
@if $collapse {
|
182
|
+
padding-right: 0;
|
183
|
+
padding-left: 0;
|
184
|
+
}
|
185
|
+
|
186
|
+
// If offset, calculate appropriate margins
|
187
|
+
@if $large-offset > 0 {
|
188
|
+
margin-#{$default-float}: gridCalc($large-offset, $total);
|
189
|
+
}
|
190
|
+
|
191
|
+
// If a column number is given, calculate width
|
192
|
+
@if $large > 0 {
|
193
|
+
width: gridCalc($large, $total);
|
194
|
+
}
|
195
|
+
|
196
|
+
// Source Ordering, adds left/right depending on which you use.
|
197
|
+
@if $external-call and $responsive {
|
198
|
+
@include above(small) {
|
199
|
+
@include source-ordering-column($push:$push, $pull:$pull, $total:$total);
|
200
|
+
}
|
201
|
+
} @else {
|
202
|
+
@include source-ordering-column($push:$push, $pull:$pull, $total:$total);
|
203
|
+
}
|
204
|
+
|
205
|
+
// If centered, get rid of float and add auto margin
|
206
|
+
@if $centered {
|
207
|
+
display: block;
|
208
|
+
float: none;
|
209
|
+
margin-right: auto !important;
|
210
|
+
margin-left: auto !important;
|
211
|
+
}
|
212
|
+
|
213
|
+
// If external call and responsive is true
|
214
|
+
@if $external-call and $responsive {
|
215
|
+
// If small column is specified
|
216
|
+
@if $small > 0 {
|
217
|
+
@include below(small) {
|
218
|
+
@include external-call-column($column:$small, $total:$total, $offset:$small-offset, $parent-offset:$large-offset);
|
219
|
+
}
|
220
|
+
|
221
|
+
@if $mini > 0 {
|
222
|
+
@include below(mini) {
|
223
|
+
@include external-call-column($column:$mini, $total:$total, $offset:$mini-offset, $parent-offset:$small-offset);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
// If small is not passed, stack the column
|
228
|
+
@else {
|
229
|
+
@include below(small) {
|
230
|
+
@include external-call-column($column:$small, $total:$total, $offset:$small-offset, $parent-offset:$large-offset);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
// Create notes when on debug
|
236
|
+
@if $debug and $external-call {
|
237
|
+
$notes: "large-#{$large}";
|
238
|
+
@if $large-offset > 0 {
|
239
|
+
$notes: $notes + " large-offset-#{$large-offset}";
|
240
|
+
}
|
241
|
+
@if $small > 0 {
|
242
|
+
$notes: $notes + " small-#{$small}";
|
243
|
+
}
|
244
|
+
@if $small-offset > 0 {
|
245
|
+
$notes: $notes + " small-offset-#{$small-offset}";
|
246
|
+
}
|
247
|
+
@if $mini > 0 {
|
248
|
+
$notes: $notes + " mini-#{$mini}";
|
249
|
+
}
|
250
|
+
@if $mini-offset > 0 {
|
251
|
+
$notes: $notes + " mini-offset-#{$mini-offset}";
|
252
|
+
}
|
253
|
+
@if $push > 0 {
|
254
|
+
$notes: $notes + " push-#{$push}";
|
255
|
+
}
|
256
|
+
@if $pull > 0 {
|
257
|
+
$notes: $notes + " pull-#{$pull}";
|
258
|
+
}
|
259
|
+
@if $centered {
|
260
|
+
$notes: $notes + " centered";
|
261
|
+
}
|
262
|
+
h-column: $notes;
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
@if $include-grid and not $external-call {
|
267
|
+
|
268
|
+
/* ------------
|
269
|
+
EDGE Grid
|
270
|
+
------------ */
|
271
|
+
|
272
|
+
// Normal row
|
273
|
+
.row {
|
274
|
+
@include row($for-base:true);
|
275
|
+
|
276
|
+
// Collapsed row
|
277
|
+
&.collapse {
|
278
|
+
@include row($collapse:true);
|
279
|
+
.column,
|
280
|
+
.columns {
|
281
|
+
@include column($collapse:true);
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
285
|
+
// Nested-collapsed row
|
286
|
+
.row {
|
287
|
+
@include row($nest:true);
|
288
|
+
&.collapse {
|
289
|
+
@include row($nest:true, $collapse:true);
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
// Normal column
|
295
|
+
.column,
|
296
|
+
.columns {
|
297
|
+
@include column($large:$total-columns, $for-base:true);
|
298
|
+
}
|
299
|
+
|
300
|
+
@for $i from 1 through $total-columns {
|
301
|
+
.large#{-$i} { @include column($large:$i); }
|
302
|
+
}
|
303
|
+
|
304
|
+
// Centered column
|
305
|
+
.column.large-centered,
|
306
|
+
.columns.large-centered {
|
307
|
+
@include column($centered:true);
|
308
|
+
}
|
309
|
+
|
310
|
+
// Source Ordering
|
311
|
+
@if $responsive {
|
312
|
+
@include above(small) {
|
313
|
+
@include source-ordering-output();
|
314
|
+
}
|
315
|
+
} @else {
|
316
|
+
@include source-ordering-output();
|
317
|
+
}
|
318
|
+
|
319
|
+
@if $responsive {
|
320
|
+
// Small screen and below
|
321
|
+
@include below(small) {
|
322
|
+
.column,
|
323
|
+
.columns {
|
324
|
+
@include column($large:$total-columns);
|
325
|
+
}
|
326
|
+
@for $i from 1 through $total-columns {
|
327
|
+
.small#{-$i} {
|
328
|
+
@include column($large:$i);
|
329
|
+
}
|
330
|
+
}
|
331
|
+
|
332
|
+
@for $i from 0 through $total-columns - 2 {
|
333
|
+
.small-offset-#{$i} {
|
334
|
+
@include column($large-offset:$i);
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
.column.small-centered,
|
339
|
+
.columns.small-centered {
|
340
|
+
@include column($centered:true);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
|
344
|
+
} // responsive
|
345
|
+
|
346
|
+
} // $include-grid
|
@@ -144,7 +144,7 @@ button, select { text-transform: none; }
|
|
144
144
|
button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; }
|
145
145
|
button[disabled], html input[disabled] { cursor: default; }
|
146
146
|
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
|
147
|
-
input[type="search"] { -webkit-appearance: textfield;
|
147
|
+
input[type="search"] { -webkit-appearance: textfield; }
|
148
148
|
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
|
149
149
|
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
|
150
150
|
|
data/lib/edge/version.rb
CHANGED
@@ -15,20 +15,10 @@ $body-font-family : "Helvetica", Helvetica, Arial, "sans-serif";
|
|
15
15
|
$main-color : #2a71e3;
|
16
16
|
$sub-color : #d7d7d7;
|
17
17
|
|
18
|
-
// -------------------
|
19
|
-
// COLOR PALETTE
|
20
|
-
// -------------------
|
21
|
-
// $passive-color : #d7d7d7;
|
22
|
-
// $blue-color : #2a71e3;
|
23
|
-
// $yellow-color : #fac741;
|
24
|
-
// $red-color : #d35400;
|
25
|
-
// $green-color : #229e61;
|
26
|
-
|
27
18
|
// ----------------
|
28
19
|
// OUTPUT CONFIG
|
29
20
|
// ----------------
|
30
21
|
// $responsive : true;
|
31
|
-
// $debug : false;
|
32
22
|
|
33
23
|
// $include-tile : true;
|
34
24
|
// $include-visibility : true;
|
@@ -38,6 +28,25 @@ $sub-color : #d7d7d7;
|
|
38
28
|
// $include-print : false;
|
39
29
|
// $include-code : false;
|
40
30
|
|
31
|
+
// ---------------
|
32
|
+
// GLOBAL VALUE
|
33
|
+
// ---------------
|
34
|
+
// $g-radius : 3px;
|
35
|
+
// $g-transition : all .2s ease-in-out;
|
36
|
+
|
37
|
+
// --------
|
38
|
+
// GRID
|
39
|
+
// --------
|
40
|
+
// $row-max-width : 1140px;
|
41
|
+
// $total-columns : 12;
|
42
|
+
// $column-gutter : 20px;
|
43
|
+
|
44
|
+
// ------------
|
45
|
+
// TILE
|
46
|
+
// ------------
|
47
|
+
// $max-tiles : 12;
|
48
|
+
// $tile-gutter : 15px;
|
49
|
+
|
41
50
|
// ------
|
42
51
|
// BODY
|
43
52
|
// ------
|
@@ -63,12 +72,6 @@ $sub-color : #d7d7d7;
|
|
63
72
|
|
64
73
|
// $p-margin-bottom : 1em;
|
65
74
|
|
66
|
-
// ---------------
|
67
|
-
// GLOBAL VALUE
|
68
|
-
// ---------------
|
69
|
-
// $g-radius : 3px;
|
70
|
-
// $g-transition : all .2s ease-in-out;
|
71
|
-
|
72
75
|
// -------------------
|
73
76
|
// MEDIA QUERIES
|
74
77
|
// -------------------
|
@@ -77,19 +80,6 @@ $sub-color : #d7d7d7;
|
|
77
80
|
// $large-screen : 1440px;
|
78
81
|
// $retina-screen : 192dpi;
|
79
82
|
|
80
|
-
// --------
|
81
|
-
// GRID
|
82
|
-
// --------
|
83
|
-
// $row-max-width : 1140px;
|
84
|
-
// $total-columns : 12;
|
85
|
-
// $column-gutter : 20px;
|
86
|
-
|
87
|
-
// ------------
|
88
|
-
// TILE
|
89
|
-
// ------------
|
90
|
-
// $max-tiles : 12;
|
91
|
-
// $tile-gutter : 15px;
|
92
|
-
|
93
83
|
// -----------------
|
94
84
|
// CODE Highlighter
|
95
85
|
// -----------------
|
@@ -0,0 +1,139 @@
|
|
1
|
+
<?php
|
2
|
+
/*
|
3
|
+
Create Custom Post Type
|
4
|
+
*/
|
5
|
+
|
6
|
+
function add_post_type($name, $icon = "admin-post", $tax_name = null) {
|
7
|
+
$plural = Inflector::pluralize($name);
|
8
|
+
$singular = $name;
|
9
|
+
|
10
|
+
$labels = array(
|
11
|
+
"name" => $plural,
|
12
|
+
"singular_name" => $singular,
|
13
|
+
"add_new_item" => "Add New " . $singular,
|
14
|
+
"edit_item" => "Edit " . $singular,
|
15
|
+
"new_item" => "New " . $singular,
|
16
|
+
"view_item" => "View " . $singular,
|
17
|
+
"search_items" => "Search " . $plural,
|
18
|
+
"not_found" => "No " . strtolower($plural) . " found",
|
19
|
+
"not_found_in_trash" => "No " . strtolower($plural) . " found in Trash",
|
20
|
+
"parent_item_colon" => "Parent " . $singular . ":",
|
21
|
+
);
|
22
|
+
|
23
|
+
$post_args = array(
|
24
|
+
"public" => true,
|
25
|
+
"menu_icon" => "dashicons-".$icon,
|
26
|
+
"labels" => $labels,
|
27
|
+
"capability_type" => "post",
|
28
|
+
"supports" => array(
|
29
|
+
"title",
|
30
|
+
"editor",
|
31
|
+
"custom-fields",
|
32
|
+
"revisions",
|
33
|
+
"thumbnail",
|
34
|
+
),
|
35
|
+
);
|
36
|
+
|
37
|
+
// If taxonomy is given
|
38
|
+
if($tax_name) {
|
39
|
+
add_taxonomy($tax_name, $name);
|
40
|
+
}
|
41
|
+
|
42
|
+
register_post_type(strtolower($name), $post_args);
|
43
|
+
}
|
44
|
+
|
45
|
+
/*
|
46
|
+
Create Custom Taxonomy
|
47
|
+
*/
|
48
|
+
|
49
|
+
function add_taxonomy($name, $post_type) {
|
50
|
+
$plural = Inflector::pluralize($name);
|
51
|
+
$singular = $name;
|
52
|
+
|
53
|
+
$labels = array(
|
54
|
+
"name" => $plural,
|
55
|
+
"singular_name" => $singular,
|
56
|
+
"all_items" => "All " . $plural,
|
57
|
+
"edit_item" => "Edit " . $singular,
|
58
|
+
"view_item" => "View " . $singular,
|
59
|
+
"update_item" => "Update " . $singular,
|
60
|
+
"add_new_item" => "Add New " . $singular,
|
61
|
+
"parent_item" => "Parent " . $singular,
|
62
|
+
"search_items" => "Search " . $plural,
|
63
|
+
"popular_items" => "Popular " . $plural,
|
64
|
+
"add_or_remove_items" => "Add or remove " . strtolower($plural),
|
65
|
+
"choose_from_most_used" => "Choose from the most used " . strtolower($plural),
|
66
|
+
"not_found" => "No " . strtolower($plural) . " found"
|
67
|
+
);
|
68
|
+
|
69
|
+
$tax_args = array(
|
70
|
+
"labels" => $labels,
|
71
|
+
"show_ui" => true,
|
72
|
+
"query_var" => true,
|
73
|
+
"show_admin_column" => false,
|
74
|
+
"hierarchical" => true,
|
75
|
+
);
|
76
|
+
register_taxonomy(strtolower($name), strtolower($post_type), $tax_args);
|
77
|
+
|
78
|
+
new CPT_Filter(array(strtolower($post_type) => array(strtolower($singular) ) ) );
|
79
|
+
}
|
80
|
+
|
81
|
+
/*
|
82
|
+
Add Taxonomy filter to a CPT
|
83
|
+
@author Ohad Raz <admin@bainternet.info>
|
84
|
+
*/
|
85
|
+
class CPT_Filter {
|
86
|
+
function __construct($cpt = array()) {
|
87
|
+
$this->cpt = $cpt;
|
88
|
+
add_action("restrict_manage_posts", array($this, "my_restrict_manage_posts") );
|
89
|
+
}
|
90
|
+
|
91
|
+
/*
|
92
|
+
Add select dropdown per taxonomy
|
93
|
+
*/
|
94
|
+
public function my_restrict_manage_posts() {
|
95
|
+
// only display these taxonomy filters on desired custom post_type listings
|
96
|
+
global $typenow;
|
97
|
+
$types = array_keys($this->cpt);
|
98
|
+
|
99
|
+
if (in_array($typenow, $types) ) {
|
100
|
+
// create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list
|
101
|
+
$filters = $this->cpt[$typenow];
|
102
|
+
|
103
|
+
foreach ($filters as $tax_slug) {
|
104
|
+
// retrieve the taxonomy object
|
105
|
+
$tax_obj = get_taxonomy($tax_slug);
|
106
|
+
$tax_name = $tax_obj->labels->name;
|
107
|
+
|
108
|
+
// output html for taxonomy dropdown filter
|
109
|
+
echo "<select name='".strtolower($tax_slug)."' id='".strtolower($tax_slug)."' class='postform'>";
|
110
|
+
echo "<option value=''>Show All $tax_name</option>";
|
111
|
+
$this->generate_taxonomy_options($tax_slug,0,0,(isset($_GET[strtolower($tax_slug)])? $_GET[strtolower($tax_slug)] : null));
|
112
|
+
echo "</select>";
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
/*
|
118
|
+
Generate_taxonomy_options generate dropdown
|
119
|
+
*/
|
120
|
+
public function generate_taxonomy_options($tax_slug, $parent = "", $level = 0, $selected = null) {
|
121
|
+
$args = array("show_empty" => 1);
|
122
|
+
|
123
|
+
if(!is_null($parent) ) {
|
124
|
+
$args = array("parent" => $parent);
|
125
|
+
}
|
126
|
+
$terms = get_terms($tax_slug, $args);
|
127
|
+
$tab = "";
|
128
|
+
|
129
|
+
for($i = 0; $i < $level; $i++) {
|
130
|
+
$tab .= "--";
|
131
|
+
}
|
132
|
+
|
133
|
+
foreach ($terms as $term) {
|
134
|
+
// output each select option line, check against the last $_GET to show the current option selected
|
135
|
+
echo "<option value=". $term->slug, $selected == $term->slug ? " selected='selected'" : "", ">" . $tab . $term->name ." (" . $term->count .")</option>";
|
136
|
+
$this->generate_taxonomy_options($tax_slug, $term->term_id, $level + 1, $selected);
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}//end class
|
@@ -1,8 +1,13 @@
|
|
1
1
|
<?php
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
/*
|
3
|
+
Pluralize or Singularize a verb/noun
|
4
|
+
|
5
|
+
Thanks to:
|
6
|
+
- http://www.eval.ca/articles/php-pluralize (MIT license)
|
7
|
+
- http://dev.rubyonrails.org/browser/trunk/activesupport/lib/active_support/inflections.rb (MIT license)
|
8
|
+
- http://www.fortunecity.com/bally/durrus/153/gramch13.html
|
9
|
+
- http://www2.gsu.edu/~wwwesl/egw/crump.htm
|
10
|
+
*/
|
6
11
|
|
7
12
|
class Inflector {
|
8
13
|
static $plural = array(
|
@@ -59,26 +64,26 @@ class Inflector {
|
|
59
64
|
);
|
60
65
|
|
61
66
|
static $irregular = array(
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
"move" => "moves",
|
68
|
+
"foot" => "feet",
|
69
|
+
"goose" => "geese",
|
70
|
+
"sex" => "sexes",
|
71
|
+
"child" => "children",
|
72
|
+
"man" => "men",
|
73
|
+
"tooth" => "teeth",
|
74
|
+
"person" => "people"
|
70
75
|
);
|
71
76
|
|
72
77
|
static $uncountable = array(
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
78
|
+
"sheep",
|
79
|
+
"fish",
|
80
|
+
"deer",
|
81
|
+
"series",
|
82
|
+
"species",
|
83
|
+
"money",
|
84
|
+
"rice",
|
85
|
+
"information",
|
86
|
+
"equipment"
|
82
87
|
);
|
83
88
|
|
84
89
|
public static function pluralize( $string ) {
|
@@ -89,7 +94,7 @@ class Inflector {
|
|
89
94
|
|
90
95
|
// check for irregular singular forms
|
91
96
|
foreach ( self::$irregular as $pattern => $result ) {
|
92
|
-
$pattern =
|
97
|
+
$pattern = "/" . $pattern . "$/i";
|
93
98
|
|
94
99
|
if ( preg_match( $pattern, $string ) ) {
|
95
100
|
return preg_replace( $pattern, $result, $string);
|
@@ -114,7 +119,7 @@ class Inflector {
|
|
114
119
|
|
115
120
|
// check for irregular plural forms
|
116
121
|
foreach ( self::$irregular as $result => $pattern ) {
|
117
|
-
$pattern =
|
122
|
+
$pattern = "/" . $pattern . "$/i";
|
118
123
|
|
119
124
|
if ( preg_match( $pattern, $string ) ) {
|
120
125
|
return preg_replace( $pattern, $result, $string);
|
@@ -5,6 +5,8 @@
|
|
5
5
|
- Requirement: Wordpress 3.8 and PHP 5.3
|
6
6
|
------------------------------------------- */
|
7
7
|
include "inflector.php";
|
8
|
+
include "cpt.php";
|
9
|
+
include "query.php";
|
8
10
|
|
9
11
|
function home() { echo home_url()."/"; }
|
10
12
|
function root() { return get_template_directory_uri()."/"; }
|
@@ -13,31 +15,6 @@ function root() { return get_template_directory_uri()."/"; }
|
|
13
15
|
function js() { echo root()."assets/js/"; }
|
14
16
|
function files() { echo root()."assets/files/"; }
|
15
17
|
|
16
|
-
/*
|
17
|
-
ELLIPSIZE
|
18
|
-
- Adding "..." at the end of the string.
|
19
|
-
- Default is 160 characters
|
20
|
-
*/
|
21
|
-
|
22
|
-
function ellipsize($text, $char_number = "160", $etc = "...") {
|
23
|
-
$text = html_entity_decode($text, ENT_QUOTES);
|
24
|
-
if (strlen($text) > $char_number) {
|
25
|
-
$text = substr($text, 0, $char_number);
|
26
|
-
$text = substr($text,0,strrpos($text," "));
|
27
|
-
|
28
|
-
$punctuation = ".!?:;,-"; // punctuation you want removed
|
29
|
-
|
30
|
-
$text = (strspn(strrev($text), $punctuation) != 0)
|
31
|
-
?
|
32
|
-
substr($text, 0, -strspn(strrev($text), $punctuation))
|
33
|
-
:
|
34
|
-
$text;
|
35
|
-
|
36
|
-
$text = $text.$etc;
|
37
|
-
}
|
38
|
-
$text = htmlentities($text, ENT_QUOTES);
|
39
|
-
return $text;
|
40
|
-
}
|
41
18
|
|
42
19
|
/*
|
43
20
|
CUSTOM NAV MENU
|
@@ -53,113 +30,6 @@ function edge_nav_menu() {
|
|
53
30
|
));
|
54
31
|
}
|
55
32
|
|
56
|
-
/*
|
57
|
-
DATABASE CALL
|
58
|
-
*/
|
59
|
-
|
60
|
-
class Post {
|
61
|
-
public static function find($args = null) {
|
62
|
-
wp_reset_postdata();
|
63
|
-
|
64
|
-
if(empty($args) ) {
|
65
|
-
$args = array(
|
66
|
-
"post_type" => get_called_class()
|
67
|
-
);
|
68
|
-
}
|
69
|
-
|
70
|
-
return new WP_Query($args);
|
71
|
-
}
|
72
|
-
|
73
|
-
public static function find_by($key, $value) {
|
74
|
-
wp_reset_postdata();
|
75
|
-
|
76
|
-
$args = array(
|
77
|
-
$key => $value,
|
78
|
-
"post_type" => get_called_class()
|
79
|
-
);
|
80
|
-
return new WP_Query($args);
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
class Page extends Post {}
|
85
|
-
|
86
|
-
/*
|
87
|
-
CUSTOM POST TYPE
|
88
|
-
*/
|
89
|
-
|
90
|
-
function add_post_type($name, $icon = "admin-post", $tax_name = null) {
|
91
|
-
$plural = Inflector::pluralize($name);
|
92
|
-
$singular = $name;
|
93
|
-
|
94
|
-
$labels = array(
|
95
|
-
"name" => $plural,
|
96
|
-
"singular_name" => $singular,
|
97
|
-
"add_new_item" => "Add New " . $singular,
|
98
|
-
"edit_item" => "Edit " . $singular,
|
99
|
-
"new_item" => "New " . $singular,
|
100
|
-
"view_item" => "View " . $singular,
|
101
|
-
"search_items" => "Search " . $plural,
|
102
|
-
"not_found" => "No " . strtolower($plural) . " found",
|
103
|
-
"not_found_in_trash" => "No " . strtolower($plural) . " found in Trash",
|
104
|
-
"parent_item_colon" => "Parent " . $singular . ":",
|
105
|
-
);
|
106
|
-
|
107
|
-
$post_args = array(
|
108
|
-
"public" => true,
|
109
|
-
"menu_icon" => "dashicons-".$icon,
|
110
|
-
"labels" => $labels,
|
111
|
-
"capability_type" => "post",
|
112
|
-
"supports" => array(
|
113
|
-
"title",
|
114
|
-
"editor",
|
115
|
-
"custom-fields",
|
116
|
-
"revisions",
|
117
|
-
"thumbnail",
|
118
|
-
),
|
119
|
-
);
|
120
|
-
|
121
|
-
// If taxonomy is given
|
122
|
-
if($tax_name) {
|
123
|
-
add_taxonomy($tax_name, $name);
|
124
|
-
}
|
125
|
-
|
126
|
-
register_post_type(strtolower($name), $post_args);
|
127
|
-
}
|
128
|
-
|
129
|
-
/*
|
130
|
-
CUSTOM TAXONOMY
|
131
|
-
*/
|
132
|
-
|
133
|
-
function add_taxonomy($name, $post_type) {
|
134
|
-
$plural = Inflector::pluralize($name);
|
135
|
-
$singular = $name;
|
136
|
-
|
137
|
-
$labels = array(
|
138
|
-
"name" => $plural,
|
139
|
-
"singular_name" => $singular,
|
140
|
-
"all_items" => "All " . $plural,
|
141
|
-
"edit_item" => "Edit " . $singular,
|
142
|
-
"view_item" => "View " . $singular,
|
143
|
-
"update_item" => "Update " . $singular,
|
144
|
-
"add_new_item" => "Add New " . $singular,
|
145
|
-
"parent_item" => "Parent " . $singular,
|
146
|
-
"search_items" => "Search " . $plural,
|
147
|
-
"popular_items" => "Popular " . $plural,
|
148
|
-
"add_or_remove_items" => "Add or remove " . strtolower($plural),
|
149
|
-
"choose_from_most_used" => "Choose from the most used " . strtolower($plural),
|
150
|
-
"not_found" => "No " . strtolower($plural) . " found"
|
151
|
-
);
|
152
|
-
|
153
|
-
$tax_args = array(
|
154
|
-
"labels" => $labels,
|
155
|
-
"show_ui" => true,
|
156
|
-
"query_var" => true,
|
157
|
-
"show_admin_column" => false,
|
158
|
-
"hierarchical" => true,
|
159
|
-
);
|
160
|
-
register_taxonomy(strtolower($name), strtolower($post_type), $tax_args);
|
161
|
-
}
|
162
|
-
|
163
33
|
/* REMOVE MENU ITEMS */
|
164
34
|
add_action("admin_menu", "remove_menu_items");
|
165
35
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/*
|
4
|
+
Custom WP Query
|
5
|
+
*/
|
6
|
+
|
7
|
+
class Post {
|
8
|
+
public static function find($args = null) {
|
9
|
+
wp_reset_postdata();
|
10
|
+
|
11
|
+
if(empty($args) ) {
|
12
|
+
$args = array(
|
13
|
+
"post_type" => get_called_class()
|
14
|
+
);
|
15
|
+
}
|
16
|
+
|
17
|
+
return new WP_Query($args);
|
18
|
+
}
|
19
|
+
|
20
|
+
public static function find_by($key, $value) {
|
21
|
+
wp_reset_postdata();
|
22
|
+
|
23
|
+
$args = array(
|
24
|
+
$key => $value,
|
25
|
+
"post_type" => get_called_class()
|
26
|
+
);
|
27
|
+
return new WP_Query($args);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
class Page extends Post {}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?php // Generic Utility
|
2
|
+
|
3
|
+
/*
|
4
|
+
ELLIPSIZE
|
5
|
+
- Adding "..." at the end of the string.
|
6
|
+
- Default is 160 characters
|
7
|
+
*/
|
8
|
+
|
9
|
+
function ellipsize($text, $char_number = "160", $etc = "...") {
|
10
|
+
$text = html_entity_decode($text, ENT_QUOTES);
|
11
|
+
if (strlen($text) > $char_number) {
|
12
|
+
$text = substr($text, 0, $char_number);
|
13
|
+
$text = substr($text,0,strrpos($text," "));
|
14
|
+
|
15
|
+
$punctuation = ".!?:;,-"; // punctuation you want removed
|
16
|
+
|
17
|
+
$text = (strspn(strrev($text), $punctuation) != 0)
|
18
|
+
?
|
19
|
+
substr($text, 0, -strspn(strrev($text), $punctuation))
|
20
|
+
:
|
21
|
+
$text;
|
22
|
+
|
23
|
+
$text = $text.$etc;
|
24
|
+
}
|
25
|
+
$text = htmlentities($text, ENT_QUOTES);
|
26
|
+
return $text;
|
27
|
+
}
|
@@ -4,15 +4,19 @@
|
|
4
4
|
add_theme_support("post-thumbnails");
|
5
5
|
add_theme_support("menus");
|
6
6
|
|
7
|
+
|
8
|
+
|
7
9
|
/* CUSTOM POST TYPE
|
8
10
|
1: Type name, MUST be singular
|
9
11
|
2: (opt) Icon name, check http://melchoyce.github.io/dashicons/
|
10
12
|
3: (opt) Taxonomy name, MUST be singular
|
11
13
|
*/
|
12
|
-
|
13
|
-
|
14
|
+
// Example:
|
15
|
+
add_post_type("Product", "cart", "Brand");
|
14
16
|
class Product extends Post {};
|
15
17
|
|
18
|
+
|
19
|
+
|
16
20
|
/* Remove Unnecessary ADMIN SIDEBAR
|
17
21
|
- Use the slug
|
18
22
|
*/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edge_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henner Setyono
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- assets/sass/edge/components/_code.scss
|
110
110
|
- assets/sass/edge/components/_form.scss
|
111
111
|
- assets/sass/edge/components/_grid.scss
|
112
|
+
- assets/sass/edge/components/_grid_old.scss
|
112
113
|
- assets/sass/edge/components/_normalize.scss
|
113
114
|
- assets/sass/edge/components/_print.scss
|
114
115
|
- assets/sass/edge/components/_tile.scss
|
@@ -125,7 +126,6 @@ files:
|
|
125
126
|
- lib/edge/sprockets.rb
|
126
127
|
- lib/edge/version.rb
|
127
128
|
- lib/edge_framework.rb
|
128
|
-
- template/base/.gitignore
|
129
129
|
- template/base/assets/css/.keep
|
130
130
|
- template/base/assets/files/.keep
|
131
131
|
- template/base/assets/fonts/.keep
|
@@ -139,16 +139,17 @@ files:
|
|
139
139
|
- template/base/assets/sass/app.scss
|
140
140
|
- template/base/assets/sass/framework.scss
|
141
141
|
- template/base/config.rb
|
142
|
+
- template/base/gitignore
|
142
143
|
- template/base/robots.txt
|
143
144
|
- template/html/index.html
|
144
|
-
- template/php/_footer.php
|
145
|
-
- template/php/_header.php
|
146
|
-
- template/php/index.php
|
147
145
|
- template/rails/application.html.erb
|
148
146
|
- template/wordpress/404.php
|
149
147
|
- template/wordpress/category.php
|
148
|
+
- template/wordpress/code/cpt.php
|
150
149
|
- template/wordpress/code/inflector.php
|
151
150
|
- template/wordpress/code/main.php
|
151
|
+
- template/wordpress/code/query.php
|
152
|
+
- template/wordpress/code/util.php
|
152
153
|
- template/wordpress/comments.php
|
153
154
|
- template/wordpress/content-post.php
|
154
155
|
- template/wordpress/content-posts.php
|
data/template/php/_footer.php
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
<div id="footer-push"></div>
|
2
|
-
</div>
|
3
|
-
<footer class="main-footer"></footer>
|
4
|
-
|
5
|
-
<!-- JAVASCRIPT LIBRARY -->
|
6
|
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
7
|
-
<script>
|
8
|
-
// Fallback if Google's one doesn't load
|
9
|
-
if (!window.jQuery) {
|
10
|
-
document.write("<script src='assets/js/vendor/jquery.min.js'><\/script>");
|
11
|
-
}
|
12
|
-
</script>
|
13
|
-
<script src="assets/js/vendor/fastclick.min.js"></script>
|
14
|
-
<script src="assets/js/app.js"></script>
|
15
|
-
|
16
|
-
</body>
|
17
|
-
</html>
|
data/template/php/_header.php
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="UTF-8">
|
5
|
-
<meta name="viewport" content="width=device-width">
|
6
|
-
|
7
|
-
<!-- WEBSITE DETAIL -->
|
8
|
-
<title>My Website</title>
|
9
|
-
<meta name="description" content="This is a description of your website, only first 160 characters matters">
|
10
|
-
|
11
|
-
<!-- FAVICON -->
|
12
|
-
<link rel="icon" href="assets/img/favicon.png">
|
13
|
-
<link rel="apple-touch-icon-precomposed" href="assets/img/favicon-big.png">
|
14
|
-
|
15
|
-
<!-- JAVASCRIPT that must load first -->
|
16
|
-
<script src="assets/js/vendor/custom.modernizr.js"></script>
|
17
|
-
|
18
|
-
<!-- STYLESHEET -->
|
19
|
-
<link rel="stylesheet" href="assets/css/framework.css">
|
20
|
-
<link rel="stylesheet" href="assets/css/app.css">
|
21
|
-
|
22
|
-
</head>
|
23
|
-
<body>
|
24
|
-
<div id="main-wrapper">
|