-
{{ page.title }}
+
+
{% endblock %}
{% block scripts %}
diff --git a/attack-theme/templates/macros/navigation_menu.html b/attack-theme/templates/macros/navigation_menu.html
index 1aa97d850b2..8adb025cb55 100644
--- a/attack-theme/templates/macros/navigation_menu.html
+++ b/attack-theme/templates/macros/navigation_menu.html
@@ -48,7 +48,7 @@
+{% endmacro %}
+
+{% macro child_has_child(element) %}
+
+
{% endmacro %}
\ No newline at end of file
diff --git a/data/resources_navigation.json b/data/resources_navigation.json
index d9c71f7884f..08a20f1c4b8 100644
--- a/data/resources_navigation.json
+++ b/data/resources_navigation.json
@@ -14,6 +14,12 @@
"path": "/resources/getting-started/",
"children": []
},
+ {
+ "name": "Contribute",
+ "id": "contribute",
+ "path": "/resources/contribute/",
+ "children": []
+ },
{
"name": "Training",
"id": "training",
@@ -69,6 +75,12 @@
"path": "/resources/brand/",
"children": []
},
+ {
+ "name": "Benefactors",
+ "id": "benefactors",
+ "path": "/resources/benefactors/",
+ "children": []
+ },
{
"name": "Privacy Policy",
"id": "privacy",
@@ -86,6 +98,12 @@
"id": "changelog",
"path": "/resources/changelog.html",
"children": []
+ },
+ {
+ "name": "Contact",
+ "id": "contact",
+ "path": "/contact/",
+ "children": []
}
]
}
diff --git a/modules/benefactors/__init__.py b/modules/benefactors/__init__.py
new file mode 100644
index 00000000000..f21046ea539
--- /dev/null
+++ b/modules/benefactors/__init__.py
@@ -0,0 +1,21 @@
+from . import benefactors
+from . import benefactors_config
+import json
+
+
+def get_priority():
+ return benefactors_config.priority
+
+
+def get_menu():
+ return {
+ "display_name": "Benefactors",
+ "module_name": "Benefactors",
+ "url": "/resources/benefactors/",
+ "external_link": False,
+ "priority": benefactors_config.priority,
+ "children": [],
+ }
+
+def run_module():
+ return (benefactors.generate_benefactors(), benefactors_config.module_name)
diff --git a/modules/benefactors/benefactors.py b/modules/benefactors/benefactors.py
new file mode 100644
index 00000000000..4861ab2fdbe
--- /dev/null
+++ b/modules/benefactors/benefactors.py
@@ -0,0 +1,28 @@
+import json
+import math
+import os
+
+from modules import util
+
+from . import benefactors_config
+from .. import site_config
+
+
+def generate_benefactors():
+ """Generate benefactors page markdown"""
+
+ # Create content pages directory if does not already exist
+ util.buildhelpers.create_content_pages_dir()
+
+ # Move templates to templates directory
+ util.buildhelpers.move_templates(benefactors_config.module_name, benefactors_config.benefactors_templates_path)
+
+ # Create directory if it does not exist
+ if not os.path.isdir(benefactors_config.benefactors_markdown_path):
+ os.mkdir(benefactors_config.benefactors_markdown_path)
+
+ benefactors_md = benefactors_config.benefactors_md
+
+ # write markdown to file
+ with open(os.path.join(benefactors_config.benefactors_markdown_path, "benefactors.md"), "w", encoding="utf8") as md_file:
+ md_file.write(benefactors_md)
diff --git a/modules/benefactors/benefactors_config.py b/modules/benefactors/benefactors_config.py
new file mode 100644
index 00000000000..ae8ae4db38f
--- /dev/null
+++ b/modules/benefactors/benefactors_config.py
@@ -0,0 +1,12 @@
+module_name = "Benefactors"
+priority = 9
+
+# Markdown path for benefactors
+benefactors_markdown_path = "content/pages/resources"
+
+# String template for benefactors index page
+benefactors_md = (
+ "Title: Benefactors\n" "Template: benefactors/benefactors\n" "save_as: resources/benefactors/index.html\n" "data: "
+)
+
+benefactors_templates_path = "modules/benefactors/templates"
diff --git a/modules/benefactors/templates/benefactors.html b/modules/benefactors/templates/benefactors.html
new file mode 100644
index 00000000000..ab7b3823ae6
--- /dev/null
+++ b/modules/benefactors/templates/benefactors.html
@@ -0,0 +1,34 @@
+{% extends "general/two-column.html" %}
+{% set active_page = "resources" -%}
+{% set title = "Benefactors | MITRE ATT&CK®" -%}
+{% import 'macros/navigation.html' as navigation %}
+
+{% block innerleft %}
+
+ {{navigation.sidenav(RESOURCE_NAV, output_file)}}
+
+{% endblock %}
+
+{% block innerright %}
+
+
+{% endblock %}
+{% block scripts %}
+{{ super () }}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/modules/blog/blog_config.py b/modules/blog/blog_config.py
index cd6759f8ece..b26974ea252 100644
--- a/modules/blog/blog_config.py
+++ b/modules/blog/blog_config.py
@@ -1,2 +1,2 @@
module_name = "Blog"
-priority = 9
+priority = 10
diff --git a/modules/campaigns/__init__.py b/modules/campaigns/__init__.py
index 7887aef5dae..99ff4eaa234 100644
--- a/modules/campaigns/__init__.py
+++ b/modules/campaigns/__init__.py
@@ -5,17 +5,5 @@
def get_priority():
return campaigns_config.priority
-
-def get_menu():
- return {
- "display_name": campaigns_config.module_name,
- "module_name": campaigns_config.module_name,
- "url": "/campaigns",
- "external_link": False,
- "priority": campaigns_config.priority,
- "children": [],
- }
-
-
def run_module():
return (campaigns.generate_campaigns(), campaigns_config.module_name)
diff --git a/modules/contribute/__init__.py b/modules/contribute/__init__.py
deleted file mode 100644
index b81b657ddb8..00000000000
--- a/modules/contribute/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from . import contribute
-from . import contribute_config
-import json
-
-
-def get_priority():
- return contribute_config.priority
-
-
-def get_menu():
- return {
- "display_name": "Contribute",
- "module_name": "Contribute",
- "url": "/resources/contribute/",
- "external_link": False,
- "priority": contribute_config.priority,
- "children": [],
- }
-
-
-def get_redirections():
- with open(contribute_config.contribute_redirection_location, "r", encoding="utf8") as json_redirections:
- return json.load(json_redirections)
- return []
-
-
-def run_module():
- return (contribute.generate_contribute(), contribute_config.module_name)
diff --git a/modules/contribute/contribute.py b/modules/contribute/contribute.py
deleted file mode 100644
index 6f9e2d52aa0..00000000000
--- a/modules/contribute/contribute.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import json
-import math
-import os
-
-from modules import util
-
-from . import contribute_config
-from .. import site_config
-
-
-def generate_contribute():
- """Generate contribute page markdown"""
-
- # Create content pages directory if does not already exist
- util.buildhelpers.create_content_pages_dir()
-
- # Move templates to templates directory
- util.buildhelpers.move_templates(contribute_config.module_name, contribute_config.contribute_templates_path)
-
- # Generate redirections
- util.buildhelpers.generate_redirections(
- redirections_filename=contribute_config.contribute_redirection_location, redirect_md=site_config.redirect_md
- )
-
- ms = util.relationshipgetters.get_ms()
- contributors = util.stixhelpers.get_contributors(ms)
-
- if not contributors:
- util.buildhelpers.remove_module_from_menu(contribute_config.module_name)
- return
-
- data = {}
-
- data["contributors"] = []
-
- contributors_first_col = []
- contributors_second_col = []
-
- half = math.ceil((len(contributors)) / 2)
- list_size = len(contributors)
-
- for index in range(0, half):
- contributors_first_col.append(contributors[index])
-
- for index in range(half, list_size):
- contributors_second_col.append(contributors[index])
-
- data["contributors"].append(contributors_first_col)
- data["contributors"].append(contributors_second_col)
-
- subs = contribute_config.contribute_index_md + json.dumps(data)
-
- # Create directory if it does not exist
- if not os.path.isdir(contribute_config.contribute_markdown_path):
- os.mkdir(contribute_config.contribute_markdown_path)
-
- # Open markdown file for the contribute page
- with open(
- os.path.join(contribute_config.contribute_markdown_path, "contribute.md"), "w", encoding="utf8"
- ) as md_file:
- md_file.write(subs)
diff --git a/modules/contribute/contribute_config.py b/modules/contribute/contribute_config.py
deleted file mode 100644
index 857319849bd..00000000000
--- a/modules/contribute/contribute_config.py
+++ /dev/null
@@ -1,14 +0,0 @@
-module_name = "Contribute"
-priority = 10
-
-# Markdown path for contribute
-contribute_markdown_path = "content/pages/resources"
-
-# String template for contribution index page
-contribute_index_md = (
- "Title: Contribute\n" "Template: contribute/contribute\n" "save_as: resources/contribute/index.html\n" "data: "
-)
-
-contribute_templates_path = "modules/contribute/templates"
-
-contribute_redirection_location = "modules/contribute/contribute_redirections.json"
diff --git a/modules/datasources/__init__.py b/modules/datasources/__init__.py
index 722076992e1..8790954c0db 100644
--- a/modules/datasources/__init__.py
+++ b/modules/datasources/__init__.py
@@ -9,12 +9,22 @@ def get_priority():
def get_menu():
return {
- "display_name": datasources_config.module_name,
+ "display_name": datasources_config.module_tab_name,
"module_name": datasources_config.module_name_no_spaces,
"url": "/datasources",
"external_link": False,
"priority": datasources_config.priority,
- "children": [],
+ "children": [
+ {"display_name": "Data Sources", "url": "/datasources", "external_link": False, "children": []},
+ {"display_name": "Mitigations", "url": "/mitigations/", "external_link": False, "children": [
+ {"display_name": "Enterprise", "url": "/mitigations/enterprise/", "external_link": False, "children": []},
+ {"display_name": "Mobile", "url": "/mitigations/mobile/", "external_link": False, "children": []},
+ {"display_name": "ICS", "url": "/mitigations/ics/", "external_link": False, "children": []},
+ ]},
+ {"display_name": "Groups", "url": "/groups", "external_link": False, "children": []},
+ {"display_name": "Software", "url": "/software", "external_link": False, "children": []},
+ {"display_name": "Campaigns", "url": "/datasources", "external_link": False, "children": []},
+ ],
}
diff --git a/modules/datasources/datasources_config.py b/modules/datasources/datasources_config.py
index 220a45a81d3..df784ac0416 100644
--- a/modules/datasources/datasources_config.py
+++ b/modules/datasources/datasources_config.py
@@ -2,6 +2,7 @@
module_name = "Data Sources"
module_name_no_spaces = "datasources"
+module_tab_name = "Defenses and CTI"
priority = 4.1
diff --git a/modules/groups/__init__.py b/modules/groups/__init__.py
index 96480c1aee3..aa2ad69da15 100644
--- a/modules/groups/__init__.py
+++ b/modules/groups/__init__.py
@@ -6,17 +6,5 @@
def get_priority():
return groups_config.priority
-
-def get_menu():
- return {
- "display_name": groups_config.module_name,
- "module_name": groups_config.module_name,
- "url": "/groups",
- "external_link": False,
- "priority": groups_config.priority,
- "children": [],
- }
-
-
def run_module():
return (groups.generate_groups(), groups_config.module_name)
diff --git a/modules/mitigations/__init__.py b/modules/mitigations/__init__.py
index 704fd5eb3e5..40d74cfbd41 100644
--- a/modules/mitigations/__init__.py
+++ b/modules/mitigations/__init__.py
@@ -6,20 +6,5 @@ def get_priority():
return mitigations_config.priority
-def get_menu():
- return {
- "display_name": mitigations_config.module_name,
- "module_name": mitigations_config.module_name,
- "url": "/mitigations/",
- "external_link": False,
- "priority": mitigations_config.priority,
- "children": [
- {"display_name": "Enterprise", "url": "/mitigations/enterprise/", "external_link": False, "children": []},
- {"display_name": "Mobile", "url": "/mitigations/mobile/", "external_link": False, "children": []},
- {"display_name": "ICS", "url": "/mitigations/ics/", "external_link": False, "children": []},
- ],
- }
-
-
def run_module():
return (mitigations.generate_mitigations(), mitigations_config.module_name)
diff --git a/modules/resources/__init__.py b/modules/resources/__init__.py
index 1f4e4eb7d35..fd1805b7fd2 100644
--- a/modules/resources/__init__.py
+++ b/modules/resources/__init__.py
@@ -22,6 +22,12 @@ def get_menu():
"external_link": False,
"children": [],
},
+ {
+ "display_name": "Contribute",
+ "url": "/resources/contribute/",
+ "external_link": False,
+ "children": [],
+ },
{"display_name": "Training", "url": "/resources/training/", "external_link": False, "children": []},
{"display_name": "ATT&CKcon", "url": "/resources/attackcon/", "external_link": False, "children": []},
{
diff --git a/modules/contribute/contribute_redirections.json b/modules/resources/contribute_redirections.json
similarity index 100%
rename from modules/contribute/contribute_redirections.json
rename to modules/resources/contribute_redirections.json
diff --git a/modules/resources/resources.py b/modules/resources/resources.py
index 3b84026e294..4433bde8ddb 100644
--- a/modules/resources/resources.py
+++ b/modules/resources/resources.py
@@ -3,6 +3,7 @@
import shutil
from datetime import datetime
from pathlib import Path
+import math
from loguru import logger
from mitreattack.attackToExcel import attackToExcel
@@ -37,11 +38,21 @@ def generate_resources():
if site_config.resource_nav["children"][i]["id"] == "versions":
del site_config.resource_nav["children"][i]
+ build_benefactors_module = False
+ for module_info in modules.run_ptr:
+ if module_info["module_name"] == "benefactors":
+ build_benefactors_module = True
+ if not build_benefactors_module:
+ for i, child in enumerate(site_config.resource_nav["children"]):
+ if site_config.resource_nav["children"][i]["id"] == "benefactors":
+ del site_config.resource_nav["children"][i]
+
# Move templates to templates directory
util.buildhelpers.move_templates(resources_config.module_name, resources_config.resources_templates_path)
copy_docs(module_docs_path=resources_config.docs_path)
generate_working_with_attack()
generate_general_information()
+ generate_contribute_page()
generate_training_pages()
generate_brand_page()
generate_attackcon_page()
@@ -355,3 +366,43 @@ def generate_working_with_attack():
os.path.join(site_config.resources_markdown_path, "working_with_attack.md"), "w", encoding="utf8"
) as md_file:
md_file.write(working_with_attack_content)
+
+def generate_contribute_page():
+ """Responsible for generating the markdown pages of the contribute pages."""
+ logger.info("Generating contributing page")
+
+ # Generate redirections
+ util.buildhelpers.generate_redirections(
+ redirections_filename=resources_config.contribute_redirection_location, redirect_md=site_config.redirect_md
+ )
+
+ ms = util.relationshipgetters.get_ms()
+ contributors = util.stixhelpers.get_contributors(ms)
+
+ data = {}
+
+ data["contributors"] = []
+
+ contributors_first_col = []
+ contributors_second_col = []
+
+ half = math.ceil((len(contributors)) / 2)
+ list_size = len(contributors)
+
+ for index in range(0, half):
+ contributors_first_col.append(contributors[index])
+
+ for index in range(half, list_size):
+ contributors_second_col.append(contributors[index])
+
+ data["contributors"].append(contributors_first_col)
+ data["contributors"].append(contributors_second_col)
+
+ subs = resources_config.contribute_md + json.dumps(data)
+
+ # Open markdown file for the contribute page
+ with open(
+ os.path.join(site_config.resources_markdown_path, "contribute.md"), "w", encoding="utf8"
+ ) as md_file:
+ md_file.write(subs)
+
diff --git a/modules/resources/resources_config.py b/modules/resources/resources_config.py
index 5c438a74dad..4ce4a342e1a 100644
--- a/modules/resources/resources_config.py
+++ b/modules/resources/resources_config.py
@@ -34,6 +34,11 @@
"Template: resources/training-cti\n"
"save_as: resources/training/cti/index.html\n"
)
+contribute_md = (
+ "Title: Contribute\n" "Template: resources/contribute\n" "save_as: resources/contribute/index.html\n" "data: "
+)
+
+contribute_redirection_location = "modules/resources/contribute_redirections.json"
# Brand md
brand_md = "Title: Brand\n" "Template: resources/brand\n" "save_as: resources/brand/index.html\n" "data: "
diff --git a/modules/resources/templates/contact.html b/modules/resources/templates/contact.html
index bac0a4d9b8d..8601b12d567 100644
--- a/modules/resources/templates/contact.html
+++ b/modules/resources/templates/contact.html
@@ -1,10 +1,17 @@
-{% extends "general/base.html" %}
+{% extends "general/two-column.html" %}
{% set active_page = "contact" -%}
{% set title = "Contact | MITRE ATT&CK®" %}
+{% import 'macros/navigation.html' as navigation %}
-{% block content %}
+{% block innerleft %}
+
+ {{navigation.sidenav(RESOURCE_NAV, output_file)}}
+
+{% endblock %}
+
+{% block innerright %}
{{ super () }}
-
+
Contact Us!
@@ -15,4 +22,10 @@
Contact Us!
For learning how to submit contributions to ATT&CK, read our contribute page
+{% endblock %}
+
+{% block scripts %}
+{{ super() }}
+
+
{% endblock %}
\ No newline at end of file
diff --git a/modules/contribute/templates/contribute.html b/modules/resources/templates/contribute.html
similarity index 90%
rename from modules/contribute/templates/contribute.html
rename to modules/resources/templates/contribute.html
index 9e092044aaf..5d1fca332f9 100644
--- a/modules/contribute/templates/contribute.html
+++ b/modules/resources/templates/contribute.html
@@ -1,19 +1,29 @@
-{% extends "general/base.html" %}
+{% extends "general/two-column.html" %}
{% set active_page = "resources" -%}
{% set title = "Contribute | MITRE ATT&CK®" -%}
{% set parsed = page.data | from_json %}
+{% import 'macros/navigation.html' as navigation %}
-{% block content %} {{ super () }}
-
-
-
+{% block innerleft %}
+
+ {{navigation.sidenav(RESOURCE_NAV, output_file)}}
+
+{% endblock %}
+
+{% block innerright %}
+
-
-
Contribute
+
-{% endblock %} {% block scripts %} {{ super () }}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
+{% block scripts %} {{ super () }}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/modules/software/__init__.py b/modules/software/__init__.py
index e9d0f6a651b..103553ec56d 100644
--- a/modules/software/__init__.py
+++ b/modules/software/__init__.py
@@ -5,16 +5,6 @@
def get_priority():
return software_config.priority
-def get_menu():
- return {
- "display_name": software_config.module_name,
- "module_name": software_config.module_name,
- "url": "/software/",
- "external_link": False,
- "priority": software_config.priority,
- "children": []
- }
-
# TODO commented out to resolve infinite redirect loop when run locally. Needs further testing before code removal.
# def get_redirections():
# with open(software_config.software_redirection_location , "r", encoding="utf8") as json_redirections:
diff --git a/update-attack.py b/update-attack.py
index 602fd29cc56..6bf29a89952 100644
--- a/update-attack.py
+++ b/update-attack.py
@@ -29,7 +29,7 @@
"subdirectory",
"tests",
]
-extras = ["resources", "versions", "contribute", "blog", "stixtests"]
+extras = ["resources", "versions", "blog", "stixtests", "benefactors"]
test_choices = ["size", "links", "external_links", "citations"]
@@ -229,7 +229,7 @@ def remove_from_menu():
ptr["run_module"]()
end_time = time.time()
util.buildhelpers.print_end(ptr["module_name"], start_time, end_time)
-
+
# Print end of module
update_end = time.time()
util.buildhelpers.print_end("TOTAL Update Time", update_start, update_end)
From 07dd712e9008a43373dc468ddcf2fef32170bb94 Mon Sep 17 00:00:00 2001
From: Charissa Miller <48832936+clemiller@users.noreply.github.com>
Date: Fri, 22 Sep 2023 11:53:18 -0400
Subject: [PATCH 35/51] update navbar
---
modules/assets/__init__.py | 12 ------------
modules/datasources/__init__.py | 1 +
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/modules/assets/__init__.py b/modules/assets/__init__.py
index 454a48536c3..f39002b53e5 100644
--- a/modules/assets/__init__.py
+++ b/modules/assets/__init__.py
@@ -5,17 +5,5 @@
def get_priority():
return assets_config.priority
-
-def get_menu():
- return {
- "display_name": assets_config.module_name,
- "module_name": assets_config.module_name,
- "url": "/assets",
- "external_link": False,
- "priority": assets_config.priority,
- "children": [],
- }
-
-
def run_module():
return (assets.generate_assets(), assets_config.module_name)
diff --git a/modules/datasources/__init__.py b/modules/datasources/__init__.py
index 8790954c0db..9d0e95b11c8 100644
--- a/modules/datasources/__init__.py
+++ b/modules/datasources/__init__.py
@@ -24,6 +24,7 @@ def get_menu():
{"display_name": "Groups", "url": "/groups", "external_link": False, "children": []},
{"display_name": "Software", "url": "/software", "external_link": False, "children": []},
{"display_name": "Campaigns", "url": "/datasources", "external_link": False, "children": []},
+ {"display_name": "Assets", "url": "/assets", "external_link": False, "children": [] },
],
}
From e471215d22605f38b4de5feccd0e66aaff437bcc Mon Sep 17 00:00:00 2001
From: adpare
Date: Fri, 22 Sep 2023 12:05:15 -0400
Subject: [PATCH 36/51] campaigns link changed
---
modules/datasources/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/datasources/__init__.py b/modules/datasources/__init__.py
index 8790954c0db..5c33c5c4402 100644
--- a/modules/datasources/__init__.py
+++ b/modules/datasources/__init__.py
@@ -23,7 +23,7 @@ def get_menu():
]},
{"display_name": "Groups", "url": "/groups", "external_link": False, "children": []},
{"display_name": "Software", "url": "/software", "external_link": False, "children": []},
- {"display_name": "Campaigns", "url": "/datasources", "external_link": False, "children": []},
+ {"display_name": "Campaigns", "url": "/campaigns", "external_link": False, "children": []},
],
}
From c595399d319eeac88dbcd235657d1d06ccc92014 Mon Sep 17 00:00:00 2001
From: adpare
Date: Wed, 27 Sep 2023 10:12:11 -0400
Subject: [PATCH 37/51] code cleanup
---
...-load-resources.js => sidebar-load-all.js} | 3 ++
.../static/scripts/sidebar-load-campaigns.js | 31 -----------------
.../static/scripts/sidebar-load-groups.js | 31 -----------------
.../static/scripts/sidebar-load-matrices.js | 34 -------------------
.../scripts/sidebar-load-mitigations.js | 31 -----------------
.../static/scripts/sidebar-load-software.js | 31 -----------------
.../static/scripts/sidebar-load-tactics.js | 31 -----------------
.../static/scripts/sidebar-load-techniques.js | 31 -----------------
attack-theme/static/style/_layouts.scss | 5 +++
.../templates/general/attackcon-overview.html | 4 +--
.../templates/general/faq-overview.html | 4 +--
.../templates/general/intro-overview.html | 4 +--
modules/campaigns/templates/campaign.html | 4 +--
.../campaigns/templates/campaigns-index.html | 4 +--
modules/groups/templates/group.html | 4 +--
modules/groups/templates/groups-index.html | 6 ++--
modules/matrices/templates/matrix.html | 7 ++--
modules/mitigations/templates/mitigation.html | 6 ++--
.../templates/mitigations-domain-index.html | 6 ++--
modules/resources/templates/brand.html | 4 +--
.../resources/templates/getting-started.html | 4 +--
.../resources/templates/related-projects.html | 4 +--
modules/resources/templates/resources.html | 4 +--
modules/resources/templates/training-cti.html | 4 +--
modules/resources/templates/training.html | 4 +--
modules/resources/templates/update-post.html | 4 +--
.../resources/templates/updates-index.html | 4 +--
.../templates/working-with-attack.html | 4 +--
.../software/templates/software-index.html | 4 +--
modules/software/templates/software.html | 4 +--
modules/tactics/templates/tactic.html | 4 +--
.../templates/tactics-domain-index.html | 4 +--
modules/techniques/templates/technique.html | 5 ++-
.../templates/techniques-domain-index.html | 4 +--
modules/versions/templates/versions.html | 4 +--
.../website_build/templates/changelog.html | 4 +--
36 files changed, 66 insertions(+), 280 deletions(-)
rename attack-theme/static/scripts/{sidebar-load-resources.js => sidebar-load-all.js} (93%)
delete mode 100644 attack-theme/static/scripts/sidebar-load-campaigns.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-groups.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-matrices.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-mitigations.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-software.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-tactics.js
delete mode 100644 attack-theme/static/scripts/sidebar-load-techniques.js
diff --git a/attack-theme/static/scripts/sidebar-load-resources.js b/attack-theme/static/scripts/sidebar-load-all.js
similarity index 93%
rename from attack-theme/static/scripts/sidebar-load-resources.js
rename to attack-theme/static/scripts/sidebar-load-all.js
index 8f577e8369a..b628ee6cc1d 100644
--- a/attack-theme/static/scripts/sidebar-load-resources.js
+++ b/attack-theme/static/scripts/sidebar-load-all.js
@@ -10,6 +10,9 @@ $("#sidebars").load(mod_entry, function() {
else{
winlocation = window.location.href
}
+ if(!element.href.endsWith("/")){
+ element.href = element.href + "/";
+ }
if(element.href == winlocation){
$(element.parentNode).addClass("active")
}});
diff --git a/attack-theme/static/scripts/sidebar-load-campaigns.js b/attack-theme/static/scripts/sidebar-load-campaigns.js
deleted file mode 100644
index 28778ecb8e5..00000000000
--- a/attack-theme/static/scripts/sidebar-load-campaigns.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/campaigns/sidebar-campaigns", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-groups.js b/attack-theme/static/scripts/sidebar-load-groups.js
deleted file mode 100644
index e02e0cd58c0..00000000000
--- a/attack-theme/static/scripts/sidebar-load-groups.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/groups/sidebar-groups", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-matrices.js b/attack-theme/static/scripts/sidebar-load-matrices.js
deleted file mode 100644
index 942af251ed3..00000000000
--- a/attack-theme/static/scripts/sidebar-load-matrices.js
+++ /dev/null
@@ -1,34 +0,0 @@
-$("#sidebars").load("/matrices/sidebar-matrices", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(!element.href.endsWith("/")){
- element.href = element.href + "/";
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-mitigations.js b/attack-theme/static/scripts/sidebar-load-mitigations.js
deleted file mode 100644
index b6f33cd8fdc..00000000000
--- a/attack-theme/static/scripts/sidebar-load-mitigations.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/mitigations/sidebar-mitigations", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
- });
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-software.js b/attack-theme/static/scripts/sidebar-load-software.js
deleted file mode 100644
index b3ddcc1a8c7..00000000000
--- a/attack-theme/static/scripts/sidebar-load-software.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/software/sidebar-software", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-tactics.js b/attack-theme/static/scripts/sidebar-load-tactics.js
deleted file mode 100644
index a027727706a..00000000000
--- a/attack-theme/static/scripts/sidebar-load-tactics.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/tactics/sidebar-tactics", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/scripts/sidebar-load-techniques.js b/attack-theme/static/scripts/sidebar-load-techniques.js
deleted file mode 100644
index d4ea07d99d5..00000000000
--- a/attack-theme/static/scripts/sidebar-load-techniques.js
+++ /dev/null
@@ -1,31 +0,0 @@
-$("#sidebars").load("/techniques/sidebar-techniques", function() {
- var navElements = document.querySelectorAll('.sidenav-head > a');
- var winlocation;
- navElements.forEach(function(element){
- if(!window.location.href.endsWith("/")){
- winlocation = window.location.href + "/";
- }
- else{
- winlocation = window.location.href
- }
- if(element.href == winlocation){
- $(element.parentNode).addClass("active")
- }});
-
- //This code is for creating a collapsable sidebar for the mobile view
- var mediaQuery = window.matchMedia('(max-width: 47.9875rem)')
- function mobileSidenav(e) {
- if (e.matches) {
- $('#sidebar-collapse').collapse('hide')
- }
- else{
- $('#sidebar-collapse').collapse('show')
- }
- }
- $(document).ready(function() {
- mobileSidenav(mediaQuery)
- let sidenav_active_elements = $(".sidenav .active");
- sidenav_active_elements[0].scrollIntoView({ block: 'nearest', inline: 'start' })
- });
- mediaQuery.addEventListener('change', mobileSidenav)
-});
\ No newline at end of file
diff --git a/attack-theme/static/style/_layouts.scss b/attack-theme/static/style/_layouts.scss
index 7a278e0c49b..02a91afe6a6 100644
--- a/attack-theme/static/style/_layouts.scss
+++ b/attack-theme/static/style/_layouts.scss
@@ -1051,6 +1051,11 @@ pre {
/******/
+// how to display the sidebar
+div#sidebars {
+ display: contents
+}
+
/*Plus/Minus expand icons*/
// used in the expandable list items in the side navigation and in the expandable gray blocks in ATT&CKCON
.expand-icon {
diff --git a/attack-theme/templates/general/attackcon-overview.html b/attack-theme/templates/general/attackcon-overview.html
index 251c95f8ca7..380986eee32 100644
--- a/attack-theme/templates/general/attackcon-overview.html
+++ b/attack-theme/templates/general/attackcon-overview.html
@@ -5,7 +5,7 @@
{% import 'macros/navigation.html' as navigation %}
{% block innerleft %}
-
+
{% endblock %}
{% block innerright %}
@@ -115,5 +115,5 @@ Sponsors
{% block scripts %}
{{ super() }}
-
+
{% endblock %}
\ No newline at end of file
diff --git a/attack-theme/templates/general/faq-overview.html b/attack-theme/templates/general/faq-overview.html
index 61ee0ff074a..0abe4d06579 100644
--- a/attack-theme/templates/general/faq-overview.html
+++ b/attack-theme/templates/general/faq-overview.html
@@ -5,7 +5,7 @@
{% import 'macros/navigation.html' as navigation %}
{% block innerleft %}
-
+
{% endblock %}
{% block innerright %}
@@ -62,5 +62,5 @@