Git Product home page Git Product logo

Comments (5)

sampaccoud avatar sampaccoud commented on May 24, 2024

@sveetch a few elements that could help us solve the issues you raise:

{% render_placeholder "course_syllabus" as course_syllabus %}
{{ course_syllabus|truncatechars_html:150 }}
  • For the preview image, it's a bit more tricky but we could add a placeholder in the template of the course and wrap it with {% if current_page.publisher_is_draft %} so that it only appears on the draft page. You won't see it on the public page but you can still display it in your course glimpse with a {% render_placeholder %} template tag... smart leh? And what would be very nice is to display these "draft only elements" in a special materialized block on top of the draft course detail view. WDYT?

from richie.

sveetch avatar sveetch commented on May 24, 2024

@sampaccoud syllabus are free HTML content, mostly paragraphs and i don't think you can correctly truncate this. There is https://docs.djangoproject.com/en/2.1/ref/templates/builtins/#truncatechars-html but the example is about only one paragraph, not sure how it will work with two or more paragraphs.

For the image preview displayed only in draft, well yeah it's "smart", but as you said it also it's tricky :) I'm not very confident about, in my opinions the draft should reflect what will be showed in published version, not to include additional information that will go elsewhere.

We have to take a little more time to think about these solutions.

from richie.

sveetch avatar sveetch commented on May 24, 2024

So with more discussion about this, we finally choose to add image preview as a placeholder that will show only in draft mode (with conditional "if" blocks around placeholder) that have to be showed as a preview. No short resume text to add since, in fact, course glimpse card don't have to show a resume, i was wrong because it's just the organization name.

from richie.

sampaccoud avatar sampaccoud commented on May 24, 2024

@sveetch I have the feeling this issue is now fixed can you confirm?

from richie.

sveetch avatar sveetch commented on May 24, 2024

You are right, closing it

from richie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.