This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineStore } from 'pinia'; | |
export const useAssignmentsStore = defineStore('assignments', { | |
state: () => ( { | |
assignments: {}, | |
}), | |
actions: { | |
async fetchAssignments() { | |
const user = useDirectusUser() | |
const { getItems } = useDirectusItems() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<header class="p-10"> | |
<div class="md:flex md:justify-between md:items-center"> | |
<a href="/" title="" class="block hover:opacity-60"> | |
<!-- <img :src="fileUrl(global.seo_image.id)" :alt="global.site_name" class="w-12" /> --> | |
</a> | |
<!-- <pre>{{global.navigation[0]}}</pre> --> | |
<!-- <ul v-if> | |
<li v-for="(item,index) in global.navigation" :key="index"> | |
{{ item.label.value }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Layout> | |
<h1>Group by Year via method</h1> | |
<ul> | |
<li v-for="(items, year) in groupBy($page.allBlogPost.edges, 'createdYear')" :key="year"> | |
{{ year }} | |
<ul> | |
<li v-for="item in items" :key="item.id"> | |
{{ item.title }} | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Layout> | |
<h1>Group by Category via computed</h1> | |
<ul> | |
<li v-for="(items, category) in groupedByCategory" :key="category"> | |
{{ category }} | |
<ul> | |
<li v-for="item in items" :key="item.id"> | |
{{ item.title }} | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Layout> | |
<h1>Group by Year via computed</h1> | |
<ul> | |
<li v-for="(items, year) in groupedByYear" :key="year"> | |
{{ year }} | |
<ul> | |
<li v-for="item in items" :key="item.id"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const upcomingTuts = [ | |
{ | |
"id": 1, | |
"title": "Using NPM Modules with Gridsome", | |
"slug": 1, | |
"topic": "Gridsome", | |
"tags": "npm, yarn, modules", | |
"amount": 150, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Cron config that gives you an opportunity | |
* to run scheduled jobs. | |
* | |
* The cron format consists of: | |
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK] | |
* | |
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#cron-tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
module.exports = async () => { | |
// Get all books at once using map (or object) | |
const allReviews = new Map([ | |
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781617294624', { isbn: "9781617294624", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781484238042', { isbn: "9781484238042", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781786469946', { isbn: "9781786469946", short_title: "Learning Vue.js 2", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
module.exports = async () => { | |
// Get all books at once using map (or object) | |
const allReviews = new Map([ | |
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781617294624', { isbn: "9781617294624", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781484238042', { isbn: "9781484238042", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], | |
['isbn:9781786469946', { isbn: "9781786469946", short_title: "Learning Vue.js 2", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Cron config that gives you an opportunity | |
* to run scheduled jobs. | |
* | |
* The cron format consists of: | |
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK] | |
* | |
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#cron-tasks |
NewerOlder