🆕 cleanup for redesign+rewrite
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
# PAGES
|
||||
|
||||
This directory contains your Application Views and Routes.
|
||||
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
|
||||
@@ -1,65 +0,0 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
transition(name="fade-title" @after-enter="afterEnter")
|
||||
h1(v-if="showTitle") {{ category.title }}
|
||||
transition(name="fade-card")
|
||||
.cards(v-if="areCardsVisible && showCards")
|
||||
template(v-for='resource in category.resources' )
|
||||
Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../components/Card'
|
||||
|
||||
export default {
|
||||
components: { Card },
|
||||
data() {
|
||||
return {
|
||||
categoryRouteTitle: this.$route.params.category,
|
||||
index: '',
|
||||
activeCard: '',
|
||||
showTitle: false,
|
||||
showCards: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
areCardsVisible() {
|
||||
return this.$store.getters['Sidebar/areCardsVisible']
|
||||
},
|
||||
category() {
|
||||
return this.$store.getters['data/sortByTitle'](this.categoryRouteTitle)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.activeCard = this.$route.query.card || ''
|
||||
},
|
||||
mounted() {
|
||||
this.showTitle = true
|
||||
},
|
||||
methods: {
|
||||
setActiveCard(index) {
|
||||
this.activeCard = index
|
||||
},
|
||||
async createCopyUrl(resource) {
|
||||
try {
|
||||
const { path, cleanTitle } = resource
|
||||
await this.$copyText(`https://webgems.io${path}`)
|
||||
this.setActiveCard(cleanTitle)
|
||||
this.$router.push(path)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
afterEnter() {
|
||||
this.showCards = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
</style>
|
||||
@@ -1,55 +0,0 @@
|
||||
<template lang="pug">
|
||||
.welcome
|
||||
main
|
||||
h1.text-black.font-bold.text-xl.mb-2 What is
|
||||
span 💎 webgems?
|
||||
p Webgems is a goto place for devs and designers to find new resources and more. As a beginner, it's sometimes not easy to find what you need since you don't know where to look for what.
|
||||
p Therefore we created this project to have the most common and best resources for beginners and veterans in one place — kind of like a bookmarks list for devs and designers, containing only the best gems out there.
|
||||
p If you want to add your gem, go ahead and open a pull request on GitHub (click on that octocat at the top right corner).
|
||||
p By the way, this project lives by getting shared; if you find this worthy, please share it with others.
|
||||
|
||||
p.muted // made with love by
|
||||
p.contributors class
|
||||
a(href="https://twitter.com/lostdesign") @lostdesign
|
||||
span extends
|
||||
a(href="https://github.com/S3B4S") @S3B4S
|
||||
span and
|
||||
a(href="https://devcord.com") Devcord
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.welcome {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.muted {
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.5;
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.contributors {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
main {
|
||||
max-width: 90%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
h1 Legal Notice
|
||||
p Webgems.io is a project of
|
||||
a.highlighted(href="https://lost.design", title="Visit lost.design") www.lost.design
|
||||
|
||||
h2 Contact
|
||||
p
|
||||
a(href="mailto:hello@webgems.io", title="Write webgems an email") hello@webgems.io
|
||||
|
||||
h2 Disclaimer
|
||||
small Last updated: October 24, 2019
|
||||
p Disclosures in accordance with § 5 TMG (Telemediengesetz) do not apply, as this is an open source project that is not comercially operated.
|
||||
p The information contained on webgems.io website (the "Service") is for general information purposes only. Webgems assumes no responsibility for errors or omissions in the contents on the Service. In no event shall webgems be liable for any special, direct, indirect, consequential, or incidental damages or any damages whatsoever, whether in an action of contract, negligence or other tort, arising out of or in connection with the use of the Service or the contents of the Service.
|
||||
p Webgems reserves the right to make additions, deletions, or modification to the contents on the Service at any time without prior notice. Webgems does not warrant that the website is free of viruses or other harmful components.
|
||||
p This website may contain links to external websites that are not provided or maintained by or in any way affiliated with webgems. Please note that the webgems does not guarantee the accuracy, relevance, timeliness, or completeness of any information on these external websites.
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
h2 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
p {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,86 +0,0 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
transition(name="fade-title" @after-enter="afterEnter")
|
||||
h1(v-if="showTitle") Search
|
||||
transition(name="fade-card")
|
||||
.cards(v-if="areCardsVisible && showCards")
|
||||
template(v-if="resources.length")
|
||||
template(v-for='resource in resources' )
|
||||
Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
|
||||
p(v-else) No results
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../components/Card'
|
||||
import * as R from 'ramda'
|
||||
|
||||
export default {
|
||||
components: { Card },
|
||||
data() {
|
||||
return {
|
||||
activeCard: '',
|
||||
resources: [],
|
||||
searchInput: {},
|
||||
showTitle: false,
|
||||
showCards: false,
|
||||
debounceID: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
areCardsVisible() {
|
||||
return this.$store.getters['Sidebar/areCardsVisible']
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route(updatedChanges) {
|
||||
clearTimeout(this.debounceID)
|
||||
const updateSearch = () => {
|
||||
const keywords = updatedChanges.query.keywords
|
||||
const tags = updatedChanges.query.tags
|
||||
this.searchInput = {
|
||||
keywords: keywords && R.split(',', keywords),
|
||||
tags: tags && R.split(',', tags),
|
||||
}
|
||||
}
|
||||
|
||||
if (updatedChanges.query.enter !== 'true')
|
||||
this.debounceID = setTimeout(updateSearch, 300)
|
||||
else
|
||||
updateSearch()
|
||||
},
|
||||
searchInput(searchInput) {
|
||||
this.resources = this.$store.getters['data/findBySearchInputs'](searchInput.keywords, searchInput.tags)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.showTitle = true
|
||||
|
||||
const keywords = this.$route.query.keywords
|
||||
const tags = this.$route.query.tags
|
||||
this.searchInput = {
|
||||
keywords: keywords && R.split(',', keywords),
|
||||
tags: tags && R.split(',', tags),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async createCopyUrl(resource) {
|
||||
try {
|
||||
const { path } = resource
|
||||
await this.$copyText(`https://webgems.io${path}`)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
afterEnter() {
|
||||
this.showCards = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user