Skip to content

Commit

Permalink
v2.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gwin committed Jun 8, 2022
1 parent 2cea8d0 commit 67f5d7e
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 10 deletions.
37 changes: 37 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,21 @@
@apply atw-px-3 md:atw-px-2
}

.wpadverts-form.wpa-flat input[type=text][readonly=readonly],
.wpadverts-form.wpa-solid input[type=text][readonly=readonly],
.wpadverts-form.wpa-bottom-border input[type=text][readonly=readonly],
.wpadverts-form.wpa-flat input[type=checkbox][readonly=readonly],
.wpadverts-form.wpa-solid input[type=checkbox][readonly=readonly],
.wpadverts-form.wpa-bottom-border input[type=checkbox][readonly=readonly],
.wpadverts-form.wpa-flat select[readonly=readonly],
.wpadverts-form.wpa-solid select[readonly=readonly],
.wpadverts-form.wpa-bottom-border select[readonly=readonly],
.wpadverts-form.wpa-flat textarea[readonly=readonly],
.wpadverts-form.wpa-solid textarea[readonly=readonly],
.wpadverts-form.wpa-bottom-border textarea[readonly=readonly] {
@apply atw-bg-gray-50 atw-opacity-80;
}

/* BUTTONS */

/* Button Primary */
Expand Down Expand Up @@ -776,4 +791,26 @@
.wpa-block-categories-item.wpa-item-aligned .wpa-block-categories-icon {
@apply atw-px-3
}

.wpa-row-inline-coma .wpa-row-value:after {
content: ', ';
}
.wpa-row-inline-coma .wpa-row-value:last-child:after {
content: '';
}

.wpa-row-inline {
@apply atw--mx-1
}
.wpa-row-inline .wpa-row-value {
@apply atw-px-1
}

.wpa-row-block .wpa-row-value {
@apply atw-block atw-w-full
}

.wpa-row-attach {
@apply atw-pr-2
}
}
8 changes: 8 additions & 0 deletions blocks/details/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public function render( $atts = array() ) {

), $post_id );

$content_table = apply_filters( "wpadverts/block/details/content-table", array(
array(
"label" => __( "Description", "wpadverts" ),
"icon" => "",
"value" => $post_content
)
), $post_id );

$contact_methods = $this->_get_contact_options( $atts, $post_id );
$contact_options = array( );
$contact_additional = array();
Expand Down
16 changes: 8 additions & 8 deletions blocks/details/templates/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<?php wpadverts_block_button_css( "secondary", isset( $atts["secondary_button"] ) ? $atts["secondary_button"] : array() ) ?>
</style>

<div class="wpadverts-cpt <?php echo sprintf( "wpadverts-cpt-", $atts["post_type"] ) ?> atw-w-full">
<div class="wpadverts-cpt <?php echo sprintf( "wpadverts-cpt-", $atts["post_type"] ) ?> atw-w-full atw-flex atw-flex-col">

<?php do_action( "adverts_tpl_single_top", $post_id, true ) ?>

Expand Down Expand Up @@ -55,11 +55,11 @@
</div>
</div>
<div class="atw-flex atw-flex-col md:atw-flex-row atw-grow">
<div class="atw-flex atw-flex-none atw-items-center atw-w-1/3 atw-text-gray-700 atw-text-base atw-mb-1 md:atw-mb-0">
<div class="atw-flex atw-flex-none atw-items-center atw-w-1/3 atw-h-10 atw-text-gray-700 atw-text-base atw-mb-1 md:atw-mb-0">
<span class="atw-inline-block atw-font-bold md:atw-font-normal"><?php echo esc_html( $data["label"] ) ?></span>
</div>
<div class="atw-flex atw-grow atw-items-center atw-text-gray-800">
<span class="atw-inline-block"><?php echo $data["value"] ?></span>
<span class="atw-inline-block <?php echo isset( $data["row_classes"] ) ? esc_attr( $data["row_classes"] ) : "" ?>"><?php echo $data["value"] ?></span>
</div>
</div>
</div>
Expand All @@ -72,14 +72,14 @@
<?php do_action( "adverts_tpl_single_details", $post_id, true ) ?>
</div>

<div class="">
<?php foreach( array(1) as $k ): ?>
<div class="atw-mb-6">
<?php foreach( $content_table as $content ): ?>
<div class="atw-mt-3">
<div>
<span class="atw-inline-block atw-text-gray-700 atw-text-xl atw-font-bold atw-py-3">Description</span>
<span class="atw-inline-block atw-text-gray-700 atw-text-xl atw-font-bold atw-py-3"><?php echo esc_html( $content["label"] ) ?></span>
</div>
<div>
<?php echo $post_content ?>
<?php echo $content["value"] ?>
</div>
</div>
<?php endforeach; ?>
Expand Down Expand Up @@ -112,7 +112,7 @@
<?php do_action( "adverts_tpl_single_bottom", $post_id, true ) ?>

<?php if( ! empty( $contact_options ) || ! empty( $options ) ): ?>
<div class="wpa-cpt-contact-details atw-my-3 atw--mx-1">
<div class="wpa-cpt-contact-details atw-my-6 atw--mx-1">

<div class="atw-relative atw-flex atw-flex-col md:atw-flex-row atw--mx-1">

Expand Down
2 changes: 1 addition & 1 deletion includes/class-types-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ protected function _edit_form_renderers( $object, $type ) {
"label" => __( "Renderer Template", "wpadverts" ),
"order" => 10,
"value" => "",
"options" => $template_options
"options" => wpadverts_get_block_templates_options()
)
)
);
Expand Down
2 changes: 2 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3981,6 +3981,8 @@ function adverts_default_comments_status( $post_type ) {

function adverts_get_taxonomy_path( $term, $glue = false ) {

include_once ADVERTS_PATH . '/includes/class-html.php';

$a = array();
$path = advert_term_path( $term );

Expand Down
2 changes: 1 addition & 1 deletion wpadverts.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: The lightweight WordPress classifieds plugin done right.
* Author: Greg Winiarski
* Text Domain: wpadverts
* Version: 2.0.0.b001
* Version: 2.0.0.b002
*
* Adverts is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit 67f5d7e

Please sign in to comment.