-
Notifications
You must be signed in to change notification settings - Fork 144
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 #444 from mitre-attack/faq-page-updates
Sidebar changes
- Loading branch information
Showing
38 changed files
with
749 additions
and
119 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,32 @@ | ||
var resizer = document.querySelector(".resizer"); | ||
var sidebar = document.querySelector(".sidebar"); | ||
$(document).ready(function (){ | ||
resizeSidebar( resizer, sidebar ); | ||
}); | ||
|
||
|
||
function resizeSidebar( resizer, sidebar ) { | ||
var x = 0; | ||
var w = 0; | ||
|
||
function resizeSidebar_mousedownHandler( event ) { | ||
x = event.clientX; | ||
var sidebarWidth = window.getComputedStyle( sidebar ).width; | ||
w = parseInt( sidebarWidth ); | ||
document.addEventListener("mousemove", resizeSidebar_mousemoveHandler); | ||
document.addEventListener("mouseup", resizeSidebar_mouseupHandler); | ||
} | ||
|
||
function resizeSidebar_mousemoveHandler( event ) { | ||
var dx = event.clientX - x; | ||
var newsidebarWidth = w + dx; | ||
sidebar.style.width = `${ newsidebarWidth }px`; | ||
} | ||
|
||
function resizeSidebar_mouseupHandler() { | ||
document.removeEventListener("mouseup", resizeSidebar_mouseupHandler); | ||
document.removeEventListener("mousemove", resizeSidebar_mousemoveHandler); | ||
} | ||
|
||
resizer.addEventListener("mousedown", resizeSidebar_mousedownHandler); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{% extends "general/two-column.html" %} | ||
{% set active_page = "resources" -%} | ||
{% set title = "MITRE ATT&CKcon - " + page.title + " | MITRE ATT&CK®" -%} | ||
{% set con = page.data | from_json %} | ||
{% import 'macros/navigation.html' as navigation %} | ||
|
||
{% block innerleft %} | ||
<div id="v-tab" role="tablist" aria-orientation="vertical" class="h-100"> | ||
{{navigation.sidenav(RESOURCE_NAV, output_file)}} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block innerright %} | ||
{{ super () }} | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a href="/">Home</a></li> | ||
<li class="breadcrumb-item"><a href="/resources">Resources</a></li> | ||
<li class="breadcrumb-item"><a href="/resources/attackcon">ATT&CKcon</a></li> | ||
<li class="breadcrumb-item">{{ con.title }}</a></li> | ||
</ol> | ||
|
||
<div class="tab-content attackcons p-4 mb-3"> | ||
{% set conID = "-".join(con.date.split(' ')) %} | ||
<div class="container pb-3 uniform-block"> | ||
{% if "banner_img" in con %} | ||
<p> | ||
<img src="{{ con.banner_img }}" width="100%"> | ||
</p> | ||
{% endif %} | ||
|
||
{% if "description" in con %} | ||
<p>{{con.description}}</p> | ||
{% endif %} | ||
{% if "blogpost" in con %} | ||
<p><a target="_blank" href="{{con.blogpost}}">Click here to read our blog post about {{con.title}}! <img src="/theme/images/external-site-dark.jpeg" alt="External site" class="external-icon"></a></p> | ||
{% endif %} | ||
|
||
<div class="presentations card-block" id="presentations"> | ||
<h2>Presentations</h2> | ||
{% for presentation in con.presentations %} | ||
{% set isPanel = "moderator" in presentation %} | ||
<div class="card w-100 mt-1"> | ||
<div class="card-header collapsed" id="{{conID}}-{{loop.index}}-header" data-toggle="collapse" data-target="#{{conID}}-{{loop.index}}-body" aria-expanded="false" aria-controls="{{conID}}-{{loop.index}}-body"> | ||
<h5 class="mb-0">{{loop.index}}. {{presentation.title}} | ||
<small> | ||
{% if not isPanel %} | ||
({% for presenterGroup in presentation.presenters %}{% if loop.index > 1 %}; {% endif %}{{ " and ".join(presenterGroup.names)}}{% if "organization" in presenterGroup %}, {{presenterGroup.organization}}{% endif %}{% endfor %}) | ||
{% else %} | ||
(Moderated by {{presentation.moderator.name}}, {{presentation.moderator.organization}}) | ||
{% endif %} | ||
</small> | ||
</h5> | ||
</div> | ||
<div id="{{conID}}-{{loop.index}}-body" class="collapse" aria-labelledby="{{conID}}-{{loop.index}}-header"> | ||
<div class="card-body"> | ||
{% if not isPanel %} | ||
<p class="card-text">{{presentation.description}}</p> | ||
{% else %} | ||
<p class="card-text">Panelists:</p> | ||
<ul class="card-text"> | ||
{% for panelist in presentation.panelists %} | ||
<li> | ||
{{panelist}} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<p class="card-text">{{presentation.moderator.name}} moderates a panel that discusses:</p> | ||
<ul class="card-text"> | ||
{% for topic in presentation.topics %} | ||
<li> | ||
{{topic}} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
{% if "video" in presentation %} | ||
<a class="card-link" target="_blank" href="{{presentation.video}}">video <img src="/theme/images/external-site-dark.jpeg" alt="External site" class="external-icon"></a> | ||
{% else %} | ||
<span class="card-link">(no video)</span> | ||
{% endif %} | ||
|
||
{% if "slides" in presentation %} | ||
<a class="card-link" target="_blank" href="{{presentation.slides}}">slides <img src="/theme/images/external-site-dark.jpeg" alt="External site" class="external-icon"></a> | ||
{% else %} | ||
<span class="card-link">(no slides)</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endfor %} | ||
</div> | ||
{% if "sponsors_img" in con %} | ||
<div> | ||
<h2>Sponsors</h2> | ||
<img src="{{ con.sponsors_img }}" width="100%"> | ||
</div> | ||
{% elif "sponsors_img_list" in con %} | ||
<div> | ||
<h2>Sponsors</h2> | ||
<div class="sponsors-block"> | ||
{% for sponsor_img in con.sponsors_img_list %} | ||
<div class="img-container"> | ||
<img src="{{sponsor_img}}"> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
{% endblock %} | ||
|
||
<!--startindex--> | ||
{% block scripts %} | ||
{{ super() }} | ||
<!--SCRIPTS--> | ||
<script src="/theme/scripts/navigation.js"></script> | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{% extends "general/two-column.html" %} | ||
{% set active_page = "resources" -%} | ||
{% set title = "FAQ - " + page.title + " | MITRE ATT&CK®" -%} | ||
{% set parsed = page.data | from_json %} | ||
{% import 'macros/navigation.html' as navigation %} | ||
|
||
{% block innerleft %} | ||
<div id="v-tab" role="tablist" aria-orientation="vertical" class="h-100"> | ||
{{navigation.sidenav(RESOURCE_NAV, output_file)}} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block innerright %} | ||
<!--stopindex--> | ||
<div class="px-3"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a href="/">Home</a></li> | ||
<li class="breadcrumb-item"><a href="/resources">Resources</a></li> | ||
<li class="breadcrumb-item">FAQ</li> | ||
</ol> | ||
</div> | ||
<div class="container pb-3 uniform-block"> | ||
<h1 class="text-center">Frequently Asked Questions</h1> | ||
<div class="card-block faq"> | ||
<div class="clearfix pb-3"> | ||
<h2>{{parsed.name}}</h2> | ||
<div> | ||
<h3>Table of Contents</h3> | ||
<ol> | ||
<h5> | ||
{% for qa in parsed.questions %} | ||
|
||
<li> | ||
<a href="#{{qa.id}}-header">{{qa.question}}</a> | ||
</li> | ||
{% endfor %} | ||
</h5> | ||
</ol> | ||
<hr color="black"> | ||
</div> | ||
<div> | ||
<ol> | ||
{% for qa in parsed.questions %} | ||
<div> | ||
<div class="card-title" id="{{qa.id}}-header"> | ||
<li> | ||
{{qa.question}} | ||
</li> | ||
</div> | ||
<div class="card-data"> | ||
{{qa.answer}} | ||
</div> | ||
<hr> | ||
|
||
</div> | ||
{% endfor %} | ||
</ol> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
<!--startindex--> | ||
{% block scripts %} | ||
{{ super() }} | ||
<!--SCRIPTS--> | ||
<script src="/theme/scripts/navigation.js"></script> | ||
{% endblock %} |
Oops, something went wrong.