Skip to content

Commit

Permalink
Merge pull request #438 from positivecrash/master
Browse files Browse the repository at this point in the history
Link to shop
  • Loading branch information
positivecrash authored Feb 26, 2025
2 parents dc926d9 + 15bcfdb commit 888f9da
Showing 1 changed file with 62 additions and 20 deletions.
82 changes: 62 additions & 20 deletions src/components/blocks/DevicesBuySection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,52 @@
<div class="layout layout__content section-vivid-green">
<slot />

<section>
<div class="price" v-if="price">
<div class="price-number">{{price}}</div>
<div class="price-desc">
<div>{{$t('Early bird price')}}</div>
<div>{{$t('Coming in early 2025')}}</div>
<!-- Todo: remove hardcoding, make dynamic props analitycs -->

<template v-if="$route.path.includes('altruist')">
<section class="product-available">
<section class="lined">
<div class="price-number">{{$t('Outdoor sensor “ALTRUIST“')}}</div>
<div class="price" v-if="price">
<div class="price-number">{{price}}</div>
<div class="price-desc">
<div>{{$t('Now Available!')}}</div>
<div>{{$t('Worldwide Shipping')}}</div>
</div>
</div>
<div>
<ul>
<li>{{$t('Open-Source Hardware & Software')}}</li>
<li>{{$t('Independent Decentralized Network Technologies')}}</li>
<li>{{$t('Colorful 3D-Printed Cases of Your Choice')}}</li>
</ul>
</div>
</section>
<rb-button block to="https://shop.pinout.cloud/altruist">{{$t('Order Now')}}</rb-button>
</section>
</template>
<template v-else>
<section>
<div class="price" v-if="price">
<div class="price-number">{{price}}</div>
<div class="price-desc">
<div>{{$t('Early bird price')}}</div>
<div>{{$t('Coming in early 2025')}}</div>
</div>
</div>
</div>

<gsp-form :gscriptID="gscript" :siteKey="siteKey" @gsp-beforesubmit="beforeSubmit" @gsp-onsubmit="onSubmit" @gsp-oncaptchanotverified="captchaError">
<label class="block"><input type="email" data-gsp-name="Email" :data-gsp-data="email" v-model="email" :placeholder="$t('Your email')" class="block" required /></label>
<label class="block"><input disabled type="checkbox" v-model="deviceupdates" /> <span>{{ $t('Get updates about smart devices') }}</span></label>
<label class="block"><input type="checkbox" v-model="regularupdates" /> <span>{{ $t('Receive regular emails from Robonomics') }}</span></label>

<input type="hidden" data-gsp-name="Location" :data-gsp-data="location" />
<input type="hidden" data-gsp-name="Tags" :data-gsp-data="tags.toString()" />

<robo-button class="block" :loading="status === 'process'" :type="buttontype">{{buttontext}}</robo-button>
<span v-if="message">{{message}}</span>
</gsp-form>
</section>
<gsp-form :gscriptID="gscript" :siteKey="siteKey" @gsp-beforesubmit="beforeSubmit" @gsp-onsubmit="onSubmit" @gsp-oncaptchanotverified="captchaError">
<label class="block"><input type="email" data-gsp-name="Email" :data-gsp-data="email" v-model="email" :placeholder="$t('Your email')" class="block" required /></label>
<label class="block"><input disabled type="checkbox" v-model="deviceupdates" /> <span>{{ $t('Get updates about smart devices') }}</span></label>
<label class="block"><input type="checkbox" v-model="regularupdates" /> <span>{{ $t('Receive regular emails from Robonomics') }}</span></label>

<input type="hidden" data-gsp-name="Location" :data-gsp-data="location" />
<input type="hidden" data-gsp-name="Tags" :data-gsp-data="tags.toString()" />

<robo-button class="block" :loading="status === 'process'" :type="buttontype">{{buttontext}}</robo-button>
<span v-if="message">{{message}}</span>
</gsp-form>
</section>
</template>
</div>
</template>

Expand Down Expand Up @@ -135,4 +160,21 @@
min-width: 170px;
font-variation-settings: var(--font-flex-medium);
}
.product-available {
align-self: start;
}
.lined > * {
margin-bottom: var(--space);
}
.lined > *:not(:last-child) {
padding-bottom: var(--space);
border-bottom: 1px solid var(--color-dark);
}
.lined li {
margin-bottom: calc(var(--space)/2);
}
</style>

0 comments on commit 888f9da

Please sign in to comment.