Skip to content

Commit 7b5bdec

Browse files
committed
update chapters
1 parent d2125b8 commit 7b5bdec

File tree

3 files changed

+95
-27
lines changed

3 files changed

+95
-27
lines changed

Diff for: _drafts/2022-01-04-Ubiq-Memberbenefit.docx

-17.6 KB
Binary file not shown.

Diff for: pages/chapters/chapter_status.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ Jump to
9494
---
9595

9696
<section id='last-update'></section>
97-
98-
### All Chapters and Most Recent Update
97+
<!-- update this to only be active chapters per DA -->
98+
### Last Updated and By Number of Meetings
9999
<ul>
100100
{% assign chapters = site.data.chapters | sort: 'meetings' | reverse %}
101101
{% for chapter in chapters %}
102+
{% if chapter.build != 'no pages' %}
102103
{% assign custr = chapter.updated | date: "%Y-%m-%d" %}
103104
{% assign status_color = 'black' %}
104105
{% assign meeting_color = 'black' %}
@@ -112,6 +113,7 @@ Jump to
112113
<div style='float:left;padding-right:24px;'>Last Updated: {{ custr }}</div>
113114
<div style='display:block;'><span style='color:{{status_color}};'>Build Status: {{ chapter.build }} </span></div>
114115
<div style='display:block;'><span style='color:{{meeting_color}};'>Meetings last 365 days: {{chapter.meetings}}</span></div></li>
116+
{% endif %}
115117
{% endfor %}
116118
</ul>
117119

Diff for: pages/chapters/chapters.md

+91-25
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@ tags: chapters
88

99
<!-- rebuild 1 -->
1010

11+
<style>
12+
.chapterli {
13+
-webkit-box-sizing: border-box;
14+
-moz-box-sizing: border-box;
15+
box-sizing: border-box;
16+
display: inline-block;
17+
width : 24%;
18+
padding : 15px; /* this will be applied internally, due to
19+
box-sizing property */
20+
vertical-align: text-top;
21+
}
22+
23+
.chapter-panel {
24+
background-color: lightgray;
25+
margin-bottom: 6px;
26+
}
27+
</style>
1128
<img src="/assets/images/web/chaper-wide.jpg" alt="Bay Area Chapter Meeting">
1229

1330
OWASP Local Chapters build community for application security professionals around the world. Our Local Chapter Meetings are **free and open** to anyone to attend so both members and non-members are always welcomed. Local meetings include:
@@ -19,39 +36,77 @@ OWASP Local Chapters build community for application security professionals arou
1936
Chapter pages on this site have general information and leader contact info. Local meeting RSVPs are handled through [https://meetup.com/pro/owasp](https://meetup.com/pro/owasp).
2037

2138

22-
## Local Chapters by Region
23-
{% assign regions = site.data.supported_regions %}
24-
<ul>
25-
{% for region in regions %}
26-
<li><a href='#{{ region.region | remove: " " }}'>{{ region.region }}</a></li>
27-
{% endfor %}
28-
</ul>
29-
3039
<a href="https://meetup.com/pro/owasp" target="_blank" rel="noopener"><button class="cta-button grey">Search using Map</button></a>
3140

41+
<!--
3242
<div>
3343
<label for='chapters-filter'>Filter List:</label>
3444
<input type='text' id='chapters-filter'>
3545
</div>
46+
-->
47+
3648

3749
## Chapter Listing
50+
{% assign countries = site.data.chapters | map: "country" | uniq | sort %}
51+
{% assign chapter_regions = site.data.chapters | map: "region" | uniq | sort%}
52+
{% assign countries_by_region = "" | split: "," %}
53+
{% for region in chapter_regions %}
54+
{% assign ch_regions = "" | split: "," %}
55+
{% for chapter in site.data.chapters %}
56+
{% if region == chapter.region %}
57+
{% assign ch_regions = ch_regions | push: chapter %}
58+
{% endif %}
59+
{% endfor %}
60+
{% assign countries_by_region = countries_by_region | push: ch_regions %}
61+
{% endfor %}
3862

39-
<div class='chapters-list' id='chapters-list'>
40-
{% assign regions = site.data.supported_regions %}
41-
{% for region in regions %}
42-
{% assign rcount = 0 %}
43-
<div class="region">
44-
<h4><a name="{{ region.region | remove: ' ' }}"></a>{{ region.region }}</h4>
45-
<ul>
46-
{% for chapter in site.data.chapters %}
47-
{% if chapter.region == region.region and chapter.build != 'no pages'%}
48-
{% assign rcount = rcount | plus: 1 %}
49-
<li><a href='{{ chapter.url }}'>{{ chapter.title }}</a></li>
50-
{% endif %}
51-
{% endfor %}
52-
</ul>
53-
Total: {{rcount}}
63+
{% comment %}
64+
{% assign old_region = "" %}
65+
{% for region in countries_by_region %}
66+
{%- for ch in region -%}
67+
<div>{{ch.name}}</div>
68+
{% endfor %}
69+
{% endfor %}
70+
{% endcomment %}
71+
{% assign supported_regions = site.data.supported_regions | map: "region" %}
72+
{% assign country_header = false %}
73+
<div class='chapters-list corp_member_div' id='chapters-list'>
74+
{% for region in chapter_regions %}
75+
{%- if supported_regions contains region -%}
76+
{% assign rcount = 0 %}
77+
{% for chapter in site.data.chapters %}
78+
{% if chapter.region == region and chapter.build != 'no pages' %}
79+
{% assign rcount = rcount | plus: 1 %}
80+
{% endif %}
81+
{% endfor %}
82+
<button class='accordion' style="margin-bottom: 3px;font-weight: bold; font-size: larger;"> {{ region }} ({{rcount}})</button>
83+
<div class='panel chapter-panel'>
84+
{% for country in countries %}
85+
{% for rchs in countries_by_region %}
86+
{% for chapter in rchs %}
87+
88+
{% if chapter.region == region and chapter.build != 'no pages' and chapter.country == country%}
89+
{% if country_header == false %}
90+
{% assign country_header = true %}
91+
{% assign country_title = chapter.country %}
92+
{% if country_title == "" %}
93+
{% assign country_title = "Unknown" %}
94+
{% endif %}
95+
<ul>
96+
<h5><a name="{{country_title}}"></a>{{country_title}}</h5>
97+
<hr>
98+
{% endif %}
99+
<li class="chapterli">&bull;<a href='{{ chapter.url }}'>{{ chapter.name }}</a></li>
100+
{% endif %}
101+
{%endfor%}
102+
{% endfor %}
103+
{% if country_header == true %}
104+
</ul>
105+
{% endif %}
106+
{% assign country_header = false %}
107+
{%endfor%}
54108
</div>
109+
{%endif%}
55110
{% endfor %}
56111
</div>
57112

@@ -137,6 +192,17 @@ Chapter pages on this site have general information and leader contact info. Loc
137192

138193
html += "</ul>";
139194
$('#chapters-list').html(html);
140-
}
141-
});
195+
}
196+
});
197+
198+
$(".accordion").click(function () {
199+
$(this).toggleClass("active");
200+
if($(this).next('.panel').css('display') != 'none'){
201+
$(this).next('.panel').css('display', 'none');
202+
}
203+
else {
204+
$(this).next('.panel').css('display', 'block');
205+
}
206+
});
207+
}
142208
</script>

0 commit comments

Comments
 (0)