Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcia Ramos <virtua.creative@gmail.com>2018-03-08 23:32:31 +0300
committerMarcia Ramos <virtua.creative@gmail.com>2018-03-08 23:32:31 +0300
commit19f0f1cf8c6e7d3ee0746589c401e35d739489bf (patch)
tree53ffb405e77fa57a354bb577b0b082a6aec91866 /content
parent1be23adad928acb3aff541f50db95b6e020a6bb3 (diff)
instantsearch: add tag to search result
Diffstat (limited to 'content')
-rw-r--r--content/assets/stylesheets/instantsearch.scss18
-rw-r--r--content/search/index.md1
2 files changed, 19 insertions, 0 deletions
diff --git a/content/assets/stylesheets/instantsearch.scss b/content/assets/stylesheets/instantsearch.scss
index 2e954042..c75e38a6 100644
--- a/content/assets/stylesheets/instantsearch.scss
+++ b/content/assets/stylesheets/instantsearch.scss
@@ -43,6 +43,7 @@ $color9: #383838;
font-size: 13px;
font-weight: 300;
width: 100%; // was 81%
+ position: relative;
&:hover {
border-color: $color1;
@@ -68,6 +69,23 @@ $color9: #383838;
margin: 1px 0 10px;
font-size: 14px;
}
+
+ .hit-tag {
+ display: block;
+ position: absolute;
+ padding: 3px;
+ border: 1px solid $color0;
+ border-top: 0;
+ border-right: 0;
+ border-bottom-left-radius: 5px;
+ right: 0;
+ top: 0;
+ width: 90px;
+ height: 25px;
+ font-size: 11px;
+ text-align: center;
+ color: $color6;
+ }
}
//scss-lint:enable ImportantRule
diff --git a/content/search/index.md b/content/search/index.md
index 70bb15a2..26d49c65 100644
--- a/content/search/index.md
+++ b/content/search/index.md
@@ -19,6 +19,7 @@ layout: instantsearch
<h3 class="hit-name">{{{_highlightResult.hierarchy.lvl1.value}}}</h3>
<h4 class="hit-description">{{{_highlightResult.hierarchy.lvl2.value}}}</h4>
<p class="hit-text">{{{_highlightResult.content.value}}}</p>
+ <div class="hit-tag">{{{_highlightResult.hierarchy.lvl0.value}}}</div>
</div>
</a>
</script>