Last active
July 31, 2018 21:29
-
-
Save zkreations/6eb2474c6eacd47351100423789d0082 to your computer and use it in GitHub Desktop.
Cambiar estilos para búsquedas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.result-search { | |
position: relative; | |
margin-bottom: .5rem; | |
padding: 1.5rem 1.2rem; | |
background: rgba(0, 0, 0, 0.08); | |
width: 100%; | |
} | |
.result-search__data { | |
margin-left: calc(75px + 1rem); | |
} | |
.result-search__image { | |
float: left; | |
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3); | |
border-radius: 3px; | |
overflow: hidden; | |
} | |
.result-search::after { | |
display: block; | |
content: ""; | |
clear: both; | |
} | |
.result-search__title { | |
font-size: 1.2rem; | |
margin-bottom: 1rem; | |
padding-bottom: 1rem; | |
border-bottom: 2px dashed rgba(0, 0, 0, 0.1); | |
} | |
.result-search__title a { | |
color: rgba(0, 0, 0, 0.75); | |
text-decoration: none; | |
} | |
.result-search__title a:hover { | |
color: rgba(0, 0, 0, 1); | |
} | |
.result-search__snippet { | |
color: rgba(0, 0, 0, 0.6); | |
font-weight: 500; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Expresion (selector ternario) --> | |
<div class='flex align-items-start wrap'> | |
<b:class cond='!data:blog.searchQuery' name='items'/> | |
<b:loop values='data:posts' var='post'> | |
<b:include data='post' expr:name='data:blog.searchQuery ? "post-search" : "post"'/><!-- insertamos entradas --> | |
</b:loop> | |
</div> | |
<!-- includable --> | |
<b:includable id='post-search' var='post'> | |
<div class="result-search"> | |
<a class='result-search__image' expr:href='data:post.url'> | |
<img expr:alt='data:post.title' expr:src='data:post.thumbnailUrl'/> | |
</a> | |
<div class='result-search__data'> | |
<h2 class='result-search__title'><a expr:href='data:post.url'><data:post.title/></a></h2> | |
<p class='result-search__snippet'><data:post.snippet/></p> | |
</div> | |
</div> | |
</b:includable> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment