diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 32163a3..e72c2f0 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -3,4 +3,6 @@ These are lovely people who have helped this project:
- [lostdesign](https://github.com/lostdesign) : Active Contributor and currently also the main contributor.
* twitter: @lostdesign
-- [Kevin](https://github.com/S3B4S) :dog:
\ No newline at end of file
+- [Kevin](https://github.com/S3B4S) :dog:
+- [jacobparis](https://github.com/jacobparis) : Team Devcord
+ * twitter: @jacobmparis
\ No newline at end of file
diff --git a/components/Card.vue b/components/Card.vue
index 94ae71e..bb7de71 100644
--- a/components/Card.vue
+++ b/components/Card.vue
@@ -1,53 +1,16 @@
- .card(:class="active")
- p.card--title {{title}}
- p.card--description {{desc}}
+ .card(:class="{ cardActive: isActive }")
+ p.card--title {{resource.title}}
+ p.card--description {{resource.desc}}
.card--links
- a.card--reference(@click='createCopyUrl') Copy
+ a.card--reference(@click='createCopyUrl(resource)') Copy
br
- a.card--target(:href="url" :target='title' rel='noreferrer') Open
+ a.card--target(:href="resource.url" :target='resource.title' rel='noreferrer') Open
@@ -62,7 +25,7 @@ export default {
flex-direction: column;
position: relative;
- &--active {
+ &Active {
box-shadow:inset 0px 0px 0px 3px #08e5ff;
}
diff --git a/components/Sidebar.vue b/components/Sidebar.vue
index aae7849..ce17c96 100644
--- a/components/Sidebar.vue
+++ b/components/Sidebar.vue
@@ -2,22 +2,36 @@
aside.nav
.sidebar
template(v-for='category in categories')
+ //- nuxt-link(:to='$i18n.path(category.slug)') {{ category.title }}
nuxt-link(:to='category.slug') {{ category.title }}
+ div(class="toggleWrapper" @click="toggleCardsVisible")
+ div(class="viewToggle" :class="{active: areCardsVisible}") Cards
+ div(class="viewToggle" :class="{active: !areCardsVisible}") Table
diff --git a/locales/de.json b/locales/de.json
new file mode 100644
index 0000000..0e0ed39
--- /dev/null
+++ b/locales/de.json
@@ -0,0 +1,5 @@
+{
+ "general": {
+ "siteTitle": "Was ist đź’Ž webgems?"
+ }
+}
diff --git a/locales/en.json b/locales/en.json
new file mode 100644
index 0000000..2b8a643
--- /dev/null
+++ b/locales/en.json
@@ -0,0 +1,5 @@
+{
+ "general": {
+ "siteTitle": "What is đź’Ž webgems?"
+ }
+}
diff --git a/locales/fr.json b/locales/fr.json
new file mode 100644
index 0000000..2b8a643
--- /dev/null
+++ b/locales/fr.json
@@ -0,0 +1,5 @@
+{
+ "general": {
+ "siteTitle": "What is đź’Ž webgems?"
+ }
+}
diff --git a/nuxt.config.js b/nuxt.config.js
index 11bd935..ac9997d 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,5 +1,5 @@
import pkg from './package'
-import store from './store.json'
+import resources from './resources/'
export default {
/*
@@ -29,7 +29,7 @@ export default {
** Generate dynamic routes
*/
generate: {
- routes: store.map(category => category.slug)
+ routes: resources.map(category => category.slug)
},
/*
@@ -37,6 +37,9 @@ export default {
*/
loading: { color: '#fff' },
+ plugins: [
+ '~/plugins/i18n.js'
+ ],
/*
** Nuxt.js modules
*/
diff --git a/package-lock.json b/package-lock.json
index b470b67..6cc8391 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5764,9 +5764,9 @@
}
},
"lodash": {
- "version": "4.17.14",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz",
- "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw=="
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lodash._reinterpolate": {
"version": "3.0.0",
@@ -6064,9 +6064,9 @@
}
},
"mixin-deep": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
- "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
"requires": {
"for-in": "^1.0.2",
"is-extendable": "^1.0.1"
@@ -8991,9 +8991,9 @@
"dev": true
},
"set-value": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
- "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
@@ -9619,13 +9619,13 @@
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"tar": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
- "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
+ "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"dev": true,
"requires": {
"block-stream": "*",
- "fstream": "^1.0.2",
+ "fstream": "^1.0.12",
"inherits": "2"
}
},
@@ -9982,35 +9982,14 @@
"integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw=="
},
"union-value": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
- "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
"requires": {
"arr-union": "^3.1.0",
"get-value": "^2.0.6",
"is-extendable": "^0.1.1",
- "set-value": "^0.4.3"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "set-value": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
- "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-extendable": "^0.1.1",
- "is-plain-object": "^2.0.1",
- "to-object-path": "^0.3.0"
- }
- }
+ "set-value": "^2.0.1"
}
},
"uniq": {
@@ -10364,6 +10343,11 @@
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz",
"integrity": "sha512-KmvZVtmM26BQOMK1rwUZsrqxEGeKiYSZGA7SNWE6uExx8UX/cj9hq2MRV/wWC3Cq6AoeDGk57rL9YMFRel/q+g=="
},
+ "vue-i18n": {
+ "version": "8.11.2",
+ "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.11.2.tgz",
+ "integrity": "sha512-STcpmxqBrG77SyWi7e0Yn/B3DjKR6mSDwYS4F/V7zoi+e/+CPbVb2TaBqFwnrkoDcPmRfjM7nTwsiRQQOGdifw=="
+ },
"vue-loader": {
"version": "15.7.0",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.7.0.tgz",
diff --git a/package.json b/package.json
index 9b83c2f..62231b5 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,8 @@
"dependencies": {
"cross-env": "^5.2.0",
"nuxt": "^2.4.0",
- "nuxt-clipboard2": "^0.2.1"
+ "nuxt-clipboard2": "^0.2.1",
+ "vue-i18n": "^8.11.2"
},
"devDependencies": {
"autoprefixer": "^8.6.4",
diff --git a/pages/_category.vue b/pages/_category.vue
index 91efda5..770e2b4 100644
--- a/pages/_category.vue
+++ b/pages/_category.vue
@@ -1,27 +1,59 @@
div
h1 {{ category.title }}
- .cards
- template(v-for='resource in category.resources')
- Card(:title='resource.title' :desc='resource.desc' :url='resource.url')
+ .cards(v-if="areCardsVisible")
+ template(v-for='resource in category.resources' )
+ Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
+ table(v-if="!areCardsVisible")
+ template(v-for='resource in category.resources' )
+ TableRow(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
+
+
diff --git a/pages/index.vue b/pages/index.vue
index 22129f2..0d2d461 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -3,10 +3,11 @@
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 what you should look for.
- p Therefore I created this project to have the most common and best resources for beginners and veterans in one place. Kinda like a bookmarks list for devs and designers, containing only the best gems out there.
- p If you want to add your own 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 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
@@ -14,13 +15,13 @@
a(href="https://github.com/S3B4S") @S3B4S
span and
a(href="https://devcord.com") Devcord
-
+