Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
fix: install page
Browse files Browse the repository at this point in the history
  • Loading branch information
R-unic committed Oct 11, 2023
1 parent 01e6808 commit b078fc8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 48 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta property="og:description" content="P is a statically-typed, interpreted programming language written in 100% TypeScript. It aims to be readable and easy to use.">
<meta property="og:image" content="https://p-lang.dev/p.png">
<meta property="og:url" content="https://p-lang.xyz">
<meta name="theme-color" content="#ffff8f">
<meta name="theme-color" content="#696ef5">
<meta name="description" content="P is a statically-typed, interpreted programming language written in 100% TypeScript. It aims to be readable and easy to use.">
<meta name="keywords" content="p, lang, language, programming, ppm, plang, p-lang, code, coding">
<title>The P Programming Language</title>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Community.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import HowToHelpVue from '@/components/HowToHelp.vue';

<template>
<h1 class="bright title">Community</h1>
<h2>There's plenty of ways to get involved with Cosmo.</h2>
<h2>There's plenty of ways to get involved with P.</h2>
<h2 class="push-down-much">Here's a list of how and what you can do to help.</h2>
<HowToHelpVue/>
</template>
70 changes: 24 additions & 46 deletions src/views/Install.vue
Original file line number Diff line number Diff line change
@@ -1,60 +1,38 @@
<!-- eslint-disable vue/multi-word-component-names -->
<script lang="ts">
export default {
data() {
return {
windowsInstallerURL: "",
osxInstallerURL: "",
linuxInstallerURL: ""
};
},
created() {
this.fetchLatestInstallerURL();
},
methods: {
async fetchLatestInstallerURL(): Promise<void> {
fetch("https://api.github.com/repos/cosmo-lang/cosmo-installer/releases/latest")
.then(response => response.json())
.then(data => {
const baseURL = `https://github.com/cosmo-lang/cosmo-installer/releases/download/${data.tag_name}/CosmoInstaller_`;
this.windowsInstallerURL = baseURL + "Windows.zip";
this.osxInstallerURL = baseURL + "OSX.zip";
this.linuxInstallerURL = baseURL + "Linux.zip";
});
}
}
// data() {
// return {
// windowsInstallerURL: "",
// osxInstallerURL: "",
// linuxInstallerURL: ""
// };
// },
// created() {
// this.fetchLatestInstallerURL();
// },
// methods: {
// async fetchLatestInstallerURL(): Promise<void> {
// fetch("https://api.github.com/repos/cosmo-lang/cosmo-installer/releases/latest")
// .then(response => response.json())
// .then(data => {
// const baseURL = `https://github.com/cosmo-lang/cosmo-installer/releases/download/${data.tag_name}/CosmoInstaller_`;
// this.windowsInstallerURL = baseURL + "Windows.zip";
// this.osxInstallerURL = baseURL + "OSX.zip";
// this.linuxInstallerURL = baseURL + "Linux.zip";
// });
// }
// }
};
</script>

<template>
<h1 class="bright title push-down-much">Install</h1>
<br/>
<h2 class="description-body">You can install Cosmo via the official Cosmo Installer.</h2>

<div id="main-button-list">
<ul>
<a :href="windowsInstallerURL">
<button style="border-radius: 25%;" class="main-button no-border">
<img width="48" height="48" src="https://img.icons8.com/color/48/windows-10.png" alt="windows-10"/>
</button>
</a>
<a :href="osxInstallerURL">
<button style="border-radius: 25%;" class="main-button no-border">
<img width="48" height="48" src="https://img.icons8.com/color/48/000000/mac-os--v1.png" alt="mac-os--v1"/>
</button>
</a>
<a :href="linuxInstallerURL">
<button style="border-radius: 25%;" class="main-button no-border">
<img width="48" height="48" src="https://img.icons8.com/color/48/000000/linux--v1.png" alt="linux--v1"/>
</button>
</a>
</ul>
</div>

<h2 style="font-weight: 700;" class="description-body">OR</h2>
<h2 class="description-body">You can install P via the source code and NPM.</h2>
<div id="main-button-list">
<ul>
<a href="https://github.com/cosmo-lang/cosmo/archive/refs/heads/master.zip">
<a href="https://github.com/p-programming-language/plang/archive/refs/heads/main.zip">
<button style="border-radius: 25%;" class="main-button no-border">
<img width="48" height="48" src="https://img.icons8.com/color/48/000000/git.png" alt="git"/>
</button>
Expand Down

0 comments on commit b078fc8

Please sign in to comment.