7 |
8 |
13 | James Bond Military Intelligence, Section 6 14 |
15 |├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── build
├── build.js
├── dev-client.js
├── dev-server.js
├── utils.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
├── prod.env.js
└── test.env.js
├── index.html
├── package.json
├── screenshot
├── charts.jpg
└── progressbar.jpg
├── src
├── App.vue
├── assets
│ ├── headerlogo-white.png
│ ├── headerlogo.png
│ ├── images
│ │ ├── vueico.png
│ │ └── vuelogo.png
│ ├── logo.png
│ └── photo.jpg
├── components
│ ├── collapse
│ │ ├── collapse.vue
│ │ ├── collapseitem.vue
│ │ └── index.vue
│ ├── common
│ │ ├── index.vue
│ │ ├── pagination.vue
│ │ └── progressbar.vue
│ ├── header
│ │ └── index.vue
│ ├── mixins.less
│ ├── modal
│ │ ├── Modal.vue
│ │ ├── Toast.vue
│ │ ├── ToastItem.vue
│ │ └── index.vue
│ ├── page
│ │ ├── content.vue
│ │ ├── foot.vue
│ │ ├── index.vue
│ │ ├── link.vue
│ │ ├── login.vue
│ │ ├── navmenu.vue
│ │ └── title.vue
│ ├── stars
│ │ ├── index.vue
│ │ └── stars.less
│ ├── timeline
│ │ ├── index.vue
│ │ ├── timeline.vue
│ │ └── timelineitem.vue
│ └── variables.less
├── demos
│ ├── 404.vue
│ ├── About.vue
│ ├── Ajax.vue
│ ├── Buttons.vue
│ ├── Card.vue
│ ├── Charts.vue
│ ├── Collapse.vue
│ ├── Content.vue
│ ├── Form.vue
│ ├── Icons.vue
│ ├── Image.vue
│ ├── Index.vue
│ ├── Level.vue
│ ├── MediaObject.vue
│ ├── Message.vue
│ ├── Modal.vue
│ ├── Nav.vue
│ ├── Notifications.vue
│ ├── Pagination.vue
│ ├── Panel.vue
│ ├── Progress.vue
│ ├── Rating.vue
│ ├── Table.vue
│ ├── Tabs.vue
│ ├── Tags.vue
│ ├── Timeline.vue
│ ├── Title.vue
│ └── Toast.vue
├── main.js
└── store.js
├── static
└── .gitkeep
├── test
└── unit
│ ├── .eslintrc
│ ├── index.js
│ ├── karma.conf.js
│ └── specs
│ └── Hello.spec.js
└── web.manifest
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-2"],
3 | "plugins": ["transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | # src/components/xscroll/*.js
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parserOptions: {
4 | sourceType: 'module'
5 | },
6 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
7 | extends: 'standard',
8 | // required to lint *.vue files
9 | plugins: [
10 | 'html'
11 | ],
12 | // add your custom rules here
13 | 'rules': {
14 | // allow paren-less arrow functions
15 | 'arrow-parens': 0,
16 | // allow debugger during development
17 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | selenium-debug.log
6 | test/unit/coverage
7 | test/e2e/reports
8 | .sass-cache/
9 | _site/
10 | *.swp
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 connors and other contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vue-Bulma
2 |
3 | > 轻量级高性能MVVM Admin UI框架
4 |
5 | Demo网址:[https://admin-c79b5.firebaseapp.com/admin/index](https://admin-c79b5.firebaseapp.com/admin/index)
6 |
7 |
8 | # Screenshot
9 |
10 |
11 |
12 |
13 | ## Build Setup
14 |
15 | ``` bash
16 | # 安装依赖包
17 | npm install
18 |
19 | # 开发模式运行在 localhost:8080
20 | npm run dev
21 |
22 | # 打包项目
23 | npm run build
24 | 打包前注意将node_modules\moment\locale\目录下除zh-cn.js的文件全部删除,否则打包后文件将会很大
25 |
26 | # 运行测试
27 | npm run unit
28 | ```
29 |
30 | ## manifest 缓存
31 |
32 | > 为了让前端飞,我们还需要进行manifest缓存。示例文件为web.manifest,通过设定甚至可以进行整站缓存,如果需要使用该设定,请记住每次代码更新的同时也需要修改一下该文件避免加载出错。
33 |
34 | ## 引入
35 |
36 | - [Bulma](https://github.com/jgthms/bulma)
37 | - [Vue](http://vuejs.org/)
38 | - [vuex](http://vuex.vuejs.org)
39 | - [vue-router](http://router.vuejs.org)
40 | - [vue-resource](https://github.com/vuejs/vue-resource)
41 |
42 | ## 特别提示
43 |
44 | > 本项目构建中已使用eslint,力求代码排版标准化方便阅读,建议不要在设置里取消该设定。
45 | > 本项目不含jQuery库,原因可参考pagination组件,通过vue仅使用一行代码即实现了复杂的分页页码处理,vue强大的数据驱动模型带来了全新的前端设计方式。
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | // https://github.com/shelljs/shelljs
2 | require('shelljs/global')
3 | env.NODE_ENV = 'production'
4 |
5 | var path = require('path')
6 | var config = require('../config')
7 | var ora = require('ora')
8 | var webpack = require('webpack')
9 | var webpackConfig = require('./webpack.prod.conf')
10 |
11 | console.log(
12 | ' Tip:\n' +
13 | ' Built files are meant to be served over an HTTP server.\n' +
14 | ' Opening index.html over file:// won\'t work.\n'
15 | )
16 |
17 | var spinner = ora('building for production...')
18 | spinner.start()
19 |
20 | var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
21 | rm('-rf', assetsPath)
22 | mkdir('-p', assetsPath)
23 | cp('-R', 'static/', assetsPath)
24 |
25 | webpack(webpackConfig, function (err, stats) {
26 | spinner.stop()
27 | if (err) throw err
28 | process.stdout.write(stats.toString({
29 | colors: true,
30 | modules: false,
31 | children: false,
32 | chunks: false,
33 | chunkModules: false
34 | }) + '\n')
35 | })
36 |
--------------------------------------------------------------------------------
/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | require('eventsource-polyfill')
3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 |
5 | hotClient.subscribe(function (event) {
6 | if (event.action === 'reload') {
7 | window.location.reload()
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/build/dev-server.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var express = require('express')
3 | var webpack = require('webpack')
4 | var config = require('../config')
5 | var proxyMiddleware = require('http-proxy-middleware')
6 | var webpackConfig = process.env.NODE_ENV === 'testing'
7 | ? require('./webpack.prod.conf')
8 | : require('./webpack.dev.conf')
9 |
10 | // default port where dev server listens for incoming traffic
11 | var port = process.env.PORT || config.dev.port
12 | // Define HTTP proxies to your custom API backend
13 | // https://github.com/chimurai/http-proxy-middleware
14 | var proxyTable = config.dev.proxyTable
15 |
16 | var app = express()
17 | var compiler = webpack(webpackConfig)
18 |
19 | var devMiddleware = require('webpack-dev-middleware')(compiler, {
20 | publicPath: webpackConfig.output.publicPath,
21 | stats: {
22 | colors: true,
23 | chunks: false
24 | }
25 | })
26 |
27 | var hotMiddleware = require('webpack-hot-middleware')(compiler)
28 | // force page reload when html-webpack-plugin template changes
29 | compiler.plugin('compilation', function (compilation) {
30 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
31 | hotMiddleware.publish({ action: 'reload' })
32 | cb()
33 | })
34 | })
35 |
36 | // proxy api requests
37 | Object.keys(proxyTable).forEach(function (context) {
38 | var options = proxyTable[context]
39 | if (typeof options === 'string') {
40 | options = { target: options }
41 | }
42 | app.use(proxyMiddleware(context, options))
43 | })
44 |
45 | // handle fallback for HTML5 history API
46 | app.use(require('connect-history-api-fallback')())
47 |
48 | // serve webpack bundle output
49 | app.use(devMiddleware)
50 |
51 | // enable hot-reload and state-preserving
52 | // compilation error display
53 | app.use(hotMiddleware)
54 |
55 | // serve pure static assets
56 | var staticPath = path.posix.join(config.build.assetsPublicPath, config.build.assetsSubDirectory)
57 | app.use(staticPath, express.static('./static'))
58 |
59 | module.exports = app.listen(port, function (err) {
60 | if (err) {
61 | console.log(err)
62 | return
63 | }
64 | console.log('Listening at http://localhost:' + port + '\n')
65 | })
66 |
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
4 |
5 | exports.assetsPath = function (_path) {
6 | return path.posix.join(config.build.assetsSubDirectory, _path)
7 | }
8 |
9 | exports.cssLoaders = function (options) {
10 | options = options || {}
11 | // generate loader string to be used with extract text plugin
12 | function generateLoaders (loaders) {
13 | var sourceLoader = loaders.map(function (loader) {
14 | var extraParamChar
15 | if (/\?/.test(loader)) {
16 | loader = loader.replace(/\?/, '-loader?')
17 | extraParamChar = '&'
18 | } else {
19 | loader = loader + '-loader'
20 | extraParamChar = '?'
21 | }
22 | return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
23 | }).join('!')
24 |
25 | if (options.extract) {
26 | return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
27 | } else {
28 | return ['vue-style-loader', sourceLoader].join('!')
29 | }
30 | }
31 |
32 | // http://vuejs.github.io/vue-loader/configurations/extract-css.html
33 | return {
34 | css: generateLoaders(['css']),
35 | postcss: generateLoaders(['css']),
36 | less: generateLoaders(['css', 'less']),
37 | sass: generateLoaders(['css', 'sass?indentedSyntax']),
38 | scss: generateLoaders(['css', 'sass']),
39 | stylus: generateLoaders(['css', 'stylus']),
40 | styl: generateLoaders(['css', 'stylus'])
41 | }
42 | }
43 |
44 | // Generate loaders for standalone style files (outside of .vue)
45 | exports.styleLoaders = function (options) {
46 | var output = []
47 | var loaders = exports.cssLoaders(options)
48 | for (var extension in loaders) {
49 | var loader = loaders[extension]
50 | output.push({
51 | test: new RegExp('\\.' + extension + '$'),
52 | loader: loader
53 | })
54 | }
55 | return output
56 | }
57 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var utils = require('./utils')
4 | var projectRoot = path.resolve(__dirname, '../')
5 |
6 | module.exports = {
7 | entry: {
8 | app: './src/main.js'
9 | },
10 | output: {
11 | path: config.build.assetsRoot,
12 | publicPath: config.build.assetsPublicPath,
13 | filename: '[name].js'
14 | },
15 | resolve: {
16 | extensions: ['', '.js', '.vue'],
17 | fallback: [path.join(__dirname, '../node_modules')],
18 | alias: {
19 | 'src': path.resolve(__dirname, '../src'),
20 | 'assets': path.resolve(__dirname, '../src/assets'),
21 | 'components': path.resolve(__dirname, '../src/components')
22 | }
23 | },
24 | resolveLoader: {
25 | fallback: [path.join(__dirname, '../node_modules')]
26 | },
27 | module: {
28 | preLoaders: [
29 | {
30 | test: /\.vue$/,
31 | loader: 'eslint',
32 | include: projectRoot,
33 | exclude: /node_modules/
34 | },
35 | {
36 | test: /\.js$/,
37 | loader: 'eslint',
38 | include: projectRoot,
39 | exclude: /node_modules/
40 | }
41 | ],
42 | loaders: [
43 | {
44 | test: /\.vue$/,
45 | loader: 'vue'
46 | },
47 | {
48 | test: /\.js$/,
49 | loader: 'babel',
50 | include: projectRoot,
51 | exclude: /node_modules/
52 | },
53 | {
54 | test: /\.json$/,
55 | loader: 'json'
56 | },
57 | {
58 | test: /\.html$/,
59 | loader: 'vue-html'
60 | },
61 | {
62 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
63 | loader: 'url',
64 | query: {
65 | limit: 10000,
66 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
67 | }
68 | },
69 | {
70 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
71 | loader: 'url',
72 | query: {
73 | limit: 10000,
74 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
75 | }
76 | }
77 | ]
78 | },
79 | eslint: {
80 | formatter: require('eslint-friendly-formatter')
81 | },
82 | vue: {
83 | loaders: utils.cssLoaders()
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var config = require('../config')
2 | var webpack = require('webpack')
3 | var merge = require('webpack-merge')
4 | var utils = require('./utils')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | var HtmlWebpackPlugin = require('html-webpack-plugin')
7 |
8 | // add hot-reload related code to entry chunks
9 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
10 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
11 | })
12 |
13 | module.exports = merge(baseWebpackConfig, {
14 | module: {
15 | loaders: utils.styleLoaders()
16 | },
17 | // eval-source-map is faster for development
18 | devtool: '#eval-source-map',
19 | plugins: [
20 | new webpack.DefinePlugin({
21 | 'process.env': config.dev.env
22 | }),
23 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
24 | new webpack.optimize.OccurenceOrderPlugin(),
25 | new webpack.HotModuleReplacementPlugin(),
26 | new webpack.NoErrorsPlugin(),
27 | // https://github.com/ampedandwired/html-webpack-plugin
28 | new HtmlWebpackPlugin({
29 | filename: 'index.html',
30 | template: 'index.html',
31 | inject: true
32 | })
33 | ]
34 | })
35 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var utils = require('./utils')
4 | var webpack = require('webpack')
5 | var merge = require('webpack-merge')
6 | var baseWebpackConfig = require('./webpack.base.conf')
7 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
8 | var HtmlWebpackPlugin = require('html-webpack-plugin')
9 | var env = process.env.NODE_ENV === 'testing'
10 | ? require('../config/test.env')
11 | : config.build.env
12 |
13 | var webpackConfig = merge(baseWebpackConfig, {
14 | module: {
15 | loaders: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true })
16 | },
17 | devtool: config.build.productionSourceMap ? '#source-map' : false,
18 | output: {
19 | path: config.build.assetsRoot,
20 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
21 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
22 | },
23 | vue: {
24 | loaders: utils.cssLoaders({
25 | sourceMap: config.build.productionSourceMap,
26 | extract: true
27 | })
28 | },
29 | plugins: [
30 | // http://vuejs.github.io/vue-loader/workflow/production.html
31 | new webpack.DefinePlugin({
32 | 'process.env': env
33 | }),
34 | new webpack.optimize.UglifyJsPlugin({
35 | compress: {
36 | warnings: false
37 | }
38 | }),
39 | new webpack.optimize.OccurenceOrderPlugin(),
40 | // extract css into its own file
41 | new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')),
42 | // generate dist index.html with correct asset hash for caching.
43 | // you can customize output by editing /index.html
44 | // see https://github.com/ampedandwired/html-webpack-plugin
45 | new HtmlWebpackPlugin({
46 | filename: process.env.NODE_ENV === 'testing'
47 | ? 'index.html'
48 | : config.build.index,
49 | template: 'index.html',
50 | inject: true,
51 | minify: {
52 | removeComments: true,
53 | collapseWhitespace: true,
54 | removeAttributeQuotes: true
55 | // more options:
56 | // https://github.com/kangax/html-minifier#options-quick-reference
57 | },
58 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
59 | chunksSortMode: 'dependency'
60 | }),
61 | // split vendor js into its own file
62 | new webpack.optimize.CommonsChunkPlugin({
63 | name: 'vendor',
64 | minChunks: function (module, count) {
65 | // any required modules inside node_modules are extracted to vendor
66 | return (
67 | module.resource &&
68 | /\.js$/.test(module.resource) &&
69 | module.resource.indexOf(
70 | path.join(__dirname, '../node_modules')
71 | ) === 0
72 | )
73 | }
74 | }),
75 | // extract webpack runtime and module manifest to its own file in order to
76 | // prevent vendor hash from being updated whenever app bundle is updated
77 | new webpack.optimize.CommonsChunkPlugin({
78 | name: 'manifest',
79 | chunks: ['vendor']
80 | })
81 | ]
82 | })
83 |
84 | if (config.build.productionGzip) {
85 | var CompressionWebpackPlugin = require('compression-webpack-plugin')
86 |
87 | webpackConfig.plugins.push(
88 | new CompressionWebpackPlugin({
89 | asset: '[path].gz[query]',
90 | algorithm: 'gzip',
91 | test: new RegExp(
92 | '\\.(' +
93 | config.build.productionGzipExtensions.join('|') +
94 | ')$'
95 | ),
96 | threshold: 10240,
97 | minRatio: 0.8
98 | })
99 | )
100 | }
101 |
102 | module.exports = webpackConfig
103 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../dist/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../dist'),
9 | assetsSubDirectory: 'static',
10 | assetsPublicPath: '/',
11 | // 默认生成map,这里取消
12 | productionSourceMap: false,
13 | // Gzip off by default as many popular static hosts such as
14 | // Surge or Netlify already gzip all static assets for you.
15 | // Before setting to `true`, make sure to:
16 | // npm install --save-dev compression-webpack-plugin
17 | // 此处意义不大,web server自带了gzip压缩能力
18 | productionGzip: false,
19 | productionGzipExtensions: ['js', 'css']
20 | },
21 | dev: {
22 | env: require('./dev.env'),
23 | port: 8080,
24 | proxyTable: {}
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/config/test.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var devEnv = require('./dev.env')
3 |
4 | module.exports = merge(devEnv, {
5 | NODE_ENV: '"testing"'
6 | })
7 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 | 11 |
12 |页面君去火星了!
13 |John Smith
26 |@johnsmith
27 |<div class="card">
40 | <div class="card-image">
41 | <figure class="image is-4by3">
42 | <img src="http://placehold.it/300x225" alt="">
43 | </figure>
44 | </div>
45 | <div class="card-content">
46 | <div class="media">
47 | <div class="media-left">
48 | <figure class="image is-32x32">
49 | <img src="http://placehold.it/64x64" alt="Image">
50 | </figure>
51 | </div>
52 | <div class="media-content">
53 | <p class="title is-5">John Smith</p>
54 | <p class="subtitle is-6">@johnsmith</p>
55 | </div>
56 | </div>
57 |
58 | <div class="content">
59 | Lorem ipsum dolor sit amet, consectetur adipiscing elit.
60 | Phasellus nec iaculis mauris. <a href="#">@bulmaio</a>.
61 | <a href="#">#css</a> <a href="#">#responsive</a>
62 | <br>
63 | <small>11:09 PM - 1 Jan 2016</small>
64 | </div>
65 | </div>
66 | </div>
77 | Component 78 |
79 | 80 | 81 | 82 |<div class="card is-fullwidth">
99 | <header class="card-header">
100 | <p class="card-header-title">
101 | Component
102 | </p>
103 | <a class="card-header-icon">
104 | <i class="fa fa-angle-down"></i>
105 | </a>
106 | </header>
107 | <div class="card-content">
108 | <div class="content">
109 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. <a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
110 | <br>
111 | <small>11:09 PM - 1 Jan 2016</small>
112 | </div>
113 | </div>
114 | <footer class="card-footer">
115 | <a class="card-footer-item">Save</a>
116 | <a class="card-footer-item">Edit</a>
117 | <a class="card-footer-item">Delete</a>
118 | </footer>
119 | </div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
9 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
10 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
11 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
14 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
15 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
16 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
19 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
20 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
21 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
28 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
29 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
30 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
33 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
34 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
35 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
38 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
39 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
40 |When you can't use the CSS classes you want, or when you just want to directly use HTML tags, use content
as container. It can handle almost any HTML tag:
<p>
paragraphs<ul> <ol> <dl>
lists<h1>
to <h6>
headings<blockquotes>
quotes<em>
and <strong>
<table> <tr> <th> <td>
tablesThis content
class can be used in any, whenever you just want to write some text. For example, it's used for the paragraph you're currently reading.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.
28 |Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.
30 |Quisque ante lacus, malesuada ac auctor vitae, congue non ante. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum tellus.
38 |Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet turpis.48 |
Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et justo sodales elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.
49 |Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas vestibulum interdum commodo.
50 |Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis malesuada nulla. Nulla facilisi. Nullam ac erat ante.
51 |Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at elementum ex efficitur.
53 |Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.
54 |Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus non pellentesque.
55 |Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.
57 |Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.
59 | 60 |<div class="content">
64 | <h1>Hello World</h1>
65 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.</p>
66 | <h2>Second level</h2>
67 | <p>Curabitur accumsan turpis pharetra <strong>augue tincidunt</strong> blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.</p>
68 | <ul>
69 | <li>In fermentum leo eu lectus mollis, quis dictum mi aliquet.</li>
70 | <li>Morbi eu nulla lobortis, lobortis est in, fringilla felis.</li>
71 | <li>Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.</li>
72 | <li>Ut non enim metus.</li>
73 | </ul>
74 | <h3>Third level</h3>
75 | <p>Quisque ante lacus, malesuada ac auctor vitae, congue <a href="#">non ante</a>. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum tellus.</p>
76 | <ol>
77 | <li>Donec blandit a lorem id convallis.</li>
78 | <li>Cras gravida arcu at diam gravida gravida.</li>
79 | <li>Integer in volutpat libero.</li>
80 | <li>Donec a diam tellus.</li>
81 | <li>Aenean nec tortor orci.</li>
82 | <li>Quisque aliquam cursus urna, non bibendum massa viverra eget.</li>
83 | <li>Vivamus maximus ultricies pulvinar.</li>
84 | </ol>
85 | <blockquote>Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet turpis.</blockquote>
86 | <p>Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et <em>justo sodales</em> elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.</p>
87 | <p>Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas vestibulum interdum commodo.</p>
88 | <p>Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis malesuada nulla. Nulla facilisi. Nullam ac erat ante.</p>
89 | <h4>Fourth level</h4>
90 | <p>Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at elementum ex efficitur.</p>
91 | <p>Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.</p>
92 | <p>Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus non pellentesque.</p>
93 | <h5>Fifth level</h5>
94 | <p>Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.</p>
95 | <h6>Sixth level</h6>
96 | <p>Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.</p>
97 | </ul>
98 | </div>
You can use the is-medium
and is-large
modifiers to change the font size.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.
110 |Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.
112 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.
124 |Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.
126 |Awesome Icons
9 | 10 | 11 |Because images can take a few seconds to load (or not at all), use the .image
container to specify a precisely sized container so that your layout isn't broken because of image loading or image errors.
<figure class="image is-128x128">
23 | <img src="http://placehold.it/128x128">
24 | </figure>
There are 7 dimensions to choose from, useful for avatars:
31 |image is-16x16 |
37 | 16x16px | 39 ||
image is-24x24 |
42 | 24x24px | 44 ||
image is-32x32 |
47 | 32x32px | 49 ||
image is-48x48 |
52 | 48x48px | 54 ||
image is-64x64 |
57 | 64x64px | 59 ||
image is-96x96 |
62 | 96x96px | 64 ||
image is-128x128 |
67 | 128x128px | 69 |
Because the image is fixed in size, you can use an image that is twice as big. So for example, in a 128x128
container, you can use a 256x256
image, but resized to 128x128 pixels.
<figure class="image is-128x128">
86 | <img src="http://placehold.it/256x256">
87 | </figure>
If you don't know the exact dimensions but know the ratio instead, you can use one of the 5 ratio modifers:
95 |image is-square |
101 | Square (or 1by1) | 103 ||
image is-1by1 |
106 | 1 by 1 | 108 ||
image is-4by3 |
111 | 4 by 3 | 113 ||
image is-3by2 |
116 | 3 by 2 | 118 ||
image is-16by9 |
121 | 16 by 9 | 123 ||
image is-2by1 |
126 | 2 by 1 | 128 |
The .image
container will take up the whole width while maintaining the perfect ratio.
Vue-Bulma
19 |轻量级高性能MVVM Admin UI框架
20 |偶然发现了bulma,自然语义定义的方式让人耳目一新,特别gzip后13.6k的size令人印象深刻,刚好基于vue+weui的移动端组件库demo已经接近完成,于是便抽空做了这套基于vue+bulma的轻量级UI。既然是后台管理UI,便可以任性的对IE无视,此处应有掌声。
21 |为简化部署及升级便利,UI处理上原则不变动bulma的基础设置,只增加差异化的部分,同时谈化各种切换效果,力求整个UI界面的小清新。
22 |Flex Layout
37 |弹性盒内滚动布局
38 |支持所有新一代浏览器,为获得最优的效果优先推荐使用最新版Chrome,本项目设计为PC端的管理后台使用。
39 |Vertical...
52 |Top tile
53 |...tiles
56 |Bottom tile
57 |Middle tile
62 |With an image
63 |Wide tile
72 |Aligned with the right tile
73 |Tall tile
83 |With even more content
84 |全局组件
99 |Modal、Toast、Preloader
100 |为了更方便的调用经常性组件,特别设计为全局组件,可处理多数场景,复杂的处理请自行添加入页面级组件
101 |缓存
116 |keep-alive dom cache、ajax data cache、manifest resource cache
117 |想让系统更加顺畅,缓存必不可少,vue-bulma中除了vue内置的keep-alive对dom进行缓存外,同时具备ajax的数据缓存机制。另外,还准备了manifest缓存指引,让前端飞起来。。。
118 |The structure of a level is the following:
11 |level
: main container
14 | level-left
for the left sidelevel-right
for the right side
18 | level-item
for each individual elementIn a level-item
, you can then insert almost anything you want: a title, a button, a text input, or just simple text. No matter what elements you put inside a Bulma level
, they will always be vertically centered.
<!-- Main container -->
107 | <nav class="level">
108 | <!-- Left side -->
109 | <div class="level-left">
110 | <div class="level-item">
111 | <p class="subtitle is-5">
112 | <strong>123</strong> posts
113 | </p>
114 | </div>
115 | <div class="level-item">
116 | <p class="control has-addons">
117 | <input class="input" type="text" placeholder="Find a post">
118 | <button class="button">
119 | Search
120 | </button>
121 | </p>
122 | </div>
123 | </div>
124 |
125 | <!-- Right side -->
126 | <div class="level-right">
127 | <p class="level-item"><strong>All</strong></p>
128 | <p class="level-item"><a>Published</a></p>
129 | <p class="level-item"><a>Drafts</a></p>
130 | <p class="level-item"><a>Deleted</a></p>
131 | <p class="level-item"><a class="button is-success">New</a></p>
132 | </div>
133 | </nav>
level-item
as you want, as long as they are direct children of the level
container.
140 | <nav class="level">
164 | <div class="level-item has-text-centered">
165 | <p class="heading">Tweets</p>
166 | <p class="title">3,456</p>
167 | </div>
168 | <div class="level-item has-text-centered">
169 | <p class="heading">Following</p>
170 | <p class="title">123</p>
171 | </div>
172 | <div class="level-item has-text-centered">
173 | <p class="heading">Followers</p>
174 | <p class="title">456K</p>
175 | </div>
176 | <div class="level-item has-text-centered">
177 | <p class="heading">Likes</p>
178 | <p class="title">789</p>
179 | </div>
180 | </nav>
<nav class="level">
203 | <p class="level-item has-text-centered">
204 | <a class="link is-info">Home</a>
205 | </p>
206 | <p class="level-item has-text-centered">
207 | <a class="link is-info">Menu</a>
208 | </p>
209 | <p class="level-item has-text-centered">
210 | <img src="http://bulma.io/images/bulma-type.png" alt="" style="height: 33px;">
211 | </p>
212 | <p class="level-item has-text-centered">
213 | <a class="link is-info">Reservations</a>
214 | </p>
215 | <p class="level-item has-text-centered">
216 | <a class="link is-info">Contact</a>
217 | </p>
218 | </nav>
is-mobile
modifier on the level
container.
224 | Modal
6 |全局Modal与定制Modal
7 |8 | Show Alert 9 | Show Confirm 10 | Show Custom Modal 11 | Custom Width 12 |
13 |Modal打开后浏览器前进后退试试
16 |17 | 全局alert 18 | 全局Confirm 19 |
20 | 21 | 22 |
28 |
13 | The nav
container can have 3 parts:
14 |
nav-left
nav-center
nav-right
21 | For responsiveness, 2 additional classes are available: 22 |
23 |nav-toggle
for the hamburger menu on mobilenav-menu
for menu that is collapsable on mobile (you can combine it with nav-right
)<nav class="nav">
86 | <div class="nav-left">
87 | <a class="nav-item is-brand" href="#">
88 | <img src="http://bulma.io/images/bulma-type.png" alt="Bulma logo">
89 | </a>
90 | </div>
91 |
92 | <div class="nav-center">
93 | <a class="nav-item" href="#">
94 | <span class="icon">
95 | <i class="fa fa-github"></i>
96 | </span>
97 | </a>
98 | <a class="nav-item" href="#">
99 | <span class="icon">
100 | <i class="fa fa-twitter"></i>
101 | </span>
102 | </a>
103 | </div>
104 |
105 | <span class="nav-toggle">
106 | <span></span>
107 | <span></span>
108 | <span></span>
109 | </span>
110 |
111 | <div class="nav-right nav-menu">
112 | <a class="nav-item" href="#">
113 | Home
114 | </a>
115 | <a class="nav-item" href="#">
116 | Documentation
117 | </a>
118 | <a class="nav-item" href="#">
119 | Blog
120 | </a>
121 |
122 | <span class="nav-item">
123 | <a class="button" >
124 | <span class="icon">
125 | <i class="fa fa-twitter"></i>
126 | </span>
127 | <span>Tweet</span>
128 | </a>
129 | <a class="button is-primary" href="#">
130 | <span class="icon">
131 | <i class="fa fa-download"></i>
132 | </span>
133 | <span>Download</span>
134 | </a>
135 | </span>
136 | </div>
137 | </nav>
nav
container can have a shadow by adding the has-shadow
modifiernav-item
can become active by adding the is-active
modifiernav-item
can become a tab by adding the is-tab
modifier<div class="notification">
41 | <button class="delete"></button>
42 | Lorem ipsum dolor sit amet, consectetur
43 | adipiscing elit lorem ipsum dolor sit amet,
44 | consectetur adipiscing elit
45 | </div>
46 |
47 | <div class="notification is-primary">
48 | <button class="delete"></button>
49 | Primar lorem ipsum dolor sit amet, consectetur
50 | adipiscing elit lorem ipsum dolor sit amet,
51 | consectetur adipiscing elit
52 | </div>
53 |
54 | <div class="notification is-info">
55 | <button class="delete"></button>
56 | Info lorem ipsum dolor sit amet, consectetur
57 | adipiscing elit lorem ipsum dolor sit amet,
58 | consectetur adipiscing elit
59 | </div>
60 |
61 | <div class="notification is-success">
62 | <button class="delete"></button>
63 | Success lorem ipsum dolor sit amet, consectetur
64 | adipiscing elit lorem ipsum dolor sit amet,
65 | consectetur adipiscing elit
66 | </div>
67 |
68 | <div class="notification is-warning">
69 | <button class="delete"></button>
70 | Warning lorem ipsum dolor sit amet, consectetur
71 | adipiscing elit lorem ipsum dolor sit amet,
72 | consectetur adipiscing elit
73 | </div>
74 |
75 | <div class="notification is-danger">
76 | <button class="delete"></button>
77 | Danger lorem ipsum dolor sit amet, consectetur
78 | adipiscing elit lorem ipsum dolor sit amet,
79 | consectetur adipiscing elit
80 | </div>
Pagination
6 |vue页码组件
7 |vue典型组件,从这个组件的设计中体现了与jquery的巨大不同,组件中只需要一行代码即可实现比较复杂的页码显示处理,使用了配置设定来代替代码驱动dom,彻底告别了乱糟糟的代码。
8 |<nav class="panel">
42 | <p class="panel-heading">
43 | Repositories
44 | </p>
45 | <p class="panel-tabs">
46 | <a class="is-active" href="#">All</a>
47 | <a href="#">Public</a>
48 | <a href="#">Private</a>
49 | <a href="#">Sources</a>
50 | <a href="#">Forks</a>
51 | </p>
52 | <a class="panel-block is-active" href="#">
53 | <span class="panel-icon">
54 | <i class="fa fa-book"></i>
55 | </span>
56 | bulma-website
57 | </a>
58 | <a class="panel-block" href="#">
59 | <span class="panel-icon">
60 | <i class="fa fa-book"></i>
61 | </span>
62 | bulma
63 | </a>
64 | <a class="panel-block" href="#">
65 | <span class="panel-icon">
66 | <i class="fa fa-book"></i>
67 | </span>
68 | marksheet
69 | </a>
70 | <a class="panel-block" href="#">
71 | <span class="panel-icon">
72 | <i class="fa fa-code-fork"></i>
73 | </span>
74 | daniellowtw/infBoard
75 | </a>
76 | <a class="panel-block" href="#">
77 | <span class="panel-icon">
78 | <i class="fa fa-book"></i>
79 | </span>
80 | jgthms.github.io
81 | </a>
82 | <a class="panel-block" href="#">
83 | <span class="panel-icon">
84 | <i class="fa fa-code-fork"></i>
85 | </span>
86 | mojs
87 | </a>
88 | <a class="panel-block" href="#">
89 | <span class="panel-icon">
90 | <i class="fa fa-book"></i>
91 | </span>
92 | grumpy-cat
93 | </a>
94 | <label class="panel-block">
95 | <input type="checkbox">
96 | Remember me
97 | </label>
98 | <div class="panel-block">
99 | <button class="button is-primary is-outlined is-fullwidth">
100 | Reset all filters
101 | </button>
102 | </div>
103 | </nav>
<progress class="progress" value="15" max="100">15%</progress>
29 | <progress class="progress is-primary" value="30" max="100">30%</progress>
30 | <progress class="progress is-info" value="45" max="100">45%</progress>
31 | <progress class="progress is-success" value="60" max="100">60%</progress>
32 | <progress class="progress is-warning" value="75" max="100">75%</progress>
33 | <progress class="progress is-danger" value="90" max="100">90%</progress>
<progress class="progress is-small" value="15" max="100">15%</progress>
44 | <progress class="progress" value="30" max="100">30%</progress>
45 | <progress class="progress is-medium" value="45" max="100">45%</progress>
46 | <progress class="progress is-large" value="60" max="100">60%</progress>
15 | | Open source projects | 16 |Year started | 17 |Links | 18 |||
---|---|---|---|---|---|
23 | | Open source projects | 24 |Year started | 25 |Links | 26 |||
31 | 32 | | 33 |34 | Android 35 | | 36 |37 | 2003 38 | | 39 |40 | 41 | 42 | 43 | | 44 |45 | 46 | 47 | 48 | | 49 |50 | 51 | 52 | 53 | | 54 |
57 | 58 | | 59 |60 | Firefox 61 | | 62 |63 | 2003 64 | | 65 |66 | 67 | 68 | 69 | | 70 |71 | 72 | 73 | 74 | | 75 |76 | 77 | 78 | 79 | | 80 |
83 | 84 | | 85 |86 | Linux 87 | | 88 |89 | 2003 90 | | 91 |92 | 93 | 94 | 95 | | 96 |97 | 98 | 99 | 100 | | 101 |102 | 103 | 104 | 105 | | 106 |
109 | 110 | | 111 |112 | WordPress 113 | | 114 |115 | 2003 116 | | 117 |118 | 119 | 120 | 121 | | 122 |123 | 124 | 125 | 126 | | 127 |128 | 129 | 130 | 131 | | 132 |
<table class="table">
138 | <thead>
139 | <tr>
140 | <th>Name</th>
141 | <th>Instrument</th>
142 | <th></th>
143 | <th></th>
144 | </tr>
145 | </thead>
146 | <tfoot>
147 | <tr>
148 | <th>Name</th>
149 | <th>Instrument</th>
150 | <th></th>
151 | <th></th>
152 | </tr>
153 | </tfoot>
154 | <tbody>
155 | <tr>
156 | <td>Misty Abbott</td>
157 | <td>Bass Guitar</td>
158 | <td class="is-icon">
159 | <a href="#">
160 | <i class="fa fa-twitter"></i>
161 | </a>
162 | </td>
163 | <td class="is-icon">
164 | <a href="#">
165 | <i class="fa fa-instagram"></i>
166 | </a>
167 | </td>
168 | </tr>
169 | <tr>
170 | <td>John Smith</td>
171 | <td>Rhythm Guitar</td>
172 | <td class="is-icon">
173 | <a href="#">
174 | <i class="fa fa-twitter"></i>
175 | </a>
176 | </td>
177 | <td class="is-icon">
178 | <a href="#">
179 | <i class="fa fa-instagram"></i>
180 | </a>
181 | </td>
182 | </tr>
183 | <tr>
184 | <td>Robert Mikels</td>
185 | <td>Lead Guitar</td>
186 | <td class="is-icon">
187 | <a href="#">
188 | <i class="fa fa-twitter"></i>
189 | </a>
190 | </td>
191 | <td class="is-icon">
192 | <a href="#">
193 | <i class="fa fa-instagram"></i>
194 | </a>
195 | </td>
196 | </tr>
197 | <tr>
198 | <td>Karyn Holmberg</td>
199 | <td>Drums</td>
200 | <td class="is-icon">
201 | <a href="#">
202 | <i class="fa fa-twitter"></i>
203 | </a>
204 | </td>
205 | <td class="is-icon">
206 | <a href="#">
207 | <i class="fa fa-instagram"></i>
208 | </a>
209 | </td>
210 | </tr>
211 | </tbody>
212 | </table>
Add borders to all the cells.
221 |table is-bordered
224 | One | 230 |Two | 231 |
---|---|
Three | 236 |Four | 237 |
Add stripes to the table.
246 |table is-striped
249 | One | 255 |Two | 256 |
---|---|
Three | 261 |Four | 262 |
Five | 265 |Six | 266 |
Seven | 269 |Eight | 270 |
Make the cells narrower.
279 |table is-narrow
282 | One | 288 |Two | 289 |
---|---|
Three | 294 |Four | 295 |
Five | 298 |Six | 299 |
Seven | 302 |Eight | 303 |
You can combine all three modifiers.
312 |table is-bordered is-striped is-narrow
315 | One | 321 |Two | 322 |
---|---|
Three | 327 |Four | 328 |
Five | 331 |Six | 332 |
Seven | 335 |Eight | 336 |
<span class="tag">
22 | Tag label
23 | </span>
33 | 34 | Dark 35 | 36 |
37 |38 | 39 | Primary 40 | 41 |
42 |43 | 44 | Info 45 | 46 |
47 |48 | 49 | Success 50 | 51 |
52 |53 | 54 | Warning 55 | 56 |
57 | 58 | Danger 59 | 60 |<span class="tag is-dark">Dark</span>
63 | <span class="tag is-primary">Primary</span>
64 | <span class="tag is-info">Info</span>
65 | <span class="tag is-success">Success</span>
66 | <span class="tag is-warning">Warning</span>
67 | <span class="tag is-danger">Danger</span>
77 | 78 | Small 79 | 80 |
81 |82 | 83 | Medium 84 | 85 |
86 |87 | 88 | Large 89 | 90 |
91 |<span class="tag is-dark is-small">Small</span>
94 | <span class="tag is-primary is-medium">Medium</span>
95 | <span class="tag is-info is-large">Large</span>
105 | 106 | Foo 107 | 108 | 109 |
110 |111 | 112 | Bar 113 | 114 | 115 |
116 |117 | 118 | Hello 119 | 120 | 121 |
122 |123 | 124 | World 125 | 126 | 127 |
128 |<span class="tag is-info is-small">
131 | Foo
132 | <button class="delete is-small"></button>
133 | </span>
134 | <span class="tag is-success">
135 | Bar
136 | <button class="delete is-small"></button>
137 | </span>
138 | <span class="tag is-warning is-medium">
139 | Hello
140 | <button class="delete is-small"></button>
141 | </span>
142 | <span class="tag is-danger is-large">
143 | World
144 | <button class="delete"></button>
145 | </span>
There are 2 types of heading:
12 |Title
15 |Subtitle
16 |<h1 class="title">Title</h1>
19 | <h2 class="subtitle">Subtitle</h2>
There are 6 sizes available:
26 |Title 1
29 |Title 2
30 |Title 3 (default size)
31 |Title 4
32 |Title 5
33 |Title 6
34 |<h1 class="title is-1">Title 1</h1>
37 | <h2 class="title is-2">Title 2</h2>
38 | <h3 class="title is-3">Title 3</h3>
39 | <h4 class="title is-4">Title 4</h4>
40 | <h5 class="title is-5">Title 5</h5>
41 | <h6 class="title is-6">Title 6</h6>
Subtitle 1
48 |Subtitle 2
49 |Subtitle 3
50 |Subtitle 4
51 |Subtitle 5 (default size)
52 |Subtitle 6
53 |<h1 class="subtitle is-1">Subtitle 1</h1>
56 | <h2 class="subtitle is-2">Subtitle 2</h2>
57 | <h3 class="subtitle is-3">Subtitle 3</h3>
58 | <h4 class="subtitle is-4">Subtitle 4</h4>
59 | <h5 class="subtitle is-5">Subtitle 5</h5>
60 | <h6 class="subtitle is-6">Subtitle 6</h6>
When you combine a title and a subtitle, they move closer together.
68 |As a rule of thumb, it is recommended to use a size difference of two. So if you use a title is-1
, combine it with a subtitle is-3
.
Title 1
74 |Subtitle 3
75 |Title 2
78 |Subtitle 4
79 |Title 3
82 |Subtitle 5
83 |<p class="title is-1">Title 1</p>
87 | <p class="subtitle is-3">Subtitle 3</p>
88 |
89 | <p class="title is-2">Title 2</p>
90 | <p class="subtitle is-4">Subtitle 4</p>
91 |
92 | <p class="title is-3">Title 3</p>
93 | <p class="subtitle is-5">Subtitle 5</p>