diff --git a/.gitignore b/.gitignore index b1acffc..8bc8a27 100644 --- a/.gitignore +++ b/.gitignore @@ -86,5 +86,6 @@ dist /README-temp.md /static/game-list.json /static/homebrew-list.json -.DS_Store +/static/video-list.json /commits-data.json +.DS_Store diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css index cbbcd0e..b01a3fc 100644 --- a/assets/css/tailwind.css +++ b/assets/css/tailwind.css @@ -61,6 +61,26 @@ * @import "utilities/skew-transforms"; */ + +.ease { + transition-property: all; + transition-duration: 400ms; + /* easeInOutQuart */ + /* https://easings.net/en#easeInOutQuart */ + transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1); +} + +.lazyload, +.lazyloading { + opacity: 0; +} +.lazyloaded { + @apply ease; + transition-property: opacity; + + opacity: 1; +} + .neumorphic-shadow, .hover\:neumorphic-shadow:hover { /* box-shadow: -0.25rem -0.25rem 0.5rem rgba(255, 255, 255, 0.07); */ diff --git a/components/link-button.vue b/components/link-button.vue index 4803a97..20d3aa5 100644 --- a/components/link-button.vue +++ b/components/link-button.vue @@ -4,8 +4,8 @@ :href="href" :target="target" :rel="rel" + :class="classlist" role="button" - class="relative inline-flex items-center px-4 py-2 border border-transparent leading-5 font-medium rounded-md text-white bg-darker neumorphic-shadow hover:bg-indigo-400 focus:outline-none focus:shadow-outline-indigo focus:border-indigo-600 active:bg-indigo-600 transition duration-150 ease-in-out" > @@ -23,6 +23,10 @@ export default { target: { type: String, default: null + }, + classGroups: { + type: Object, + default: () => {} } }, computed: { @@ -30,6 +34,30 @@ export default { if (this.href.charAt(0) === '/') return null return 'noopener' + }, + classlist () { + const defaultClassGroups = { + general: 'relative inline-flex items-center rounded-md px-4 py-2', + font: 'leading-5 font-medium', + text: 'text-white', + border: 'border border-transparent focus:outline-none focus:border-indigo-600', + shadow: 'neumorphic-shadow focus:shadow-outline-indigo', + bg: 'bg-darker hover:bg-indigo-400 active:bg-indigo-600', + transition: 'transition duration-150 ease-in-out' + } + + const mergedClassGroups = { + ...defaultClassGroups, + ...this.classGroups + } + + // if (this.isFocused) { + // delete mergedClassGroups.blur + // } else { + // delete mergedClassGroups.focus + // } + + return Object.values(mergedClassGroups) } } } diff --git a/components/navbar.vue b/components/navbar.vue index 22fe431..b6d7baf 100644 --- a/components/navbar.vue +++ b/components/navbar.vue @@ -146,6 +146,10 @@ export default { label: 'Categories', url: '/categories', }, + { + label: 'Benchmarks', + url: '/benchmarks', + }, { label: 'Homebrew', url: '/kind/homebrew', diff --git a/components/search.vue b/components/search.vue index 05a887d..84e1ddb 100644 --- a/components/search.vue +++ b/components/search.vue @@ -79,7 +79,7 @@ - + + + @@ -174,7 +197,7 @@ import { getAppCategory } from '~/helpers/categories.js' import { getAppEndpoint } from '~/helpers/app-derived.js' // import appList from '~/static/app-list.json' -// import EmailSubscribe from '~/components/email-subscribe.vue' +import LinkButton from '~/components/link-button.vue' // import RelativeTime from '~/components/relative-time.vue' import ListSummary from '~/components/list-summary.vue' @@ -183,6 +206,7 @@ export default { components: { // EmailSubscribe: () => process.client ? import('~/components/email-subscribe.vue') : null, ListSummary, + LinkButton, RelativeTime: () => process.client ? import('~/components/relative-time.vue') : null }, props: { @@ -325,6 +349,11 @@ export default { methods: { getAppCategory, getAppEndpoint, + getSearchLinks (app) { + if (typeof app.searchLinks === 'undefined') return [] + + return app.searchLinks + }, // Search priorities titleStartsWith (query, app) { const matches = app.name.toLowerCase().startsWith(query) diff --git a/components/video/bg-player.vue b/components/video/bg-player.vue new file mode 100644 index 0000000..8bac188 --- /dev/null +++ b/components/video/bg-player.vue @@ -0,0 +1,133 @@ +