diff --git a/django_lostplaces/lostplaces/static/images/missing_image.png b/django_lostplaces/lostplaces/static/images/missing_image.png index bf5352b..28dd954 100644 Binary files a/django_lostplaces/lostplaces/static/images/missing_image.png and b/django_lostplaces/lostplaces/static/images/missing_image.png differ diff --git a/django_lostplaces/lostplaces/templates/home.html b/django_lostplaces/lostplaces/templates/home.html index df98f0e..1694e93 100644 --- a/django_lostplaces/lostplaces/templates/home.html +++ b/django_lostplaces/lostplaces/templates/home.html @@ -22,28 +22,7 @@ {% for place in place_list %}
  • -
    -
    - -
    -
    -
    - -

    {{place.name|truncatechars:19}}

    -
    - -

    {{place.location|truncatechars:25}}

    -
    -
    -
    -
      -
    • -
    • -
    • -
    -
    -
    -
    + {% include 'partials/place_teaser.html' with place=place%}
  • {% endfor %} diff --git a/django_lostplaces/lostplaces/templates/partials/place_teaser.html b/django_lostplaces/lostplaces/templates/partials/place_teaser.html new file mode 100644 index 0000000..15929a5 --- /dev/null +++ b/django_lostplaces/lostplaces/templates/partials/place_teaser.html @@ -0,0 +1,37 @@ +{%load static %} + +
    +
    + {% if place.placeimages.all|length > 0 %} + + {% else %} + + {% endif %} +
    +
    +
    + +

    {{place.name|truncatechars:19}}

    +
    + +

    {{place.location|truncatechars:25}}

    +
    +
    +
    +

    + {% if place.description|length > 210 %} + {{place.description|truncatechars:210|truncatewords:-1}} + {% else %} + {{place.description}} + {% endif %} +

    +
    +
    +
      +
    • +
    • +
    • +
    +
    +
    +
    \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/place/place_list.html b/django_lostplaces/lostplaces/templates/place/place_list.html index b5ca2a2..058bee1 100644 --- a/django_lostplaces/lostplaces/templates/place/place_list.html +++ b/django_lostplaces/lostplaces/templates/place/place_list.html @@ -18,37 +18,7 @@ {% for place in place_list %}
  • -
    -
    - -
    -
    -
    - -

    {{place.name}}

    -
    - -

    {{place.location}}

    -
    -
    -
    -

    - {% if place.description|length > 210 %} - {{place.description|truncatechars:210|truncatewords:-1}} - {% else %} - {{place.description}} - {% endif %} -

    -
    -
    -
      -
    • -
    • -
    • -
    -
    -
    -
    + {% include 'partials/place_teaser.html' with place=place extended=True %}
  • {% endfor %}