Skip to content

Instantly share code, notes, and snippets.

@TheDiligentDev
TheDiligentDev / function.json
Created December 30, 2021 12:49
CreatePost - function.json
{
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"post"
]
@TheDiligentDev
TheDiligentDev / CryptoDetailsExchangeCard.vue
Last active December 7, 2021 13:45
CryptoApp - CryptoDetailsExchangeCard.vue
<template>
<q-card class="q-ma-md q-pa-sm">
<q-card-section>
<div class="text-h4">{{ ticker.market.name }}</div>
<div class="text-h6">
Trust: <q-avatar size="sm" :color="ticker.trust_score" />
</div>
</q-card-section>
<q-separator></q-separator>
<q-card-section>
@TheDiligentDev
TheDiligentDev / CryptoDetailsSocialMediaButtons.vue
Created December 7, 2021 12:53
CryptoApp - CryptoDetailsSocialMediaButtons
<template>
<div class="row">
<div class="col flex flex-center">
<q-btn
type="a"
color="primary"
class="q-mr-sm"
:href="`https://facebook.com/${facebookUserName}`"
target="__blank"
>
@TheDiligentDev
TheDiligentDev / CryptoDetailsHeading.vue
Created December 7, 2021 12:51
CryptoApp - CryptoDetailsHeading.vue
<template>
<div class="row">
<div class="col flex flex-center">
<q-img width="50px" :src="image"></q-img>
<span class="text-h3 q-pt-md q-pb-md"> {{ name }} ({{ symbol }}) </span>
</div>
</div>
</template>
<script>
@TheDiligentDev
TheDiligentDev / CryptoDetails.vue
Last active December 7, 2021 13:46
Final CryptoDetails
<template>
<q-page v-if="details" padding>
<crypto-details-heading
:image="details.image.small"
:name="details.name"
:symbol="details.symbol"
></crypto-details-heading>
<q-separator class="q-mb-lg"></q-separator>
@TheDiligentDev
TheDiligentDev / Index.vue
Last active December 6, 2021 20:15
Crypto App Final Index.vue
<template>
<q-page padding>
<q-table
grid
title="Cryptocurrencies"
:rows="coins"
:columns="columns"
row-key="name"
:filter="filter"
:pagination="{ rowsPerPage: 12 }"
@TheDiligentDev
TheDiligentDev / CryptocurrencyCard.vue
Created December 5, 2021 14:03
Crypto App - CryptocurrencyCard
<template>
<q-card>
<q-card-section>
<div class="text-h4">{{ cryptocurrencyData.name }}</div>
<div class="text-subtitle2">{{ cryptocurrencyData.symbol }}</div>
</q-card-section>
<q-card-actions>
<q-btn @click="navigateToCryptoDetails(cryptocurrencyData.id)" flat>
View
</q-btn>
@TheDiligentDev
TheDiligentDev / axios.js
Created December 3, 2021 17:55
CryptoApp Axios
import { boot } from "quasar/wrappers";
import axios from "axios";
const api = axios.create({
baseURL: "https://api.coingecko.com/api/v3",
});
export default boot(({ app }) => {
app.config.globalProperties.$api = api;
});
<template>
<q-layout view="lHh Lpr lFf">
<q-header class="frosted-glass" elevated>
<q-toolbar>
<q-toolbar-title> Cryptocurrencies </q-toolbar-title>
</q-toolbar>
</q-header>
<q-page-container>
<router-view />
@TheDiligentDev
TheDiligentDev / MainLayout.vue
Created December 2, 2021 19:54
MainLayout - Govt Job App
<template>
<q-layout view="lHh Lpr lFf">
<q-header elevated>
<q-toolbar>
<q-toolbar-title> Government Jobs </q-toolbar-title>
</q-toolbar>
</q-header>
<q-page-container>
<router-view />