Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #308

Merged
merged 207 commits into from
Jan 10, 2025
Merged

Dev #308

Show file tree
Hide file tree
Changes from 206 commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
2c66cc0
add new prod script command to package.json
natalialuzuriaga Oct 21, 2024
f554eb5
add baseurl var to project card template for project report link
natalialuzuriaga Oct 21, 2024
ed5069b
update prod checks
natalialuzuriaga Oct 21, 2024
a81f3b7
Merge pull request #270 from DSACMS/nat/test-prod-command
natalialuzuriaga Oct 25, 2024
939c514
Merge branch 'main' into dev
Oct 27, 2024
da0a660
Merge branch 'main' into dev
Oct 27, 2024
0effc86
Merge branch 'main' into dev
Oct 27, 2024
556cf9d
Merge branch 'main' into dev
Oct 27, 2024
6831121
Merge branch 'main' into dev
Oct 27, 2024
1e9d568
Merge branch 'main' into dev
Oct 27, 2024
fe1014c
Merge branch 'main' into dev
Oct 27, 2024
b7da6b7
Merge branch 'main' into dev
Oct 27, 2024
d5d0f41
Merge branch 'main' into dev
Oct 27, 2024
2bcc3f4
Merge branch 'main' into dev
Oct 27, 2024
553dcc0
Merge branch 'main' into dev
Oct 27, 2024
fcc4a94
Merge branch 'main' into dev
Oct 27, 2024
1bf95e3
Merge branch 'main' into dev
Oct 27, 2024
48110b2
Merge branch 'main' into dev
Oct 29, 2024
4473023
Merge branch 'main' into dev
Nov 3, 2024
337f78a
Merge branch 'main' into dev
Nov 3, 2024
9439c1d
Merge branch 'main' into dev
Nov 3, 2024
f27fa23
Merge branch 'main' into dev
Nov 3, 2024
2febe39
Merge branch 'main' into dev
Nov 3, 2024
19a49bc
Merge branch 'main' into dev
Nov 3, 2024
3e01dbf
Merge branch 'main' into dev
Nov 3, 2024
8db0571
Merge branch 'main' into dev
Nov 3, 2024
5e12cbf
Merge branch 'main' into dev
Nov 3, 2024
0fbb675
Merge branch 'main' into dev
Nov 3, 2024
bd4e6df
Merge branch 'main' into dev
Nov 3, 2024
6b9f273
Merge branch 'main' into dev
Nov 3, 2024
4990581
Merge branch 'main' into dev
Nov 3, 2024
36fd752
Merge branch 'main' into dev
Nov 6, 2024
1874245
Merge branch 'main' into dev
Nov 10, 2024
71bf3a9
Merge branch 'main' into dev
Nov 10, 2024
c23c830
Merge branch 'main' into dev
Nov 10, 2024
9401e58
Merge branch 'main' into dev
Nov 10, 2024
bbcb14c
Merge branch 'main' into dev
Nov 10, 2024
abf0417
Merge branch 'main' into dev
Nov 10, 2024
0c5f4bf
Merge branch 'main' into dev
Nov 10, 2024
675b8d3
Merge branch 'main' into dev
Nov 10, 2024
e42ecb6
Merge branch 'main' into dev
Nov 10, 2024
11c2ecb
Merge branch 'main' into dev
Nov 10, 2024
18d2b40
Merge branch 'main' into dev
Nov 10, 2024
e5bb5c1
Merge branch 'main' into dev
Nov 10, 2024
a17e7f1
Merge branch 'main' into dev
Nov 10, 2024
e78c8fe
Merge branch 'main' into dev
Nov 10, 2024
d156ee7
Merge branch 'main' into dev
Nov 10, 2024
73edb74
Merge branch 'main' into dev
Nov 13, 2024
0e52ce4
Merge branch 'main' into dev
Nov 16, 2024
f85337e
Merge branch 'main' into dev
Nov 17, 2024
0d98736
Merge branch 'main' into dev
Nov 17, 2024
d76615b
Merge branch 'main' into dev
Nov 17, 2024
a7ee3eb
Merge branch 'main' into dev
Nov 17, 2024
bc763fd
Merge branch 'main' into dev
Nov 17, 2024
32e82af
Merge branch 'main' into dev
Nov 17, 2024
1175dd7
Merge branch 'main' into dev
Nov 17, 2024
695638d
Merge branch 'main' into dev
Nov 17, 2024
bbf1fa9
Merge branch 'main' into dev
Nov 17, 2024
c1a3722
Merge branch 'main' into dev
Nov 17, 2024
ae80010
Merge branch 'main' into dev
Nov 17, 2024
cf14b03
Merge branch 'main' into dev
Nov 17, 2024
70bbae9
Merge branch 'main' into dev
Nov 17, 2024
b3d2911
Merge branch 'main' into dev
Nov 17, 2024
12246fb
Merge branch 'main' into dev
Nov 17, 2024
ca57304
Merge branch 'main' into dev
Nov 17, 2024
5d17ab6
Merge branch 'main' into dev
Nov 24, 2024
1df5790
Merge branch 'main' into dev
Nov 24, 2024
5e733a0
Merge branch 'main' into dev
Nov 24, 2024
fb8f7a3
Merge branch 'main' into dev
Nov 24, 2024
774f95d
Merge branch 'main' into dev
Nov 24, 2024
0e85a86
Merge branch 'main' into dev
Nov 24, 2024
60e4f5b
Merge branch 'main' into dev
Nov 24, 2024
e5abbf8
Merge branch 'main' into dev
Nov 24, 2024
fcd8c00
Merge branch 'main' into dev
Nov 24, 2024
6eec56c
Merge branch 'main' into dev
Nov 24, 2024
1851ae7
Merge branch 'main' into dev
Nov 24, 2024
994be57
Merge branch 'main' into dev
Nov 24, 2024
982a6e5
Merge branch 'main' into dev
Nov 24, 2024
1dbf29a
Merge branch 'main' into dev
Nov 24, 2024
cd377ff
Merge branch 'main' into dev
Nov 24, 2024
dd62ab8
Merge branch 'main' into dev
Nov 24, 2024
98c7419
Merge branch 'main' into dev
Nov 25, 2024
853d164
Create menu toggle
DinneK Nov 26, 2024
f256c15
Change navigation menu to toggle
DinneK Nov 26, 2024
963c656
Reafactor home main
DinneK Nov 29, 2024
6b675d6
Refactor footer
DinneK Nov 29, 2024
0b130a2
Refactor orgs page
DinneK Nov 29, 2024
c2b0fa7
Add functionality to projects search
DinneK Dec 1, 2024
96e2811
Merge branch 'main' into dev
Dec 1, 2024
77c2c4a
Merge branch 'main' into dev
Dec 1, 2024
55950cd
Merge branch 'main' into dev
Dec 1, 2024
35e03d0
Merge branch 'main' into dev
Dec 1, 2024
2300410
Merge branch 'main' into dev
Dec 1, 2024
2c03d29
Merge branch 'main' into dev
Dec 1, 2024
17f57ba
Merge branch 'main' into dev
Dec 1, 2024
8b8ca6f
Merge branch 'main' into dev
Dec 1, 2024
b8fe126
Merge branch 'main' into dev
Dec 1, 2024
d15faab
Merge branch 'main' into dev
Dec 1, 2024
219c485
Merge branch 'main' into dev
Dec 1, 2024
fa0ac34
Merge branch 'main' into dev
Dec 1, 2024
f5c8dcd
Merge branch 'main' into dev
Dec 1, 2024
2d292dd
Merge branch 'main' into dev
Dec 1, 2024
cdc8629
Merge branch 'main' into dev
Dec 1, 2024
207edab
Add pagination
DinneK Dec 3, 2024
5e233c9
Fix search to hide org name when org.length === 0
DinneK Dec 3, 2024
a86938f
Fix project filtering
DinneK Dec 3, 2024
eb4a372
Fix check boxes
DinneK Dec 3, 2024
1ae823c
Fix sort functioanlity
DinneK Dec 4, 2024
9953c78
Fix sort functionality
DinneK Dec 4, 2024
e181739
Merge branch 'dev' into Refactor-projects-page
DinneK Dec 4, 2024
d52ddd2
Update app/.eleventy.js
DinneK Dec 4, 2024
10e3cc5
Update app/site/_includes/banner.liquid
DinneK Dec 4, 2024
0c0c458
Update app/site/_includes/project-card.liquid
DinneK Dec 4, 2024
7eb8e40
Update app/site/index.liquid
DinneK Dec 4, 2024
5a878a2
Update app/site/index.liquid
DinneK Dec 4, 2024
0ffd6c5
Update app/src/css/style.css
DinneK Dec 5, 2024
8a82ec3
Update app/src/css/style.css
DinneK Dec 5, 2024
aaf91af
Update app/src/css/style.css
DinneK Dec 5, 2024
b46a19d
Style Pagination
DinneK Dec 5, 2024
f2165a6
fix report link
DinneK Dec 5, 2024
2fe83d7
Add conditional for local and in prod testing
DinneK Dec 5, 2024
a397f63
Style filters
DinneK Dec 6, 2024
9628f4b
Set searches
DinneK Dec 6, 2024
e3b1957
Set main menu
DinneK Dec 6, 2024
5a013e2
Begin org styling
DinneK Dec 6, 2024
0925791
Updated project card url
natalialuzuriaga Dec 6, 2024
950252f
Begin org styling
DinneK Dec 6, 2024
334eeaa
Begin org styling
DinneK Dec 6, 2024
5d85a59
Merge pull request #294 from DSACMS/Refactor-projects-page
DinneK Dec 6, 2024
ddadc40
Merge branch 'main' into dev
Dec 8, 2024
3677b30
Merge branch 'main' into dev
Dec 8, 2024
b95f412
Merge branch 'main' into dev
Dec 8, 2024
dd78535
Merge branch 'main' into dev
Dec 8, 2024
d603cc9
Merge branch 'main' into dev
Dec 8, 2024
dcad009
Merge branch 'main' into dev
Dec 8, 2024
368a839
Merge branch 'main' into dev
Dec 8, 2024
a23438f
Merge branch 'main' into dev
Dec 8, 2024
96d8dd3
Merge branch 'main' into dev
Dec 8, 2024
2500006
Merge branch 'main' into dev
Dec 8, 2024
25d7c53
Merge branch 'main' into dev
Dec 8, 2024
203299b
Merge branch 'main' into dev
Dec 8, 2024
9969058
Merge branch 'main' into dev
Dec 8, 2024
67d5ca2
Merge branch 'main' into dev
Dec 8, 2024
8c2a0e1
Merge branch 'main' into dev
Dec 8, 2024
05cd910
Merge branch 'main' into dev
Dec 8, 2024
656ea93
Fix nav menu functionality
DinneK Dec 8, 2024
144814f
Fix org label positions
DinneK Dec 8, 2024
8d209a7
Merge branch 'dev' into Fix-nav-menu
DinneK Dec 9, 2024
b2a5b5a
Merge pull request #297 from DSACMS/Fix-nav-menu
DinneK Dec 9, 2024
cc15ebc
Merge branch 'main' into dev
Dec 15, 2024
700e3e1
Merge branch 'main' into dev
Dec 15, 2024
f6179b5
Merge branch 'main' into dev
Dec 15, 2024
e2b6bcb
Merge branch 'main' into dev
Dec 15, 2024
d2a9508
Merge branch 'main' into dev
Dec 15, 2024
ee3da3a
Merge branch 'main' into dev
Dec 15, 2024
51f5bf8
Merge branch 'main' into dev
Dec 15, 2024
07af721
Merge branch 'main' into dev
Dec 15, 2024
324bb8b
Merge branch 'main' into dev
Dec 15, 2024
71b14bd
Merge branch 'main' into dev
Dec 15, 2024
6a3c295
Merge branch 'main' into dev
Dec 15, 2024
62895c4
Merge branch 'main' into dev
Dec 15, 2024
8dd701d
Merge branch 'main' into dev
Dec 15, 2024
b7ff2e3
Merge branch 'main' into dev
Dec 15, 2024
835ca7e
Merge branch 'main' into dev
Dec 15, 2024
ed05bbe
Merge branch 'main' into dev
Dec 15, 2024
e8bf7bc
Merge branch 'main' into dev
Dec 22, 2024
fcad9d8
Merge branch 'main' into dev
Dec 22, 2024
a7bcc1b
Merge branch 'main' into dev
Dec 22, 2024
d07a943
Merge branch 'main' into dev
Dec 22, 2024
258fd82
Merge branch 'main' into dev
Dec 22, 2024
77614b1
Merge branch 'main' into dev
Dec 22, 2024
50139e7
Merge branch 'main' into dev
Dec 22, 2024
c5056a5
Merge branch 'main' into dev
Dec 22, 2024
7443288
Merge branch 'main' into dev
Dec 22, 2024
43650fd
Merge branch 'main' into dev
Dec 22, 2024
a9dba87
Merge branch 'main' into dev
Dec 22, 2024
c24a712
Merge branch 'main' into dev
Dec 22, 2024
b6a69ca
Merge branch 'main' into dev
Dec 22, 2024
6ae2637
Merge branch 'main' into dev
Dec 22, 2024
73be5cb
Merge branch 'main' into dev
Dec 22, 2024
91d8874
Merge branch 'main' into dev
Dec 22, 2024
e644a50
Fix nav menu
DinneK Dec 23, 2024
703ab32
Change logic in project graphs
DinneK Dec 30, 2024
a1451f6
Add modal functionality
DinneK Jan 2, 2025
9eb2a3b
Add graph info
DinneK Jan 2, 2025
3d6ad7d
Add org modal descriptions
DinneK Jan 2, 2025
ce32041
Merge branch 'main' into dev
Jan 5, 2025
1c3ed8f
Merge branch 'main' into dev
Jan 5, 2025
45397c6
Merge branch 'main' into dev
Jan 5, 2025
61f9a0f
Merge branch 'main' into dev
Jan 5, 2025
d6f9994
Merge branch 'main' into dev
Jan 5, 2025
ea661ef
Merge branch 'main' into dev
Jan 5, 2025
dee067c
Merge branch 'main' into dev
Jan 5, 2025
e545d85
Merge branch 'main' into dev
Jan 5, 2025
9942d63
Merge branch 'main' into dev
Jan 5, 2025
8435120
Merge branch 'main' into dev
Jan 5, 2025
c3e9862
Merge branch 'main' into dev
Jan 5, 2025
46b164d
Merge branch 'main' into dev
Jan 5, 2025
d9bf4e0
Merge branch 'main' into dev
Jan 5, 2025
337b14f
Merge branch 'main' into dev
Jan 5, 2025
04bc14e
Merge branch 'main' into dev
Jan 5, 2025
bd9277a
Merge branch 'main' into dev
Jan 5, 2025
2900e66
Add language to home
DinneK Jan 6, 2025
524b9c1
Merge pull request #303 from DSACMS/Project-graph-revamp
DinneK Jan 6, 2025
0b6e588
Add initial responsiveness
DinneK Jan 6, 2025
2445c06
Merge pull request #304 from DSACMS/Initial-mobile-responsiveness
IsaacMilarky Jan 7, 2025
5bc12e0
Merge branch 'main' into dev
Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module.exports = function (eleventyConfig) {

eleventyConfig.addPassthroughCopy({
"src/img": "assets/img",
"src/js": "src/js",
"site/img": "assets/img",
"site/_includes/css": "css",
"site/_includes/js": "assets/js",
Expand All @@ -88,7 +89,7 @@ module.exports = function (eleventyConfig) {
"stroke-width": 2,
})

const pathPrefix = process.env.NODE_ENV === "production" ? "/metrics" : ""
const pathPrefix = process.env.NODE_ENV.includes("production") ? "/metrics" : ""

return {
dir: {
Expand Down
5 changes: 5 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"start:eleventy": "eleventy --serve",
"start:rollup": "rollup --config rollup.config.mjs -w",
"start:postcss": "postcss ./src/css -d ./site/_includes/css -w",
"prod": "NODE_ENV=test-production run-s -l prod:*",
"prod:clean": "rm -rf dist",
"prod:rollup": "rollup --config rollup.config.mjs --bundleConfigAsCjs",
"prod:postcss": "postcss ./src/css -d ./site/_includes/css",
"prod:eleventy": "eleventy --serve",
"build": "NODE_ENV=production run-s -l build:*",
"build:clean": "rm -rf dist",
"build:rollup": "rollup --config rollup.config.mjs --bundleConfigAsCjs",
Expand Down
2 changes: 1 addition & 1 deletion app/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
plugins: [
require("postcss-import"),
require("autoprefixer"),
...(process.env.NODE_ENV === "production"
...(process.env.NODE_ENV.includes("production")
? [
require("cssnano"),
require("@fullhuman/postcss-purgecss")({
Expand Down
2 changes: 1 addition & 1 deletion app/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default [
resolve(),
babel(),
commonjs(),
...(process.env.NODE_ENV === "production" ? [terser()] : []),
...(process.env.NODE_ENV.includes("production") ? [terser()] : []),
],
},
]
9 changes: 5 additions & 4 deletions app/site/_data/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const path = require("path");

module.exports = function () {
const dataDirectory = path.join(__dirname);
var projects = [];
const projects = [];

// Read the list of organization directories
var orgDirectories = fs.readdirSync(dataDirectory);
const orgDirectories = fs.readdirSync(dataDirectory);

// Iterate through organization directories
orgDirectories.forEach((orgDirectory) => {
Expand Down Expand Up @@ -37,7 +37,8 @@ module.exports = function () {
}
});
}

});

return projects;
return projects
};
11 changes: 6 additions & 5 deletions app/site/_data/site.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const production = process.env.NODE_ENV === "production"
const isProduction = process.env.NODE_ENV.includes("production")
const isTest = process.env.NODE_ENV.includes("test")

const host = production ? "https://dsacms.github.io" : "http://0.0.0.0:8080"
const host = (isProduction && !isTest) ? "https://dsacms.github.io" : "http://localhost:8080"

// For modifying the <base> tag
const baseurl = production ? "/metrics" : ""
const baseurl = isProduction ? "/metrics" : ""

module.exports = {
name: "CMS Metrics Website",
Expand All @@ -13,8 +14,8 @@ module.exports = {
baseurl,
url: `${host}${baseurl}`,
domain: (host || "").replace("https://", ""),
production,
robots: production,
production: isProduction,
robots: isProduction,
locale: "en-US",
// TODO: Add nav elements for deployment
nav: [{ url: "/about/", label: "About" }],
Expand Down
2 changes: 2 additions & 0 deletions app/site/_includes/assets.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@
<link rel="stylesheet" href="{{ site.url }}/css/style.css">

<script type="module" src="{{ "/assets/js/index.js" | url}}"></script>
<script type="module" src="{{ "/src/js/nav.js" | url}}"></script>
<script type="module" src="{{ "/src/js/modal.js" | url}}"></script>
6 changes: 4 additions & 2 deletions app/site/_includes/banner.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
</p>
</div>
</div>
{% comment %} <section
<!-- {% comment %} -->
<section
class="usa-banner"
aria-label="Official website of the United States government"
>
Expand Down Expand Up @@ -100,4 +101,5 @@
</div>
</div>
</div>
</section> {% endcomment %}
</section>
<!-- {% endcomment %} -->
32 changes: 23 additions & 9 deletions app/site/_includes/graph-section.liquid
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
{% assign className = class | default: 'graph-container' %}
{% assign className = class | default: 'graph-container-{{ title | slugify}}' %}
{% assign devPath = 'site/_graphs' | append: path %}
{% assign distPath = baseurl | append: '/assets/img/graphs' | append: path %}
{% assign fileExtension = path | split: '.' | last %}
{% assign modal_description = modal_description %}

{% if devPath | fileExists %}
<div class="{{ className }}">
<h3>{{ title }}</h3>
<figure>
{% if fileExtension == 'svg' %}
<embed type="image/svg+xml" src="{{ distPath }}">
{% else %}
<img src="{{ distPath }}">
{% endif %}
</figure>
<div class="graph-box">
<h3 class="graph-title">{{ title }}</h3>
<figure>
{% if fileExtension == 'svg' %}
<embed type="image/svg+xml" src="{{ distPath }}">
{% else %}
<img src="{{ distPath }}">
{% endif %}
</figure>
<div class="modal-button-styling">
<a
href="#{{ title | slugify }}-modal"
class="usa-button modal-button"
aria-controls="{{ title | slugify }}-modal"
data-open-modal
>
Learn More
</a>
</div>
{% render "modal-content", title: title, modal_description: modal_description %}
</div>
</div>
{% endif %}
68 changes: 41 additions & 27 deletions app/site/_includes/graph-toggle.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% assign graphName = name| append: "-graph" %}
{% assign buttonName = name | append: "-button-" %}
{% assign graphsCheck = true %}
{% assign modal_description = modal_description %}

{% comment %} Check for file existence of graphs {% endcomment %}
{% for path in graphs %}
Expand All @@ -13,36 +14,49 @@

{% comment %} Render components accordingly {% endcomment %}
{% if graphsCheck %}
<div class="graph-container">
<h3>{{ title }}</h3>
<ul class="usa-button-group ">
{% for option in options %}
<li class="usa-button-group__item">
<div class="graph-container-{{ title | slugify }}">
<div class="graph-box">
<h3 class="graph-title">{{ title }}</h3>
<ul class="usa-button-group">
{% for option in options %}
<li class="usa-button-group__item">
{% if forloop.first %}
<button type="button" id={{ buttonName | append: forloop.index0 }} class="usa-button" onclick="showGraph({{ forloop.index0 }}, '{{ graphName }}','{{ buttonName }}')">{{ option }}</button>
{% else %}
<button type="button" id={{ buttonName | append: forloop.index0 }} class="usa-button usa-button--outline" onclick="showGraph({{ forloop.index0 }}, '{{ graphName }}','{{ buttonName }}')">{{ option }}</button>
{% endif %}
</li>
{% endfor %}
</ul>
{% for graph in graphs %}
{% if forloop.first %}
<button type="button" id={{ buttonName | append: forloop.index0 }} class="usa-button" onclick="showGraph({{ forloop.index0 }}, '{{ graphName }}','{{ buttonName }}')">{{ option }}</button>
<div class={{ graphName }} id="{{ forloop.index0 }}">
{% else %}
<button type="button" id={{ buttonName | append: forloop.index0 }} class="usa-button usa-button--outline" onclick="showGraph({{ forloop.index0 }}, '{{ graphName }}','{{ buttonName }}')">{{ option }}</button>
<div class={{ graphName }} id="{{ forloop.index0 }}" style="display: none;">
{% endif %}
</li>
{% assign graphPath = graph | strip %}
{% assign distPath = baseurl | append: "/assets/img/graphs" | append: graphPath %}
{% assign fileExtension = graphPath | split: '.' | last %}
<figure>
{% if fileExtension == 'svg' %}
<embed type="image/svg+xml" src="{{ distPath }}" />
{% else %}
<img src="{{ distPath }}"/>
{% endif %}
</figure>
<div class="modal-button-styling">
<a
href="#{{ title | slugify }}-modal"
class="usa-button modal-button"
aria-controls="{{ title | slugify }}-modal"
data-open-modal
>
Learn More
</a>
</div>
{% render "modal-content", title: title, modal_description: modal_description %}
</div>
{% endfor %}
</ul>
{% for graph in graphs %}
{% if forloop.first %}
<div class={{ graphName }} id="{{ forloop.index0 }}">
{% else %}
<div class={{ graphName }} id="{{ forloop.index0 }}" style="display: none;">
{% endif %}
{% assign graphPath = graph | strip %}
{% assign distPath = baseurl | append: "/assets/img/graphs" | append: graphPath %}
{% assign fileExtension = graphPath | split: '.' | last %}
<figure>
{% if fileExtension == 'svg' %}
<embed type="image/svg+xml" src="{{ distPath }}" />
{% else %}
<img src="{{ distPath }}"/>
{% endif %}
</figure>
</div>
{% endfor %}
</div>
</div>
{% endif %}
37 changes: 37 additions & 0 deletions app/site/_includes/modal-content.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<div class="margin-y-3">
<div
class="usa-modal"
id="{{ title | slugify }}-modal"
aria-labelledby="{{ title | slugify }}-modal-heading"
aria-describedby="{{ title | slugify }}-modal-description"
aria-hidden="true"
>
<div class="usa-modal__content">
<div class="usa-modal__main">
<h2 class="usa-modal__heading" id="{{ title | slugify }}-modal-heading">
{{ title }}
</h2>
<div class="usa-prose">
<p id="{{ title | slugify }}-modal-description">
{{ modal_description }}
</p>
</div>
<div class="usa-modal__footer">
<button type="button" class="usa-button modal-button" data-close-modal>
Close
</button>
</div>
</div>
<button
type="button"
class="usa-button-exit usa-modal__close"
aria-label="Close this window"
data-close-modal
>
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use href="/assets/img/sprite.svg#close"></use>
</svg>
</button>
</div>
</div>
</div>
76 changes: 50 additions & 26 deletions app/site/_includes/nav.liquid
Original file line number Diff line number Diff line change
@@ -1,39 +1,63 @@
<div class="usa-overlay"></div>
<header class="usa-header usa-header--basic">
<div class="usa-nav-container">
<div class="usa-navbar">
<div class="usa-navigation-container">
<div class="usa-nav-bar">
<div class="title">
<img src="{{ "/assets/img/cms-logo.jpg" | url }}" class="logo" alt="CMS Logo">
<h1>Metrics Website</h1>
</div>
<div class="usa-logo">
<em class="usa-logo__text">
<a href="{{ "/" | url}}" title="{{site.title}}">{{ site.title }}</a>
</em>
</div>
<button type="button" class="usa-menu-btn">Menu</button>
</div>
<nav aria-label="Primary navigation" class="usa-nav">
<button type="button" class="usa-nav__close">
<img src="{{"/assets/img/usa-icons/close.svg" | url}}" role="img" alt="Close">
</button>
<ul class="usa-nav__primary usa-accordion">
<li class="usa-nav__primary-item">
<a href="{{ "/" | url}}" class="usa-nav-link {% if page.url == "/" %}usa-current{% endif %}">
<span>Home</span>
</a>
</li>
<li class="usa-nav__primary-item">
<a
href="{{ "/organizations/" | url}}"
class="usa-nav-link {% if page.url contains "/organizations/" %}usa-current{% endif %}"
>
<span>Organizations</span>
</a>
</li>
<nav aria-label="Primary navigation" class="usa-nav nav-styling">
<ul class="usa-nav__primary usa-accordion usa-nav__primary-navigation">
<li class="usa-nav__primary-item">
<a
href="{{ "/projects/" | url}}"
class="usa-nav-link {% if page.url contains "/projects/" %}usa-current{% endif %}"
<button
type="button"
class="usa-accordion__button usa-nav__link button-styling"
aria-expanded="false"
aria-controls="basic-nav-section-one"
>
<span>Projects</span>
</a>
<svg
class="usa-icon--size-7 toggle-icon"
aria-hidden="true"
focusable="false"
role="img"
>
<use href="{{ site.baseurl }}/assets/img/sprite.svg#menu">
</svg>
</button>
<ul id="basic-nav-section-one" class="usa-nav__submenu">
<li class="close-icon">
<svg class="usa-icon--size-4 button-styling" aria-hidden="true" focusable="false" role="img">
<use href="{{ site.baseurl }}/assets/img/sprite.svg#close"></use>
</svg>
</li>
<li class="usa-nav__primary-item">
<a href="{{ "/" | url}}" class="usa-nav-link {% if page.url == "/" %}usa-current{% endif %}">
<span>Home</span>
</a>
</li>
<li class="usa-nav__primary-item">
<a
href="{{ "/organizations/" | url}}"
class="usa-nav-link {% if page.url contains "/organizations/" %}usa-current{% endif %}"
>
<span>Organizations</span>
</a>
</li>
<li class="usa-nav__primary-item">
<a
href="{{ "/projects/" | url}}"
class="usa-nav-link {% if page.url contains "/projects/" %}usa-current{% endif %}"
>
<span>Projects</span>
</a>
</li>
</ul>
</li>
</ul>
</nav>
Expand Down
Loading
Loading