Skip to content

Commit 6c14881

Browse files
committed
Chapter section Frontend redesign && remove old styles (everything is in SASS now)
1 parent 265df95 commit 6c14881

18 files changed

+628
-1455
lines changed

frontend-build/scss/buddypress.scss

+63
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,70 @@
11
#buddypress {
2+
input[type=submit] {
3+
@include button(false,$success-color,lighten($success-color,5),$white,solid);
4+
}
5+
#drag-drop-area {
6+
border: 4px dashed #27a635 !important;
7+
}
8+
.bp-avatar-nav {
9+
.avatar-nav-items {
10+
li.current {
11+
.bp-avatar-nav-item {
12+
background: #fff;
13+
}
14+
}
15+
}
16+
}
17+
18+
#item-header-cover-image {
19+
#item-header-avatar {
20+
img.avatar {
21+
background: rgba( 255, 255, 255, 0.8 );
22+
border: solid 8px #fff;
23+
}
24+
}
25+
}
226
#members-dir-search {
327
#members_search_submit {
428
height: 2.45rem;
29+
margin-bottom: 0;
30+
}
31+
}
32+
.profile-fields {
33+
tr {
34+
td {
35+
&.label {
36+
width: 96% !important;
37+
white-space: pre-wrap !important;
38+
border-right: none !important;
39+
}
40+
&.data {
41+
padding-bottom: 1rem;
42+
border-bottom: 1px solid darken($warning-color,2);
43+
}
44+
}
45+
&.alt {
46+
td {
47+
background: transparent !important;
48+
line-height: 1.3rem;
49+
color: $black;
50+
&.label {
51+
color: $white !important;
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
.bp-user {
59+
#buddypress {
60+
#cover-image-container {
61+
#item-header-cover-image {
62+
#item-header-content {
63+
margin-left: 170px !important;
64+
margin-top: -130px !important;
65+
font-size: 1rem;
66+
}
67+
}
568
}
669
}
770
}

frontend-build/scss/common.scss

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.top-space {
2+
padding-top: 11rem;
3+
}
4+
.inner-space {
5+
padding-top: 2rem;
6+
padding-bottom: 2rem;
7+
}

frontend-build/scss/gforms.scss

+6
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,10 @@
117117
@include button(false,$success-color,lighten($success-color,5),$white, solid);
118118
}
119119
}
120+
}
121+
.page-body .gform_wrapper .gform_body input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]) {
122+
padding: 5px 4px !important;
123+
/*width: auto !important;*/
124+
font-size: 1rem !important;
125+
border: 1px solid lightgray;
120126
}

frontend-build/scss/modules.scss

+151
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
z-index: 1;
2424
font-family: $font-alt;
2525
background-color: $primary-color;
26+
&.caption-hub {
27+
background-color: $alert-color;
28+
color: $white;
29+
}
2630
h3 {
2731
font-weight: bold;
2832
font-family: $font-alt;
@@ -457,4 +461,151 @@ table.ccgn-profile {
457461
top: 3.5rem;
458462
opacity: 1;
459463
}
464+
}
465+
466+
.directory {
467+
&.members {
468+
.item-list-tabs {
469+
display: none;
470+
}
471+
}
472+
li {
473+
&:before {
474+
content: none !important;
475+
}
476+
}
477+
}
478+
.block-area {
479+
.entry-content {
480+
min-height: 20rem;
481+
}
482+
}
483+
.cc-content-area {
484+
.block-area {
485+
padding-top: 3rem;
486+
.entry-content {
487+
min-height: 60vh !important;
488+
&.not-login {
489+
margin-top: 10rem;
490+
}
491+
ul {
492+
padding-left: 1.5rem;
493+
margin-top: .5rem;
494+
margin-bottom: .5rem;
495+
margin-left: 1rem;
496+
&.user-list {
497+
margin: 1rem 0 2rem;
498+
-webkit-columns: 2;
499+
-moz-columns: 2;
500+
columns: 2;
501+
-webkit-column-gap: 2rem;
502+
-moz-column-gap: 2rem;
503+
column-gap: 2rem;
504+
list-style-type: none;
505+
li {
506+
padding: .8rem 1rem;
507+
border-bottom: 1px solid #f1f1f1;
508+
}
509+
}
510+
&.link-list {
511+
margin: 0;
512+
padding: 0;
513+
border-top: 1px solid #f1f1f1;
514+
border-bottom: 1px solid #f1f1f1;
515+
list-style-type: none;
516+
li {
517+
padding: .5rem;
518+
a {
519+
text-decoration: none;
520+
&:hover {
521+
text-decoration: underline;
522+
}
523+
}
524+
}
525+
}
526+
}
527+
h1, h2, h3, h4, h5, h6 {
528+
margin: 1rem 0;
529+
}
530+
}
531+
}
532+
}
533+
.entry-content p {
534+
margin: 1.2rem 0;
535+
line-height: 1.8rem;
536+
}
537+
.entry-ask-request {
538+
padding: 1rem;
539+
border: 2px solid #ececec;
540+
text-align: center;
541+
.subtitle {
542+
text-transform: uppercase;
543+
font-size: .9rem;
544+
color: #8a8a8a;
545+
}
546+
h5 {
547+
margin: .5rem 0;
548+
font-size: 1.3rem;
549+
}
550+
.button {
551+
display: block;
552+
margin-top: 1rem;
553+
font-size: .9rem;
554+
color: white;
555+
}
556+
#clarification_voucher {
557+
padding: .5rem;
558+
width: 100%;
559+
border: 1px solid #BABABA;
560+
}
561+
}
562+
.voucher_profile_link {
563+
margin-left: 1rem;
564+
font-size: .9rem;
565+
}
566+
.page-template-template-user-status {
567+
.application-status {
568+
position: relative;
569+
padding: 1.5rem;
570+
margin-bottom: 1.5rem;
571+
border-top: 1px solid #ececec;
572+
border-bottom: 1px solid #ececec;
573+
small {
574+
font-style: italic;
575+
}
576+
.title {
577+
font-size: 1.2rem;
578+
text-transform: uppercase;
579+
}
580+
}
581+
.button {
582+
padding: 8px 15px;
583+
color: white;
584+
background-color: #27a635;
585+
font-weight: bold;
586+
text-transform: uppercase;
587+
text-decoration: none;
588+
&.yellow {
589+
background-color: #efbe01;
590+
color: black;
591+
font-weight: normal;
592+
text-transform: none;
593+
&:hover {
594+
background-color: #d3a900;
595+
}
596+
}
597+
&.top-right {
598+
position: absolute;
599+
right: 0;
600+
top: 28%;
601+
}
602+
}
603+
}
604+
.votation-content {
605+
min-height: 20rem;
606+
}
607+
#cc_worldmap {
608+
.active {
609+
fill: $success-color;
610+
}
460611
}

frontend-build/scss/style.scss

+41-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
// General styles
2+
3+
body:not(.page-template-page-faqs) {
4+
.item-content {
5+
display: block;
6+
}
7+
}
28
.page-body {
39
.space-top {
410
padding-top: 12rem;
@@ -10,6 +16,7 @@
1016
color: $white;
1117
h2 {
1218
font-weight: 900;
19+
font-size: 1.5rem;
1320
}
1421
.to-r {
1522
font-size: 0.9rem;
@@ -28,6 +35,10 @@
2835
a {
2936
color: $secondary-color;
3037
font-weight: bold;
38+
&.more-link {
39+
font-weight: normal;
40+
font-size: .9rem;
41+
}
3142
}
3243
h1, h2, h3, h4, h5, h6 {
3344
font-family: $font-alt;
@@ -51,6 +62,35 @@
5162
}
5263
.item-content {
5364
font-size: .9rem;
65+
display: none;
66+
}
67+
}
68+
.search-result {
69+
padding: 2rem 0;
70+
border-bottom: 1px solid $light-gray;
71+
.entry-title {
72+
font-size: 1.3rem;
73+
&:hover {
74+
color: $primary-color;
75+
}
76+
}
77+
.link-more {
78+
.more-link {
79+
.screen-reader-text {
80+
position: relative;
81+
padding-left: 1rem;
82+
&:before {
83+
content: "\f345";
84+
font-family: dashicons;
85+
position: absolute;
86+
left: .2rem;
87+
top: -.1rem;
88+
}
89+
}
90+
&:hover {
91+
color: $dark-gray;
92+
}
93+
}
5494
}
5595
}
5696
}
@@ -144,4 +184,4 @@
144184
}
145185
}
146186
}
147-
}
187+
}

plugins/queulat-cc-chapters-cpt-plugin/class-cc-chapters-metabox.php

+25
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,28 @@ public function search_members()
7373
public function get_fields() : array
7474
{
7575
return [
76+
Node_Factory::make(
77+
Select::class,
78+
[
79+
'name' => 'chapter_status',
80+
'label' => 'Chapter Status',
81+
'attributes' => [
82+
'class' => 'widefat'
83+
],
84+
'properties' => [
85+
'description' => 'Choose the Status of the current chapter',
86+
],
87+
'options' => (function () {
88+
$status = array(
89+
'' => 'Choose',
90+
'active' => 'Active',
91+
'inactive' => 'Inactive',
92+
'in-progress' => 'In Progress'
93+
);
94+
return $status;
95+
})()
96+
]
97+
),
7698
Node_Factory::make(
7799
Input::class,
78100
[
@@ -252,6 +274,9 @@ public function sanitize_data(array $data) : array
252274
case 'meeting_url':
253275
$sanitized[$key] = esc_url_raw($val);
254276
break;
277+
case 'chapter_status':
278+
$sanitized[$key] = $val;
279+
break;
255280
}
256281
}
257282
return $sanitized;

plugins/queulat-cc-chapters-cpt-plugin/class-cc-chapters-post-query.php

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
use Queulat\Post_Query;
44

55
class Cc_Chapters_Post_Query extends Post_Query {
6+
public function __construct()
7+
{
8+
parent::__construct($id, $title, $post_type, $args);
9+
add_action("wp_ajax_event-metabox__search-members", [$this, 'search_members']);
10+
add_action("wp_ajax_event-metabox__get_countries", [$this, 'get_countries']);
11+
}
612
public function get_post_type() : string {
713
return 'cc_chapters';
814
}

plugins/queulat-cc-chapters-cpt-plugin/class-cc-chapters-post-type.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function get_post_type_args() : array {
6868
'with_front' => true,
6969
'feeds' => true,
7070
'pages' => true,
71-
'slug' => 'cc_chapters',
71+
'slug' => 'chapter',
7272
'ep_mask' => 1,
7373
],
7474
'supports' => [

0 commit comments

Comments
 (0)