Skip to content

Commit

Permalink
ADD: cherry search icons
Browse files Browse the repository at this point in the history
FIX: search, posts, documentation form
  • Loading branch information
corvus committed Jun 7, 2017
1 parent 07a73db commit ce4f357
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 28 deletions.
5 changes: 4 additions & 1 deletion assets/sass/elements/_custom-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
.documentation-box {
margin: 0 0 2em;
margin-bottom: 70px;
padding: 30px 140px 80px;
padding: 30px 0 50px;
@include media-breakpoint-up(lg) {
padding: 30px 140px 50px;
}
position: relative;
&:after {
content: '';
Expand Down
25 changes: 23 additions & 2 deletions assets/sass/plugins/_cherry-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
.chosen-drop {
width: 208px;
top: 180%;
padding: 5px 2px 1px 2px;
padding: 9px 0 5px 5px;
::-webkit-scrollbar {
width: 8px;
border-radius: $border__radius;
Expand Down Expand Up @@ -353,6 +353,7 @@
margin: 0 15px 0 0;
min-width: 20%;
display: none;
text-align: center;
@include media-breakpoint-up(md) {
-webkit-box-flex: 0;
-ms-flex: 0 1 9%;
Expand All @@ -363,6 +364,16 @@
img {
border: 1px solid #e6e6f2;
}
.nc-icon-mini {
width: 100%;
height: 50px;
background: aliceblue;
border: 1px solid #e6e6f2;
&:before {
line-height: 48px;
@include font-size(1.125);
}
}
}
}
&__spinner {
Expand Down Expand Up @@ -393,7 +404,17 @@ li.cherry-search__results-item:before {
.cherry-search .cherry-search__more-button:hover {
background-color: transparent;
}

.search-no-results .no-results.not-found {
p {
a {
color: $color__link-hover;
text-decoration: underline;
&:hover {
color: $color__link;
}
}
}
}
.cherry-search__info, .cherry-search__message {
h1 {
margin-bottom: 18px;
Expand Down
59 changes: 54 additions & 5 deletions assets/sass/shortcodes/_shortcodes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
padding: 1.5em 2em 1.5em 3em;
@include media-breakpoint-up(xl) {
padding: 33px 128px 50px 95px;
padding: 33px 128px 33px 95px;
};
&.type {
&-info, &-success, &-warning, &-error {
Expand Down Expand Up @@ -409,7 +409,7 @@
.wapu-loader {
width: 16px;
height: 16px;
margin: 0 3px;
margin: 0 8px;
border-top: 3px solid rgba(255,255,255,0.65);
border-right: 3px solid rgba(255,255,255,0.65);
border-bottom: 3px solid rgba(255,255,255,0.65);
Expand All @@ -435,15 +435,64 @@
}

.docs-search-results {
text-align: center;
&__text {
margin-bottom: 1.94em;
text-align: left;
margin-top: 35px;
margin-bottom: 15px;
&__title {
margin: 0 0 0.5em;
@include font-size(1.125);
}
&__link {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: space-between;
align-content: stretch;
align-items: center;
padding: 10px 15px;
border-radius:$border__radius;
border: 1px solid $color__separator;
background-color: $color__invert-main;
@include media-breakpoint-up(md) {
flex-direction: row;
flex-wrap: nowrap;
}
&-text {
text-align: center;
word-break: break-word;
@include font-size(0.875);
order: 0;
flex: 0 1 100%;
align-self: auto;
@include media-breakpoint-up(md) {
flex: 0 1 calc(100% - 120px);
text-align: left;
}
}
}
&__actions {
@include font-size(0.875);
order: 0;
flex: 0 1 100%;
align-self: auto;
margin-top: 15px;
@include media-breakpoint-up(md) {
flex: 0 1 90px;
margin-top: 0;
}
.btn, .button {
margin: 0 5px 5px;
}
}
&__delimiter {
height: 16px;
width: 1px;
position: relative;
display: inline-block;
background-color: $color__separator;
transform: translateY(3px);
margin: 0 5px;
}
}

// Wapu popup
Expand Down
23 changes: 20 additions & 3 deletions assets/sass/site/primary/_posts-and-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,29 @@
}
}

.search-no-results {
.page-content {
margin-bottom: 30px;
}
.no-results.not-found {
padding-bottom: 50px;
.page-title {
margin-top: 0;
margin-bottom: 30px;
}
}
}

.single.single-post .entry-title {
margin-top: 13px;
margin-bottom: 25px;
}

.single .entry-content {
p, ul, ol {
img {
border-radius: 5px;
-webkit-box-shadow: 0 10px 59px 0 rgba(80,106,172,0.15);
box-shadow: 0 10px 59px 0 rgba(80,106,172,0.15);
-webkit-box-shadow: 0 10px 59px 0 rgba(80,106,172,0.30);
box-shadow: 0 10px 59px 0 rgba(80,106,172,0.30);
margin-top: 1.75em;
margin-bottom: 2.75em;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/
Author: Wapuula team
Author URI: http://wapuula.com
Description: wapuula.com theme
Version: 1.0.4.1
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wapu
Expand Down
3 changes: 3 additions & 0 deletions assets/sass/typography/_copy.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
p {
margin: 0 0 2em;
.single .entry-content & {
margin: 0 0 1em
}
}

p strong {
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/typography/_headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ h6 {
}
}

.single {
.single .entry-content {
h2 {
margin: 0.325em 0 0.650em
}
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/variables-site/_structure.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$size__site-main: 100%;
$size__site-sidebar: 25%;

$input__indents: 11px 15px;
$input__indents: 10px 15px 12px;
$border__radius: 5px;

$pre_indents: 2.063em 3.438em 2.313em;
Expand Down
4 changes: 2 additions & 2 deletions style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions template-parts/content-none.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

<?php elseif ( is_search() ) : ?>

<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'wapu' ); ?></p>
<p><?php printf( wp_kses( __( 'Results not found. Check your spelling & try again. If you still have a question, please use a <a href="%1$s">knowledge base</a>.', 'wapu' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( home_url( '/support/knowledge-base/' ) ) ); ?></p>
<?php
get_search_form();
//get_search_form();

else : ?>

Expand Down
16 changes: 9 additions & 7 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<figure class="post-thumbnail">
<?php the_post_thumbnail( '__tm-thumb-l', array(
'class' => 'post-thumbnail__img wp-post-image',
'alt' => get_the_title(),
) );
?>
</figure><!-- .post-thumbnail -->
<?php if ( has_post_thumbnail() ) { ?>
<figure class="post-thumbnail">
<?php the_post_thumbnail( '__tm-thumb-l', array(
'class' => 'post-thumbnail__img wp-post-image',
'alt' => get_the_title(),
) ); ?>

</figure><!-- .post-thumbnail -->
<?php } ?>
<?php wapu_get_post_category(); ?>
<?php the_title( sprintf( '<h4 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h4>' ); ?>
<div class="entry-content">
Expand Down
2 changes: 1 addition & 1 deletion wapu-core/shortcodes/blurb/blurb-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<div class="blurb <?php echo $class; ?>" <?php echo $id; ?>>
<?php $this->html( $link, '<a href="%1$s" class="blurb__link">' ) ?>
<?php echo $img_tag; ?>
</a>
<?php $this->html( $link, '</a>' ); ?>
</div>
2 changes: 1 addition & 1 deletion wapu-core/shortcodes/docs-search/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="docs-search <?php echo $class; ?>" <?php echo $id; ?>>
<h5><?php esc_html_e( 'Search for documentation:', 'wapu' ); ?></h5>
<div class="docs-search__form">
<input type="text" name="_docs_query" class="docs-search__input" placeholder="<?php esc_html_e( 'Enter theme name or template ID', 'wapu-core' ); ?>">
<input type="text" name="_docs_query" class="docs-search__input" placeholder="<?php esc_html_e( 'Enter theme name or template ID', 'wapu' ); ?>">
<button class="docs-search__submit" type="submit" data-init="docs"><?php
esc_html_e( 'Find', 'wapu' );
?></button>
Expand Down
2 changes: 1 addition & 1 deletion wapu-core/widgets/submit-ticket/popup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

printf(
'<div class="providers-list__item-wrap"><a href="%1$s" class="providers-list__item">
'<div class="providers-list__item-wrap"><a href="%1$s" target="_blank" class="providers-list__item">
%2$s
<span class="providers-list__item-label">%3$s</span>
</a></div>',
Expand Down

0 comments on commit ce4f357

Please sign in to comment.