Skip to content

Commit

Permalink
pre f
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Jul 7, 2024
1 parent b84d1ea commit 94292bf
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 30 deletions.
7 changes: 1 addition & 6 deletions assets/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
@tailwind components;
@tailwind utilities;






@layer components {
/* Titles */
.title-h1 {
Expand All @@ -24,7 +19,7 @@
/* @apply lg:text-7xl; */

font-weight: 600;
line-height: 1.2;
line-height: 1.1;
color: #232323;
}

Expand Down
1 change: 0 additions & 1 deletion components/sections/BuildSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<template v-slot:content>
<div class="grid grid-cols-1 p-xl gap-xl lg:grid-cols-2">
<!-- <h2 class="title-h2">{{ $t('build-section.title') }}</h2> -->
<BuildWithWitnet
v-for="(reason, index) in reasons"
:index="index + 1"
Expand Down
4 changes: 2 additions & 2 deletions components/sections/SectionBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<div class="flex flex-col items-center">


<h2 v-if="headingType === 'h2'" class="title title-h2 mb-md text-center max-w-screen-md">
<h2 v-if="headingType === 'h2'" class="title title-h2 text-center max-w-screen-md" :class="{ 'mb-md': !separator }">
<slot name="title"></slot>
</h2>

<h3 v-if="headingType === 'h3'" class="title title-h2 mb-md text-center max-w-screen-md">
<h3 v-if="headingType === 'h3'" class="title title-h2 text-center max-w-screen-md" :class="{ 'mb-md': !separator }">
<slot name="title"></slot>
</h3>

Expand Down
20 changes: 11 additions & 9 deletions components/sections/WhatIsWitnetSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
<template v-slot:title>
<i18n-t
keypath="what-is-witnet.title.main"
class="text-4xl sm:text-5xl lg:text-6xl text-white text-center"
class="text-4xl sm:text-5xl lg:text-6xl text-white text-center font-normal"
tag="span"
>
<span class="black block">{{ $t('what-is-witnet.title.witnet') }}</span>
<span class="font-bold">
<br />
{{ $t('what-is-witnet.title.witnet') }}</span>
</i18n-t>
</template>

Expand All @@ -20,14 +22,14 @@
class="flex content-center items-center justify-center flex-row mt-lg"
>
<CircleIcon
class="relative z-10 w-10 top-5 left-5 sm:w-20 sm:top-7 sm:left-7"
class="relative z-10 w-10 h-auto top-5 left-5 sm:w-20 sm:top-7 sm:left-7"
/>
<BashIcon class="z-20 mr-sm w-10 sm:w-20" />
<StorageIcon class="z-20 mr-sm w-10 sm:w-20" />
<SlashIcon class="z-20 mr-sm w-10 sm:w-20" />
<LockIcon class="z-20 mr-sm w-10 sm:w-20" />
<BulbIcon class="z-20 mr-sm w-10 sm:w-20" />
<KeyIcon class="z-20 mr-sm w-10 sm:w-20" />
<BashIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
<StorageIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
<SlashIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
<LockIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
<BulbIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
<KeyIcon class="z-20 mr-sm w-10 h-auto sm:w-20" />
</div>
</template>
</SectionBase>
Expand Down
24 changes: 12 additions & 12 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<template>
<div class="grid grid-flow-row overflow-hidden">
<HeroSection />
<WhatIsWitnetSection class="padding-y px-4" />
<CoinSection class="padding-y px-4" />
<BuySection class="padding-y px-4" />
<SecureSection class="padding-y px-4" />
<BuildSection class="padding-y px-4" />
<ExploreSection class="padding-y px-4" />
<TutorialsSection class="padding-y px-4" />
<CommunitySection class="padding-y px-4" />
<Newsletter class="padding-y px-4" />
<FooterSection class="padding-y px-4" />
<WhatIsWitnetSection class="pt-10 pb-10 pt- px-4" />
<CoinSection class="pt-10 pb-10 px-4" />
<BuySection class="pt-10 pb-10 px-4" />
<SecureSection class="pt-10 pb-10 px-4" />
<BuildSection class="pt-10 pb-10 px-4" />
<ExploreSection class="pt-10 pb-10 px-4" />
<TutorialsSection class="pt-10 pb-10 px-4" />
<CommunitySection class="pt-10 pb-10 px-4" />
<Newsletter class="pt-10 pb-10 px-4" />
<FooterSection class="pt-10 pb-10 px-4" />
</div>
</template>

<style scoped>
.padding-y {
/* .pt-10 pb-10 {
padding-top: 96px;
padding-bottom: 96px;
}
} */
</style>
8 changes: 8 additions & 0 deletions utils/getBrowserOs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const DEFAULT_OS = 'Linux'

export function getBrowserOs(navigator: any) {
const supportedOs = ['Win', 'Mac', 'Linux']
const platform = navigator.platform

return supportedOs.find((os) => platform.includes(os)) || DEFAULT_OS
}
36 changes: 36 additions & 0 deletions utils/getLatestRelease.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { getBrowserOs } from './getBrowserOs'
export const URL_RELEASE_BASE =
'https://api.github.com/repos/witnet/sheikah/releases/latest'

export async function getLatestRelease(navigator: any) {
return await fetch(URL_RELEASE_BASE).then(async (result: any) => {
const os = await getBrowserOs(navigator).toLowerCase()
const macRelease = await result.data.assets.find((asset: any) =>
asset.browser_download_url.includes('.dmg')
)
const linuxRelease = await result.data.assets.find((asset: any) =>
asset.browser_download_url.includes('.AppImage')
)
const windowsRelease = await result.data.assets.find((asset: any) =>
asset.browser_download_url.includes('.exe')
)
const release = {
linux: {
platform: 'GNU / Linux',
releaseUrl: linuxRelease.browser_download_url,
downloadName: linuxRelease.name,
},
win: {
platform: 'Windows',
releaseUrl: windowsRelease.browser_download_url,
downloadName: windowsRelease.name,
},
mac: {
platform: 'Mac OS',
releaseUrl: macRelease.browser_download_url,
downloadName: windowsRelease.name,
},
}
return (release as any)[os] as any
})
}

0 comments on commit 94292bf

Please sign in to comment.