<commit_before>- content_for :title, document_title(@exercise)

%script
  featuresJson = #{@exercise.topic.features.split(' ').to_json.html_safe};
  exerciseJson = #{@exercise.json.html_safe};

.title-bar
  .logo
    %a(href='/')<
      = image_tag 'basic_ruby_x2_black.png', width: 148, height: 18
  %span.dash &mdash;
  = "#{@exercise.topic.num}."
  = convert_title_backticks @exercise.title
  %span.dash &mdash;
  = @exercise.color_explanation

.section.stretch-section{class: @exercise.color}

  .assignment-above
    = image_tag_for_exercise @exercise, 30
    %p= assignment_split_with_br @exercise
  .consistent-height
    - if @exercise.json_loaded['cases']
      .col-1-of-3
        %textarea.code-editor!= @exercise.json_loaded['code']
      .col-2-of-3
        .debugger
      .col-3-of-3
        .cases
    - else
      .col-1-of-2
        %textarea.code-editor= @exercise.json_loaded['code']
      .col-2-of-2
        .debugger
    .clear

- if %w[green red].include?(@exercise.color)
  .section.yellow#solution-section
    .consistent-height
      - if @exercise.json_loaded['cases']
        .col-1-of-3
          #solution-code-hider
            %textarea.code-editor
              = @exercise.json_loaded['solution']
          %p.demo-explanation
            This section demonstrates what your finished program should do.
        .col-2-of-3
          .debugger
        .col-3-of-3
          .cases
      - else
        .col-1-of-2
          #solution-code-hider
            %textarea.code-editor= @exercise.json_loaded['solution']
          %p.demo-explanation
            This section demonstrates what your finished program should do.
        .col-2-of-2
          .debugger
      .clear

.actions{class: @exercise.color}
  - if %w[red green orange].include?(@exercise.color)
    .left
      /%button.show-demo Demo
      %button.show-solution Solution
  .right
    %button.link{'data-href' => @exercise.path_for_next_rep,
      'disabled' => @exercise.path_for_next_rep.nil? ? true : nil}
      &#x27f3; Do another
    - if @exercise.path_for_next_exercise
      %button.link{'data-href' => @exercise.path_for_next_exercise,
        'disabled' => @exercise.path_for_next_exercise.nil? ? true : nil}
        &#x279c; Go on
    - else
      %button(disabled='true' style='width:500px')
        = image_tag 'under_construction.png', width: 25, height: 25
        More exercises coming soon.
<commit_msg>Say "See another" instead of "Do another" for yellow exercises.<commit_after>- content_for :title, document_title(@exercise)

%script
  featuresJson = #{@exercise.topic.features.split(' ').to_json.html_safe};
  exerciseJson = #{@exercise.json.html_safe};

.title-bar
  .logo
    %a(href='/')<
      = image_tag 'basic_ruby_x2_black.png', width: 148, height: 18
  %span.dash &mdash;
  = "#{@exercise.topic.num}."
  = convert_title_backticks @exercise.title
  %span.dash &mdash;
  = @exercise.color_explanation

.section.stretch-section{class: @exercise.color}

  .assignment-above
    = image_tag_for_exercise @exercise, 30
    %p= assignment_split_with_br @exercise
  .consistent-height
    - if @exercise.json_loaded['cases']
      .col-1-of-3
        %textarea.code-editor!= @exercise.json_loaded['code']
      .col-2-of-3
        .debugger
      .col-3-of-3
        .cases
    - else
      .col-1-of-2
        %textarea.code-editor= @exercise.json_loaded['code']
      .col-2-of-2
        .debugger
    .clear

- if %w[green red].include?(@exercise.color)
  .section.yellow#solution-section
    .consistent-height
      - if @exercise.json_loaded['cases']
        .col-1-of-3
          #solution-code-hider
            %textarea.code-editor
              = @exercise.json_loaded['solution']
          %p.demo-explanation
            This section demonstrates what your finished program should do.
        .col-2-of-3
          .debugger
        .col-3-of-3
          .cases
      - else
        .col-1-of-2
          #solution-code-hider
            %textarea.code-editor= @exercise.json_loaded['solution']
          %p.demo-explanation
            This section demonstrates what your finished program should do.
        .col-2-of-2
          .debugger
      .clear

.actions{class: @exercise.color}
  - if %w[red green orange].include?(@exercise.color)
    .left
      /%button.show-demo Demo
      %button.show-solution Solution
  .right
    %button.link{'data-href' => @exercise.path_for_next_rep,
      'disabled' => @exercise.path_for_next_rep.nil? ? true : nil}
      - if @exercise.color == 'yellow'
        &#x27f3; See another
      - else
        &#x27f3; Do another
    - if @exercise.path_for_next_exercise
      %button.link{'data-href' => @exercise.path_for_next_exercise,
        'disabled' => @exercise.path_for_next_exercise.nil? ? true : nil}
        &#x279c; Go on
    - else
      %button(disabled='true' style='width:500px')
        = image_tag 'under_construction.png', width: 25, height: 25
        More exercises coming soon.

{'fraction_non_alphanumeric': 0.13472752865473558, 'fraction_numerical': 0.017092298411421677, 'mean_word_length': 2.369918699186992, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2857047', 'n_tokens_mistral': 1762, 'n_tokens_neox': 1629, 'n_words': 298}