Skip to content
Open
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
123 changes: 16 additions & 107 deletions djangoproject/scss/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@ blockquote {
}
}

details {
border-bottom: 1px solid var(--hairline-color);
}

summary {
cursor: pointer;
display: list-item;

h3 {
display: inline-block;
}
}

//------------------- Layout


Expand Down Expand Up @@ -374,25 +387,11 @@ main {
display: none;
}

.list-collapsing {
margin-top: 0;
details {
border-bottom: 0;

&.active {
li {
border-top: 0;
}

h2 {
padding: 10px 40px 10px 0;
font-size: 18px;
border-bottom: 0;
color: var(--primary);

.collapsing-icon {
font-size: 10px;
}
}
summary h3 {
border-bottom: 0;
}
}
}
Expand Down Expand Up @@ -1918,102 +1917,12 @@ h2+.list-link-soup {

@include respond-min(768px) {

.list-collapsing-header {
float: left;

.section & h2 {
margin: 40px 0 20px;
}

+.form-controls.label {
margin: 50px 0 0;
text-align: right;
}
}

.form-controls.label {
float: right;
}
}


.list-collapsing {
// reusable accordion style collapsing list, as seen on the Get Started Page. 'Expand/Collapse All' toggle is generated by the javascript. H2 is used for label, and 'collapsing-content' class is used to identify all content that should expand and collapse onclick.
border-bottom: 1px solid var(--hairline-color);
list-style: none;
margin: 30px 0;
padding: 0;
clear: both;

&.active {

>li {
border-top: 1px solid var(--hairline-color);
margin: 0;
padding: 0;

&.active {
h2 {
.collapsing-icon {
&:before {
content: "\f068";
}
}
}
}
}

h2 {
@include font-size(18);
cursor: pointer;
margin: 0;
padding: 18px 40px 18px 0;
position: relative;

&:hover,
&:focus,
&:active {
color: var(--text-l20);
outline: none;
}

.collapsing-icon {
position: absolute;
right: 0;
top: 24px;

&:before {
content: "\f067";
}
}

&.bullet-icon {
// H2 class for using icons as 'bullets' much like the layout of a list. When the line breaks, the text won't fold under the icon. See the community page for an example.
padding-left: 1.5em;

>i:first-child {
position: absolute;
top: 24px;
left: 0;
}
}
}

.collapsing-content {
overflow: hidden;
max-height: 0px;

-webkit-transition: all 0.5s ease-out;
transition: all 0.5s ease-out;
}

li.active .collapsing-content {
max-height: 1000px;
overflow: auto;
}
}
}

.list-image {
// list style for large, clickable images accompanied by text. (See Get Started Page.)
list-style: none;
Expand Down
5 changes: 0 additions & 5 deletions djangoproject/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ define(function () {
return !!document.getElementsByClassName(className).length; //return a boolean
}

//collapsing list
if (hasClass('list-collapsing')) {
mods.push('mod/list-collapsing');
}

if (hasClass('stripe-donation')) {
mods.push('mod/stripe-donation');
}
Expand Down
62 changes: 0 additions & 62 deletions djangoproject/static/js/mod/list-collapsing.js

This file was deleted.

58 changes: 28 additions & 30 deletions djangoproject/templates/aggregator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,34 @@ <h3>{% translate "Local Django Community" %}</h3>
</div>

<h2>{% translate "Django RSS feeds" %}</h2>
<ul class="list-collapsing">
{% for feedtype, latest_feeds in feedtype_list %}
<li id="{{ feedtype.slug }}">
<h2 class="bullet-icon"><i class="icon icon-rss blue"></i> {{ feedtype.name }}</h2>
<div class="collapsing-content">
<dl class="list-links">
{% for item in latest_feeds %}
<dt><a href="{{ item.link }}">{{ item.title }}</a></dt>
<dd>
{% blocktranslate trimmed with modified_date=item.date_modified|date:"DATETIME_FORMAT" public_url=item.feed.public_url title=item.feed.title %}
{{ modified_date }} by <a href="{{ public_url }}">{{ title }}</a>
{% endblocktranslate %}
</dd>
{% endfor %}
</dl>
<p class="meta">
{% if latest_feeds %}
<a href="{% url 'community-feed-list' feedtype.slug %}">{% translate "View more" %}</a>
{% endif %}
{% if latest_feeds and feedtype.can_self_add %}
{% translate "or" context "view more OR add your feed" %}
{% endif %}
{% if feedtype.can_self_add %}
<a href="{% url 'community-add-feed' feedtype.slug %}">{% translate "Add your feed" %}</a>
{% endif %}
</p>
</div>
</li>
{% endfor %}
</ul>
{% for feedtype, latest_feeds in feedtype_list %}
<details>
<summary>
<h3 class="bullet-icon"><i class="icon icon-rss blue"></i> {{ feedtype.name }}</h3>
</summary>
<dl class="list-links">
{% for item in latest_feeds %}
<dt><a href="{{ item.link }}">{{ item.title }}</a></dt>
<dd>
{% blocktranslate trimmed with modified_date=item.date_modified|date:"DATETIME_FORMAT" public_url=item.feed.public_url title=item.feed.title %}
{{ modified_date }} by <a href="{{ public_url }}">{{ title }}</a>
{% endblocktranslate %}
</dd>
{% endfor %}
</dl>
<p class="meta">
{% if latest_feeds %}
<a href="{% url 'community-feed-list' feedtype.slug %}">{% translate "View more" %}</a>
{% endif %}
{% if latest_feeds and feedtype.can_self_add %}
{% translate "or" context "view more OR add your feed" %}
{% endif %}
{% if feedtype.can_self_add %}
<a href="{% url 'community-add-feed' feedtype.slug %}">{% translate "Add your feed" %}</a>
{% endif %}
</p>
</details>
{% endfor %}
{% endblock %}

{% block content-related-extra %}
Expand Down
1 change: 0 additions & 1 deletion djangoproject/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
},
paths: {
"jquery": extless("{% static 'js/lib/jquery.min.js' %}"),
"mod/list-collapsing": extless("{% static 'js/mod/list-collapsing.js' %}"),
"mod/stripe-change-card": extless("{% static 'js/mod/stripe-change-card.js' %}"),
"mod/switch-dark-mode": extless("{% static 'js/mod/switch-dark-mode.js' %}"),
"stripe-checkout": "https://checkout.stripe.com/checkout",
Expand Down
28 changes: 13 additions & 15 deletions djangoproject/templates/blog/month_links_snippet.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{% load i18n %}
{% regroup dates by year as dates_by_year %}

<ul class="list-collapsing active">
{% for month in dates_by_year %}
<li id="year{{ month.grouper }}"{% if forloop.first %} class="active"{% endif %}>
<h2><a href="{% url 'weblog:archive-year' month.grouper %}">{{ month.grouper }}</a> <i class="collapsing-icon icon icon-plus"></i></h2>
<div class="collapsing-content">
<ul class="list-links-small">
{% for d in month.list %}
<li><a href="{% language "en" %}{% url 'weblog:archive-month' d|date:"Y" d|date:"b" %}{% endlanguage %}">{{ d|date:"YEAR_MONTH_FORMAT" }}</a></li>
{% endfor %}
</ul>
<p></p>
</div>
</li>
{% endfor %}
</ul>
{% for month in dates_by_year %}
<details>
<summary>
<h3><a href="{% url 'weblog:archive-year' month.grouper %}">{{ month.grouper }}</a></h3>
</summary>
<ul class="list-links-small">
{% for d in month.list %}
<li><a href="{% language "en" %}{% url 'weblog:archive-month' d|date:"Y" d|date:"b" %}{% endlanguage %}">{{ d|date:"YEAR_MONTH_FORMAT" }}</a></li>
{% endfor %}
</ul>
<p></p>
</details>
{% endfor %}
Loading