Skip to content

Commit

Permalink
add blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Libra11-zz committed Nov 12, 2020
1 parent c42b04f commit a95bc57
Show file tree
Hide file tree
Showing 30 changed files with 643 additions and 431 deletions.
11 changes: 11 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,16 @@ module.exports = {
// 头像图片地址
headerPic: "https://libra321.oss-cn-huhehaote.aliyuncs.com/avatar.jpg",
},
comment: {
// 是否显示评论列表
showComment: true,
// The owner's name of repository to store the issues and comments.
owner: 'Libra11',
// The name of repository to store the issues and comments.
repo: 'vuepress-theme-libra',
// The clientId & clientSecret introduced in OAuth2 spec.
clientId: '07f6df24d9150e2da866',
clientSecret: 'ec60c756133e4a608e60405110a1fd6c78f19ecc',
}
},
};
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/components/Pagination/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
.actived {
background-color: @hoverBlueColor;
color: #fff;
color: @whiteColor;
}
}
}
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/components/SearchBox/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
transition: all 0.5s;
&:hover {
transition: all 0.5s;
background-color: #000;
background-color: @blackColor;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/components/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {};
align-items: center;
.wavetext {
.text {
color: #fff;
color: @whiteColor;
font-size: 1rem;
font-weight: 100;
display: inline-block;
Expand Down
13 changes: 7 additions & 6 deletions docs/.vuepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { themeConfig } = require("../config");
module.exports = {
plugins: [
[
Expand All @@ -6,15 +7,15 @@ module.exports = {
comment: {
// Which service you'd like to use
service: 'vssue',
// The owner's name of repository to store the issues and comments.
owner: 'Libra11',
locale: 'zh',
// The name of repository to store the issues and comments.
repo: 'vuepress-theme-libra',
autoCreateIssue: true,
// The owner's name of repository to store the issues and comments.
owner: themeConfig.comment.owner,
// The name of repository to store the issues and comments.
repo: themeConfig.comment.repo,
// The clientId & clientSecret introduced in OAuth2 spec.
clientId: '07f6df24d9150e2da866',
clientSecret: 'ec60c756133e4a608e60405110a1fd6c78f19ecc',
clientId: themeConfig.comment.clientId,
clientSecret: themeConfig.comment.clientSecret
},
directories: [
{
Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/theme/layouts/Blogs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<Content />
</div>
</div>
<Comment />
<Comment v-if="$themeConfig.comment.showComment"/>
</div>
<div class="right">
<category-card />
Expand Down Expand Up @@ -233,7 +233,7 @@ export default {
}
.vssue-comment-body{
background-color: @backgroundColor6;
box-shadow: 0 2px 10px 0 #000000;
box-shadow: 0 2px 10px 0 @blackColor;
border-radius: 5px;
.vssue-comment-header{
border: none;
Expand Down Expand Up @@ -263,7 +263,7 @@ export default {
border: none;
color: @whiteColor;
background-color: @backgroundColor6;
box-shadow: 0 2px 10px 0 #000000;
box-shadow: 0 2px 10px 0 @blackColor;
}
}
.vssue-new-comment-footer {
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/layouts/Contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
background-color: @whiteColor;
border-radius: 80px;
overflow: hidden;
width: 160px;
Expand Down Expand Up @@ -170,7 +170,7 @@ export default {
height: 100px;
top: -120px;
left: -15px;
background-color: #fff;
background-color: @whiteColor;
display: none;
}
&:hover {
Expand Down
24 changes: 2 additions & 22 deletions docs/.vuepress/theme/layouts/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default {
width: 97%;
border-radius: 5px;
background-color: @backgroundColor6;
box-shadow: 2px 2px 5px 0 #000000;
box-shadow: 2px 2px 5px 0 @blackColor;
overflow: hidden;
padding: 20px 10px;
}
Expand All @@ -242,28 +242,8 @@ export default {
top: 20px;
font-size: 23px;
font-family: "Libra";
color: #fff;
color: @whiteColor;
}
// .timeline-article .content-left:before {
// content: "";
// position: absolute;
// top: 16px;
// left: 100%;
// height: 0;
// width: 0;
// border: 7px solid transparent;
// border-left: 7px solid @backgroundColor6;
// }
// .timeline-article .content-right:before {
// content: "";
// position: absolute;
// top: 16px;
// left: -14px;
// height: 0;
// width: 0;
// border: 7px solid transparent;
// border-right: 7px solid @backgroundColor6;
// }
.timeline-article .meta-icon {
position: absolute;
top: 0;
Expand Down
230 changes: 230 additions & 0 deletions docs/blogs/CSS/CSS三栏布局.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
---
title: CSS两栏布局
category: css
desc: 最简单、最全面的CSS两栏布局
tag:
- css
picture: https://libra321.oss-cn-huhehaote.aliyuncs.com/blog/34C75FB4-EF1A-4D2F-937A-4B6A66F231D5.png
date: "2020-11-12"
---

# CSS 三栏布局

> 代码中 div 都没有设置高度,使用时请自行设置高度
## 浮动+margin

```html
<div class="container">
<div class="left"></div>
<div class="right"></div>
<div class="main"></div>
</div>
```

```css
.left {
float: left;
width: 200px;
background-color: red;
}
.right {
width: 200px;
background-color: blue;
float: right;
}
.main {
margin-left: 200px;
margin-right: 200px;
background-color: green;
}
```

## 浮动+BFC

```html
<div class="container">
<div class="left"></div>
<div class="right"></div>
<div class="main"></div>
</div>
```

```css
.left {
float: left;
width: 200px;
background-color: red;
}
.right {
width: 200px;
background-color: blue;
float: right;
}
.main {
overflow: hidden;
background-color: green;
}
```

## flex

```html
<div class="container">
<div class="left"></div>
<div class="main"></div>
<div class="right"></div>
</div>
```

```css
.container {
display: flex;
}
.main {
flex: 1;
background-color: red;
}
.left {
width: 200px;
background-color: blue;
}
.right {
width: 200px;
background-color: green;
}
```

## table

```html
<div class="container">
<div class="left"></div>
<div class="main"></div>
<div class="right"></div>
</div>
```

```css
.container {
display: table;
}
.left {
width: 200px;
display: table-cell;
background-color: red;
}
.main {
display: table-cell;
background-color: blue;
}
.right {
display: table-cell;
width: 200px;
background-color: green;
}
```

## 定位

```html
<div class="container">
<div class="left"></div>
<div class="main"></div>
<div class="right"></div>
</div>
```

```css
.container {
position: relative;
}
.main {
margin: 0 200px;
background-color: green;
}
.left {
position: absolute;
width: 200px;
left: 0;
background-color: red;
}
.right {
position: absolute;
width: 200px;
background-color: blue;
right: 0;
}
```

## 双飞翼布局

```html
<div class="content">
<div class="main"></div>
</div>
<div class="left"></div>
<div class="right"></div>
```

```css
.content {
float: left;
width: 100%;
}
.main {
margin-left: 200px;
margin-right: 200px;
background-color: green;
}
.left {
float: left;
width: 200px;
margin-left: -100%;
background-color: red;
}
.right {
width: 200px;
float: right;
margin-left: -200px;
background-color: blue;
}
```

## 圣杯布局

```html
<div class="container">
<div class="main"></div>
<div class="left"></div>
<div class="right"></div>
</div>
```

```css
.container {
margin-left: 200px;
margin-right: 200px;
}
.main {
float: left;
width: 100%;
background-color: red;
}
.left {
float: left;
width: 200px;
margin-left: -100%;
position: relative;
left: -200px;
background-color: blue;
}
.right {
float: left;
width: 200px;
margin-left: -200px;
position: relative;
right: -200px;
background-color: green;
}
```
Loading

0 comments on commit a95bc57

Please sign in to comment.