From 1cc2b42fa117ac7469e8b2036bce11a349ac635e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 8 Mar 2012 11:38:14 -0600 Subject: Encourage robots to not dive into search results pages Add a meta tag for all search results pages past the first. Signed-off-by: Dan McGee --- templates/packages/search.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/packages/search.html b/templates/packages/search.html index 800b883d..0c67b86a 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -6,6 +6,7 @@ {% block navbarclass %}anb-packages{% endblock %} {% block head %} +{% if is_paginated and page_obj.number > 1 %}{% endif %} {% endblock %} -- cgit v1.1-4-g5e80 From c919e337bf6afff22172a4a1f03581bc389431cd Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 7 Mar 2012 23:44:52 -0600 Subject: Break out search paginator into template Signed-off-by: Dan McGee --- sitestatic/archweb.css | 3 +- templates/packages/search.html | 50 ++------------------------------ templates/packages/search_paginator.html | 27 +++++++++++++++++ 3 files changed, 30 insertions(+), 50 deletions(-) create mode 100644 templates/packages/search_paginator.html diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index d653d98c..1a9d03bd 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -645,8 +645,7 @@ div#pkglist-about { } /* pkglist: results navigation */ -#pkglist-stats-top, -#pkglist-stats-bottom { +.pkglist-stats { font-size: 0.85em; } diff --git a/templates/packages/search.html b/templates/packages/search.html index 0c67b86a..ae67b184 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -52,31 +52,7 @@ {% if package_list %}
- - {% if paginator %} -
- -

{{paginator.count}} packages found. - Page {{page_obj.number}} of {{paginator.num_pages}}.

- -

- {% if page_obj.has_previous %} - - {% else %} - < Prev - {% endif %} - {% if page_obj.has_next %} - - {% else %} - Next > - {% endif %} -

- -
- {% endif %} - + {% include "packages/search_paginator.html" %}
{% csrf_token %} @@ -120,29 +96,7 @@ {% endfor %}
- - {% if paginator %} -
- -

{{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}.

- -

- {% if page_obj.has_previous %} - - {% else %} - < Prev - {% endif %} - {% if page_obj.has_next %} - - {% else %} - Next > - {% endif %} -

- -
- {% endif %} + {% include "packages/search_paginator.html" %} {% if perms.main.change_package %}

+ {% if is_paginated %} +

{{paginator.count}} packages found. + Page {{page_obj.number}} of {{paginator.num_pages}}.

+ +
+ + {% if page_obj.has_previous %} + < Prev + {% else %} + < Prev + {% endif %} + + + {% if page_obj.has_next %} + Next > + {% else %} + Next > + {% endif %} + +
+ {% else %} +

{{ package_list.count }} packages found.

+ {% endif %} +
-- cgit v1.1-4-g5e80 From 749b0447287332c200585c2eb7ef6c4833b815d5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 9 Mar 2012 11:26:00 -0600 Subject: Ensure users only show up once on the Fellows page If a user was in both Developer and TU groups, they would show up twice. Signed-off-by: Dan McGee --- public/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/public/views.py b/public/views.py index 66c3a74f..1f7006a6 100644 --- a/public/views.py +++ b/public/views.py @@ -49,6 +49,7 @@ def userlist(request, user_type='devs'): else: raise Http404 + users = users.distinct() context = USER_LISTS[user_type].copy() context['users'] = users return direct_to_template(request, 'public/userlist.html', context) -- cgit v1.1-4-g5e80 From 6ee65265a051933ee154c42490fdc509b9994202 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 12 Mar 2012 13:13:11 -0400 Subject: Show first 300 words of most recent news item on home page And 100 words of every other news item. We might as well make the most recent item more prominent. I'm not displaying it in full only so the front page doesn't look like a blog; 95% of our news items are under 300 words. Signed-off-by: Dan McGee --- templates/public/index.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/templates/public/index.html b/templates/public/index.html index a57ed8aa..00edf8c4 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -9,7 +9,6 @@ {% block content_left %} {% cache 62 main-page-left secure %}
-

A simple, lightweight distribution

You've reached the website for Arch Linux, a @@ -33,11 +32,9 @@

Learn more...

-
-

Latest News @@ -53,7 +50,10 @@ title="View full article: {{ news.title }}">{{ news.title }}

{{ news.postdate|date }}

-
{{ news.content|markdown|truncatewords_html:75 }}
+
+ {% if forloop.counter0 == 0 %}{{ news.content|markdown|truncatewords_html:300 }} + {% else %}{{ news.content|markdown|truncatewords_html:100 }}{% endif %} +
{% else %} {% if forloop.counter0 == 5 %}

@@ -73,7 +73,6 @@ {% endif %} {% endif %} {% endfor %} -

{% endcache %} {% endblock %} @@ -81,7 +80,6 @@ {% block content_right %} {% cache 59 main-page-right secure %}
-
@@ -92,7 +90,6 @@
-

Recent Updates (more)

@@ -113,7 +110,6 @@