mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-06-11 00:49:39 +00:00
fix: pass domain to question template
This commit is contained in:
parent
45644a0503
commit
d935ce72f6
2 changed files with 3 additions and 2 deletions
|
@ -277,6 +277,7 @@ func ViewQuestion(c *gin.Context) {
|
||||||
"theme": c.MustGet("theme").(string),
|
"theme": c.MustGet("theme").(string),
|
||||||
"currentUrl": fmt.Sprintf("%s/questions/%s/%s", os.Getenv("APP_URL"), questionId, questionTitle),
|
"currentUrl": fmt.Sprintf("%s/questions/%s/%s", os.Getenv("APP_URL"), questionId, questionTitle),
|
||||||
"sortValue": sortValue,
|
"sortValue": sortValue,
|
||||||
|
"domain": domain,
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<p class="timestamp">
|
<p class="timestamp">
|
||||||
Asked {{ .question.Timestamp }} by
|
Asked {{ .question.Timestamp }} by
|
||||||
<a
|
<a
|
||||||
href="https://stackoverflow.com{{ .question.AuthorURL }}"
|
href="https://{{ .domain }}{{ .question.AuthorURL }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>{{ .question.AuthorName }}</a
|
>{{ .question.AuthorName }}</a
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<div class="answer-author">
|
<div class="answer-author">
|
||||||
Answered {{ $answer.Timestamp }} by
|
Answered {{ $answer.Timestamp }} by
|
||||||
<a
|
<a
|
||||||
href="https://stackoverflow.com{{ $answer.AuthorURL }}"
|
href="https://{{ .domain }}{{ $answer.AuthorURL }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>{{ $answer.AuthorName }}</a
|
>{{ $answer.AuthorName }}</a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue