The landing page will initially display the top 10 cryptocurrency coins sorted by their rank. The current list can be changed to either the top 11-20, 21-30, 31-40, 41-50 coins on the market. They can be sorted by their rank or by name. Each coin will have a details page which will lead to the details page with more information for the chosen coin. The Details page will list the current price, its % change in the past hour and the total amount of coins available. Below that there will be the next 3 coins depending on the current coins rank. The random page will just display a random coin everytime you press "Random"
- NodeJs
- Axios
- Sitemap nuxt module
- Bootstrap
- Nuxt TypeScript
- Vue Router
npm install
npm run serve
npm run build
npm run test
npm run lint
The web application should be running on http://localhost:8081/ for dev build
mounted() will use axios to get to top 100 coins from coinmarketcap.com. It will put the response from the GET request into the array currencies.
If there is no response, it will log an error on the console.
This function changes how the list of 10 coins are sorted by changing the variable currentOrder.
name is assigned to the variable currentOrder which will affect how the list is ordered
Nothing is returned as it only affects the a variable
This function sorts the list depending on the variable currentOrder
item is the list of cryptocurrencies pulled from the API
Returns a sorted list depending on the variable currentOrder
This function will change the variable Range
range is the current value category selected from the menu bar
Returns nothing
Will select a certain range from the whole list of currencies
currencies is the list of cryptocurrencies pulled from the API
Returns a sliced range of cryptocurrencies depending on the value of Range
This will load the details page using Vue Router
rankis the index in the list of currency array of the coin chosen
This uses Math.random to pick a random number which will allow the code to present a random cryptocurrency.
No parameters
This will return the next chosen value for the next currency
Will either return the randomId value or 1 incase randomId is null
This project is licensed under the terms of the MIT license