Skip to content

Commit

Permalink
feat(vue): ⚡ Add vuepress{git and container} plugins
Browse files Browse the repository at this point in the history
BREAKING CHANGE: quote container need to place author name at the bottom
  • Loading branch information
avimehenwal committed Jul 14, 2020
1 parent 0ff1126 commit 3339771
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 7 deletions.
12 changes: 9 additions & 3 deletions docs/.vuepress/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<div>

</div>
<footer>
<!-- Add git info created, update(already there), author, commits, contributors -->
<h6>Footer</h6>
<ul v-for="(value, k) in $page.git" :key="value.updated">
<li>
{{ k }} - {{ value }}
</li>
</ul>
</footer>
</template>
25 changes: 25 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,32 @@ module.exports = {
},
},
],
[ 'vuepress-plugin-git-log' ],
[ '@vuepress/google-analytics', { 'ga': process.env.GA } ],
[
'vuepress-plugin-container',
{
type: 'right',
defaultTitle: '',
},
],
[
'vuepress-plugin-container',
{
type: 'theorem',
before: info => `<div class="theorem"><p class="title">${info}</p>`,
after: '</div>',
},
],
[ // DOESNT WORK, want to put title(author name) after main content
'vuepress-plugin-container',
{
type: 'quote',
defaultTitle: 'Anonymous',
before: info => `<div class="quote"><p class="title">${info}</p>`,
after: info => `${info}</div>`,
},
]
],
markdown: {
// options for markdown-it-anchor
Expand Down
34 changes: 33 additions & 1 deletion docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,36 @@ mark
padding-right: 5px
border-radius: 5px
padding-top: 2px
padding-bottom: 2px
padding-bottom: 2px

// container styles
.theorem
margin 1rem 0
padding .1rem 1.5rem
border-radius $BorderRadius
background-color #f0f4f8
.title
font-weight bold

.custom-block
&.right
color transparentify($textColor, 0.4)
font-size 0.9rem
text-align right

.quote
margin 1rem 0
padding .1rem 1.5rem
background-color #f0f4f8
border-color #4B8BBE
border-left-width 0.5rem
border-left-style solid
.title
color transparentify($textColor, 0.4)
font-weight light
font-size 0.9rem
text-align right
& p:nth-child(2)
font-size: 1.2rem
font-style: italic
text-align center
6 changes: 5 additions & 1 deletion docs/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ $homePageWidth = 960px
// responsive breakpoints
$MQNarrow = 959px
$MQMobile = 719px
$MQMobileNarrow = 419px
$MQMobileNarrow = 419px

// custome configs

$BorderRadius = 0.4rem
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

![Python programming logo](/logo.svg)

::: tip Science and Engineering

> Try to do good science rather than popular science.
Liberral Education
: Learn something about everything and everything about something.
:::

## 1.1. Pythonic

- All generators are iterators BUT not all iterators are generators
Expand Down
31 changes: 30 additions & 1 deletion docs/Tutorials/00_material.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:

<TagLinks />


## :office: Official resources

* https://www.python.org/about/gettingstarted/
Expand Down Expand Up @@ -40,4 +41,32 @@ stateDiagram-v2
Moving --> Still
Moving --> Crash : A transition
Crash --> [*]
```
```

::: quote alexander
Some quote please
:::

::: quote
horrible orrible hirriblksndoif iobni b
:::


::: theorem Newton's First Law
In an inertial frame of reference, an object either remains at rest or continues to move at a constant velocity, unless acted upon by a force.

::: right
From [Wikipedia](https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion)
:::
:::

::: tip
Tip container of `@vuepress/theme-default`
:::

::: right
From [Wikipedia](https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion)
:::


<Footer />
2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"toml": "^3.0.0",
"vuepress": "^1.5.0",
"vuepress-plugin-auto-sidebar": "^1.5.0",
"vuepress-plugin-container": "^2.1.4",
"vuepress-plugin-git-log": "^1.0.1",
"vuepress-plugin-mathjax": "^1.2.8",
"vuepress-plugin-mermaidjs": "^1.5.1"
}
Expand Down
9 changes: 8 additions & 1 deletion docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11219,7 +11219,7 @@ vuepress-plugin-auto-sidebar@^1.5.0:
dependencies:
colors "^1.4.0"

vuepress-plugin-container@^2.0.2:
vuepress-plugin-container@^2.0.2, vuepress-plugin-container@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/vuepress-plugin-container/-/vuepress-plugin-container-2.1.4.tgz#bd586587ffb303f847e4a6a2e2568171f311493b"
integrity sha512-l+EkeL+rC6DJch1wAZUFIkNDaz2TNOg4NQTHa3yMAsYkC+QaSRubGdN6YwOSmfjxVmM9s9D3gwBWw0O7OBhqRg==
Expand All @@ -11246,6 +11246,13 @@ vuepress-plugin-feed@^0.1.8:
remove-markdown "0.3.0"
striptags "3.1.1"

vuepress-plugin-git-log@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/vuepress-plugin-git-log/-/vuepress-plugin-git-log-1.0.1.tgz#22a6053ac2a2c9a8b5e9b5c4b08dcaa6dbf1d3f2"
integrity sha512-oVUfHdfvP0e7JBRIgwJ/Kmxj1AO+JJyTEsNRnBRw7YBlIfJIIC/zcGFidupsw6LSr1+UTHdGqn2vlYr8Ade6Fw==
dependencies:
cross-spawn "^6.0.5"

vuepress-plugin-mailchimp@^1.4.1:
version "1.4.2"
resolved "https://registry.yarnpkg.com/vuepress-plugin-mailchimp/-/vuepress-plugin-mailchimp-1.4.2.tgz#373fa1df8f03a8993817b09ddfb8bd9d04a1c665"
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


0 comments on commit 3339771

Please sign in to comment.