Merge branch 'master'
This commit is contained in:
commit
8747ab87a5
16 changed files with 8807 additions and 0 deletions
21
tailwindcss-talks-table/.gitignore
vendored
Normal file
21
tailwindcss-talks-table/.gitignore
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
29
tailwindcss-talks-table/README.md
Normal file
29
tailwindcss-talks-table/README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# talks-table
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
```
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
yarn run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
yarn run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run your tests
|
||||||
|
```
|
||||||
|
yarn run test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
yarn run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
tailwindcss-talks-table/babel.config.js
Normal file
5
tailwindcss-talks-table/babel.config.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/cli-plugin-babel/preset'
|
||||||
|
]
|
||||||
|
}
|
44
tailwindcss-talks-table/package.json
Normal file
44
tailwindcss-talks-table/package.json
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
"name": "talks-table",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": "^3.3.2",
|
||||||
|
"lodash": "^4.17.15",
|
||||||
|
"postcss-import": "^12.0.1",
|
||||||
|
"tailwindcss": "^1.1.3",
|
||||||
|
"vue": "^2.6.10"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/cli-plugin-babel": "^4.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "^4.0.0",
|
||||||
|
"@vue/cli-service": "^4.0.0",
|
||||||
|
"babel-eslint": "^10.0.3",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
|
"vue-template-compiler": "^2.6.10"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"root": true,
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:vue/essential",
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"rules": {},
|
||||||
|
"parserOptions": {
|
||||||
|
"parser": "babel-eslint"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions"
|
||||||
|
]
|
||||||
|
}
|
7
tailwindcss-talks-table/postcss.config.js
Normal file
7
tailwindcss-talks-table/postcss.config.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('postcss-import'),
|
||||||
|
require('tailwindcss'),
|
||||||
|
require('autoprefixer')
|
||||||
|
]
|
||||||
|
}
|
BIN
tailwindcss-talks-table/public/favicon.ico
Normal file
BIN
tailwindcss-talks-table/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
17
tailwindcss-talks-table/public/index.html
Normal file
17
tailwindcss-talks-table/public/index.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title>talks-table</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but talks-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
28
tailwindcss-talks-table/src/App.vue
Normal file
28
tailwindcss-talks-table/src/App.vue
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<div id="app" class="py-10">
|
||||||
|
<div class="max-w-6xl mx-auto px-4">
|
||||||
|
<TalksTable :data="data"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import data from '@/data'
|
||||||
|
import TalksTable from '@/components/TalksTable'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'app',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
TalksTable
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style src="@/assets/css/tailwind.css"></style>
|
5
tailwindcss-talks-table/src/assets/css/tailwind.css
Normal file
5
tailwindcss-talks-table/src/assets/css/tailwind.css
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@import 'tailwindcss/base';
|
||||||
|
|
||||||
|
@import 'tailwindcss/components';
|
||||||
|
|
||||||
|
@import 'tailwindcss/utilities';
|
BIN
tailwindcss-talks-table/src/assets/logo.png
Normal file
BIN
tailwindcss-talks-table/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
58
tailwindcss-talks-table/src/components/HelloWorld.vue
Normal file
58
tailwindcss-talks-table/src/components/HelloWorld.vue
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<template>
|
||||||
|
<div class="hello">
|
||||||
|
<h1>{{ msg }}</h1>
|
||||||
|
<p>
|
||||||
|
For a guide and recipes on how to configure / customize this project,<br>
|
||||||
|
check out the
|
||||||
|
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||||
|
</p>
|
||||||
|
<h3>Installed CLI Plugins</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Essential Links</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||||
|
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||||
|
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||||
|
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||||
|
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Ecosystem</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||||
|
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||||
|
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||||
|
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'HelloWorld',
|
||||||
|
props: {
|
||||||
|
msg: String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style scoped>
|
||||||
|
h3 {
|
||||||
|
margin: 40px 0 0;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #42b983;
|
||||||
|
}
|
||||||
|
</style>
|
104
tailwindcss-talks-table/src/components/TalksTable.vue
Normal file
104
tailwindcss-talks-table/src/components/TalksTable.vue
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
<template>
|
||||||
|
<div class="overflow-x-scroll text-gray-900 leading-snug">
|
||||||
|
<table class="w-full">
|
||||||
|
<thead>
|
||||||
|
<tr class="border-b border-gray-400">
|
||||||
|
<th class="px-4 py-2 border border-gray-400">Date</th>
|
||||||
|
<th class="px-4 py-2 border border-gray-400">Talk</th>
|
||||||
|
<th class="px-4 py-2 border border-gray-400">Event</th>
|
||||||
|
<th class="px-4 py-2 border border-gray-400">Feedback</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr
|
||||||
|
v-for="(event, i) in sortedEvents"
|
||||||
|
:key="i"
|
||||||
|
class="odd:bg-red-500"
|
||||||
|
:class="{ 'bg-gray-200': i % 2 === 0 }"
|
||||||
|
>
|
||||||
|
<td class="w-1/5 px-4 py-3 border border-gray-400">
|
||||||
|
<dl>
|
||||||
|
<span>
|
||||||
|
<dt class="sr-only">Date</dt>
|
||||||
|
<dd class="whitespace-no-wrap md:whitespace-normal">{{ event.date }}</dd>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span v-if="event.time">
|
||||||
|
<dt class="sr-only">Time</dt>
|
||||||
|
<dd class="mt-px text-sm text-gray-700">{{ event.time }}</dd>
|
||||||
|
</span>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
<td class="w-1/3 px-4 py-3 border border-gray-400">
|
||||||
|
<dl>
|
||||||
|
<span>
|
||||||
|
<dt class="sr-only">Talk</dt>
|
||||||
|
<dd>
|
||||||
|
<a class="block whitespace-no-wrap md:whitespace-normal underline hover:no-underline" href="#0">{{ getTalk(event.talk).title }}</a>
|
||||||
|
</dd>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span>
|
||||||
|
<dt class="sr-only">Talk type</dt>
|
||||||
|
<dd class="mt-px text-sm text-gray-600">{{ getTalk(event.talk).type }}</dd>
|
||||||
|
</span>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
<td class="w-1/3 px-4 py-3 border border-gray-400">
|
||||||
|
<dl>
|
||||||
|
<span>
|
||||||
|
<dt class="sr-only">Event name</dt>
|
||||||
|
<dd>
|
||||||
|
<a class="whitespace-no-wrap md:whitespace-normal underline hover:no-underline" href="#0">{{ event.title }}</a>
|
||||||
|
</dd>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="block">
|
||||||
|
<dt class="sr-only">Location</dt>
|
||||||
|
<dd class="mt-px text-sm text-gray-600">{{ event.location }}</dd>
|
||||||
|
</span>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
<td class="w-1/2 px-4 py-3 border border-gray-400">
|
||||||
|
<div v-if="event.feedback">
|
||||||
|
<a
|
||||||
|
class="px-4 py-3 bg-blue-600 text-sm text-white rounded-lg hover:bg-blue-700"
|
||||||
|
href="#0"
|
||||||
|
>
|
||||||
|
<span class="sr-only">View feedback for {{ getTalk(event.talk).title }} at {{ event.title }}</span>
|
||||||
|
<span aria-hidden="true">Feedback</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import _ from 'lodash'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
required: true,
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
sortedEvents: function () {
|
||||||
|
return _(this.data.events)
|
||||||
|
.sortBy(e => `${e.date} ${e.time}`)
|
||||||
|
.reverse()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getTalk: function (talkId) {
|
||||||
|
return this.data.talks[talkId] || {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
58
tailwindcss-talks-table/src/data.js
Normal file
58
tailwindcss-talks-table/src/data.js
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
module.exports = {
|
||||||
|
talks: {
|
||||||
|
drupal_vuejs: {
|
||||||
|
title: 'Decoupling Drupal with Vue.js',
|
||||||
|
type: 'Talk'
|
||||||
|
},
|
||||||
|
tailwind: {
|
||||||
|
title: 'Taking Flight with Tailwind CSS',
|
||||||
|
type: 'Talk'
|
||||||
|
},
|
||||||
|
php_ansible: {
|
||||||
|
title: 'Deploying PHP applications with Ansible, Ansible Vault and Ansistrano',
|
||||||
|
type: 'Talk'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
events: [
|
||||||
|
{
|
||||||
|
title: 'BlueConf 2019',
|
||||||
|
location: 'Cardiff, Wales',
|
||||||
|
talk: 'tailwind',
|
||||||
|
date: '2019-06-07',
|
||||||
|
time: '16:45 - 17:15'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'BlueConf 2019',
|
||||||
|
location: 'Cardiff, Wales',
|
||||||
|
talk: 'drupal_vuejs',
|
||||||
|
date: '2019-06-07',
|
||||||
|
time: '11:15 - 11:40'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'DrupalCon Europe 2019',
|
||||||
|
location: 'Amsterdam, NL',
|
||||||
|
talk: 'php_ansible',
|
||||||
|
date: '2019-10-02',
|
||||||
|
time: '15:25 - 15:45',
|
||||||
|
feedback: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Drupal Edinburgh',
|
||||||
|
location: 'Remote',
|
||||||
|
talk: 'php_ansible',
|
||||||
|
date: '2019-12-12'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'PHP South Wales',
|
||||||
|
location: 'Cardiff, Wales',
|
||||||
|
talk: 'php_ansible',
|
||||||
|
date: '2019-07-23'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'WordCamp Bristol 2019',
|
||||||
|
location: 'Bristol, England',
|
||||||
|
talk: 'tailwind',
|
||||||
|
date: '2019-05-18'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
8
tailwindcss-talks-table/src/main.js
Normal file
8
tailwindcss-talks-table/src/main.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
render: h => h(App),
|
||||||
|
}).$mount('#app')
|
7
tailwindcss-talks-table/tailwind.config.js
Normal file
7
tailwindcss-talks-table/tailwind.config.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
theme: {
|
||||||
|
extend: {}
|
||||||
|
},
|
||||||
|
variants: {},
|
||||||
|
plugins: []
|
||||||
|
}
|
8416
tailwindcss-talks-table/yarn.lock
Normal file
8416
tailwindcss-talks-table/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue