This commit is contained in:
Pan
2017-04-18 15:09:13 +08:00
parent 304b17520c
commit d10370086e
145 changed files with 61322 additions and 0 deletions

103
src/styles/btn.scss Normal file
View File

@@ -0,0 +1,103 @@
$blue:#324157;
$light-blue:#3A71A8;
$red:#C03639;
$pink: #E65D6E;
$green: #30B08F;
$tiffany: #4AB7BD;
$yellow:#FEC171;
$panGreen: #30B08F;
@mixin colorBtn($color) {
background: $color;
&:hover {
color: $color;
&:before, &:after {
background: $color;
}
}
}
.blue-btn {
@include colorBtn($blue)
}
.light-blue-btn{
@include colorBtn($light-blue)
}
.red-btn {
@include colorBtn($red)
}
.pink-btn {
@include colorBtn($pink)
}
.green-btn {
@include colorBtn($green)
}
.tiffany-btn {
@include colorBtn($tiffany)
}
.yellow-btn {
@include colorBtn($yellow)
}
.pan-btn {
font-size: 14px;
color: #fff;
padding: 14px 36px;
border-radius: 8px;
border: none;
outline: none;
margin-right: 25px;
transition: 600ms ease all;
position: relative;
display: inline-block;
&:hover {
background: #fff;
&:before, &:after {
width: 100%;
transition: 600ms ease all;
}
}
&:before, &:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 2px;
width: 0;
transition: 400ms ease all;
}
&::after {
right: inherit;
top: inherit;
left: 0;
bottom: 0;
}
}
.custom-button{
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
color: #fff;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: 0;
margin: 0;
padding: 10px 15px;
font-size: 14px;
border-radius: 4px;
}

348
src/styles/editor.scss Normal file
View File

@@ -0,0 +1,348 @@
//富文本
//移除 至static/tinymce/skins/lightgray.content.min.css
.small-size {
width: 800px;
margin: 0 auto;
}
img{
max-height: 300px;
}
.note-color .dropdown-menu li .btn-group{
&:first-child{
display: none;
}
}
//禁止图片缩放
.note-control-sizing {
display: none;
}
.panel-body {
$blue: #1478F0;
font-size: 16px;
line-height: 1.4em;
& > :last-child {
margin-bottom: 0;
}
img {
max-width: 100%;
display: block;
margin: 0 auto;
}
table {
width: 100% !important;
}
embed {
max-width: 100%;
margin-bottom: 30px;
}
p {
// margin-bottom: 1em;
text-align: justify;
word-break: break-all;
}
ul {
margin-bottom: 30px;
}
li {
margin-left: 20px;
margin-bottom: 30px;
}
a {
color: $blue;
}
hr {
margin: 1em auto;
border: none;
padding: 0;
width: 100%;
height: 1px;
background: #DCDCDC;
}
//add type.css start
blockquote p {
font-size: 16px;
letter-spacing: 1px;
line-height: 28px;
color: #333;
}
blockquote p:last-of-type {
margin-bottom: 0;
}
/* HTML5 媒体文件跟 img 保持一致 */
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/* 要注意表单元素并不继承父级 font 的问题 */
button,
input,
select,
textarea {
font: 500 14px/1.8 'Hiragino Sans GB', Microsoft YaHei, sans-serif;
}
/* 去掉各Table cell 的边距并让其边重合 */
table {
border-collapse: collapse;
border-spacing: 0;
}
/* IE bug fixed: th 不继承 text-align*/
th {
text-align: inherit;
}
/* 去除默认边框 */
fieldset,
img {
border: 0;
}
/* 解决 IE6-7 图片缩放锯齿问题 */
img {
-ms-interpolation-mode: bicubic;
}
/* ie6 7 8(q) bug 显示为行内表现 */
iframe {
display: block;
}
/* 块/段落引用 */
blockquote {
position: relative;
font-size: 16px;
letter-spacing: 1px;
line-height: 28px;
margin-bottom: 40px;
padding: 20px;
background: #f0f2f5;
&:before{
position: absolute;
content: " \300D";
top: 10px;
left: 2px;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
color: #333;
}
&:after{
position: absolute;
content: " \300D";
right: 6px;
bottom: 12px;
color: #333;
}
}
blockquote blockquote {
padding: 0 0 0 1em;
margin-left: 2em;
border-left: 3px solid $blue;
}
/* Firefox 以外,元素没有下划线,需添加 */
acronym,
abbr {
border-bottom: 1px dotted;
font-variant: normal;
}
/* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
abbr {
cursor: help;
}
/* 一致的 del 样式 */
del {
text-decoration: line-through;
}
address,
caption,
cite,
code,
del,
em,
th,
var {
font-style: normal;
font-weight: 500;
}
em {
font-style: normal;
font-family: sans-serif;
font-weight: bold;
}
/* 对齐是排版最重要的因素, 别让什么都居中 */
caption,
th {
text-align: left;
}
q:before,
q:after {
content: '';
}
/* 统一上标和下标 */
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: text-top;
}
:root sub,
:root sup {
vertical-align: baseline;
/* for ie9 and other mordern browsers */
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* 让链接在 hover 状态下显示下划线 */
a:hover {
text-decoration: underline;
}
/* 默认不显示下划线,保持页面简洁 */
ins,
a {
text-decoration: none;
}
u,
.typo-u {
text-decoration: underline;
}
/* 标记,类似于手写的荧光笔的作用 */
mark {
background: #fffdd1;
}
/* 代码片断 */
pre,
code {
font-family: "Courier New", Courier, monospace;
}
pre {
border: 1px solid #ddd;
border-left-width: 0.4em;
background: #fbfbfb;
padding: 10px;
}
/* 底部印刷体、版本等标记 */
small {
font-size: 12px;
color: #888;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: 18px;
font-weight: 700;
color: #1478f0;
border-left: 5px solid #1478f0;
padding-left: 10px;
margin: 30px 0;
}
h2 {
font-size: 1.2em;
}
/* 保证块/段落之间的空白隔行 */
.typo p,
.typo pre,
.typo ul,
.typo ol,
.typo dl,
.typo form,
.typo hr,
.typo table,
.typo-p,
.typo-pre,
.typo-ul,
.typo-ol,
.typo-dl,
.typo-form,
.typo-hr,
.typo-table {
margin-bottom: 15px;
line-height: 25px;
}
/* 标题应该更贴紧内容并与其他块区分margin 值要相应做优化 */
.typo h1,
.typo h2,
.typo h3,
.typo h4,
.typo h5,
.typo h6,
.typo-h1,
.typo-h2,
.typo-h3,
.typo-h4,
.typo-h5,
.typo-h6 {
margin-bottom: 0.4em;
line-height: 1.5;
}
.typo h1,
.typo-h1 {
font-size: 1.8em;
}
.typo h2,
.typo-h2 {
font-size: 1.6em;
}
.typo h3,
.typo-h3 {
font-size: 1.4em;
}
.typo h4,
.typo-h0 {
font-size: 1.2em;
}
.typo h5,
.typo h6,
.typo-h5,
.typo-h6 {
font-size: 1em;
}
/* 在文章中,应该还原 ul 和 ol 的样式 */
.typo ul,
.typo-ul {
margin-left: 1.3em;
list-style: disc;
}
.typo ol,
.typo-ol {
list-style: decimal;
margin-left: 1.9em;
}
.typo li ul,
.typo li ol,
.typo-ul ul,
.typo-ul ol,
.typo-ol ul,
.typo-ol ol {
margin-top: 0;
margin-bottom: 0;
margin-left: 2em;
}
.typo li ul,
.typo-ul ul,
.typo-ol ul {
list-style: circle;
}
/* 同 ul/ol在文章中应用 table 基本格式 */
.typo table th,
.typo table td,
.typo-table th,
.typo-table td {
border: 1px solid #ddd;
padding: 5px 10px;
}
.typo table th,
.typo-table th {
background: #fbfbfb;
}
.typo table thead th,
.typo-table thead th {
background: #f1f1f1;
}
}

392
src/styles/index.scss Normal file
View File

@@ -0,0 +1,392 @@
@import './btn.scss';
// @import './editor.scss';
@import "./mixin.scss";
body {
//height: 100%;
//overflow-y: scroll;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;
//@include scrollBar;
}
label{
font-weight: 700;
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
.no-padding {
padding: 0px !important;
}
.padding-content {
padding: 4px 0;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
.fr {
float: right;
}
.fl {
float: left;
}
.pr-5 {
padding-right: 5px;
}
.pl-5 {
padding-left: 5px;
}
.block {
display: block;
}
.inlineBlock {
display: block;
}
.components-container{
margin: 30px 50px;
}
code{
background: #eef1f6;
padding: 20px 10px;
margin-bottom: 20px;
display: block;
}
.fade-enter-active, .fade-leave-active {
transition: all .2s ease
}
.fade-enter, .fade-leave-active {
opacity: 0;
}
//editor
//.editor-placeholder {
// margin: 0 auto;
// display: block;
// .editor-placeholder-title {
// text-align: center;
// font-size: 20px;
// padding-bottom: 5px;
// }
// .editor-placeholder-image {
// display: block;
// max-height: 100px;
// margin: 0 auto;
// }
//}
//main-container全局样式
.app-container {
padding: 20px;
//min-height: 100%;
}
//element ui upload
.upload-container {
.el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
.singleImageUpload2.upload-container {
.el-upload {
width: 100%;
height: 100%;
.el-upload-dragger {
width: 100%;
height: 100%;
.el-icon-upload {
margin: 30% 0 16px;
}
}
}
}
.editor-video-upload {
@include clearfix;
margin-bottom: 10px;
.el-upload {
float: left;
width: 100px;
}
.el-upload-list {
float: left;
.el-upload-list__item:first-child {
margin-top: 0px;
}
}
}
.el-upload-list--picture-card {
float: left;
}
.pagination-container {
margin-top: 30px;
}
.pointer {
cursor: pointer;
}
.wscn-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover{
color: rgb(32, 160, 255);
}
}
.publishedTag, .draftTag, .deletedTag {
color: #fff;
background-color: $panGreen;
line-height: 1;
text-align: center;
margin: 0;
padding: 8px 12px;
font-size: 14px;
border-radius: 4px;
position: absolute;
left: 20px;
top: 10px;
}
.draftTag {
background-color: $yellow;
}
.deletedTag {
background-color: $red;
}
.input-label {
font-size: 14px;
color: #48576a;
line-height: 1;
padding: 11px 5px 11px 0;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
.no-marginLeft {
.el-checkbox {
margin: 0 20px 15px 0;
}
.el-checkbox + .el-checkbox {
margin-left: 0px;
}
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
//文章页textarea修改样式
.article-textarea {
textarea {
padding-right: 40px;
resize: none;
border: none;
border-radius: 0px;
border-bottom: 1px solid #bfcbd9;
}
}
//实时新闻创建页特殊处理
.recentNews-container {
p {
display: inline-block;
}
.el-collapse-item__content{
padding-right:0px;
}
}
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
}
.multiselect--active {
z-index: 1000 !important;
}
//reset element ui
.block-checkbox {
display: block;
}
//上传页面不显示删除icon
.mediaUpload-container {
.el-upload__btn-delete {
display: none !important;
}
}
.operation-container {
.cell {
padding: 10px !important;
}
.el-button {
&:nth-child(3) {
margin-top: 10px;
margin-left: 0px;
}
&:nth-child(4) {
margin-top: 10px;
}
}
}
.el-upload {
input[type="file"] {
display: none !important;
}
}
.el-upload__input {
display: none;
}
.cell {
.el-tag {
margin-right: 8px;
}
}
.small-padding{
.cell{
padding-left: 8px;
padding-right: 8px;
}
}
.status-col {
.cell {
padding: 0 10px;
text-align: center;
.el-tag {
margin-right: 0px;
}
}
}
//.el-form-item__content{
// margin-left: 0px!important;
//}
.no-border {
.el-input-group__prepend, .el-input__inner, .el-date-editor__editor, .multiselect__tags {
border: none;
}
}
.el-select__tags {
max-width: 100% !important;
}
.small-space .el-form-item {
margin-bottom: 10px;
}
.no-padding {
.el-dropdown-menu__item {
padding: 0px;
}
.el-dropdown-menu {
padding: 0px;
}
}
.no-hover {
.el-dropdown-menu__item:not(.is-disabled):hover {
background-color: #fff;
}
}
.el-tooltip-fullwidth {
width: 100%;
.el-tooltip__rel {
width: 100%;
}
}
//暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
.el-dialog{
transform: none;
left: 0;
position: relative;
margin: 0 auto;
}

57
src/styles/mixin.scss Normal file
View File

@@ -0,0 +1,57 @@
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin scrollBar {
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
@mixin relative {
position: relative;
width: 100%;
height: 100%;
}
@mixin pct($pct) {
width: #{$pct};
position: relative;
margin: 0 auto;
}
@mixin triangle($width, $height, $color, $direction) {
$width: $width/2;
$color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction == up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
} @else if $direction == right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
} @else if $direction == down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
} @else if $direction == left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
}