IEEE.org
|
IEEE Xplore Digital Library
|
IEEE Standards
|
IEEE Spectrum
|
More Sites
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Open at RIT
RIT Open Programs Website
Commits
63d2fd93
Commit
63d2fd93
authored
Jun 14, 2022
by
Amy Rose
Browse files
use project sources in project page
parent
1e549719
Pipeline
#795
passed with stage
in 3 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
_layouts/project.html
View file @
63d2fd93
...
...
@@ -31,6 +31,9 @@ subnav:
{% endcomment %}
<h2>
About
</h2>
<div
id=
"project-about"
></div>
<h3>
Resources
</h3>
<ul
id=
"project-sources"
></ul>
<div
id=
"project-owner"
></div>
<!-- TODO: include for this? -->
<div
id=
"project-services"
>
...
...
assets/js/project.js
View file @
63d2fd93
...
...
@@ -45,6 +45,12 @@ function populate(data) {
const
project_about_div
=
document
.
getElementById
(
"
project-about
"
);
project_about_div
.
innerText
=
data
[
"
desc
"
];
const
sources_ul
=
document
.
getElementById
(
"
project-sources
"
);
data
[
"
sources
"
].
forEach
(
source_data
=>
{
const
source_li
=
create_source
(
source_data
);
sources_ul
.
appendChild
(
source_li
);
});
const
project_metrics_div
=
document
.
getElementById
(
"
project-metrics
"
);
data
[
"
embeds
"
].
forEach
(
embed_data
=>
{
const
embed
=
create_embed
(
embed_data
);
...
...
@@ -55,6 +61,18 @@ function populate(data) {
unhide_div
(
"
project-content
"
);
}
function
create_source
(
source_data
)
{
/* Create the list item */
const
source_li
=
document
.
createElement
(
"
li
"
);
/* Create the link */
const
source_a
=
document
.
createElement
(
"
a
"
);
source_a
.
setAttribute
(
"
href
"
,
source_data
[
"
url
"
]);
source_a
.
innerText
=
source_data
[
"
type
"
];
/* Put the link in the list item and return it */
source_li
.
appendChild
(
source_a
);
return
source_li
;
}
function
create_embed
(
embed_data
)
{
/* Create the container */
const
embed_container
=
document
.
createElement
(
"
div
"
);
...
...
Write
Preview
Supports
Markdown
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