-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zachlasiuk/main
Fixed several features like table highlighting, active category filter display, and github links fixed.
- Loading branch information
Showing
8 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os, yaml | ||
|
||
# LOAD ALL CATS | ||
all_cats = '' | ||
with open('data/all_categories.yml', 'r') as all_cat_file: | ||
all_cats = yaml.safe_load(all_cat_file) | ||
|
||
# CREATE NEW ACTIVE_CATS LIST | ||
content_dir = 'content/sw_database' | ||
active_cats = [] | ||
for content_file in os.listdir(content_dir): | ||
if (content_file != ('_index.md')) and content_file.endswith('.md'): | ||
# OBTAIN CATEGORY FROM FILE | ||
cat = None | ||
with open(os.path.join(content_dir, content_file), 'r') as f: | ||
content_all = f.read() | ||
start = content_all.find('---') | ||
end = content_all.find('---', start + 3) | ||
content_metadata = content_all[start+3:end].strip() | ||
cat = yaml.safe_load(content_metadata).get('category') | ||
# ADD TO ACTIVE_CATS LIST IF NOT ALREADY PRESENT | ||
if cat in all_cats: | ||
if cat not in active_cats: | ||
active_cats.append(cat) | ||
|
||
# SAVE ACTIVE_CATS LIST | ||
with open('data/active_categories.yml', 'w') as active_cats_file: | ||
yaml.safe_dump(list(active_cats), active_cats_file, default_flow_style=False) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
--- | ||
title: Arm Ecosystem Dashboard | ||
active_filters: | ||
- test1 | ||
- ttx | ||
--- | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- Containers and Orchestration | ||
- Runtimes | ||
- Databases - noSQL | ||
- Compilers/Tools | ||
- Monitoring/Observability | ||
- Databases - Big-data | ||
- Distros | ||
- Storage | ||
- Operating System | ||
- Networking |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
themes/arm-design-system-hugo-theme/layouts/partials/eco-dashboard/github-links.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- GitHub links calculated from GitHub repo, defined in config.toml --> | ||
{{ $pathFormatted := replace .File.Path "\\" "/" -}} | ||
{{ $gh_repo := ($.Param "github_repo") -}} | ||
{{ $gh_branch := (default "main" ($.Param "github_branch")) -}} | ||
{{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted -}} | ||
|
||
{{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path -}} | ||
|
||
<!-- Display github elements --> | ||
|
||
<a href="{{ $editURL }}" target="_blank" style="text-decoration: none;"> | ||
<p class="github-link"> | ||
<span> | ||
<i class="left-hand-icon fa-brands fa-github"></i> | ||
Issues? Update here. | ||
</span> | ||
</p> | ||
</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters