-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"/Users/chris/i/chris.me/components/PageHeader.vue":"1","/Users/chris/i/chris.me/components/PersonInfo.vue":"2","/Users/chris/i/chris.me/components/repo/RepoCard.vue":"3","/Users/chris/i/chris.me/pages/projects.vue":"4","/Users/chris/i/chris.me/uno.config.ts":"5"},{"size":279,"mtime":1727418215072,"results":"6","hashOfConfig":"7"},{"size":1662,"mtime":1727416548957,"results":"8","hashOfConfig":"7"},{"size":1974,"mtime":1727418876696,"results":"9","hashOfConfig":"7"},{"size":908,"mtime":1727418883308,"results":"10","hashOfConfig":"7"},{"size":4814,"mtime":1727416347488,"results":"11","hashOfConfig":"12"},{"filePath":"13","messages":"14","suppressedMessages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"75pghd",{"filePath":"16","messages":"17","suppressedMessages":"18","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","suppressedMessages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","suppressedMessages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","suppressedMessages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"12bxb1y","/Users/chris/i/chris.me/components/PageHeader.vue",[],[],"/Users/chris/i/chris.me/components/PersonInfo.vue",[],[],"/Users/chris/i/chris.me/components/repo/RepoCard.vue",[],[],"/Users/chris/i/chris.me/pages/projects.vue",[],[],"/Users/chris/i/chris.me/uno.config.ts",[],["28"],{"ruleId":"29","severity":2,"message":"30","line":49,"column":9,"nodeType":"31","messageId":"32","endLine":49,"endColumn":18,"suppressions":"33"},"regexp/no-super-linear-backtracking","The quantifier '.+?' can exchange characters with '.+'. Using any string accepted by /:+/, this can be exploited to cause at least polynomial backtracking. This might cause exponential backtracking.","Literal","trade",["34"],{"kind":"35","justification":"36"},"directive",""] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script lang="ts" setup> | ||
const { data } = await useFetch('/api/images') | ||
console.log(data.value) | ||
</script> | ||
|
||
<template> | ||
<div class="w-70% mxa"> | ||
<ImgBlurHash v-for="src in data" :key="src.id" w-100 :src="src.urls.raw" :blurhash="src.blur_hash" /> | ||
</div> | ||
</template> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { useUnsplash } from '../utils/unsplash' | ||
|
||
export default defineEventHandler(async () => { | ||
if (import.meta.dev) { | ||
const data: any = (await import('~/mock/unsplash.json')).default | ||
return data.response | ||
} | ||
|
||
const res = await useUnsplash().photos.getRandom({ count: 20 }) | ||
return res.response | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fetch from 'node-fetch' | ||
import { createApi } from 'unsplash-js' | ||
|
||
let _unsplash: ReturnType<typeof createApi> | null = null | ||
|
||
export function useUnsplash() { | ||
if (!_unsplash) { | ||
_unsplash = createApi({ | ||
accessKey: process.env.Unsplash_Access_Key as string, | ||
fetch: fetch as any, | ||
}) | ||
} | ||
|
||
return _unsplash | ||
} |