- tip = exercise_tip.tip
.card.mb-2
  .card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
    .card-title.mb-0
      a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
        .clearfix role="button"
          i.fa aria-hidden="true"
          span
            = t('activerecord.models.tip.one')
            =< exercise_tip.rank
            = ": #{tip.title}" if tip.title?
  .card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
    .card-body.p-3
      h5
        = t('exercises.implement.tips.description')
      = tip.description
      - if tip.example?
        h5.mt-2
          = t('exercises.implement.tips.example')
        pre
          code.mh-100 class="language-#{tip.file_type.editor_mode.gsub("ace/mode/", "")}"
            = tip.example
      .mb-4
      = render(partial: 'tips/collapsed_card', collection: exercise_tip.children, as: :exercise_tip)

- tip = exercise_tip.tip
.card class="#{exercise_tip.parent_exercise_tip_id? ? 'mt-2' : ''}"
  .card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
    .card-title.mb-0
      a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-parent="#tips" data-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
        .clearfix role="button"
          i.fa aria-hidden="true"
          span
            = t('activerecord.models.tip.one')
            =< exercise_tip.rank
            = ": #{tip.title}" if tip.title?
  .card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
    .card-body.p-3
      h5
        = t('exercises.implement.tips.description')
      = tip.description
      - if tip.example?
        h5.mt-2
          = t('exercises.implement.tips.example')
        pre
          code.mh-100 class="language-#{tip.file_type.editor_mode.gsub("ace/mode/", "")}"
            = tip.example
      = render(partial: 'tips/collapsed_card', collection: exercise_tip.children, as: :exercise_tip)

Fix styling for multiple, nested cards
Fix styling for multiple, nested cards

openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean