Skip to content

Commit

Permalink
Added download button
Browse files Browse the repository at this point in the history
added download button with icon at the side of the github one. Solution using DownGit tool. @nevrome maybe you can find a better CSS setting without creating an id to overwrite table configuration
  • Loading branch information
Andros-Spica committed Sep 17, 2022
1 parent eb19af1 commit 0fccc30
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
29 changes: 27 additions & 2 deletions website_generator/package_page_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,43 @@ cat(paste(authors, collapse = "<br>"))

---

#### Module files at
#### Module files

```{r}
github_link <- htmltools::tags$a(
fontawesome::fa("github", fill = "#03989E", height = '100px'),
target = "_blank",
href = paste0("https://github.com/Archaeology-ABM/NASSA-modules/tree/main/", module_name)
)
download_link <- htmltools::tags$a(
fontawesome::fa("download", fill = "#03989E", height = '100px'),
target = "_blank",
href = paste0(
"https://minhaskamal.github.io/DownGit/#/home?url=", # using DownGit tool
"https://github.com/Archaeology-ABM/NASSA-modules/tree/main/",
module_name)
)
### TO-DO: get a schematic printout of the file structure to be shown at the right side of the GiHub icon?
```

`r github_link`
<table class="pageHeader">
<tr id="structGrid">
<td>
Go to repository
</td>
<td style="text-align: left;">
Download
</td>
</tr>
<tr id="structGrid">
<td>
`r github_link`
</td>
<td style="text-align: left;">
`r download_link`
</td>
</tr>
</table>

</div>
<div class="column">
Expand Down
7 changes: 7 additions & 0 deletions website_generator/website_source/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ thead, tfoot, tr:nth-child(even) { background: #eee; }
padding: 20px;
margin: 20px;
}

#structGrid {
border: 0;
border-collapse: collapse;
text-align: center;
background-color: transparent;
}

2 comments on commit 0fccc30

@nevrome
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the question here, @Andros-Spica?

@Andros-Spica
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! nothing! It was just me making sure you saw that bigger change. I will keep mentions only for actual questions!

Please sign in to comment.