diff --git a/src/layout/index.vue b/src/layout/index.vue
index d40d208..abebd7d 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -60,18 +60,16 @@ export default {
}
},
mounted() {
- if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
- window.pc = false
- } else {
- window.pc = true
- }
-
+ window.pc = !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
if(getToken()){
this.isShow = window.pc;
//与服务器建立websocket连接
if(!ws.isConnected){
toConnection(this.$store.state.user.name,this.$store.state.user.token);
}
+ if(this.$route.path.startsWith('/articles')){
+ this.isShow = false
+ }
}else{
this.isShow = false
}
diff --git a/src/router/index.js b/src/router/index.js
index 45b3e1a..29c895b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -203,10 +203,20 @@ export const constantRoutes = [
}
]
},
-
+ {
+ path: 'articles',
+ component: Layout,
+ children: [
+ {
+ path: `${document.location.protocol}//${window.location.host}/articles`,
+ meta: { title: '关联博客', icon: 'link' }
+ }
+ ]
+ },
{
path: '/articles',
component: Layout,
+ hidden: true,
children: [
{
path: '',
diff --git a/src/styles/markdown.scss b/src/styles/markdown.scss
index c9a9886..eb6ff40 100644
--- a/src/styles/markdown.scss
+++ b/src/styles/markdown.scss
@@ -108,7 +108,7 @@
display: flex;
width: 100%;
max-width: 1080px;
- min-height: 1000px;
+ //min-height: 1000px;
margin: 0 auto;
flex-wrap: wrap;
justify-content: space-between;
diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue
index 79bf45c..4fbdb78 100644
--- a/src/views/markdown/index.vue
+++ b/src/views/markdown/index.vue
@@ -10,6 +10,7 @@
选择位置
+ 更多设置
发布文章
更新文章
@@ -28,6 +29,16 @@
@fullScreen="fullScreen"
/>
+
+
+
+
@@ -52,6 +63,8 @@
isFullScreen: false,
storageLocation: '/',
selectLocationVisible: false,
+ moreSetting: false,
+ markdownCover: null,
}
},
mounted() {
@@ -137,6 +150,7 @@
userId: this.$store.state.user.userId,
username: this.$store.state.user.name,
filename: filename,
+ cover: this.markdownCover,
currentDirectory: this.storageLocation,
contentText: this.content
}).then((res) => {
@@ -160,6 +174,7 @@
userId: this.$store.state.user.userId,
username: this.$store.state.user.name,
filename: filename,
+ cover: this.markdownCover,
currentDirectory: this.storageLocation,
contentText: this.content
}).then(() => {
@@ -208,4 +223,15 @@
}
}
+ .more-setting {
+ padding: 15px;
+ .mark-setting-label {
+ font-weight: 500;
+ }
+ .mark-description {
+ font-size: 12px;
+ font-weight: 100;
+ }
+ }
+
diff --git a/src/views/public/articles/index.vue b/src/views/public/articles/index.vue
index b8a0375..cfd2544 100644
--- a/src/views/public/articles/index.vue
+++ b/src/views/public/articles/index.vue
@@ -55,11 +55,12 @@
@@ -291,4 +292,11 @@
height: 100%;
background: #f5f5f5;
}
+
+ .blog-background {
+ object-fit: cover;
+ width: 100%;
+ height: 100%;
+ max-height: 15em;
+}