05AB1E (legacy), 30 29 bytes
'-×'/.ø©Ð„|.‡I.D®W'.:ÐW‡IoÐW‡In.D»
Uses the legacy version of 05AB1E because it can take the minimum character of a string (based on its unicode value), saving 2 bytes over repushing the characters.
Try it onlineTry it online or verify all test casesverify all test cases.
Explanation:
'-× '# Repeat "-" the (implicit) input amount of times as string
'/.ø '# Surround it with leading/trailing "/"
© # Store this string in variable `®` (without popping)
Ð # Triplicate it
„|.‡ # Transliterate the "/" to "|" and "-" to "." in the other copy (the
# transliterate ignores the trailing "…---/" since the strings are
# of unequal length)
I.D # Duplicate it the input amount of times
® # Push string `®`
W # Push the minimum (without popping): "-"
'.: '# Replace all "-" with "." in string `®`
Ð # Triplicate it
W # Push the minimum (without popping): "."
‡ # Replace all "/" with "." (transliterate again ignores the trailing
# "…---/")
IoIn # Push 2**inputthe input, and square it
.D # Duplicate this string of "."s that many times
» # Join all strings on the stack by newlines
# (after which the result is output implicitly)