diff --git a/package.json b/package.json index c0b73ec..66ff37c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitdocs", - "version": "2.0.0-beta10", + "version": "2.0.0-beta11", "description": "Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.", "license": "MIT", "homepage": "https://github.com/timberio/gitdocs#readme", diff --git a/themes/default/components/container.js b/themes/default/components/container.js deleted file mode 100644 index cdbb4e1..0000000 --- a/themes/default/components/container.js +++ /dev/null @@ -1,6 +0,0 @@ -import styled from 'react-emotion' - -export default styled('div')` - width: 1024px; - margin: 0 auto; -` diff --git a/themes/default/markdown/index.js b/themes/default/markdown/index.js index 5986542..0c1e928 100644 --- a/themes/default/markdown/index.js +++ b/themes/default/markdown/index.js @@ -5,6 +5,7 @@ import { Wrapper } from './styles' import Code from './overrides/Code' import Header from './overrides/Header' import Link from './overrides/Link' +import Tip from './overrides/Tip' export default function (props) { const options = { @@ -40,6 +41,9 @@ export default function (props) { component: Header, props: { level: 6 }, }, + Tip: { + component: Tip, + }, a: Link, } } diff --git a/themes/default/markdown/overrides/Tip.js b/themes/default/markdown/overrides/Tip.js new file mode 100644 index 0000000..c10934d --- /dev/null +++ b/themes/default/markdown/overrides/Tip.js @@ -0,0 +1,29 @@ +import styled from 'react-emotion' + +export default styled('div')` + padding: 12px 24px 12px 20px; + margin: 2em 0; + border-left: 4px solid; + position: relative; + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; + border-left-color: #3c763d; + background-color: rgba(241,249,241,.83); + + &::before { + background-color: #3c763d; + content: "!"; + position: absolute; + top: 50%; + transform: translateY(-50%); + left: -12px; + color: #fff; + width: 20px; + height: 20px; + border-radius: 100%; + text-align: center; + line-height: 20px; + font-weight: 700; + font-family: Dosis,Source Sans Pro,Helvetica Neue,Arial,sans-serif; + } +` diff --git a/themes/default/markdown/styles.js b/themes/default/markdown/styles.js index 0415412..b612c5e 100644 --- a/themes/default/markdown/styles.js +++ b/themes/default/markdown/styles.js @@ -14,6 +14,7 @@ export const Wrapper = styled('div')` text-decoration: none; margin: 0; color: #0D0A2B; + line-height: initial; } a:first-of-type { diff --git a/themes/default/search/styles.js b/themes/default/search/styles.js index b4b3078..1494c3b 100644 --- a/themes/default/search/styles.js +++ b/themes/default/search/styles.js @@ -25,6 +25,7 @@ export const Results = styled('div')` width: 100%; top: 65px; height: 50vh; + min-width: 400px; max-width: 700px; max-height: 700px; overflow: scroll;