Sha256: 01f1b2dde6414ac4e3d678e42ac4d5e786a0ce4f0d1b546fa86a068ebce5961b

Contents?: true

Size: 1.04 KB

Versions: 94

Compression:

Stored size: 1.04 KB

Contents

<template>
  <div class='Nxd-search__result'>
    <a class='Nxd-search__result__link' v-bind:href='url'>
      <div>
        <h6 class='Vlt-blue-dark'>
          {{ hit.title }}
          <small v-if="showHeading"> &gt; {{ hit.heading }}</small>
        </h6>

        <p class='Nxd-search__result__desc'>{{ description }}</p>
        <p class='Nxd-search__result__highlight' v-html='snippet'></p>
        <span class='Vlt-badge Vlt-badge--grey Nxd-search__badge'>{{ badge }}</span>
      </div>
    </a>
  </div>
</template>
<script>
export default {
  props: ['hit'],
  computed: {
    badge: function() {
      return this.hit.product;
    },
    description: function() {
      return this.hit.description ? this.hit.description.substring(0, 150) : '';
    },
    showHeading: function() {
      return this.hit.heading && this.hit.heading == this.hit.title;
    },
    snippet: function() {
      return `...${this.hit._snippetResult.body.value}...`;
    },
    url: function() {
      return `${this.hit.path}#${this.hit.anchor}`;
    }
  },
}
</script>

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.15 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.14 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.13 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.12 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.11 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.10 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.9 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.8 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.7 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.6 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.5 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.4 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.3 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.2 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.1 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.5.0 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.4.9 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.4.8 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue
station-0.4.7 lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue