-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mandeep Singh <im@msingh.me>
- Loading branch information
Showing
10 changed files
with
1,329 additions
and
4,038 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
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 |
---|---|---|
@@ -1,5 +1,17 @@ | ||
// module.exports = { | ||
// plugins: { | ||
// tailwindcss: {}, | ||
// autoprefixer: {} | ||
// } | ||
// }; | ||
|
||
let tailwindcss = require("tailwindcss"); | ||
|
||
module.exports = { | ||
plugins: { | ||
autoprefixer: {} | ||
} | ||
plugins: [ | ||
// ... | ||
tailwindcss("./tailwind.js"), | ||
require("autoprefixer") | ||
// ... | ||
] | ||
}; |
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
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 |
---|---|---|
@@ -1,28 +1,90 @@ | ||
<template> | ||
<div id="app"> | ||
<img alt="Vue logo" src="./assets/logo.png"> | ||
<HelloWorld msg="Welcome to Your Vue.js App"/> | ||
<div id="app" class="text-center container mx-auto"> | ||
<div class="my-12"> | ||
<img alt="Github Emojis" src="./assets/logo.png"> | ||
<h1 class="mb-2">Github Emojis</h1> | ||
<p>A list of all the emojis that can be used in Github flavourd Markdown.</p> | ||
</div> | ||
|
||
<div class="container mx-auto mb-12 flex flex-col items-center"> | ||
<input type="search" placeholder="Search an emoji..." class="shadow appearance-none border rounded w-1/2 pt-3 pb-2 px-3 text-grey-darker" v-model="search"> | ||
</div> | ||
|
||
<!-- Two columns --> | ||
<section class="flex mb-4 bg-grey-lighter rounded-lg p-4"> | ||
<div class="text-center flex flex-wrap"> | ||
<div v-for="emoji in filteredList" v-bind:key="emoji.name" class="p-4 w-1/2 flex items-center cursor-pointer" @click="doCopy(emoji)"> | ||
<img :src="emoji.img" :alt="emoji.name" class="w-12 h-12 ml-24 mr-12"> | ||
<div class="text-center bg-grey-light py-1 px-3 rounded-sm text-grey-dark"><pre class="">{{ ':' + emoji.name + ':'}}</pre></div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<footer class="my-12"> | ||
<p>A fun product by <a href="https://www.khurafat.desi">Khurafat.desi</a></p> | ||
</footer> | ||
|
||
<img src="./assets/khurafat.png" alt="Khurafat" class="watermark fixed" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import HelloWorld from "./components/HelloWorld.vue"; | ||
import axios from "axios"; | ||
export default { | ||
name: "app", | ||
components: { | ||
HelloWorld | ||
}, | ||
data() { | ||
return { | ||
emojis: [], | ||
search: "" | ||
}; | ||
}, | ||
mounted() { | ||
axios.get("https://api.github.com/emojis").then(response => { | ||
this.emojis = Object.entries(response.data).map(([key, value]) => ({ | ||
name: key, | ||
img: value | ||
})); | ||
}); | ||
}, | ||
computed: { | ||
filteredList() { | ||
return this.emojis.filter(emoji => { | ||
return emoji.name.includes(this.search.toLowerCase()); | ||
}); | ||
} | ||
}, | ||
methods: { | ||
doCopy: function(emoji) { | ||
this.$copyText(":" + emoji.name + ":").then( | ||
e => { | ||
alert("Copied"); | ||
console.log(e); | ||
}, | ||
e => { | ||
alert("Can not copy"); | ||
console.log(e); | ||
} | ||
); | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style> | ||
#app { | ||
font-family: "Avenir", Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
/* body { | ||
background-color: #fff; | ||
background-image: url("./assets/khurafat.png"); | ||
background-position: right bottom; | ||
background-repeat: no-repeat; | ||
} */ | ||
.watermark { | ||
right: -2rem; | ||
bottom: -0.75rem; | ||
width: 10rem; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,62 @@ | ||
/** | ||
* This injects Tailwind's base styles, which is a combination of | ||
* Normalize.css and some additional base styles. | ||
* | ||
* You can see the styles here: | ||
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css | ||
* | ||
* If using `postcss-import`, use this import instead: | ||
* | ||
* @import "tailwindcss/preflight"; | ||
*/ | ||
@tailwind preflight; | ||
|
||
/** | ||
* This injects any component classes registered by plugins. | ||
* | ||
* If using `postcss-import`, use this import instead: | ||
* | ||
* @import "tailwindcss/components"; | ||
*/ | ||
@tailwind components; | ||
|
||
/** | ||
* Here you would add any of your custom component classes; stuff that you'd | ||
* want loaded *before* the utilities so that the utilities could still | ||
* override them. | ||
* | ||
* Example: | ||
* | ||
* .btn { ... } | ||
* .form-input { ... } | ||
* | ||
* Or if using a preprocessor or `postcss-import`: | ||
* | ||
* @import "components/buttons"; | ||
* @import "components/forms"; | ||
*/ | ||
|
||
/** | ||
* This injects all of Tailwind's utility classes, generated based on your | ||
* config file. | ||
* | ||
* If using `postcss-import`, use this import instead: | ||
* | ||
* @import "tailwindcss/utilities"; | ||
*/ | ||
@tailwind utilities; | ||
|
||
/** | ||
* Here you would add any custom utilities you need that don't come out of the | ||
* box with Tailwind. | ||
* | ||
* Example : | ||
* | ||
* .bg-pattern-graph-paper { ... } | ||
* .skew-45 { ... } | ||
* | ||
* Or if using a preprocessor or `postcss-import`: | ||
* | ||
* @import "utilities/background-patterns"; | ||
* @import "utilities/skew-transforms"; | ||
*/ |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import Vue from "vue"; | ||
import App from "./App.vue"; | ||
import VueClipboard from "vue-clipboard2"; | ||
import "./main.css"; | ||
|
||
Vue.config.productionTip = false; | ||
|
||
Vue.use(VueClipboard); | ||
|
||
new Vue({ | ||
render: h => h(App) | ||
}).$mount("#app"); |
Oops, something went wrong.