Skip to content

Commit 8efa37e

Browse files
committed
Dump a bunch of stuff from my local branch into svn.
- Legacy-Id: 19583
1 parent 2cef8b6 commit 8efa37e

19 files changed

Lines changed: 15161 additions & 389 deletions

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616
.DS_store
1717
# Simulated Subversion default ignores end here
1818
/.coverage
19+
/.factoryboy_random_state
1920
/.mypy_cache
21+
/.parcel-cache
2022
/.project
2123
/.pydevproject
2224
/.Python
2325
/.settings
2426
/.tmp
25-
/.factoryboy_random_state
2627
/attic
2728
/bin
28-
/etc
2929
/env
30+
/etc
3031
/ghostdriver.log
3132
/htmlcov
3233
/include
@@ -38,6 +39,7 @@
3839
/mergelog
3940
/mergequeue
4041
/minimum-requirements.txt
42+
/node_modules
4143
/pip-selfcheck.json
4244
/selenium
4345
/settings_local.py

ietf/doc/templatetags/active_groups_menu.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@
88

99
register = template.Library()
1010

11-
parents = GroupTypeName.objects.filter(slug__in=['ag','area','rag','team','dir','program'])
11+
parents = GroupTypeName.objects.filter(
12+
slug__in=["ag", "area", "rag", "team", "dir", "program"]
13+
)
1214

1315
others = []
14-
for group in Group.objects.filter(acronym__in=('rsoc',), state_id='active'):
15-
group.menu_url = reverse('ietf.group.views.group_home', kwargs=dict(acronym=group.acronym)) # type: ignore
16+
for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"):
17+
group.menu_url = reverse("ietf.group.views.group_home", kwargs=dict(acronym=group.acronym)) # type: ignore
1618
# could use group.about_url() instead
1719
others.append(group)
1820

21+
1922
@register.simple_tag
20-
def active_groups_menu():
23+
def active_groups_menu(flavor):
2124
global parents, others
2225
for p in parents:
23-
p.menu_url = '/%s/'%p.slug
24-
return render_to_string('base/menu_active_groups.html', { 'parents': parents, 'others': others })
25-
26+
p.menu_url = "/%s/" % p.slug
27+
return render_to_string(
28+
"base/menu_active_groups.html",
29+
{"parents": parents, "others": others, "flavor": flavor},
30+
)

ietf/doc/templatetags/wg_menu.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,40 @@
3939
register = template.Library()
4040

4141
parent_short_names = {
42-
'ops':'Ops & Mgmt',
43-
'rai':'RAI',
44-
'iab':'IAB',
45-
'art':'Apps & Realtime',
46-
'ietfadminllc' : 'IETF LLC',
47-
}
42+
"ops": "Ops & Management",
43+
"rai": "RAI",
44+
"iab": "IAB",
45+
"art": "Apps & Realtime",
46+
"ietfadminllc": "IETF LLC",
47+
}
4848

4949
parents = Group.objects.filter(
50-
models.Q(type="area") | models.Q(type="irtf", acronym="irtf") | models.Q(acronym='iab') | models.Q(acronym='ietfadminllc'),
51-
state="active"
52-
).order_by('type__order','type_id', 'acronym')
50+
models.Q(type="area")
51+
| models.Q(type="irtf", acronym="irtf")
52+
| models.Q(acronym="iab")
53+
| models.Q(acronym="ietfadminllc"),
54+
state="active",
55+
).order_by("type__order", "type_id", "acronym")
56+
5357

5458
@register.simple_tag
55-
def wg_menu():
59+
def wg_menu(flavor):
5660
global parents
5761

5862
for p in parents:
5963
p.short_name = parent_short_names.get(p.acronym) or p.name
6064
if p.short_name.endswith(" Area"):
61-
p.short_name = p.short_name[:-len(" Area")]
65+
p.short_name = p.short_name[: -len(" Area")]
6266

6367
if p.type_id == "area":
6468
p.menu_url = "/wg/#" + p.acronym
6569
elif p.acronym == "irtf":
6670
p.menu_url = "/rg/"
6771
elif p.acronym == "iab":
6872
p.menu_url = "/program/"
69-
elif p.acronym == 'ietfadminllc':
73+
elif p.acronym == "ietfadminllc":
7074
p.menu_url = "/adm/"
7175

72-
return render_to_string('base/menu_wg.html', { 'parents': parents })
76+
return render_to_string(
77+
"base/menu_wg.html", {"parents": parents, "flavor": flavor}
78+
)

ietf/settings.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,8 @@ def skip_unreadable_post(record):
415415

416416
# Additional locations of static files (in addition to each app's static/ dir)
417417
STATICFILES_DIRS = (
418-
os.path.join(BASE_DIR, 'static'),
419-
os.path.join(BASE_DIR, 'secr/static'),
420-
os.path.join(BASE_DIR, 'externals/static'),
418+
os.path.join(BASE_DIR, 'static/dist'),
419+
# os.path.join(BASE_DIR, 'secr/static'),
421420
)
422421

423422
INSTALLED_APPS = [
@@ -433,7 +432,7 @@ def skip_unreadable_post(record):
433432
'django.contrib.sites',
434433
'django.contrib.staticfiles',
435434
# External apps
436-
'bootstrap3',
435+
'django_bootstrap5',
437436
'corsheaders',
438437
'django_markup',
439438
'django_password_strength',

ietf/static/css/datatables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "../../../node_modules/datatables.net-bs5/css/dataTables.bootstrap5";

ietf/static/css/ietf.scss

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Enable negative margin classes.
2+
$enable-negative-margins: true;
3+
4+
// Don't add carets to dropdowns by default.
5+
// $enable-caret: false;
6+
7+
// Only import what we need:
8+
// https://getbootstrap.com/docs/5.1/customize/optimize/
9+
10+
// Configuration
11+
@import "~/node_modules/bootstrap/scss/functions";
12+
@import "~/node_modules/bootstrap/scss/variables";
13+
@import "~/node_modules/bootstrap/scss/mixins";
14+
@import "~/node_modules/bootstrap/scss/utilities";
15+
16+
// Layout & components
17+
@import "~/node_modules/bootstrap/scss/root";
18+
@import "~/node_modules/bootstrap/scss/reboot";
19+
@import "~/node_modules/bootstrap/scss/type";
20+
@import "~/node_modules/bootstrap/scss/images";
21+
@import "~/node_modules/bootstrap/scss/containers";
22+
@import "~/node_modules/bootstrap/scss/grid";
23+
@import "~/node_modules/bootstrap/scss/tables";
24+
@import "~/node_modules/bootstrap/scss/forms";
25+
@import "~/node_modules/bootstrap/scss/buttons";
26+
@import "~/node_modules/bootstrap/scss/transitions";
27+
@import "~/node_modules/bootstrap/scss/dropdown";
28+
@import "~/node_modules/bootstrap/scss/button-group";
29+
@import "~/node_modules/bootstrap/scss/nav";
30+
@import "~/node_modules/bootstrap/scss/navbar";
31+
// @import "~/node_modules/bootstrap/scss/card";
32+
@import "~/node_modules/bootstrap/scss/accordion";
33+
// @import "~/node_modules/bootstrap/scss/breadcrumb";
34+
// @import "~/node_modules/bootstrap/scss/pagination";
35+
// @import "~/node_modules/bootstrap/scss/badge";
36+
// @import "~/node_modules/bootstrap/scss/alert";
37+
// @import "~/node_modules/bootstrap/scss/progress";
38+
// @import "~/node_modules/bootstrap/scss/list-group";
39+
// @import "~/node_modules/bootstrap/scss/close";
40+
// @import "~/node_modules/bootstrap/scss/toasts";
41+
// @import "~/node_modules/bootstrap/scss/modal";
42+
// @import "~/node_modules/bootstrap/scss/tooltip";
43+
// @import "~/node_modules/bootstrap/scss/popover";
44+
// @import "~/node_modules/bootstrap/scss/carousel";
45+
// @import "~/node_modules/bootstrap/scss/spinners";
46+
// @import "~/node_modules/bootstrap/scss/offcanvas";
47+
// @import "~/node_modules/bootstrap/scss/placeholders";
48+
49+
// Helpers
50+
@import "~/node_modules/bootstrap/scss/helpers";
51+
52+
// Utilities
53+
@import "~/node_modules/bootstrap/scss/utilities/api";
54+
55+
// Make the bootstrap icons available.
56+
// FIXME: This requires cp -r node_modules/bootstrap-icons/font/fonts static/src/css/
57+
// to be run manually due to parcel limitations.
58+
// @import "../../../node_modules/bootstrap-icons/font/bootstrap-icons";
59+
60+
// Install the datatables.net bootstrap5 styles.
61+
// FIXME: Including this with ~ fails for some odd reason?
62+
@import "../../../node_modules/datatables.net-bs5/css/dataTables.bootstrap5";
63+
64+
// Leave room for fixed-top navbar.
65+
body {
66+
padding-top: 60px;
67+
}
68+
69+
// Make the font size choice cascade down into group menu dropdowns.
70+
.leftmenu li>ul {
71+
font-size: inherit;
72+
}
73+
74+
// Make the long dropdowns in the group menu scrollable.
75+
.group-menu .dropdown-menu {
76+
height: auto;
77+
width: auto;
78+
max-height: 35em;
79+
overflow-x: hidden;
80+
overflow-y: auto;
81+
}
82+
83+
// Helper to constrain the size of the main logo
84+
.ietflogo {
85+
width: 75%;
86+
max-width: 300px;
87+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)