Esolang-Comment-Template-Generator Lots of people on this site use esoteric languages, and since these languages are unusual and hard to understand, they will frequently write an explanation in a certain format. For example, if the code was

abcdefghijklmnop


And this languages uses # for comments, they would write an explanation like this:

a                #Explanation of what 'a' does
 bc              #Bc
   d             #d
    e            #Explanation of e
     fgh         #foobar
        ij       #hello world
          k      #etc.
           l     #so on
            mn   #and
              op #so forth


I frequently do this too, but every time I do this, I feel like creating the layout of text is really obnoxious and time-consuming. So I want you to create a "Esolang-Comment-Template-Generator" for me. For example, if we ignore the comments, the previous code has this template:

a                #
 bc              #
   d             #
    e            #
     fgh         #
        ij       #
          k      #
           l     #
            mn   #
              op #


The Challenge:

You must write a program or function that takes two strings as input, and outputs this "Esolang-Comment-Template". The first input will be the code, but with bars (|) inserted where the newlines go. The second input is what we will use for comments. So our last example would have this for input:

"a|bc|d|e|fgh|ij|k|l|mn|op", "#"


Unfortunately this excludes bars from being part of the code input, but that's OK. You can assume that the comment input will be a single character. For simplicity's sake, the comment char will not be a bar. The code input will only contain printable ASCII, and it will not contain any newlines. 

Hopefully you can infer what to do from the testcases, but I'll try to clarify some things. 

You must split the code input up into "code-sections" on every bar. Then, each section of code is output on its own line and left-padded with the length of all the previous code (not including the bars). Then, each line is right-padded with enough spaces so that the last two characters on every line are "One additional space" + "The comment character".

One trailing newline is allowed. 

Here is another example. For the input

"Hello|World", "/"


The first section of code is "Hello" and the second is "World". So it should give the output:

Hello      /
     World /


Here are some more samples:

Input:
"a|b|c|d|e|f|g", ","

Output:
a       ,
 b      ,
  c     ,
   d    ,
    e   ,
     f  ,
      g ,

Input:
"abcdefg", ":"

Output:
abcdefg :

Input:
"4|8|15|16|23|42", "%"

Output:
4          %
 8         %
  15       %
    16     %
      23   %
        42 %

Input:
"E|ac|h s|ecti|on is| one c|haracte|r longer| than the| last!", "!"

Output:
E                                                   !
 ac                                                 !
   h s                                              !
      ecti                                          !
          on is                                     !
                one c                               !
                     haracte                        !
                            r longer                !
                                     than the       !
                                              last! !

Input:
"This|Code|has||empty||sections", "@"

Output:
This                     @
    Code                 @
        has              @
                         @
           empty         @
                         @
                sections @


Rules:

You may take these inputs and outputs in any reasonable format. For example, reading/writing a file, STDIN/STOUT, function arguments/return value, etc. As usual, this is code-golf, so try to make your code as short as possible and you win if you can get the shortest solution in your language! I will also select the shortest solution as the overall winner. Standard loopholes are banned.
Java 10, 189 159 bytes

s-&gt;c-&gt;{var r=&quot;&quot;;int p=0,i;for(var a:s.split(&quot;\\|&quot;)){for(i=p;i--&gt;0;r+=&quot; &quot;);r+=a;for(p+=a.length();i++&lt;s.replace(&quot;|&quot;,&quot;&quot;).length()-p;r+=&quot; &quot;);r+=c+&quot;\n&quot;;}return r;}

-30 bytes converting Java 7 to Java 10 and optimizing the loops.
Try it online.
Explanation:
s-&gt;c-&gt;{                     // Method with String &amp; char parameters and String return-type
  var r=&quot;&quot;;                 //  Result-String, starting empty
  int p=0,                  //  Position-integer, starting at 0
      i;                    //  Index integer
  for(var a:s.split(&quot;\\|&quot;)){//  Loop over the parts split by &quot;|&quot;
    for(i=p;i--&gt;0;r+=&quot; &quot;);  //   Add `p` amount of spaces to the result-String
    r+=a;                   //   Add the current part to the result-String
    for(p+=a.length();      //   Add the length of the current part to the position-integer
        i++&lt;s.replace(&quot;|&quot;,&quot;&quot;).length()-p;r+=&quot; &quot;);
                            //   Add the row's trailing spaces to the result-String
    r+=c+&quot;\n&quot;;}             //   Add the character and a new-line to the result-String
  return r;}                //  Return the result-String