Skip to content

Commit

Permalink
v1.0.0 Beta (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
linhe0x0 committed Apr 25, 2020
1 parent 7d0df68 commit c6d1217
Show file tree
Hide file tree
Showing 52 changed files with 13,907 additions and 903 deletions.
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
docs/
10 changes: 10 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,10 @@
module.exports = {
root: true,
extends: ['plugin:vue/recommended', '@vue/prettier'],
parserOptions: {
parser: 'babel-eslint',
},
rules: {
'vue/no-v-html': 'off',
},
}
101 changes: 100 additions & 1 deletion .gitignore
@@ -1,9 +1,42 @@
# Created by https://www.gitignore.io/api/node,macos,vim
# Edit at https://www.gitignore.io/?templates=node,macos,vim

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
Expand All @@ -16,11 +49,12 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand All @@ -39,6 +73,9 @@ jspm_packages/
# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

Expand All @@ -56,9 +93,71 @@ typings/

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# rollup.js default build output
dist/

# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public

# Storybook build outputs
.out
.storybook-out

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Temporary folders
tmp/
temp/

### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~

# Auto-generated tag files
tags

# Persistent undo
[._]*.un~

# Coc configuration directory
.vim

# End of https://www.gitignore.io/api/node,macos,vim

# VuePress build output
docs/.vuepress/dist/
6 changes: 3 additions & 3 deletions .prettierrc
@@ -1,5 +1,5 @@
{
semi: false,
singleQuote: true,
trailingComma: "es5"
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
160 changes: 0 additions & 160 deletions Layout.vue

This file was deleted.

30 changes: 30 additions & 0 deletions components/Blank/index.vue
@@ -0,0 +1,30 @@
<template>
<div
class="blank"
:style="{
height: h,
}"
></div>
</template>

<script>
export default {
name: 'Blank',
props: {
height: {
type: [String, Number],
default: 20,
},
},
computed: {
h() {
return typeof this.height === 'number' ? `${this.height}px` : this.height
},
},
}
</script>

<style lang="stylus">
.blank
width: 100%
</style>
18 changes: 10 additions & 8 deletions components/Block/index.vue
Expand Up @@ -15,25 +15,27 @@
<script>
export default {
name: 'Block',
mounted() {
this.resolveLayout()
this.$parent.$parent.$emit('addBlock', this)
},
methods: {
resolveLayout() {
const heading = this.$el.querySelector('h1, h2')
const heading = this.$el.querySelector('h1, h2, h3, h4, h5, h6')
if (heading) {
this.$refs['heading-box'].appendChild(heading)
}
const examples = this.$refs['cont-box'].querySelector('.examples')
const examples = this.$refs['cont-box'].querySelectorAll('.examples')
if (examples) {
this.$refs['example-box'].appendChild(examples)
examples.forEach(item => {
this.$refs['example-box'].appendChild(item)
})
}
},
},
mounted() {
this.resolveLayout()
this.$parent.$parent.$emit('addBlock', this)
},
}
</script>

0 comments on commit c6d1217

Please sign in to comment.