diff --git a/landing/layouts/header.vue b/landing/layouts/header.vue index f040465..760119b 100644 --- a/landing/layouts/header.vue +++ b/landing/layouts/header.vue @@ -11,6 +11,20 @@ nuxtApp.hook("page:finish", () => { scroller.value?.scrollTo(0, 0); }) + +const gitstars = ref('Loading...') + +async function getGithubStars() { + const res = await fetch('https://api.github.com/repos/litlyx/litlyx'); + if (!res.ok) return gitstars.value = '340+' + const data = await res.json(); + return gitstars.value = data.stargazers_count.toString() + '+'; +} + +onMounted(() => { + getGithubStars(); +}) + @@ -63,7 +77,7 @@ nuxtApp.hook("page:finish", () => {
- 210+ + {{ gitstars }}
@@ -123,7 +137,8 @@ nuxtApp.hook("page:finish", () => {
- +
Why choose Litlyx
@@ -148,7 +163,7 @@ nuxtApp.hook("page:finish", () => {
- +
@@ -233,7 +248,8 @@ nuxtApp.hook("page:finish", () => { Github Pricing - Why choose Litlyx + Why choose Litlyx +
Company
diff --git a/landing/pages/index.vue b/landing/pages/index.vue index e786e85..c00bb89 100644 --- a/landing/pages/index.vue +++ b/landing/pages/index.vue @@ -51,6 +51,15 @@ const scriptDeferTokens = ref([ const snippetIndex = ref(0); + +async function saveEmail() { + await fetch('http://savemail.litlyx.com/email/' + encodeURIComponent(email.value), { + mode: 'no-cors' + }); + email.value = ''; + alert('We will keep you updated'); +} + @@ -331,7 +340,7 @@ const snippetIndex = ref(0);
- + Keep me updated