freedomformyanmar / military-biz-list

GNU General Public License v3.0
27 stars 9 forks source link

feature: links to google reviews #3

Closed njwest closed 3 years ago

njwest commented 3 years ago

Randomly saw this repo on my Github feed, hope you are all staying safe!

This adds Google review URLs in JSON and a pattern for adding content to the Bulma cards, plus googleReviewUrls for Nan Myaing Café and Central Hotel Yangon

JSON with googleReviewUrl

    {
      id: 3,
      product: 'Central Hotel Yangon',
      industry: 'Entertainment/Tourism',
      googleReviewUrl: 'https://www.google.com/travel/hotels/entity/CgsIuvWX--P-p8DuARAB/reviews'
    },

Card Content

Can't edit padding/margin on the <a> in the Bulma card, so had to add the extra parent div with card-content class.

There is a duplicate v-if="item.googleReviewUrl" on both the <div> and the <a> for convenience, e.g. if someone wants to add more items to the card-content div (v-if="item.googleReviewUrl || item.___ || ...:).

    <div
      class="card-content px-4 pb-4 pt-1"
      v-if="item.googleReviewUrl">
        <a
          v-if="item.googleReviewUrl"
          :href="item.googleReviewUrl"
          class="has-text-weight-semibold"
          rel="noopener noreferrer nofollow"
          target="_blank">
          Google Reviews
        </a>
    </div>