Yes the top edge will be sloping, but it won't be at the same angle as the roof, it will be shallower.
To work out the size of the curtain measure the length/height at the highest point (h1 on my scrappy drawing)and measure the length/height at the short side (h2). Then measure the width (w) and multiply that by at least 1.5 though x2 or x2.5 would look better. Then add hem allowances top and bottom.
At the top just make a casing - it will be a pain because you'll be sewing off-grain - and slot a wire or rod through to hold the curtain. Depending on the length a very ordinary curtain hook should suffice to hold the curtain clear of the door.
If you use calico or some other plain fabric which doesn't have a nap the two curtains can be cut in opposite directions for maximum economy.