.
9 |
10 | .list-group {
11 | // No need to set list-style: none; since .list-group-item is block level
12 | margin-bottom: 20px;
13 | padding-left: 0; // reset padding because ul and ol
14 | }
15 |
16 |
17 | // Individual list items
18 | //
19 | // Use on `li`s or `div`s within the `.list-group` parent.
20 |
21 | .list-group-item {
22 | position: relative;
23 | display: block;
24 | padding: 10px 15px;
25 | // Place the border on the list items and negative margin up for better styling
26 | margin-bottom: -1px;
27 | background-color: $list-group-bg;
28 | border: 1px solid $list-group-border;
29 |
30 | // Round the first and last items
31 | &:first-child {
32 | @include border-top-radius($list-group-border-radius);
33 | }
34 | &:last-child {
35 | margin-bottom: 0;
36 | @include border-bottom-radius($list-group-border-radius);
37 | }
38 | }
39 |
40 |
41 | // Interactive list items
42 | //
43 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
44 | // Includes an extra `.active` modifier class for showing selected items.
45 |
46 | a.list-group-item,
47 | button.list-group-item {
48 | color: $list-group-link-color;
49 |
50 | .list-group-item-heading {
51 | color: $list-group-link-heading-color;
52 | }
53 |
54 | // Hover state
55 | &:hover,
56 | &:focus {
57 | text-decoration: none;
58 | color: $list-group-link-hover-color;
59 | background-color: $list-group-hover-bg;
60 | }
61 | }
62 |
63 | button.list-group-item {
64 | width: 100%;
65 | text-align: left;
66 | }
67 |
68 | .list-group-item {
69 | // Disabled state
70 | &.disabled,
71 | &.disabled:hover,
72 | &.disabled:focus {
73 | background-color: $list-group-disabled-bg;
74 | color: $list-group-disabled-color;
75 | cursor: $cursor-disabled;
76 |
77 | // Force color to inherit for custom content
78 | .list-group-item-heading {
79 | color: inherit;
80 | }
81 | .list-group-item-text {
82 | color: $list-group-disabled-text-color;
83 | }
84 | }
85 |
86 | // Active class on item itself, not parent
87 | &.active,
88 | &.active:hover,
89 | &.active:focus {
90 | z-index: 2; // Place active items above their siblings for proper border styling
91 | color: $list-group-active-color;
92 | background-color: $list-group-active-bg;
93 | border-color: $list-group-active-border;
94 |
95 | // Force color to inherit for custom content
96 | .list-group-item-heading,
97 | .list-group-item-heading > small,
98 | .list-group-item-heading > .small {
99 | color: inherit;
100 | }
101 | .list-group-item-text {
102 | color: $list-group-active-text-color;
103 | }
104 | }
105 | }
106 |
107 |
108 | // Contextual variants
109 | //
110 | // Add modifier classes to change text and background color on individual items.
111 | // Organizationally, this must come after the `:hover` states.
112 |
113 | @include list-group-item-variant(success, $state-success-bg, $state-success-text);
114 | @include list-group-item-variant(info, $state-info-bg, $state-info-text);
115 | @include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
116 | @include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
117 |
118 |
119 | // Custom content options
120 | //
121 | // Extra classes for creating well-formatted content within `.list-group-item`s.
122 |
123 | .list-group-item-heading {
124 | margin-top: 0;
125 | margin-bottom: 5px;
126 | }
127 | .list-group-item-text {
128 | margin-bottom: 0;
129 | line-height: 1.3;
130 | }
131 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_scaffolding.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Scaffolding
3 | // --------------------------------------------------
4 |
5 |
6 | // Reset the box-sizing
7 | //
8 | // Heads up! This reset may cause conflicts with some third-party widgets.
9 | // For recommendations on resolving such conflicts, see
10 | // http://getbootstrap.com/getting-started/#third-box-sizing
11 | * {
12 | @include box-sizing(border-box);
13 | }
14 | *:before,
15 | *:after {
16 | @include box-sizing(border-box);
17 | }
18 |
19 |
20 | // Body reset
21 |
22 | html {
23 | font-size: 10px;
24 | -webkit-tap-highlight-color: rgba(0,0,0,0);
25 | }
26 |
27 | body {
28 | font-family: $font-family-base;
29 | font-size: $font-size-base;
30 | line-height: $line-height-base;
31 | color: $text-color;
32 | background-color: $body-bg;
33 | }
34 |
35 | // Reset fonts for relevant elements
36 | input,
37 | button,
38 | select,
39 | textarea {
40 | font-family: inherit;
41 | font-size: inherit;
42 | line-height: inherit;
43 | }
44 |
45 |
46 | // Links
47 |
48 | a {
49 | color: $link-color;
50 | text-decoration: none;
51 |
52 | &:hover,
53 | &:focus {
54 | color: $link-hover-color;
55 | text-decoration: $link-hover-decoration;
56 | }
57 |
58 | &:focus {
59 | @include tab-focus;
60 | }
61 | }
62 |
63 |
64 | // Figures
65 | //
66 | // We reset this here because previously Normalize had no `figure` margins. This
67 | // ensures we don't break anyone's use of the element.
68 |
69 | figure {
70 | margin: 0;
71 | }
72 |
73 |
74 | // Images
75 |
76 | img {
77 | vertical-align: middle;
78 | }
79 |
80 | // Responsive images (ensure images don't scale beyond their parents)
81 | .img-responsive {
82 | @include img-responsive;
83 | }
84 |
85 | // Rounded corners
86 | .img-rounded {
87 | border-radius: $border-radius-large;
88 | }
89 |
90 | // Image thumbnails
91 | //
92 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
93 | .img-thumbnail {
94 | padding: $thumbnail-padding;
95 | line-height: $line-height-base;
96 | background-color: $thumbnail-bg;
97 | border: 1px solid $thumbnail-border;
98 | border-radius: $thumbnail-border-radius;
99 | @include transition(all .2s ease-in-out);
100 |
101 | // Keep them at most 100% wide
102 | @include img-responsive(inline-block);
103 | }
104 |
105 | // Perfect circle
106 | .img-circle {
107 | border-radius: 50%; // set radius in percents
108 | }
109 |
110 |
111 | // Horizontal rules
112 |
113 | hr {
114 | margin-top: $line-height-computed;
115 | margin-bottom: $line-height-computed;
116 | border: 0;
117 | border-top: 1px solid $hr-border;
118 | }
119 |
120 |
121 | // Only display content to screen readers
122 | //
123 | // See: http://a11yproject.com/posts/how-to-hide-content
124 |
125 | .sr-only {
126 | position: absolute;
127 | width: 1px;
128 | height: 1px;
129 | margin: -1px;
130 | padding: 0;
131 | overflow: hidden;
132 | clip: rect(0,0,0,0);
133 | border: 0;
134 | }
135 |
136 | // Use in conjunction with .sr-only to only display content when it's focused.
137 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138 | // Credit: HTML5 Boilerplate
139 |
140 | .sr-only-focusable {
141 | &:active,
142 | &:focus {
143 | position: static;
144 | width: auto;
145 | height: auto;
146 | margin: 0;
147 | overflow: visible;
148 | clip: auto;
149 | }
150 | }
151 |
152 |
153 | // iOS "clickable elements" fix for role="button"
154 | //
155 | // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
156 | // for traditionally non-focusable elements with role="button"
157 | // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
158 |
159 | [role="button"] {
160 | cursor: pointer;
161 | }
162 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_popovers.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Popovers
3 | // --------------------------------------------------
4 |
5 |
6 | .popover {
7 | position: absolute;
8 | top: 0;
9 | left: 0;
10 | z-index: $zindex-popover;
11 | display: none;
12 | max-width: $popover-max-width;
13 | padding: 1px;
14 | // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
15 | // So reset our font and text properties to avoid inheriting weird values.
16 | @include reset-text;
17 | font-size: $font-size-base;
18 |
19 | background-color: $popover-bg;
20 | background-clip: padding-box;
21 | border: 1px solid $popover-fallback-border-color;
22 | border: 1px solid $popover-border-color;
23 | border-radius: $border-radius-large;
24 | @include box-shadow(0 5px 10px rgba(0,0,0,.2));
25 |
26 | // Offset the popover to account for the popover arrow
27 | &.top { margin-top: -$popover-arrow-width; }
28 | &.right { margin-left: $popover-arrow-width; }
29 | &.bottom { margin-top: $popover-arrow-width; }
30 | &.left { margin-left: -$popover-arrow-width; }
31 | }
32 |
33 | .popover-title {
34 | margin: 0; // reset heading margin
35 | padding: 8px 14px;
36 | font-size: $font-size-base;
37 | background-color: $popover-title-bg;
38 | border-bottom: 1px solid darken($popover-title-bg, 5%);
39 | border-radius: ($border-radius-large - 1) ($border-radius-large - 1) 0 0;
40 | }
41 |
42 | .popover-content {
43 | padding: 9px 14px;
44 | }
45 |
46 | // Arrows
47 | //
48 | // .arrow is outer, .arrow:after is inner
49 |
50 | .popover > .arrow {
51 | &,
52 | &:after {
53 | position: absolute;
54 | display: block;
55 | width: 0;
56 | height: 0;
57 | border-color: transparent;
58 | border-style: solid;
59 | }
60 | }
61 | .popover > .arrow {
62 | border-width: $popover-arrow-outer-width;
63 | }
64 | .popover > .arrow:after {
65 | border-width: $popover-arrow-width;
66 | content: "";
67 | }
68 |
69 | .popover {
70 | &.top > .arrow {
71 | left: 50%;
72 | margin-left: -$popover-arrow-outer-width;
73 | border-bottom-width: 0;
74 | border-top-color: $popover-arrow-outer-fallback-color; // IE8 fallback
75 | border-top-color: $popover-arrow-outer-color;
76 | bottom: -$popover-arrow-outer-width;
77 | &:after {
78 | content: " ";
79 | bottom: 1px;
80 | margin-left: -$popover-arrow-width;
81 | border-bottom-width: 0;
82 | border-top-color: $popover-arrow-color;
83 | }
84 | }
85 | &.right > .arrow {
86 | top: 50%;
87 | left: -$popover-arrow-outer-width;
88 | margin-top: -$popover-arrow-outer-width;
89 | border-left-width: 0;
90 | border-right-color: $popover-arrow-outer-fallback-color; // IE8 fallback
91 | border-right-color: $popover-arrow-outer-color;
92 | &:after {
93 | content: " ";
94 | left: 1px;
95 | bottom: -$popover-arrow-width;
96 | border-left-width: 0;
97 | border-right-color: $popover-arrow-color;
98 | }
99 | }
100 | &.bottom > .arrow {
101 | left: 50%;
102 | margin-left: -$popover-arrow-outer-width;
103 | border-top-width: 0;
104 | border-bottom-color: $popover-arrow-outer-fallback-color; // IE8 fallback
105 | border-bottom-color: $popover-arrow-outer-color;
106 | top: -$popover-arrow-outer-width;
107 | &:after {
108 | content: " ";
109 | top: 1px;
110 | margin-left: -$popover-arrow-width;
111 | border-top-width: 0;
112 | border-bottom-color: $popover-arrow-color;
113 | }
114 | }
115 |
116 | &.left > .arrow {
117 | top: 50%;
118 | right: -$popover-arrow-outer-width;
119 | margin-top: -$popover-arrow-outer-width;
120 | border-right-width: 0;
121 | border-left-color: $popover-arrow-outer-fallback-color; // IE8 fallback
122 | border-left-color: $popover-arrow-outer-color;
123 | &:after {
124 | content: " ";
125 | right: 1px;
126 | border-right-width: 0;
127 | border-left-color: $popover-arrow-color;
128 | bottom: -$popover-arrow-width;
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/src/components/admin/article/CommentManage.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 | {{scope.row.time|date}}
12 |
13 |
14 |
15 |
16 |
17 |
18 | 查看
23 | 删除
28 |
29 |
30 |
43 |
44 |
45 |
46 |
47 |
104 |
105 |
--------------------------------------------------------------------------------
/server/routes/upload.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var path = require('path');
3 | var fs = require('fs');
4 | var formidable = require("formidable");
5 | var router = express.Router();
6 |
7 | // 引入七牛模块
8 | var qiniu = require("qiniu");
9 | var bucket = 'kkslide'; //要上传的空间名
10 | var imageUrl = 'http://example.kkslide.fun/'; // 域名名称
11 | var accessKey = 'FqmlgBwy5Y8JLxmW7ZKtVwiKPnX_piGG1fdb52Yk';
12 | var secretKey = 'bo9whWlbwjd60aYQk5JzBYLOPtPmEyMx10ajEztK';
13 | var mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
14 |
15 | var options = {
16 | scope: bucket,
17 | expires: 9999999999
18 | };
19 | var putPolicy = new qiniu.rs.PutPolicy(options);
20 | var uploadToken = putPolicy.uploadToken(mac);
21 | console.log('putPolicy------', putPolicy);
22 | console.log('*************************************************');
23 | console.log('uploadToken------', uploadToken);
24 |
25 | var config = new qiniu.conf.Config();
26 | config.zone = qiniu.zone.Zone_z0; // 华东地区服务器
27 | console.log('*************************************************');
28 | console.log(config);
29 | // *****以上的配置该有都有了***************************************************
30 | // 图片上传
31 | router.post('/upload', function (req, res, next) {
32 | var form = new formidable.IncomingForm()
33 | form.uploadDir = "./upload";
34 | form.keepExtentsions = true;
35 | form.parse(req, function (err, fields, files) {
36 | console.log('fields---',fields); // 空
37 | console.log('files---',files); // 有货
38 | console.log('------------------------------------------------------------------');
39 |
40 | // var fileName = files.file.path.split(path.sep).pop();
41 | // var localFile = files.file.path;
42 | var fileName = Object.values(files)[0].path.split(path.sep).pop();
43 | var localFile = Object.values(files)[0].path;
44 | var formUploader = new qiniu.form_up.FormUploader(config);
45 | var putExtra = new qiniu.form_up.PutExtra();
46 | var key = fileName;
47 |
48 | // 文件上传
49 | formUploader.putFile(uploadToken, key, localFile, putExtra, function (respErr, respBody, respInfo) {
50 | if (respErr) {
51 | res.end(JSON.stringify({ status: '-1', msg: '上传失败', error: respErr }));
52 | }
53 | if (respInfo.statusCode == 200) {
54 | var imageSrc = imageUrl + respBody.key;
55 | res.end(JSON.stringify({ status: '200', msg: '上传成功', imageUrl: imageSrc }));
56 | console.log(respBody);
57 | } else {
58 | res.end(JSON.stringify({ status: '-1', msg: '上传失败', error: JSON.stringify(respBody) }));
59 | }
60 | // 上传之后删除本地文件
61 | fs.unlinkSync(localFile);
62 | });
63 |
64 | /*
65 | fs.writeFile(filePath, dataBuffer, function (err) {
66 | if (err) {
67 | res.end(JSON.stringify({ status: '102', msg: '文件写入失败' }));
68 | } else {
69 |
70 | var localFile = filePath;
71 | var formUploader = new qiniu.form_up.FormUploader(config);
72 | var putExtra = new qiniu.form_up.PutExtra();
73 | var key = fileName;
74 |
75 | // 文件上传
76 | formUploader.putFile(uploadToken, key, localFile, putExtra, function (respErr, respBody, respInfo) {
77 | if (respErr) {
78 | res.end(JSON.stringify({ status: '-1', msg: '上传失败', error: respErr }));
79 | }
80 | if (respInfo.statusCode == 200) {
81 | var imageSrc = imageUrl + respBody.key;
82 | res.end(JSON.stringify({ status: '200', msg: '上传成功', imageUrl: imageSrc }));
83 | } else {
84 | res.end(JSON.stringify({ status: '-1', msg: '上传失败', error: JSON.stringify(respBody) }));
85 | }
86 | // 上传之后删除本地文件
87 | fs.unlinkSync(filePath);
88 | });
89 | }
90 | });
91 | */
92 | });
93 |
94 | });
95 |
96 | module.exports = router;
97 |
--------------------------------------------------------------------------------
/src/components/client/AboutMeComponent/About.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
{{$t("navbar.About")}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
33 |
34 |
Next Movement
35 |
36 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
81 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | // import Vue from 'vue'
2 | // import Router from 'vue-router'
3 | import AdminComponent from '@/components/admin/index.vue'
4 |
5 | /* ********* 管理端 ********** */
6 | import AdmHomeComponent from '@/components/admin/home/Home.vue'
7 | import UserManageComponent from '@/components/admin/user/UserManage.vue'
8 | import CategoryManageComponent from '@/components/admin/category/CategoryManage.vue'
9 | import ArticleManageComponent from '@/components/admin/article/ArticleManage.vue'
10 | import MassageManageComponent from '@/components/admin/massage/MassageManagement.vue'
11 | import LoginComponent from '@/components/admin/login/Login'
12 | /* ********* 管理端 ********** */
13 |
14 |
15 | /* ********* 前端 ********** */
16 | import HomeComponent from '../components/client/Home' // 首页
17 | import BlogComponent from '../components/client/BlogListComponent/BlogList.vue' // 博客列表页面
18 | import VideoListComponent from '../components/client/VideoListComponent/VideoList.vue' // vlog列表页
19 | import ContentComponent from '../components/client/ContentComponent/BlogContent.vue' // 内容详情页
20 | import AboutComponent from '../components/client/AboutMeComponent/About.vue' // '关于我'页面
21 | import WorksComponent from '../components/client/WorksComponent/Works.vue' // 代码列表页面
22 | import ContactComponent from '../components/client/ContactComponent/Contact.vue' // '联系我'页面
23 | /* ********* 前端 ********** */
24 |
25 | // import CameraComponent from '../components/other/Camera.vue' // 测试单图上传组件
26 |
27 | // import test from '../test/test2.vue'
28 |
29 |
30 | // export default new Router({
31 | export default new VueRouter({
32 | // mode:'history',
33 | routes: [
34 | {
35 | path: '/',
36 | name: 'home',
37 | component: HomeComponent,
38 | },
39 | // {
40 | // path: '/test',
41 | // name: 'test',
42 | // component: test
43 | // },
44 | {
45 | path: '/blog',
46 | name: 'blog',
47 | component: BlogComponent
48 | },
49 | {
50 | path: '/vlog',
51 | name: 'vlog',
52 | component: VideoListComponent
53 | },
54 | {
55 | path: '/logcontent/:contentid',
56 | name: 'logcontent',
57 | component: ContentComponent
58 | },
59 | {
60 | path: '/about',
61 | name: 'about',
62 | component: AboutComponent
63 | },
64 | {
65 | path: '/works',
66 | name: 'works',
67 | component: WorksComponent
68 | },
69 | {
70 | path: '/contact',
71 | name: 'contact',
72 | component: ContactComponent
73 | },
74 | // 后台管理页登陆页面
75 | {
76 | path: '/login',
77 | name: 'login',
78 | component: LoginComponent
79 | },
80 | // 管理后台路由
81 | {
82 | path: '/admin',
83 | name: 'admin',
84 | component: AdminComponent,
85 | children: [
86 | {
87 | path: 'admhome',
88 | name: 'admhome',
89 | component: AdmHomeComponent
90 | },
91 | {
92 | path: 'user',
93 | name: 'user',
94 | component: UserManageComponent
95 | },
96 | {
97 | path: 'category',
98 | name: 'category',
99 | component: CategoryManageComponent
100 | },
101 | {
102 | path: 'article',
103 | name: 'article',
104 | component: ArticleManageComponent
105 | },
106 | {
107 | path: 'massage',
108 | name: 'massage',
109 | component: MassageManageComponent
110 | },
111 | ]
112 | }
113 | ],
114 | scrollBehavior(to, from, savedPosition) {
115 | return {
116 | x: 0,
117 | y: 0
118 | }
119 | }
120 | });
121 |
122 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_modals.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Modals
3 | // --------------------------------------------------
4 |
5 | // .modal-open - body class for killing the scroll
6 | // .modal - container to scroll within
7 | // .modal-dialog - positioning shell for the actual modal
8 | // .modal-content - actual modal w/ bg and corners and shit
9 |
10 | // Kill the scroll on the body
11 | .modal-open {
12 | overflow: hidden;
13 | }
14 |
15 | // Container that the modal scrolls within
16 | .modal {
17 | display: none;
18 | overflow: hidden;
19 | position: fixed;
20 | top: 0;
21 | right: 0;
22 | bottom: 0;
23 | left: 0;
24 | z-index: $zindex-modal;
25 | -webkit-overflow-scrolling: touch;
26 |
27 | // Prevent Chrome on Windows from adding a focus outline. For details, see
28 | // https://github.com/twbs/bootstrap/pull/10951.
29 | outline: 0;
30 |
31 | // When fading in the modal, animate it to slide down
32 | &.fade .modal-dialog {
33 | @include translate(0, -25%);
34 | @include transition-transform(0.3s ease-out);
35 | }
36 | &.in .modal-dialog { @include translate(0, 0) }
37 | }
38 | .modal-open .modal {
39 | overflow-x: hidden;
40 | overflow-y: auto;
41 | }
42 |
43 | // Shell div to position the modal with bottom padding
44 | .modal-dialog {
45 | position: relative;
46 | width: auto;
47 | margin: 10px;
48 | }
49 |
50 | // Actual modal
51 | .modal-content {
52 | position: relative;
53 | background-color: $modal-content-bg;
54 | border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
55 | border: 1px solid $modal-content-border-color;
56 | border-radius: $border-radius-large;
57 | @include box-shadow(0 3px 9px rgba(0,0,0,.5));
58 | background-clip: padding-box;
59 | // Remove focus outline from opened modal
60 | outline: 0;
61 | }
62 |
63 | // Modal background
64 | .modal-backdrop {
65 | position: fixed;
66 | top: 0;
67 | right: 0;
68 | bottom: 0;
69 | left: 0;
70 | z-index: $zindex-modal-background;
71 | background-color: $modal-backdrop-bg;
72 | // Fade for backdrop
73 | &.fade { @include opacity(0); }
74 | &.in { @include opacity($modal-backdrop-opacity); }
75 | }
76 |
77 | // Modal header
78 | // Top section of the modal w/ title and dismiss
79 | .modal-header {
80 | padding: $modal-title-padding;
81 | border-bottom: 1px solid $modal-header-border-color;
82 | @include clearfix;
83 | }
84 | // Close icon
85 | .modal-header .close {
86 | margin-top: -2px;
87 | }
88 |
89 | // Title text within header
90 | .modal-title {
91 | margin: 0;
92 | line-height: $modal-title-line-height;
93 | }
94 |
95 | // Modal body
96 | // Where all modal content resides (sibling of .modal-header and .modal-footer)
97 | .modal-body {
98 | position: relative;
99 | padding: $modal-inner-padding;
100 | }
101 |
102 | // Footer (for actions)
103 | .modal-footer {
104 | padding: $modal-inner-padding;
105 | text-align: right; // right align buttons
106 | border-top: 1px solid $modal-footer-border-color;
107 | @include clearfix; // clear it in case folks use .pull-* classes on buttons
108 |
109 | // Properly space out buttons
110 | .btn + .btn {
111 | margin-left: 5px;
112 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
113 | }
114 | // but override that for button groups
115 | .btn-group .btn + .btn {
116 | margin-left: -1px;
117 | }
118 | // and override it for block buttons as well
119 | .btn-block + .btn-block {
120 | margin-left: 0;
121 | }
122 | }
123 |
124 | // Measure scrollbar width for padding body during modal show/hide
125 | .modal-scrollbar-measure {
126 | position: absolute;
127 | top: -9999px;
128 | width: 50px;
129 | height: 50px;
130 | overflow: scroll;
131 | }
132 |
133 | // Scale up the modal
134 | @media (min-width: $screen-sm-min) {
135 | // Automatically set modal's width for larger viewports
136 | .modal-dialog {
137 | width: $modal-md;
138 | margin: 30px auto;
139 | }
140 | .modal-content {
141 | @include box-shadow(0 5px 15px rgba(0,0,0,.5));
142 | }
143 |
144 | // Modal sizes
145 | .modal-sm { width: $modal-sm; }
146 | }
147 |
148 | @media (min-width: $screen-md-min) {
149 | .modal-lg { width: $modal-lg; }
150 | }
151 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/mixins/_gradients.scss:
--------------------------------------------------------------------------------
1 | // Gradients
2 |
3 |
4 |
5 | // Horizontal gradient, from left to right
6 | //
7 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
8 | // Color stops are not available in IE9 and below.
9 | @mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
10 | background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
11 | background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
12 | background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
13 | background-repeat: repeat-x;
14 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
15 | }
16 |
17 | // Vertical gradient, from top to bottom
18 | //
19 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
20 | // Color stops are not available in IE9 and below.
21 | @mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
22 | background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
23 | background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
24 | background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
25 | background-repeat: repeat-x;
26 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
27 | }
28 |
29 | @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
30 | background-repeat: repeat-x;
31 | background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
32 | background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
33 | background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
34 | }
35 | @mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
36 | background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
37 | background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
38 | background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
39 | background-repeat: no-repeat;
40 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
41 | }
42 | @mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
43 | background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
44 | background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
45 | background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
46 | background-repeat: no-repeat;
47 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
48 | }
49 | @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
50 | background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
51 | background-image: radial-gradient(circle, $inner-color, $outer-color);
52 | background-repeat: no-repeat;
53 | }
54 | @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
55 | background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
56 | background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
57 | background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
58 | }
59 |
--------------------------------------------------------------------------------
/server/routes/index.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var router = express.Router();
3 | var Category = require("../models/category");
4 | var Content = require("../models/content");
5 | var Massage = require("../models/massage");
6 | var Visitor = require("../models/visitor");
7 | /**
8 | * 获取用户ip
9 | */
10 | function getClientIp(req) {
11 | try {
12 | return req.headers['x-wq-realip'] ||
13 | req.connection.remoteAddress ||
14 | req.socket.remoteAddress ||
15 | req.connection.socket.remoteAddress;
16 | } catch (e) {
17 | logger.info("getClientIp error");
18 | return "";
19 | }
20 | }
21 | /* 统计访问者IP和时间 */
22 | router.post('/visit', function (req, res, next) {
23 | var newvisitor = new Visitor({
24 | ip: getClientIp(req).replace(/::ffff:/, ''),
25 | time: new Date()
26 | });
27 | newvisitor.save()
28 | res.json({ msg: 'ok' })
29 | });
30 |
31 | /* 前端 */
32 | /* 获取文章列表页 */
33 | router.get('/getpage', function (req, res, next) {
34 | // res.render('index', { title: 'Express' });
35 | // var obj = {
36 | // "name": "kk",
37 | // "age": 18
38 | // }
39 | Content.find({ isShow: { $eq: 1 } }).populate('category').sort({ addtime: -1 })/* .limit(6) */.then(contents => {
40 | res.json(contents.filter(v=>{
41 | return v.category.name != 'Video';
42 | }));
43 | });
44 | });
45 |
46 | /* 获取视频类型的页面 */
47 | router.get('/getvideolist', function (req,res,next) {
48 | Content.find({isShow:{$eq:1}}).populate({
49 | path:'category',
50 | select:'name',
51 | match:{name:{$eq:'Video'}}
52 | }).where().sort({ addtime: -1 }).then(contents=>{
53 | res.json(contents.filter(v=>{
54 | return v.category != null
55 | }));
56 | });
57 | });
58 |
59 | /* 获取文章详情 */
60 | router.post('/getcontent', function (req, res, next) {
61 | var id = req.query.contentid || req.body.contentid || "";
62 | Content.findOne({ _id: id }).populate(["category", "user"]).then(contents => {
63 | contents.num++;
64 | contents.save();
65 | res.json(contents);
66 | })
67 | });
68 |
69 | /* 评论文章 */
70 | router.post('/comment', function (req, res, next) {
71 | var id = req.body.contentid || req.query.contentid || ""; // 文章ID
72 | var ip = getClientIp(req).match(/(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/)[0];
73 | var commentdata = {
74 | comment: req.body.comment || req.query.comment || "",
75 | user: req.body.visitor || req.query.visitor || "",
76 | ip: ip,
77 | time: new Date()
78 | }
79 | Content.findOne({ _id: id }).then(function (thiscon) {
80 | if (commentdata.comment != "") {
81 | thiscon.comment.push(commentdata);
82 | }
83 | //thiscon.comment.reverse();
84 | thiscon.save().then(function (newcon) {
85 | res.json({ code: 1, msg: "评论成功" });
86 | });
87 | });
88 | });
89 |
90 | /* 后端删除文章评论 - 后期做成前端也能删除 - 带标识 */
91 | router.post('/comment/del', function (req, res, next) {
92 | var id = req.body.contentid || req.query.contentid || ""; // 文章ID
93 | var comment_time = req.body.time || req.query.time || ""; // 评论时间
94 | Content.findOne({ _id: id }).then(function (thiscon) {
95 | thiscon.comment.forEach((v, i) => {
96 | if ((v.time + '') === new Date(comment_time).toString()) {
97 | thiscon.comment.splice(i, 1)
98 | }
99 | })
100 | thiscon.save().then(function (newcon) {
101 | res.json({ code: 1, msg: "删除成功" });
102 | });
103 | });
104 | });
105 |
106 | /* 获取留言接口 */
107 | router.get("/massage", function (req, res, next) {
108 | Massage.find().sort({ addtime: -1 }).then(contents => {
109 | res.json(contents);
110 | });
111 | });
112 |
113 | /* 留言接口 */
114 | router.post("/massage/add", function (req, res, next) {
115 | var viewer = req.query.viewer || req.body.viewer || "nobody";
116 | var subject = req.query.subject || req.body.subject || "no subject";
117 | var massage = req.query.massage || req.body.massage || "";
118 | var newMsg = new Massage({
119 | viewer: viewer,
120 | subject: subject,
121 | massage: massage,
122 | addtime: new Date()
123 | });
124 | newMsg.save();
125 | res.json({ code: 1, msg: "哔~ 留言完毕~ 感谢支持" });
126 | });
127 |
128 | module.exports = router;
129 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_buttons.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Buttons
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // --------------------------------------------------
8 |
9 | .btn {
10 | display: inline-block;
11 | margin-bottom: 0; // For input.btn
12 | font-weight: $btn-font-weight;
13 | text-align: center;
14 | vertical-align: middle;
15 | touch-action: manipulation;
16 | cursor: pointer;
17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
18 | border: 1px solid transparent;
19 | white-space: nowrap;
20 | @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base);
21 | @include user-select(none);
22 |
23 | &,
24 | &:active,
25 | &.active {
26 | &:focus,
27 | &.focus {
28 | @include tab-focus;
29 | }
30 | }
31 |
32 | &:hover,
33 | &:focus,
34 | &.focus {
35 | color: $btn-default-color;
36 | text-decoration: none;
37 | }
38 |
39 | &:active,
40 | &.active {
41 | outline: 0;
42 | background-image: none;
43 | @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
44 | }
45 |
46 | &.disabled,
47 | &[disabled],
48 | fieldset[disabled] & {
49 | cursor: $cursor-disabled;
50 | @include opacity(.65);
51 | @include box-shadow(none);
52 | }
53 |
54 | // [converter] extracted a& to a.btn
55 | }
56 |
57 | a.btn {
58 | &.disabled,
59 | fieldset[disabled] & {
60 | pointer-events: none; // Future-proof disabling of clicks on `
` elements
61 | }
62 | }
63 |
64 |
65 | // Alternate buttons
66 | // --------------------------------------------------
67 |
68 | .btn-default {
69 | @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
70 | }
71 | .btn-primary {
72 | @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
73 | }
74 | // Success appears as green
75 | .btn-success {
76 | @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
77 | }
78 | // Info appears as blue-green
79 | .btn-info {
80 | @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
81 | }
82 | // Warning appears as orange
83 | .btn-warning {
84 | @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
85 | }
86 | // Danger and error appear as red
87 | .btn-danger {
88 | @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
89 | }
90 |
91 |
92 | // Link buttons
93 | // -------------------------
94 |
95 | // Make a button look and behave like a link
96 | .btn-link {
97 | color: $link-color;
98 | font-weight: normal;
99 | border-radius: 0;
100 |
101 | &,
102 | &:active,
103 | &.active,
104 | &[disabled],
105 | fieldset[disabled] & {
106 | background-color: transparent;
107 | @include box-shadow(none);
108 | }
109 | &,
110 | &:hover,
111 | &:focus,
112 | &:active {
113 | border-color: transparent;
114 | }
115 | &:hover,
116 | &:focus {
117 | color: $link-hover-color;
118 | text-decoration: $link-hover-decoration;
119 | background-color: transparent;
120 | }
121 | &[disabled],
122 | fieldset[disabled] & {
123 | &:hover,
124 | &:focus {
125 | color: $btn-link-disabled-color;
126 | text-decoration: none;
127 | }
128 | }
129 | }
130 |
131 |
132 | // Button Sizes
133 | // --------------------------------------------------
134 |
135 | .btn-lg {
136 | // line-height: ensure even-numbered height of button next to large input
137 | @include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
138 | }
139 | .btn-sm {
140 | // line-height: ensure proper height of button next to small input
141 | @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small);
142 | }
143 | .btn-xs {
144 | @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small);
145 | }
146 |
147 |
148 | // Block button
149 | // --------------------------------------------------
150 |
151 | .btn-block {
152 | display: block;
153 | width: 100%;
154 | }
155 |
156 | // Vertically space out multiple block buttons
157 | .btn-block + .btn-block {
158 | margin-top: 5px;
159 | }
160 |
161 | // Specificity overrides
162 | input[type="submit"],
163 | input[type="reset"],
164 | input[type="button"] {
165 | &.btn-block {
166 | width: 100%;
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/src/components/other/Upload1.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 | 选择jpg或png
18 | 尺寸360*233px, 1M以内
19 |
20 |
21 |
22 |
23 |
117 |
118 |
--------------------------------------------------------------------------------
/src/components/other/Upload.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
145 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_input-groups.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Input groups
3 | // --------------------------------------------------
4 |
5 | // Base styles
6 | // -------------------------
7 | .input-group {
8 | position: relative; // For dropdowns
9 | display: table;
10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11 |
12 | // Undo padding and float of grid classes
13 | &[class*="col-"] {
14 | float: none;
15 | padding-left: 0;
16 | padding-right: 0;
17 | }
18 |
19 | .form-control {
20 | // Ensure that the input is always above the *appended* addon button for
21 | // proper border colors.
22 | position: relative;
23 | z-index: 2;
24 |
25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on
26 | // select elements in input groups. To fix it, we float the input. Details:
27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
28 | float: left;
29 |
30 | width: 100%;
31 | margin-bottom: 0;
32 |
33 | &:focus {
34 | z-index: 3;
35 | }
36 | }
37 | }
38 |
39 | // Sizing options
40 | //
41 | // Remix the default form control sizing classes into new ones for easier
42 | // manipulation.
43 |
44 | .input-group-lg > .form-control,
45 | .input-group-lg > .input-group-addon,
46 | .input-group-lg > .input-group-btn > .btn {
47 | @extend .input-lg;
48 | }
49 | .input-group-sm > .form-control,
50 | .input-group-sm > .input-group-addon,
51 | .input-group-sm > .input-group-btn > .btn {
52 | @extend .input-sm;
53 | }
54 |
55 |
56 | // Display as table-cell
57 | // -------------------------
58 | .input-group-addon,
59 | .input-group-btn,
60 | .input-group .form-control {
61 | display: table-cell;
62 |
63 | &:not(:first-child):not(:last-child) {
64 | border-radius: 0;
65 | }
66 | }
67 | // Addon and addon wrapper for buttons
68 | .input-group-addon,
69 | .input-group-btn {
70 | width: 1%;
71 | white-space: nowrap;
72 | vertical-align: middle; // Match the inputs
73 | }
74 |
75 | // Text input groups
76 | // -------------------------
77 | .input-group-addon {
78 | padding: $padding-base-vertical $padding-base-horizontal;
79 | font-size: $font-size-base;
80 | font-weight: normal;
81 | line-height: 1;
82 | color: $input-color;
83 | text-align: center;
84 | background-color: $input-group-addon-bg;
85 | border: 1px solid $input-group-addon-border-color;
86 | border-radius: $input-border-radius;
87 |
88 | // Sizing
89 | &.input-sm {
90 | padding: $padding-small-vertical $padding-small-horizontal;
91 | font-size: $font-size-small;
92 | border-radius: $input-border-radius-small;
93 | }
94 | &.input-lg {
95 | padding: $padding-large-vertical $padding-large-horizontal;
96 | font-size: $font-size-large;
97 | border-radius: $input-border-radius-large;
98 | }
99 |
100 | // Nuke default margins from checkboxes and radios to vertically center within.
101 | input[type="radio"],
102 | input[type="checkbox"] {
103 | margin-top: 0;
104 | }
105 | }
106 |
107 | // Reset rounded corners
108 | .input-group .form-control:first-child,
109 | .input-group-addon:first-child,
110 | .input-group-btn:first-child > .btn,
111 | .input-group-btn:first-child > .btn-group > .btn,
112 | .input-group-btn:first-child > .dropdown-toggle,
113 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
114 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
115 | @include border-right-radius(0);
116 | }
117 | .input-group-addon:first-child {
118 | border-right: 0;
119 | }
120 | .input-group .form-control:last-child,
121 | .input-group-addon:last-child,
122 | .input-group-btn:last-child > .btn,
123 | .input-group-btn:last-child > .btn-group > .btn,
124 | .input-group-btn:last-child > .dropdown-toggle,
125 | .input-group-btn:first-child > .btn:not(:first-child),
126 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
127 | @include border-left-radius(0);
128 | }
129 | .input-group-addon:last-child {
130 | border-left: 0;
131 | }
132 |
133 | // Button input groups
134 | // -------------------------
135 | .input-group-btn {
136 | position: relative;
137 | // Jankily prevent input button groups from wrapping with `white-space` and
138 | // `font-size` in combination with `inline-block` on buttons.
139 | font-size: 0;
140 | white-space: nowrap;
141 |
142 | // Negative margin for spacing, position for bringing hovered/focused/actived
143 | // element above the siblings.
144 | > .btn {
145 | position: relative;
146 | + .btn {
147 | margin-left: -1px;
148 | }
149 | // Bring the "active" button to the front
150 | &:hover,
151 | &:focus,
152 | &:active {
153 | z-index: 2;
154 | }
155 | }
156 |
157 | // Negative margin to only have a 1px border between the two
158 | &:first-child {
159 | > .btn,
160 | > .btn-group {
161 | margin-right: -1px;
162 | }
163 | }
164 | &:last-child {
165 | > .btn,
166 | > .btn-group {
167 | z-index: 2;
168 | margin-left: -1px;
169 | }
170 | }
171 | }
172 |
--------------------------------------------------------------------------------
/src/styles/lib/bootstrap/_responsive-utilities.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
18 | // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
19 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
20 |
21 | @at-root {
22 | @-ms-viewport {
23 | width: device-width;
24 | }
25 | }
26 |
27 |
28 | // Visibility utilities
29 | // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
30 |
31 | @include responsive-invisibility('.visible-xs');
32 | @include responsive-invisibility('.visible-sm');
33 | @include responsive-invisibility('.visible-md');
34 | @include responsive-invisibility('.visible-lg');
35 |
36 | .visible-xs-block,
37 | .visible-xs-inline,
38 | .visible-xs-inline-block,
39 | .visible-sm-block,
40 | .visible-sm-inline,
41 | .visible-sm-inline-block,
42 | .visible-md-block,
43 | .visible-md-inline,
44 | .visible-md-inline-block,
45 | .visible-lg-block,
46 | .visible-lg-inline,
47 | .visible-lg-inline-block {
48 | display: none !important;
49 | }
50 |
51 | @media (max-width: $screen-xs-max) {
52 | @include responsive-visibility('.visible-xs');
53 | }
54 | .visible-xs-block {
55 | @media (max-width: $screen-xs-max) {
56 | display: block !important;
57 | }
58 | }
59 | .visible-xs-inline {
60 | @media (max-width: $screen-xs-max) {
61 | display: inline !important;
62 | }
63 | }
64 | .visible-xs-inline-block {
65 | @media (max-width: $screen-xs-max) {
66 | display: inline-block !important;
67 | }
68 | }
69 |
70 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
71 | @include responsive-visibility('.visible-sm');
72 | }
73 | .visible-sm-block {
74 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
75 | display: block !important;
76 | }
77 | }
78 | .visible-sm-inline {
79 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
80 | display: inline !important;
81 | }
82 | }
83 | .visible-sm-inline-block {
84 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
85 | display: inline-block !important;
86 | }
87 | }
88 |
89 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
90 | @include responsive-visibility('.visible-md');
91 | }
92 | .visible-md-block {
93 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
94 | display: block !important;
95 | }
96 | }
97 | .visible-md-inline {
98 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
99 | display: inline !important;
100 | }
101 | }
102 | .visible-md-inline-block {
103 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
104 | display: inline-block !important;
105 | }
106 | }
107 |
108 | @media (min-width: $screen-lg-min) {
109 | @include responsive-visibility('.visible-lg');
110 | }
111 | .visible-lg-block {
112 | @media (min-width: $screen-lg-min) {
113 | display: block !important;
114 | }
115 | }
116 | .visible-lg-inline {
117 | @media (min-width: $screen-lg-min) {
118 | display: inline !important;
119 | }
120 | }
121 | .visible-lg-inline-block {
122 | @media (min-width: $screen-lg-min) {
123 | display: inline-block !important;
124 | }
125 | }
126 |
127 | @media (max-width: $screen-xs-max) {
128 | @include responsive-invisibility('.hidden-xs');
129 | }
130 |
131 | @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
132 | @include responsive-invisibility('.hidden-sm');
133 | }
134 |
135 | @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
136 | @include responsive-invisibility('.hidden-md');
137 | }
138 |
139 | @media (min-width: $screen-lg-min) {
140 | @include responsive-invisibility('.hidden-lg');
141 | }
142 |
143 |
144 | // Print utilities
145 | //
146 | // Media queries are placed on the inside to be mixin-friendly.
147 |
148 | // Note: Deprecated .visible-print as of v3.2.0
149 |
150 | @include responsive-invisibility('.visible-print');
151 |
152 | @media print {
153 | @include responsive-visibility('.visible-print');
154 | }
155 | .visible-print-block {
156 | display: none !important;
157 |
158 | @media print {
159 | display: block !important;
160 | }
161 | }
162 | .visible-print-inline {
163 | display: none !important;
164 |
165 | @media print {
166 | display: inline !important;
167 | }
168 | }
169 | .visible-print-inline-block {
170 | display: none !important;
171 |
172 | @media print {
173 | display: inline-block !important;
174 | }
175 | }
176 |
177 | @media print {
178 | @include responsive-invisibility('.hidden-print');
179 | }
180 |
--------------------------------------------------------------------------------