Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gatsby Theme Onegeo
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Libs
Gatsby Theme Onegeo
Commits
427f0dee
Commit
427f0dee
authored
1 year ago
by
Manoa Harinjo
Browse files
Options
Downloads
Patches
Plain Diff
run upload file and run link
parent
d24f8bc3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/core/Menu.tsx
+0
-2
0 additions, 2 deletions
src/components/core/Menu.tsx
src/templates/news.tsx
+32
-8
32 additions, 8 deletions
src/templates/news.tsx
with
32 additions
and
10 deletions
src/components/core/Menu.tsx
+
0
−
2
View file @
427f0dee
...
...
@@ -163,8 +163,6 @@ const Menu = (props: Imenu) => {
}
else
{
url
=
item
?.
url
}
console
.
log
(
"
at
"
,
item
?.
options
?.
link
)
return
(
<
li
key
=
{
"
M_
"
+
name
+
"
_L0_
"
+
key
}
>
<
Link
...
...
This diff is collapsed.
Click to expand it.
src/templates/news.tsx
+
32
−
8
View file @
427f0dee
...
...
@@ -10,6 +10,7 @@ import {
Button
,
Layout
,
Content
,
Link
,
}
from
"
@onegeo-suite/gatsby-theme-onegeo
"
const
SideBar
=
({
documents
,
links
})
=>
{
...
...
@@ -23,13 +24,18 @@ const SideBar = ({ documents, links }) => {
</
p
>
<
div
className
=
"mt-2 "
>
{
documents
.
map
((
item
:
any
,
key
:
number
)
=>
{
const
file
=
item
.
directus_files_id
.
imageFile
.
publicURL
return
(
<
ul
className
=
"leading-8"
key
=
{
key
}
>
<
li
>
{
item
.
directus_files_id
.
filename_download
}
<
a
href
=
{
file
}
target
=
"_blank"
download
>
{
item
.
directus_files_id
.
filename_download
}
</
a
>
</
li
>
</
ul
>
)
...
...
@@ -47,7 +53,17 @@ const SideBar = ({ documents, links }) => {
{
links
.
map
((
item
:
any
)
=>
{
return
(
<
ul
className
=
"leading-8"
key
=
{
item
.
id
}
>
<
li
>
{
item
.
links_id
.
url
}
</
li
>
<
li
>
<
Link
to
=
{
item
.
links_id
.
url
}
target
=
"_blank"
>
<
div
className
=
"overflow-hidden text-ellipsis"
>
{
"
"
}
{
item
.
links_id
.
url
}{
"
"
}
</
div
>
</
Link
>
</
li
>
</
ul
>
)
})
}
...
...
@@ -79,7 +95,11 @@ interface Idata {
}
documents
:
{
directus_files_id
:
{
filename_download
:
string
filename_disk
:
string
imageFile
:
{
publicURL
:
string
}
id
:
number
}
}
categories
:
{
...
...
@@ -108,7 +128,7 @@ const News = ({ pageContext, data, location }: PageProps<Idata>) => {
return
(
<
Layout
>
<
Content
className
=
"mx-64
pt-8
max-w-none"
>
<
Content
className
=
"mx-64 max-w-none
pt-8
"
>
<
div
className
=
"bg-base-100 rounded-xl p-6 shadow-lg"
>
<
Button
aria-label
=
"Retour"
...
...
@@ -220,7 +240,11 @@ export const query = graphql`
}
documents {
directus_files_id {
id
filename_download
imageFile {
publicURL
}
}
}
categories {
...
...
@@ -229,4 +253,4 @@ export const query = graphql`
}
}
}
`
\ No newline at end of file
`
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment