Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Boost Development page #1565

Merged
merged 6 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
RedirectToToolsView,
StaticContentTemplateView,
UserGuideTemplateView,
BoostDevelopmentView,
)
from libraries.api import LibrarySearchView
from libraries.views import (
Expand Down Expand Up @@ -148,6 +149,11 @@
),
# Boost community calendar
path("calendar/", CalendarView.as_view(), name="calendar"),
path(
"boost-development/",
BoostDevelopmentView.as_view(),
name="boost-development",
),
# Boost versions views
path("releases/", VersionDetail.as_view(), name="releases-most-recent"),
path(
Expand Down
27 changes: 19 additions & 8 deletions core/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from enum import StrEnum

from django.conf import settings

from versions.models import Version
Expand All @@ -8,18 +10,27 @@ def current_version(request):
return {"current_version": Version.objects.most_recent()}


class NavItem(StrEnum):
LIBRARIES = "libraries"
LEARN = "learn"
NEWS = "news"
COMMUNITY = "community"
RELEASES = "releases"


def active_nav_item(request):
"""Custom context processor that adds the active nav item to the context"""
default_nav_item = "home"
path_map = {
"/doc/libs/": "libraries", # special case - handle first
"/doc/": "learn",
"/docs/": "learn",
"/news/": "news",
"/community/": "community",
"/library/": "libraries",
"/libraries/": "libraries",
"/releases/": "releases",
"/doc/libs/": NavItem.LIBRARIES, # special case - handle first
"/doc/": NavItem.LEARN,
"/docs/": NavItem.LEARN,
"/boost-development/": NavItem.LEARN,
"/news/": NavItem.NEWS,
"/community/": NavItem.COMMUNITY,
"/library/": NavItem.LIBRARIES,
"/libraries/": NavItem.LIBRARIES,
"/releases/": NavItem.RELEASES,
}
for prefix, item in path_map.items():
if request.path.startswith(prefix):
Expand Down
4 changes: 4 additions & 0 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def get(self, request, *args, **kwargs):
return self.render_to_response(context)


class BoostDevelopmentView(CalendarView):
template_name = "boost_development.html"


class ClearCacheView(UserPassesTestMixin, View):
http_method_names = ["get"]
login_url = "/login/"
Expand Down
2 changes: 1 addition & 1 deletion kube/boost/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ data:
location = /community/requests.html { return 301 /community/; }
location = /community/reviews.html { return 301 /review/; }
location = /community/review_schedule.html { return 301 /review/past/; }
location = /development/index.html { return 301 /doc/contributor-guide/index.html; }
location = /development/index.html { return 301 /boost-development/; }
location = /development/submissions.html { return 301 /review/; }
location = /development/bugs.html { return 301 /doc/user-guide/reporting-issues.html; }
location = /development/pull_requests.php { return 301 $scheme://$host; }
Expand Down
33 changes: 33 additions & 0 deletions templates/boost_development.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends "base.html" %}

{% block title %}Boost Development{% endblock %}

{% block content_wrapper %}
<div class="px-4 mb-8 w-full">
<div class="flex justify-start items-center my-4">
<h1 class="text-3xl">Development</h1>
</div>
<div class="mb-6 p-6 w-full bg-white md:rounded-lg md:shadow-lg dark:text-white text-slate dark:bg-charcoal dark:bg-neutral-700">
<p class="py-2">Boost sources are on <a href="https://github.com/boostorg" class="text-sky-600 dark:text-sky-300 hover:text-orange dark:hover:text-orange">GitHub</a>.</p>
<p class="py-2">
Boost developers constitute a wide array of people throughout much of the world.
Over the years much work has gone into the quantity and quality of the C++ libraries
and tools that make up Boost. There are many ways to become part of the Boost developer
community, all starting with getting involved in the development discussion. But if
you are looking for an "easy" place to get your feet wet is to volunteer
<a href="https://www.boost.org/development/testing.html" class="text-sky-600 dark:text-sky-300 hover:text-orange dark:hover:text-orange">testing</a>
resources. The wonderful people at
<a href="http://www.openhub.net/" class="text-sky-600 dark:text-sky-300 hover:text-orange dark:hover:text-orange">Black Duck Open Hub</a>
provide a peek into what goes into Boost:
</p>
<div class="flex-row md:flex justify-around items-center my-4">
<div><iframe class="mx-auto" src="https://openhub.net/p/boost/widgets/project_languages" style="height: 193px; width: 350px; border: none;" scrolling="no"></iframe></div>
<div><iframe class="mx-auto" src="https://openhub.net/p/boost/widgets/project_cocomo" style="height: 190px; width: 350px; border: none;" scrolling="no"></iframe></div>
</div>
</div>
<div class="p-6 bg-white md:rounded-lg md:shadow-lg dark:text-white text-slate dark:bg-charcoal dark:bg-neutral-700">
<p class="py-2">Below is a community maintained calendar of Boost related events. The release managers try to keep the release related portion of the calendar up to date.</p>
<iframe src="https://www.google.com/calendar/embed?src={{ boost_calendar }}&amp;ctz=America/Chicago" class="c1" width="100%" height="600" frameborder="0" scrolling="no"></iframe>
</div>
</div>
{% endblock %}
3 changes: 3 additions & 0 deletions templates/docs_temp.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ <h5 class="text-2xl leading-tight text-orange"><a href="/doc/contributor-guide/i
<div class="w-auto ml-6 mr-2 col-span-2 md:col-span-1">
<a class="list-item text-base text-sky-600 dark:text-sky-300 hover:text-orange dark:hover:text-orange" href="/doc/contributor-guide/requirements/library-requirements.html">Library Requirements</a>
</div>
<div class="w-auto ml-6 mr-2 col-span-2 md:col-span-1">
<a class="list-item text-base text-sky-600 dark:text-sky-300 hover:text-orange dark:hover:text-orange" href={% url 'boost-development' %}>About Boost Development</a>
</div>
</div>
</div>

Expand Down
Loading