diff --git a/.gitignore b/.gitignore index 89a5c3d6..83e7efe7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,9 @@ local_settings.py /media/ *.mo venv +bin +lib +lib64 +.idea +share +pyvenv.cfg \ No newline at end of file diff --git a/dolweb/blog/templates/blog_sidebar.html b/dolweb/blog/templates/blog_sidebar.html index 566072e0..76653b96 100644 --- a/dolweb/blog/templates/blog_sidebar.html +++ b/dolweb/blog/templates/blog_sidebar.html @@ -1,39 +1,44 @@ {% load i18n zinnia blog_tags %} -
-
-
- - - - -
-
-
- -
- - -
+ + + -
-

{% trans "Blog tags" %}

- {% get_tag_cloud %} -
+
+
+ + +
+
-
-

{% trans "Blog series" %}

- {% get_recent_blog_series 3 %} -

{% trans "See all" %} »

-
+
+
+
+
{% trans "Blog tags" %}
+ {% get_tag_cloud %} +
+
+
{% trans "Blog series" %}
+ {% get_recent_blog_series 3 %} + +
+
+
+ \ No newline at end of file diff --git a/dolweb/blog/templates/series-index.html b/dolweb/blog/templates/series-index.html index 04a6eec1..168f962d 100644 --- a/dolweb/blog/templates/series-index.html +++ b/dolweb/blog/templates/series-index.html @@ -7,33 +7,36 @@ {% block content %} -{% for series in all_series %} + {% for series in all_series %} -
- {% if series.image %} - {% thumbnail series.image "120x120" crop="center" format="PNG" as im %} - Series illustration - {% endthumbnail %} - {% endif %} -
- {#

{{ serie.name }} #} -

{{ series.name }} - {% blocktrans count count=series.entries.count %} - {{ count }} entry - {% plural %} - {{ count }} entries - {% endblocktrans %}

-

{% trans "RSS feed:" %}

-
    - {% for entry in series.entries_reversed %} -
  1. {{ entry.title }}
  2. - {% endfor %} -
-
-
+
+ {% if series.image %} + {% thumbnail series.image "120x120" crop="center" format="PNG" as im %} + Series illustration + {% endthumbnail %} + {% endif %} +
+ {#

{{ serie.name }} #} +

{{ series.name }} + {% blocktrans count count=series.entries.count %} + {{ count }} entry + {% plural %} + {{ count }} entries + {% endblocktrans %} +

+

+ {% trans "RSS feed:" %} +

+
    + {% for entry in series.entries_reversed %} +
  1. {{ entry.title }}
  2. + {% endfor %} +
+
+
-{% empty %} -

{% trans "No blog series yet." %}

-{% endfor %} + {% empty %} +

{% trans "No blog series yet." %}

+ {% endfor %} {% endblock %} diff --git a/dolweb/blog/templates/zinnia/_entry_detail_base.html b/dolweb/blog/templates/zinnia/_entry_detail_base.html index 53448373..57285437 100644 --- a/dolweb/blog/templates/zinnia/_entry_detail_base.html +++ b/dolweb/blog/templates/zinnia/_entry_detail_base.html @@ -1,98 +1,99 @@ {% load comments i18n thumbnail %} -
- {% if object.draft %} - - {% endif %} - {% block entry-header %} -
- {% block entry-title %} -

- - {{ object.title }} - -

- {% endblock %} - {% block entry-info %} - diff --git a/dolweb/blog/templates/zinnia/skeleton.html b/dolweb/blog/templates/zinnia/skeleton.html index 80e75a23..4ee01021 100644 --- a/dolweb/blog/templates/zinnia/skeleton.html +++ b/dolweb/blog/templates/zinnia/skeleton.html @@ -8,17 +8,19 @@ {% block "body" %} -
-
+
+
{% block breadcrumbs %}{% endblock breadcrumbs %} - +
+ +
{% block slider %}{% endblock slider %} {% block content %}{% endblock %}
-
+
{% include "blog_sidebar.html" %}
diff --git a/dolweb/blog/templates/zinnia/tags/breadcrumbs.html b/dolweb/blog/templates/zinnia/tags/breadcrumbs.html index 2ecf7f4c..e6d0c610 100644 --- a/dolweb/blog/templates/zinnia/tags/breadcrumbs.html +++ b/dolweb/blog/templates/zinnia/tags/breadcrumbs.html @@ -1,11 +1,13 @@ - + \ No newline at end of file diff --git a/dolweb/blog/templates/zinnia/tags/search_form.html b/dolweb/blog/templates/zinnia/tags/search_form.html index 59559b2c..6cb6ed01 100644 --- a/dolweb/blog/templates/zinnia/tags/search_form.html +++ b/dolweb/blog/templates/zinnia/tags/search_form.html @@ -1,18 +1,16 @@ {% load i18n %} {% load static from staticfiles %} -
-
+ +
- - - +
-

-? -{% trans "You can use - to exclude words or phrases, "double quotes" for exact phrases and the AND/OR boolean operators combined with parenthesis for complex queries." %} +

+ + {% trans "You can use - to exclude words or phrases, "double quotes" for exact phrases and the AND/OR boolean operators combined with parenthesis for complex queries." %}

diff --git a/dolweb/compat/admin.py b/dolweb/compat/admin.py index fe13d603..749022cd 100644 --- a/dolweb/compat/admin.py +++ b/dolweb/compat/admin.py @@ -2,9 +2,24 @@ # SPDX-License-Identifier: MIT from django.contrib import admin -from dolweb.compat.models import Page +from dolweb.compat.models import Page, Revision, Category, CategoryLink + class PageAdmin(admin.ModelAdmin): list_display = ('title', 'namespace') ordering = ('namespace', 'title_url') admin.site.register(Page, PageAdmin) + +class RevisionAdmin(admin.ModelAdmin): + list_display = ('page', 'text', 'timestamp') + ordering = ('timestamp',) +admin.site.register(Revision, RevisionAdmin) + +class CategoryAdmin(admin.ModelAdmin): + list_display = ('title',) + ordering = ('id',) +admin.site.register(Category, CategoryAdmin) + +class CategoryLinkAdmin(admin.ModelAdmin): + list_display = ('page', 'cat') +admin.site.register(CategoryLink, CategoryLinkAdmin) diff --git a/dolweb/compat/models.py b/dolweb/compat/models.py index b6f257ec..f263e939 100644 --- a/dolweb/compat/models.py +++ b/dolweb/compat/models.py @@ -49,7 +49,7 @@ class Revision(models.Model): timestamp = models.CharField(db_column='rev_timestamp', max_length=14) def __str__(self): - return '%s for %s' % (self.timestamp_raw, self.page) + return '%s for %s' % (self.timestamp, self.page) class Meta: db_table = 'revision' diff --git a/dolweb/compat/templates/compat-list-pagi.html b/dolweb/compat/templates/compat-list-pagi.html index 9cded6d5..2934afb4 100644 --- a/dolweb/compat/templates/compat-list-pagi.html +++ b/dolweb/compat/templates/compat-list-pagi.html @@ -1,12 +1,12 @@ {% load compat %} -
-
    -{% for p in pages %} - {% if p == page %} -
  • {{ p }}
  • - {% else %} -
  • {{ p }}
  • - {% endif %} -{% endfor %} -
-
+ diff --git a/dolweb/compat/templates/compat-list.html b/dolweb/compat/templates/compat-list.html index 29b7930f..9eef12b6 100644 --- a/dolweb/compat/templates/compat-list.html +++ b/dolweb/compat/templates/compat-list.html @@ -15,56 +15,109 @@ {% endblock %} {% block "body" %} +
+
+
+
+

{% trans "How to read the ratings" %}

-
-
-
-
-

{% trans "How to read the ratings" %}

- -
    -
  • {% trans {% trans "Perfect: No issues at all!" %}
  • -
  • {% trans {% trans "Playable: Runs well, only minor graphical or audio glitches. Games can be played all the way through." %}
  • -
  • {% trans {% trans "Starts: Starts, maybe even plays well, but crashes or major graphical/audio glitches." %}
  • -
  • {% trans {% trans "Intro/Menu: Hangs/crashes somewhere between booting and starting." %}
  • -
  • {% trans {% trans "Broken: Crashes when booting." %}
  • -
+
    +
  • +
    +
    + {% trans "Perfect" as perfect_text %} + {% include "compat-rating-responsive.html" with rating="5" rating_text=perfect_text %} +
    +
    + {% trans "Perfect: No issues at all!" %} +
    +
    +
  • +
  • +
    +
    + {% trans "Playable" as playable_text %} + {% include "compat-rating-responsive.html" with rating="4" rating_text=playable_text %} +
    +
    + {% trans "Playable: Runs well, only minor graphical or audio glitches. Games can be played all the way through." %} +
    +
    +
  • +
  • +
    +
    + {% trans "Starts" as starts_text %} + {% include "compat-rating-responsive.html" with rating="3" rating_text=starts_text %} +
    +
    + {% trans "Starts: Starts, maybe even plays well, but crashes or major graphical/audio glitches." %} +
    +
    +
  • +
  • +
    +
    + {% trans "Intro/Menu" as intro_menu_text %} + {% include "compat-rating-responsive.html" with rating="2" rating_text=intro_menu_text %} +
    +
    + {% trans "Intro/Menu: Hangs/crashes somewhere between booting and starting." %} +
    +
    +
  • +
  • +
    +
    + {% trans "Broken" as broken_text %} + {% include "compat-rating-responsive.html" with rating="1" rating_text=broken_text %} +
    +
    + {% trans "Broken: Crashes when booting." %} +
    +
    +
  • +
+
-
-
-
-

{% trans "Statistics" %}

+
+
+

{% trans "Statistics" %}

-
- {% for rating in all_ratings %} -
- {% if filter_by == rating %} - {% trans "Show all" %} - {% else %} - {% trans "Filter" %} - {% endif %} - {{ rating|compat_text }}: {{ rating|rating_pct|floatformat }}% -
-
- {% endfor %} -
+
+ {% for rating in all_ratings %} +
+ {% if filter_by == rating %} + {% trans "Show all" %} + {% else %} + {% trans "Filter" %} + {% endif %} + {{ rating|compat_text }}: {{ rating|rating_pct|floatformat }}% +
+
+
+
+
+
+ {% endfor %} +
+
-
{% include "compat-list-pagi.html" %} {% if games %} - +
- - - - - + + + + + @@ -73,9 +126,11 @@

{% trans "Statistics" %}

- - - + + + {% endfor %} diff --git a/dolweb/compat/templates/compat-rating-responsive.html b/dolweb/compat/templates/compat-rating-responsive.html new file mode 100644 index 00000000..298efaba --- /dev/null +++ b/dolweb/compat/templates/compat-rating-responsive.html @@ -0,0 +1,13 @@ +{% load compat %} + + {% for i in '12345'|make_list %} + {% if i <= rating %} + + {% else %} + + {% endif %} + {% endfor %} + + + {{ rating }}/5 + \ No newline at end of file diff --git a/dolweb/docs/templates/docs-faq.html b/dolweb/docs/templates/docs-faq.html index d23befb2..1e7f363b 100644 --- a/dolweb/docs/templates/docs-faq.html +++ b/dolweb/docs/templates/docs-faq.html @@ -9,30 +9,30 @@ {% block "body" %}
-
-
- - +
+ +
{% for category in categories %}
diff --git a/dolweb/docs/templates/docs-guide.html b/dolweb/docs/templates/docs-guide.html index 90165493..b6bc1252 100644 --- a/dolweb/docs/templates/docs-guide.html +++ b/dolweb/docs/templates/docs-guide.html @@ -9,7 +9,7 @@ {% endblock %} {% block "body" %} -

« {% trans "Go back to the guides list" %}

+

« {% trans "Go back to the guides list" %}

-
{% trans "Game title (click for details)" %}{% trans "Compatibility" %}{% trans "Last updated" %}{% trans "Game title" %}{% trans "Compatibility" %}{% trans "Last updated" %}
{{ cat|capfirst }} {{ game.title }}{{ game.latest.text.data|compat_text }}{{ ts|naturaltime }}{{ game.title }} - {{ game.latest.text.data }} + {% include "compat-rating-responsive.html" with rating=game.latest.text.data rating_text=game.latest.text.data|compat_text %} + {{ ts|naturaltime }}
- - {% for ver in releases %} - - - - - - - - - - - {% empty %} - - {% endfor %} - -
Dolphin {{ ver.version }}{{ ver.date|naturaltime }}
{% trans "No stable release yet" %}
+
+ {% empty %} +
{% trans "No stable release yet" %}
+ {% endfor %} +
-

{% trans "Linux distributions" %}

+

{% trans "Linux distributions" %}

{% blocktrans %}Ubuntu users can install a PPA for development and stable versions of Dolphin here: Installing Dolphin {% endblocktrans %}

@@ -120,7 +115,7 @@

{% trans "Linux distributions" %}

-

{% trans "Source code" %}

+

{% trans "Source code" %}

{% blocktrans %} The latest version of the Dolphin source code can be downloaded from the @@ -137,7 +132,7 @@

{% trans "Source code" %}

-

{% trans "Reporting bugs" %}

+

{% trans "Reporting bugs" %}

{% blocktrans %} For reporting bugs please go to the issue tracker. diff --git a/dolweb/downloads/templates/downloads-links.html b/dolweb/downloads/templates/downloads-links.html index 28c9fa07..2cac4642 100644 --- a/dolweb/downloads/templates/downloads-links.html +++ b/dolweb/downloads/templates/downloads-links.html @@ -1,5 +1,14 @@ {% load artifacts %} {% for artifact in ver.artifacts.all|artifact_sort %} - {{ artifact.target_system }} + + + {{ artifact.target_system }} + {% endfor %} diff --git a/dolweb/downloads/templates/downloads-list-pagi.html b/dolweb/downloads/templates/downloads-list-pagi.html index 9a0fdc94..04bc51d5 100644 --- a/dolweb/downloads/templates/downloads-list-pagi.html +++ b/dolweb/downloads/templates/downloads-list-pagi.html @@ -1,39 +1,37 @@ -

-
    +
      {% if page_obj.has_previous %} -
    • +
    • {% else %} -
    • +
    • {% endif %} {% for page in page_obj.leading_range %} -
    • {{ page }}
    • +
    • {{ page }}
    • {% endfor %} {% if page_obj.leading_range %} -
    • +
    • {% endif %} {% for page in page_obj.main_range %} {% if page == page_obj.number %} -
    • {{ page }}
    • +
    • {{ page }}
    • {% else %} -
    • {{ page }}
    • +
    • {{ page }}
    • {% endif %} {% endfor %} {% if page_obj.trailing_range %} -
    • +
    • {% endif %} {% for page in page_obj.trailing_range %} -
    • {{ page }}
    • +
    • {{ page }}
    • {% endfor %} {% if page_obj.has_next %} -
    • +
    • {% else %} -
    • +
    • {% endif %} -
    -
+ \ No newline at end of file diff --git a/dolweb/downloads/templates/downloads-list.html b/dolweb/downloads/templates/downloads-list.html index c2bcd8db..8c840601 100644 --- a/dolweb/downloads/templates/downloads-list.html +++ b/dolweb/downloads/templates/downloads-list.html @@ -5,8 +5,8 @@ {% block "title" %}{% blocktrans %}{{ branch }} branch - page {{ page }}{% endblocktrans %}{% endblock %} {% block "body" %} -