Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
widgets
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
energenious-open-source
widgets
Commits
f90372a5
Commit
f90372a5
authored
Sep 21, 2020
by
Łukasz Starosta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved external links to top of sidebar
parent
75293d09
Pipeline
#192388070
passed with stages
in 6 minutes and 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
pages/config.js
pages/config.js
+1
-1
pages/src/components/mdxComponents/anchor.js
pages/src/components/mdxComponents/anchor.js
+2
-6
pages/src/components/sidebar/index.js
pages/src/components/sidebar/index.js
+14
-12
No files found.
pages/config.js
View file @
f90372a5
...
...
@@ -41,7 +41,7 @@ const config = {
],
links
:
[
{
text
:
"
Energenious
"
,
link
:
"
https://energenious.eu
"
},
{
text
:
"
Live Examples
"
,
link
:
`
${
pathPrefix
}
/storybook`
}
{
text
:
"
Examples (Storybook)
"
,
link
:
`
${
pathPrefix
}
/storybook`
}
],
frontline
:
false
,
ignoreIndex
:
false
,
...
...
pages/src/components/mdxComponents/anchor.js
View file @
f90372a5
import
*
as
React
from
'
react
'
;
import
*
as
React
from
"
react
"
;
const
AnchorTag
=
({
children
:
link
,
...
props
})
=>
{
if
(
link
)
{
return
(
<
a
href
=
{
props
.
href
}
target
=
"
_blank
"
rel
=
"
noopener noreferrer
"
>
{
link
}
<
/a
>
);
return
<
a
href
=
{
props
.
href
}
>
{
link
}
<
/a>
;
}
else
{
return
null
;
}
...
...
pages/src/components/sidebar/index.js
View file @
f90372a5
import
React
from
'
react
'
;
import
Tree
from
'
./tree
'
;
import
{
StaticQuery
,
graphql
}
from
'
gatsby
'
;
import
styled
from
'
@emotion/styled
'
;
import
{
ExternalLink
}
from
'
react-feather
'
;
import
config
from
'
../../../config
'
;
import
React
from
"
react
"
;
import
Tree
from
"
./tree
"
;
import
{
StaticQuery
,
graphql
}
from
"
gatsby
"
;
import
styled
from
"
@emotion/styled
"
;
import
{
ExternalLink
}
from
"
react-feather
"
;
import
config
from
"
../../../config
"
;
// eslint-disable-next-line no-unused-vars
const
ListItem
=
styled
(({
className
,
active
,
level
,
...
props
})
=>
{
...
...
@@ -45,7 +45,7 @@ const ListItem = styled(({ className, active, level, ...props }) => {
}
`
;
const
Sidebar
=
styled
(
'
aside
'
)
`
const
Sidebar
=
styled
(
"
aside
"
)
`
width: 100%;
height: 100vh;
overflow: auto;
...
...
@@ -111,15 +111,13 @@ const SidebarLayout = ({ location }) => (
<
Sidebar
>
{
config
.
sidebar
.
title
?
(
<
div
className
=
{
'
sidebarTitle hiddenMobile
'
}
className
=
{
"
sidebarTitle hiddenMobile
"
}
dangerouslySetInnerHTML
=
{{
__html
:
config
.
sidebar
.
title
}}
/
>
)
:
null
}
<
ul
className
=
{
'
sideBarUL
'
}
>
<
Tree
edges
=
{
allMdx
.
edges
}
/
>
{
config
.
sidebar
.
links
&&
config
.
sidebar
.
links
.
length
>
0
&&
<
Divider
/>
}
<
ul
className
=
{
"
sideBarUL
"
}
>
{
config
.
sidebar
.
links
.
map
((
link
,
key
)
=>
{
if
(
link
.
link
!==
''
&&
link
.
text
!==
''
)
{
if
(
link
.
link
!==
""
&&
link
.
text
!==
""
)
{
return
(
<
ListItem
key
=
{
key
}
to
=
{
link
.
link
}
>
{
link
.
text
}
...
...
@@ -128,6 +126,10 @@ const SidebarLayout = ({ location }) => (
);
}
})}
{
config
.
sidebar
.
links
&&
config
.
sidebar
.
links
.
length
>
0
&&
(
<
Divider
/>
)}
<
Tree
edges
=
{
allMdx
.
edges
}
/
>
<
/ul
>
<
/Sidebar
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment