chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex flex-column justify-content-center align-items-center page-wrap container">
|
||||
<div class="mb-4 text-secondary" style="font-size: 120px; line-height: 1.2;">(=‘x‘=)</div>
|
||||
<div class="text-center mb-4">Unfortunately, this page doesn't exist.</div>
|
||||
<div class="text-center"><a role="button" tabindex="0" href="{{$.baseURL}}/" class="btn btn-link">Back to
|
||||
homepage</a></div>
|
||||
</div>
|
||||
|
||||
{{template "footer" .}}
|
||||
@@ -0,0 +1,60 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "comment"}}
|
||||
{{range .comments}}
|
||||
<div class="border-bottom py-2 comment-item border-top">
|
||||
<div class="d-block">
|
||||
<div class="fmt small">
|
||||
{{formatLinkNofollow .ParsedText}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between small">
|
||||
<div class="d-flex align-items-center link-secondary">
|
||||
<a href="{{$.baseURL}}/users/{{.Username}}">{{.UserDisplayName}}</a><span
|
||||
class="mx-1">•</span>
|
||||
<time
|
||||
class="me-3"
|
||||
datetime="{{timeFormatISO $.timezone .CreatedAt}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .CreatedAt}}">{{translatorTimeFormat $.language $.timezone .CreatedAt}}
|
||||
</time>
|
||||
<button type="button"
|
||||
class="me-3 btn-no-border p-0 link-secondary btn btn-link btn-sm">
|
||||
<i class="br bi-hand-thumbs-up-fill"></i>
|
||||
{{if ne 0 .VoteCount}}
|
||||
<span class="ms-2">{{.VoteCount}}</span>
|
||||
{{end}}
|
||||
</button>
|
||||
<button type="button"
|
||||
class="link-secondary m-0 p-0 btn-no-border btn btn-link btn-sm">
|
||||
{{translator $.language "ui.comment.btn_reply"}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="d-block d-md-none dropdown">
|
||||
<div class="no-toggle dropdown-toggle" id="dropdown-comment"
|
||||
aria-expanded="false" variant="success">
|
||||
<i class="br bi-three-dots text-secondary"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "footer"}}
|
||||
<div class="main-mx-with">
|
||||
<div class="row">
|
||||
<footer class="py-3 d-flex flex-wrap align-items-center justify-content-between text-secondary small">
|
||||
<div class="d-flex align-items-center">
|
||||
{{$cc := (join " " .siteinfo.General.Name .siteinfo.Year)}}
|
||||
<div className="me-3">{{- $ft := translator $.language "ui.footer.build_on" "cc" $cc -}}</div>
|
||||
<a class="me-3" href="{{$.baseURL}}/tos" data-discover="true" class="link-secondary">
|
||||
{{translator $.language "ui.admin.legal.terms_of_service.label"}}
|
||||
</a>
|
||||
<a href="{{$.baseURL}}/privacy" data-discover="true" class="link-secondary">
|
||||
{{translator $.language "ui.admin.legal.privacy_policy.label"}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center mb-0 small text-secondary link-secondary">
|
||||
{{templateHTML (replaceHTMLTag $ft "<a href=\"https://answer.apache.org/\" target=\"_blank\"> Answer </a>")}}
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--customize_footer-->
|
||||
{{if .FooterCode }}{{.FooterCode | templateHTML}}{{end}}
|
||||
<!--customize_footer-->
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
@@ -0,0 +1,286 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "header"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{.lang}}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{{.title}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<meta name="theme-color" />
|
||||
<meta name="description" content="{{.description}}" data-rh="true" />
|
||||
<meta name="generator" content="Answer {{.Version}} - https://github.com/apache/answer version {{.Revision}}">
|
||||
{{if .keywords }}<meta name="keywords" content="{{.keywords}}" data-rh="true" />{{end}}
|
||||
{{if .noindex }}<meta name="robots" content="noindex">{{end}}
|
||||
|
||||
<link rel="canonical" href="{{.siteinfo.Canonical}}" />
|
||||
<link rel="manifest" href="{{$.baseURL}}/manifest.json" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="{{$.baseURL}}/opensearch.xml" title="{{.siteinfo.General.Name}}" />
|
||||
<link href="{{.cssPath}}" rel="stylesheet" />
|
||||
<link href="{{$.baseURL}}/custom.css" rel="stylesheet" />
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
href="{{if $.siteinfo.Branding.Favicon }}{{$.siteinfo.Branding.Favicon}}{{else}}{{$.baseURL}}/favicon.ico{{end}}"
|
||||
data-rh="true"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
sizes="192x192"
|
||||
href="{{.siteinfo.Branding.SquareIcon}}"
|
||||
data-rh="true"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
type="image/png"
|
||||
href="{{.siteinfo.Branding.SquareIcon}}"
|
||||
data-rh="true"
|
||||
/>
|
||||
{{range $path := .scriptPath}}
|
||||
<script defer="defer" src="{{$path}}"></script>
|
||||
{{end}}
|
||||
{{if $.siteinfo.JsonLD }}{{ .siteinfo.JsonLD | templateHTML}}{{end}}
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" name="twitter:title" content="{{.title}}" />
|
||||
<meta property="og:site_name" content="{{.siteinfo.General.Name}}" />
|
||||
<meta property="og:url" content="{{.siteinfo.Canonical}}" />
|
||||
<meta property="og:description" content="{{.description}}" />
|
||||
<meta
|
||||
property="og:image"
|
||||
itemProp="image primaryImageOfPage"
|
||||
content="{{if $.siteinfo.Branding.Favicon }}{{$.siteinfo.Branding.Favicon}}{{else}}{{$.baseURL}}/favicon.ico{{end}}"
|
||||
/>
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:domain" content="{{.siteinfo.General.SiteUrl}}" />
|
||||
<meta name="twitter:description" content="{{.description}}" />
|
||||
<meta
|
||||
name="twitter:image"
|
||||
content="{{if $.siteinfo.Branding.Favicon }}{{$.siteinfo.Branding.Favicon}}{{else}}{{$.baseURL}}/favicon.ico{{end}}"
|
||||
/>
|
||||
<meta name="go-template">
|
||||
<!--customize_head-->
|
||||
{{if .HeadCode }} {{.HeadCode | templateHTML}} {{end}}
|
||||
<!--customize_head-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--customize_header-->
|
||||
{{if .HeaderCode }} {{.HeaderCode | templateHTML}} {{end}}
|
||||
<!--customize_header-->
|
||||
<div id="root">
|
||||
|
||||
<div id="spin-mask">
|
||||
<noscript>
|
||||
<style>
|
||||
#spin-mask {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#protect-browser {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
<style>
|
||||
@keyframes _doc-spin {
|
||||
to { transform: rotate(360deg) }
|
||||
}
|
||||
#spin-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: white;
|
||||
z-index: 9999;
|
||||
}
|
||||
#spin-container {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
#spin-container .spinner {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
vertical-align: -.125em;
|
||||
border: .25rem solid currentColor;
|
||||
border-right-color: transparent;
|
||||
color: rgba(108, 117, 125, .75);
|
||||
border-radius: 50%;
|
||||
animation: 0.75s linear infinite _doc-spin;
|
||||
}
|
||||
|
||||
#protect-browser {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div id="spin-container">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
<div id="protect-browser"></div>
|
||||
</div>
|
||||
|
||||
<nav id="header" class="sticky-top theme-dark navbar navbar-expand-xl navbar-light">
|
||||
<div class="w-100 d-flex align-items-center px-3">
|
||||
<button
|
||||
aria-controls="navBarContent"
|
||||
type="button"
|
||||
aria-label="Toggle navigation"
|
||||
class="answer-navBar me-2 navbar-toggler collapsed"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-center nav-grow flex-nowrap"
|
||||
>
|
||||
{{if .siteinfo.Branding.Logo}}
|
||||
<a class="lh-1 me-0 me-sm-5 p-0 navbar-brand" href="{{$.baseURL}}/">
|
||||
<img class="logo me-0" src="{{.siteinfo.Branding.Logo}}" alt="{{.siteinfo.General.Name}}">
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="lh-1 me-0 me-sm-3 navbar-brand" href="{{$.baseURL}}/">
|
||||
{{.siteinfo.General.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="d-none d-xl-block flex-grow-1 me-auto">
|
||||
<div class="d-none d-xl-block ps-0 col-lg-8">
|
||||
<form action="/search" class="w-100 maxw-400">
|
||||
<input placeholder="Search" name="q" type="search" class="placeholder-search form-control" value="">
|
||||
</form>
|
||||
</div>
|
||||
<!-- <div class="xl-none mt-3 pb-1 nav-item">
|
||||
<a class="text-capitalize text-nowrap btn btn-light" href="/questions/add">{{translator $.language "ui.btns.add_question"}}</a>
|
||||
</div> -->
|
||||
<div class="d-none d-xl-flex justify-content-start justify-content-sm-end col-lg-4">
|
||||
<!-- <a role="button" tabindex="0" href="/users/login" class="me-2 link-light btn btn-link">
|
||||
{{translator $.language "ui.btns.login"}}
|
||||
</a>
|
||||
<a role="button" tabindex="0" href="/users/register" class="btn btn-light">
|
||||
{{translator $.language "ui.btns.signup"}}
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="position-relative page-wrap d-flex flex-column flex-fill">
|
||||
<div class="d-flex">
|
||||
<div class="position-sticky px-3 border-end pt-4 d-none d-xl-block" id="pcSideNav">
|
||||
{{template "sidenav" . }}
|
||||
</div>
|
||||
<div class="flex-fill w-100 overflow-x-hidden">
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
/**
|
||||
* @description: Prompt that the browser version is too low
|
||||
*/
|
||||
const defaultList = [
|
||||
{
|
||||
name: 'Edge',
|
||||
version: '100'
|
||||
},
|
||||
{
|
||||
name: 'Firefox',
|
||||
version: '100'
|
||||
},
|
||||
{
|
||||
name: 'Chrome',
|
||||
version: '90'
|
||||
},
|
||||
{
|
||||
name: 'Safari',
|
||||
version: '15'
|
||||
},
|
||||
{
|
||||
name: 'IE',
|
||||
}
|
||||
];
|
||||
function getBrowserTypeAndVersion(){
|
||||
var browser = {
|
||||
name: '',
|
||||
version: ''
|
||||
};
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var s;
|
||||
((ua.indexOf("compatible") > -1 && ua.indexOf("MSIE") > -1) || (ua.indexOf('Trident') > -1 && ua.indexOf("rv:11.0") > -1)) ? browser = { name: 'IE', version: '' } :
|
||||
(s = ua.match(/edge\/([\d\.]+)/)) ? browser = { name: 'Edge', version: s[1] } :
|
||||
(s = ua.match(/firefox\/([\d\.]+)/)) ? browser = { name: 'Firefox', version: s[1] } :
|
||||
(s = ua.match(/chrome\/([\d\.]+)/)) ? browser = { name: 'Chrome', version: s[1] } :
|
||||
(s = ua.match(/version\/([\d\.]+).*safari/)) ? browser = { name: 'Safari', version: s[1] } : browser = { name: 'unknown', version: '' };
|
||||
// 根据关系进行判断
|
||||
return browser;
|
||||
}
|
||||
|
||||
function compareVersion(version1, version2) {
|
||||
var v1 = version1.split('.');
|
||||
var v2 = version2.split('.');
|
||||
var len = Math.max(v1.length, v2.length);
|
||||
while (v1.length < len) {
|
||||
v1.push('0');
|
||||
}
|
||||
while (v2.length < len) {
|
||||
v2.push('0');
|
||||
}
|
||||
for (var i = 0; i < len; i++) {
|
||||
var num1 = parseInt(v1[i]);
|
||||
var num2 = parseInt(v2[i]);
|
||||
if (num1 >= num2) {
|
||||
return 1;
|
||||
} else if (num1 < num2) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const browserInfo = getBrowserTypeAndVersion();
|
||||
|
||||
if (browserInfo.name === 'IE') {
|
||||
const div = document.getElementById('protect-browser');
|
||||
div.innerText = 'Sorry, this site does not support Internet Explorer. In order to avoid affecting the normal use of our features, please use a more modern browser such as Edge, Firefox, Chrome, or Safari.'
|
||||
} else {
|
||||
const notSupport = defaultList.some(item => {
|
||||
if (item.name === browserInfo.name) {
|
||||
return compareVersion(browserInfo.version, item.version) === -1;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (notSupport) {
|
||||
const div = document.getElementById('protect-browser');
|
||||
div.innerText = 'The current browser version is too low, in order not to affect the normal use of the function, please upgrade the browser to the latest version.'
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex justify-content-center px-0 px-md-4">
|
||||
<div class="answer-container">
|
||||
<div class="pt-4 mb-5">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="d-md-flex d-block flex-wrap justify-content-between">
|
||||
<div class="d-flex flex-column flex-md-row mb-4">
|
||||
<a href="{{$.baseURL}}/users/{{.userinfo.Username}}">
|
||||
<img
|
||||
src="{{.userinfo.Avatar}}"
|
||||
width="160px" height="160px" class="rounded" alt="{{.userinfo.Username}}" />
|
||||
</a>
|
||||
<div class="ms-0 ms-md-4 mt-4 mt-md-0">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<a class="link-dark h3 mb-0" href="{{$.baseURL}}/users/{{.userinfo.Username}}">{{.userinfo.DisplayName}}</a>
|
||||
|
||||
</div>
|
||||
<div class="text-secondary mb-4">@{{.userinfo.Username}}</div>
|
||||
<div class="d-flex flex-wrap mb-3">
|
||||
<div class="me-3">
|
||||
<strong class="fs-5">{{.userinfo.Rank}}</strong><span class="text-secondary"> {{translator $.language "ui.personal.x_reputation"}}</span>
|
||||
</div>
|
||||
<div class="me-3">
|
||||
<strong class="fs-5">{{.userinfo.AnswerCount}}</strong><span class="text-secondary"> {{translator $.language "ui.personal.x_answers"}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<strong class="fs-5">{{.userinfo.QuestionCount}}</strong><span class="text-secondary"> {{translator $.language "ui.personal.x_questions"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{if .userinfo.Website }}
|
||||
<div class="d-flex align-items-center"><i class="br bi-house-door-fill me-2"></i><a class="link-secondary" href="{{.userinfo.Website}}">{{.userinfo.Website}}</a></div>
|
||||
{{else}}
|
||||
{{end}}
|
||||
<div class="d-flex text-secondary"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-content-center row">
|
||||
|
||||
<div class="col-xxl-7 col-lg-8 col-sm-12">
|
||||
<div>
|
||||
<h5 class="mb-3">{{translator $.language "ui.personal.about_me"}}</h5>
|
||||
{{if .bio }}
|
||||
<div class="mb-5 text-break fmt">{{.bio}}</div>
|
||||
{{else}}
|
||||
<div class="text-center py-5 mb-4">{{translator $.language "ui.personal.about_me_empty"}}</div>
|
||||
{{end}}
|
||||
<div class="mb-4 row">
|
||||
<div class="mb-4 col-md-6 col-sm-12">
|
||||
<h5 class="mb-3">Top Answers</h5>
|
||||
<ol class="list-unstyled">
|
||||
{{ range .topAnswers }}
|
||||
<li class="mb-2">
|
||||
<a class="text-truncate-1" href="{{$.baseURL}}/questions/{{.QuestionID}}/{{.AnswerID}}">{{.QuestionInfo.Title}}</a>
|
||||
<div class="text-secondary small">
|
||||
<i class="br bi-hand-thumbs-up-fill me-1"></i><span>{{.VoteCount}} votes</span>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5 class="mb-3">Top Questions</h5>
|
||||
<ol class="list-unstyled">
|
||||
{{ range .topQuestions }}
|
||||
<li class="mb-2">
|
||||
<a class="text-truncate-1" href="{{$.baseURL}}/questions/{{.ID}}">{{.Title}}</a>
|
||||
<div class="text-secondary small">
|
||||
<i class="br bi-hand-thumbs-up-fill me-1"></i><span> {{.VoteCount}} votes</span>
|
||||
<div class="d-inline-block text-secondary ms-3 small text-success">
|
||||
<i class="br bi-check-circle-fill"></i><span> {{.AnswerCount}} answers</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 mt-lg-0 col-xxl-3 col-lg-4 col-sm-12">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "footer" .}}
|
||||
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "hot-question"}}
|
||||
<div class="card">
|
||||
<div class="text-nowrap text-capitalize card-header">{{translator $.language "ui.question.hot_questions"}}</div>
|
||||
<div class="list-group list-group-flush">
|
||||
{{ range .hotQuestion }}
|
||||
{{if $.useTitle }}
|
||||
<a class="list-group-item list-group-item-action" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">
|
||||
{{else}}
|
||||
<a class="list-group-item list-group-item-action" href="{{$.baseURL}}/questions/{{.ID}}">
|
||||
{{end}}
|
||||
<div class="link-dark">{{ .Title }}</div>
|
||||
{{if ne 0 .AnswerCount}}
|
||||
<div class="d-flex align-items-center small mt-1 link-secondary">
|
||||
<i class="br bi-chat-square-text-fill"></i>
|
||||
<span class="ms-1">{{translator $.language "ui.question.x_answers" "count" .AnswerCount}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>{{$.general.Name}}</ShortName>
|
||||
{{if $.general.Description}}
|
||||
<Description>{{$.general.Description}}</Description>
|
||||
{{end}}
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16" type="image/x-icon">{{$.favicon}}</Image>
|
||||
<Url type="text/html" method="get" template="{{$.general.SiteUrl}}/search?q={searchTerms}"/>
|
||||
</OpenSearchDescription>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "page"}}
|
||||
<ul class="d-inline-flex mb-0 pagination pagination-sm">
|
||||
{{ if ne .page.Currpage 1 }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$.path}}?page={{$.page.Prevpage}}"><span aria-hidden="true">{{translator $.language "ui.pagination.prev"}}</span><span
|
||||
class="visually-hidden">{{translator $.language "ui.pagination.prev"}}</span></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range $value := .page.Pages }}
|
||||
{{ if eq $.page.Currpage $value }}
|
||||
<li class="page-item active">
|
||||
<span class="page-link" href="{{$.path}}?page={{$value}}">{{$value}}
|
||||
<span class="visually-hidden">(current)</span>
|
||||
</span>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$.path}}?page={{$value}}">{{$value}}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if lt $.page.Currpage $.page.Totalpages }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$.path}}?page={{$.page.Nextpage}}"><span aria-hidden="true">{{translator $.language "ui.pagination.next"}}</span><span
|
||||
class="visually-hidden">{{translator $.language "ui.pagination.next"}}</span></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{end}}
|
||||
@@ -0,0 +1,189 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex justify-content-center px-0 px-md-4">
|
||||
<div class="answer-container">
|
||||
<div class="questionDetailPage pt-4 mb-5 row">
|
||||
<div class="page-main flex-auto col">
|
||||
<div>
|
||||
<h1 class="h3 mb-3 text-wrap text-break">
|
||||
{{if $.useTitle }}
|
||||
<a class="link-dark" href="{{$.baseURL}}/questions/{{.detail.ID}}/{{urlTitle .detail.Title}}">{{.detail.Title}}</a>
|
||||
{{else}}
|
||||
<a class="link-dark" href="{{$.baseURL}}/questions/{{.detail.ID}}">{{.detail.Title}}</a>
|
||||
{{end}}
|
||||
</h1>
|
||||
<div
|
||||
class="d-flex flex-wrap align-items-center small mb-4 text-secondary border-bottom pb-3">
|
||||
<div class="d-flex align-items-center text-secondary me-3">
|
||||
<a class="d-flex align-items-center" href="{{$.baseURL}}/users/{{.detail.UserInfo.Username}}">
|
||||
<img
|
||||
src="{{.detail.UserInfo.Avatar}}"
|
||||
width="24px" height="24px"
|
||||
class="rounded me-1"
|
||||
alt=""/>
|
||||
<span class="me-1 name-ellipsis" style="max-width: 300px;">{{.detail.UserInfo.DisplayName}}</span>
|
||||
</a>
|
||||
<span class="fw-bold" title="Reputation">{{.detail.UserInfo.Rank}}</span>
|
||||
</div>
|
||||
<time class="me-3 link-secondary"
|
||||
datetime="{{timeFormatISO $.timezone .detail.CreateTime}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .detail.CreateTime}}">{{translator $.language "ui.question_detail.created"}} {{translatorTimeFormat $.language $.timezone .detail.CreateTime}}
|
||||
</time>
|
||||
{{if gt .detail.QuestionUpdateTime 0}}
|
||||
<time class="me-3 link-secondary"
|
||||
datetime="{{timeFormatISO $.timezone .detail.QuestionUpdateTime}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .detail.QuestionUpdateTime}}">{{translator $.language "ui.question_detail.Edited"}} {{translatorTimeFormat $.language $.timezone .detail.QuestionUpdateTime}}
|
||||
</time>
|
||||
{{end}}
|
||||
<div class="me-3">{{translator $.language "ui.question_detail.Views"}} {{.detail.ViewCount}}</div>
|
||||
<button type="button" class="p-0 btn-no-border btn btn-link btn-sm">{{translator $.language "ui.question_detail.Follow"}}</button>
|
||||
</div>
|
||||
|
||||
<div class="img-viewer">
|
||||
<article class="fmt text-break text-wrap last-p mt-4">
|
||||
{{formatLinkNofollow .detail.HTML}}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="m-n1">
|
||||
{{range .detail.Tags}}
|
||||
<a href="{{$.baseURL}}/tags/{{.SlugName}}"
|
||||
class="badge-tag rounded-1 {{if .Reserved}}badge-tag-reserved{{end}} {{if .Recommend}}badge-tag-required{{end}} m-1">
|
||||
<span class="">{{.SlugName}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div role="group" class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
<i class="br bi-hand-thumbs-up-fill"></i></button>
|
||||
<button type="button"
|
||||
disabled="" class="btn btn-outline-dark text-body">
|
||||
{{.detail.VoteCount}}
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
<i class="br bi-hand-thumbs-down-fill"></i>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary ms-3">
|
||||
<i class="br bi-bookmark-fill"></i><span style="padding-left: 10px">{{.detail.CollectionCount}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="d-flex flex-wrap justify-content-between align-items-center"><div class="d-flex flex-wrap"><button type="button" class="rounded-pill me-2 link-secondary btn-reaction btn btn-light btn-sm"><i class="br bi-chat-text-fill"></i><span class="ms-1">Add comment</span></button><button type="button" aria-label="add or remove reactions" aria-haspopup="true" class="smile-btn rounded-pill link-secondary btn-reaction btn btn-light btn-sm"><i class="br bi-emoji-smile-fill"></i><span class="ms-1">+</span></button></div><div class="md-show align-items-center"><div class="dropdown"><a class="no-toggle pointer d-flex link-secondary small dropdown-toggle" id="dropdown-share" aria-expanded="false" style="line-height: 23px;">{{translator $.language "ui.share.name"}}</a></div></div><div class="md-hide"></div></div>
|
||||
|
||||
<div class="comments-wrap">
|
||||
{{template "comment" (wrapComments (index $.comments $.detail.ID) $.language $.timezone)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between mt-5 mb-3"
|
||||
id="answerHeader">
|
||||
<h5 class="mb-0">{{.detail.AnswerCount}} Answers</h5>
|
||||
</div>
|
||||
{{range .answers}}
|
||||
<div class="answer-item py-4">
|
||||
<article class="fmt">
|
||||
{{formatLinkNofollow .HTML}}
|
||||
</article>
|
||||
<div class="d-flex align-items-center mt-4">
|
||||
<div class="">
|
||||
<div role="group" class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
<i class="br bi-hand-thumbs-up-fill"></i></button>
|
||||
<button type="button"
|
||||
disabled="" class="btn btn-outline-dark text-body">
|
||||
{{.VoteCount}}
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
<i class="br bi-hand-thumbs-down-fill"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{if eq 2 .Accepted}}
|
||||
<button type="button" disabled=""
|
||||
class="ms-3 active opacity-100 bg-success text-white btn btn-outline-success">
|
||||
<i class="br bi-check-circle-fill me-2"></i><span>{{translator $.language "ui.question_detail.answers.btn_accepted"}}</span>
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="mt-4 mb-3 row">
|
||||
<div class="mb-3 mb-md-0 col">
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 mb-md-0 col-lg-3">
|
||||
<a href="{{$.baseURL}}/posts/{{$.detail.ID}}/{{.ID}}/timeline">
|
||||
<time
|
||||
class="link-secondary small"
|
||||
datetime="{{timeFormatISO $.timezone .UpdateTime}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .UpdateTime}}">
|
||||
{{translator $.language "ui.question_detail.edit"}} {{translatorTimeFormat $.language $.timezone .UpdateTime}}
|
||||
</time>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="d-flex">
|
||||
<a href="{{$.baseURL}}/users/{{.UserInfo.Username}}"><img
|
||||
src="{{.UserInfo.Avatar}}"
|
||||
width="40px" height="40px"
|
||||
class="rounded me-2 d-none d-md-block"
|
||||
alt=""/><img
|
||||
src="{{.UserInfo.Avatar}}"
|
||||
width="24px" height="24px"
|
||||
class="rounded me-2 d-block d-md-none"
|
||||
alt=""/></a>
|
||||
<div
|
||||
class="small text-secondary d-flex flex-row flex-md-column align-items-center align-items-md-start">
|
||||
<div class="me-1 me-md-0">
|
||||
<a class="me-1 text-break"
|
||||
href="{{$.baseURL}}/users/{{.UserInfo.Username}}">{{.UserInfo.DisplayName}}</a><span
|
||||
class="fw-bold" title="Reputation">{{.UserInfo.Rank}}</span>
|
||||
</div>
|
||||
<a href="{{$.baseURL}}/posts/{{$.detail.ID}}/{{.ID}}/timeline">
|
||||
<time
|
||||
class="link-secondary"
|
||||
datetime="{{timeFormatISO $.timezone .CreateTime}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .CreateTime}}">{{translator $.language "ui.question_detail.answered"}} {{translatorTimeFormat $.language $.timezone .CreateTime}}
|
||||
</time>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comments-wrap">
|
||||
{{template "comment" (wrapComments (index $.comments .ID) $.language $.timezone)}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="page-right-side mt-4 mt-xl-0 col">
|
||||
{{template "related-question" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
@@ -0,0 +1,116 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex justify-content-center px-0 px-md-4">
|
||||
<div class="answer-container">
|
||||
<div class="pt-4 mb-5 row">
|
||||
<div class="page-main flex-auto overflow-x-hidden col">
|
||||
<div>
|
||||
<div class="mb-3 d-flex flex-wrap justify-content-between">
|
||||
<h5 class="fs-5 text-nowrap mb-3 mb-md-0">
|
||||
{{translator $.language "ui.question.all_questions"}}
|
||||
</h5>
|
||||
{{template "sort-btns" .}}
|
||||
</div>
|
||||
<div class="rounded-0 list-group">
|
||||
{{range .data}}
|
||||
<li class="py-3 px-2 border-start-0 border-end-0 position-relative pointer list-group-item list-group-item-action">
|
||||
<div class="d-flex flex-wrap text-secondary small mb-12">
|
||||
<div class="d-flex align-items-center text-secondary me-1">
|
||||
<a href="{{$.baseURL}}/users/{{.Operator.Username}}">
|
||||
<img src="{{$.baseURL}}/users/{{.Operator.Avatar}}" width="24px" height="24px" class="rounded-circle me-1" alt="shuai" data-processed="true">
|
||||
<span class="me-1 name-ellipsis" style="max-width: 300px;">{{.Operator.DisplayName}}</span>
|
||||
</a>
|
||||
<span class="fw-bold" title="Reputation">{{.Operator.Rank}}</span>
|
||||
</div>
|
||||
•
|
||||
<time
|
||||
class="text-secondary ms-1"
|
||||
datetime="{{timeFormatISO $.timezone .OperatedAt}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .OperatedAt}}">
|
||||
{{translator $.language "ui.question.asked"}}
|
||||
{{translatorTimeFormat $.language $.timezone .OperatedAt}}
|
||||
</time>
|
||||
</div>
|
||||
|
||||
<h5 class="text-wrap text-break">
|
||||
{{if $.useTitle }}
|
||||
<a class="link-dark d-block" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">
|
||||
{{.Title}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="link-dark d-block" href="{{$.baseURL}}/questions/{{.ID}}">{{.Title}}</a>
|
||||
{{end}}
|
||||
</h5>
|
||||
|
||||
<div class="text-truncate-2 mb-2">
|
||||
{{if $.useTitle }}
|
||||
<a class="d-block small text-body" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">{{.Description}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="d-block small text-body" href="{{$.baseURL}}/questions/{{.ID}}">{{.Description}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="question-tags mb-12">
|
||||
{{range .Tags }}
|
||||
<a
|
||||
href="{{$.baseURL}}/tags/{{.SlugName}}"
|
||||
class="badge-tag rounded-1 {{if .Reserved}}badge-tag-reserved{{end}} {{if .Recommend}}badge-tag-required{{end}} me-1">
|
||||
<span class="">{{.SlugName}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="small text-secondary">
|
||||
<div class="d-flex align-items-center mt-2 mt-md-0">
|
||||
<div class="d-flex align-items-center flex-shrink-0">
|
||||
<i class="br bi-hand-thumbs-up-fill me-1"></i>
|
||||
<span class="fw-medium">{{.VoteCount}}</span>
|
||||
<span class="ms-1">{{translator $.language "ui.counts.votes"}}</span>
|
||||
</div>
|
||||
<div class="d-flex flex-shrink-0 align-items-center ms-3">
|
||||
<i class="br bi-chat-square-text-fill me-1"></i>
|
||||
<span class="fw-medium">{{.AnswerCount}}</span>
|
||||
<span class="ms-1">{{translator $.language "ui.counts.answers"}}</span>
|
||||
</div>
|
||||
<span class="summary-stat ms-3 flex-shrink-0">
|
||||
<i class="br bi-bar-chart-fill"></i>
|
||||
<span class="fw-medium ms-1">{{.ViewCount}}</span>
|
||||
<span class="ms-1">{{translator $.language "ui.counts.views"}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="mt-4 mb-2 d-flex justify-content-center">
|
||||
{{template "page" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-right-side mt-4 mt-xl-0 col">
|
||||
{{template "hot-question" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "related-question"}}
|
||||
<div class="card">
|
||||
<div class="card-header">{{translator $.language "ui.related_question.title"}}</div>
|
||||
<div class="list-group list-group-flush">
|
||||
{{ range .relatedQuestion }}
|
||||
{{if $.useTitle }}
|
||||
<a class="list-group-item list-group-item-action" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">
|
||||
{{else}}
|
||||
<a class="list-group-item list-group-item-action" href="{{$.baseURL}}/questions/{{.ID}}">
|
||||
{{end}}
|
||||
<div class="link-dark">{{ .Title }}</div>
|
||||
{{if ne 0 .AnswerCount}}
|
||||
<div class="mt-1 small me-2 link-secondary">
|
||||
<i class="br bi-chat-square-text-fill me-1"></i>
|
||||
<span>{{ .AnswerCount }} {{translator $.language "ui.related_question.answers"}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "sidenav"}}
|
||||
<div class="flex-column nav nav-pills">
|
||||
<a class="nav-link active" href="{{$.baseURL}}/questions">
|
||||
<i class="br bi-question-circle-fill me-2"></i>
|
||||
<span>{{translator $.language "ui.header.nav.question"}}</span>
|
||||
</a>
|
||||
<a href="{{$.baseURL}}/tags" data-rr-ui-event-key="/tags" class="nav-link">
|
||||
<i class="br bi-tags-fill me-2"></i>
|
||||
<span>{{translator $.language "ui.header.nav.tag"}}</span>
|
||||
</a>
|
||||
<a class="nav-link" href="{{$.baseURL}}/users">
|
||||
<i class="br bi-people-fill me-2"></i>
|
||||
<span>{{translator $.language "ui.header.nav.user"}}</span>
|
||||
</a>
|
||||
<a class="nav-link" href="{{$.baseURL}}/badges">
|
||||
<i class="br bi-people-fill me-2"></i>
|
||||
<span>{{translator $.language "ui.header.nav.badges"}}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{ .xmlHeader }}
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{{ range .page }}
|
||||
<sitemap>
|
||||
<loc>{{$.general.SiteUrl}}/sitemap/question-{{.}}.xml</loc>
|
||||
</sitemap>
|
||||
{{ end }}
|
||||
</sitemapindex>
|
||||
@@ -0,0 +1,33 @@
|
||||
{{ .xmlHeader }}
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{{ range .list }}
|
||||
<url>
|
||||
{{if $.hastitle}}
|
||||
<loc>{{$.general.SiteUrl}}/questions/{{.ID}}/{{.Title}}</loc>
|
||||
{{else}}
|
||||
<loc>{{$.general.SiteUrl}}/questions/{{.ID}}</loc>
|
||||
{{end}}
|
||||
<lastmod>{{.UpdateTime}}</lastmod>
|
||||
</url>
|
||||
{{ end }}
|
||||
</urlset>
|
||||
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{define "sort-btns"}}
|
||||
<div role="group" class="md-show me-2 btn-group btn-group-sm">
|
||||
<a role="button" tabindex="0" href="?order=newest" class="text-capitalize fit-content btn active btn-outline-secondary">
|
||||
{{translator ($.language) "ui.question.newest" }}
|
||||
</a>
|
||||
<a role="button" tabindex="0" href="?order=active" class="text-capitalize fit-content btn btn-outline-secondary">
|
||||
{{translator ($.language) "ui.question.active" }}
|
||||
</a>
|
||||
<!-- <a role="button" tabindex="0" href="?order=hot" class="text-capitalize fit-content d-none d-md-block btn btn-outline-secondary">
|
||||
{{translator ($.language) "ui.question.hot" }}
|
||||
</a> -->
|
||||
<a role="button" tabindex="0" href="?order=unanswered" class="text-capitalize fit-content d-none d-md-block btn btn-outline-secondary" style="border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem;">
|
||||
{{translator ($.language) "ui.question.unanswered" }}
|
||||
</a>
|
||||
<a role="button" tabindex="0" href="?order=frequent" class="text-capitalize fit-content d-none d-md-block btn btn-outline-secondary" style="border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem;">
|
||||
{{translator ($.language) "ui.question.frequent" }}
|
||||
</a>
|
||||
<div role="group" class="show dropdown btn-group">
|
||||
<button type="button" aria-expanded="true" class="dropdown-toggle show btn btn-outline-secondary btn-sm">
|
||||
{{translator ($.language) "ui.btns.more" }}
|
||||
</button>
|
||||
<div x-placement="bottom-start" class="dropdown-menu show" data-popper-reference-hidden="false" data-popper-escaped="false" data-popper-placement="bottom-start" style="position: absolute; inset: 0px auto auto 0px; transform: translate(0px, 33px);">
|
||||
<a href="?order=score" aria-selected="false" class="text-capitalize dropdown-item"> {{translator ($.language) "ui.question.score" }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button type="button" id="react-aria8245013726-:r5:" aria-expanded="false" class="dropdown-toggle btn btn-outline-secondary btn-sm"><i class="br bi-view-stacked"></i></button>
|
||||
<div x-placement="bottom-end" aria-labelledby="react-aria8245013726-:r5:" class="dropdown-menu dropdown-menu-end" data-popper-reference-hidden="false" data-popper-escaped="false" data-popper-placement="bottom-end" style="position: absolute; inset: 0px 0px auto auto; transform: translate(0px, 33px);">
|
||||
<h6 class="dropdown-header" role="heading">
|
||||
{{translator ($.language) "ui.btns.view" }}
|
||||
</h6>
|
||||
<a aria-selected="true" data-rr-ui-dropdown-item="" class="dropdown-item active" role="button" tabindex="0" href="#" data-footnote-fixed="true">
|
||||
{{translator ($.language) "ui.btns.card" }}
|
||||
</a>
|
||||
<a aria-selected="false" data-rr-ui-dropdown-item="" class="dropdown-item" role="button" tabindex="0" href="#" data-footnote-fixed="true">
|
||||
{{translator ($.language) "ui.btns.compact" }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,101 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex justify-content-center px-0 px-md-4">
|
||||
<div class="answer-container">
|
||||
<div class="pt-4 mb-5 row">
|
||||
<div class="page-main flex-auto col">
|
||||
<div class="tag-box mb-5">
|
||||
<h3 class="mb-3">
|
||||
<a class="link-dark" href="{{$.baseURL}}/tags/{{$.tag.SlugName}}">{{$.tag.SlugName}}</a>
|
||||
</h3>
|
||||
<p class="text-break">{{formatLinkNofollow $.tag.ParsedText}}</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mb-3 d-flex flex-wrap justify-content-between">
|
||||
<h5 class="fs-5 text-nowrap mb-3 mb-md-0">
|
||||
{{translator ($.language) "ui.question.x_questions" "count"
|
||||
.questionCount}}
|
||||
</h5>
|
||||
{{template "sort-btns" .}}
|
||||
</div>
|
||||
<div class="rounded list-group">
|
||||
{{range .questionList}}
|
||||
<div class="bg-transparent py-3 px-0 border-start-0 border-end-0 list-group-item">
|
||||
<h5 class="text-wrap text-break">
|
||||
{{if $.useTitle }}
|
||||
<a class="link-dark" href="{{$.baseURL}}/questions/{{.ID}}/{{urlTitle .Title}}">{{.Title}}</a>
|
||||
{{else}}
|
||||
<a class="link-dark" href="{{$.baseURL}}/questions/{{.ID}}">{{.Title}}</a>
|
||||
{{end}}
|
||||
</h5>
|
||||
<div class="d-flex flex-wrap flex-column flex-md-row align-items-md-center small mb-2 text-secondary">
|
||||
<div class="d-flex flex-wrap me-0 me-md-3">
|
||||
<div class="d-flex align-items-center text-secondary me-1">
|
||||
<a href="{{$.baseURL}}/users/{{.Operator.Username}}"><span
|
||||
class="me-1 text-break">{{.Operator.DisplayName}}</span></a><span class="fw-bold"
|
||||
title="Reputation">{{.Operator.Rank}}</span>
|
||||
</div>
|
||||
•
|
||||
<time class="text-secondary ms-1" datetime="{{timeFormatISO $.timezone .OperatedAt}}"
|
||||
title="{{translatorTimeFormatLongDate $.language $.timezone .OperatedAt}}">{{translator $.language
|
||||
"ui.question.asked"}}
|
||||
{{translatorTimeFormat $.language $.timezone .OperatedAt}}
|
||||
</time>
|
||||
</div>
|
||||
<div class="d-flex align-items-center mt-2 mt-md-0">
|
||||
<div class="d-flex align-items-center flex-shrink-0">
|
||||
<i class="br bi-hand-thumbs-up-fill"></i>
|
||||
<em class="fst-normal ms-1">{{.VoteCount}}</em>
|
||||
</div>
|
||||
<div class="d-flex flex-shrink-0 align-items-center ms-3">
|
||||
<i class="br bi-chat-square-text-fill"></i>
|
||||
<em class="fst-normal ms-1">{{.AnswerCount}}</em>
|
||||
</div>
|
||||
<span class="summary-stat ms-3 flex-shrink-0">
|
||||
<i class="br bi-bar-chart-fill"></i>
|
||||
<em class="fst-normal ms-1">{{.ViewCount}}</em>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="question-tags mx-n1">
|
||||
{{range .Tags }}
|
||||
<a href="{{$.baseURL}}/tags/{{.SlugName}}"
|
||||
class="badge-tag rounded-1 {{if .Reserved}}badge-tag-reserved{{end}} {{if .Recommend}}badge-tag-required{{end}} m-1">
|
||||
<span class="">{{.SlugName}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="mt-4 mb-2 d-flex justify-content-center">
|
||||
{{template "page" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-right-side mt-4 mt-xl-0 col">
|
||||
{{template "hot-question" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
@@ -0,0 +1,78 @@
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
{{template "header" . }}
|
||||
<div class="d-flex justify-content-center px-0 px-md-4">
|
||||
<div class="answer-container">
|
||||
<div class="py-4 mb-4 row">
|
||||
<div class="col-xxl-12">
|
||||
<h3 class="mb-4">
|
||||
{{translator $.language "ui.page_title.tags"}}
|
||||
</h3>
|
||||
<div class="d-block d-sm-flex justify-content-between align-items-center flex-wrap">
|
||||
<div class="mb-3 mb-sm-0 hstack gap-3">
|
||||
<form class="">
|
||||
<div>
|
||||
<input placeholder="{{translator $.language "ui.tags.search_placeholder"}}" type="search" id="formBasicEmail" class="form-control form-control-sm" value="">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div role="group" class="btn-group btn-group-sm">
|
||||
<a role="button" tabindex="0" href="?sort=popular" class="text-capitalize fit-content btn active btn-outline-secondary">
|
||||
{{translator $.language "ui.tags.sort_buttons.popular"}}
|
||||
</a>
|
||||
<a role="button" tabindex="0" href="?sort=name" class="text-capitalize fit-content btn btn-outline-secondary">
|
||||
{{translator $.language "ui.tags.sort_buttons.name"}}
|
||||
</a>
|
||||
<a role="button" tabindex="0" href="?sort=newest" class="text-capitalize fit-content btn btn-outline-secondary">
|
||||
{{translator $.language "ui.tags.sort_buttons.newest"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 col-sm-12">
|
||||
<div class="row">
|
||||
{{ range .data.List }}
|
||||
<div class="mb-4 col-lg-3 col-md-4 col-sm-6 col-12">
|
||||
<div class="h-100 card">
|
||||
<div class="d-flex flex-column align-items-start card-body">
|
||||
<a href="{{$.baseURL}}/tags/{{.SlugName}}" class="badge-tag rounded-1 mb-3"><span
|
||||
class="">{{.SlugName}}</span></a>
|
||||
<div class="small flex-fill text-break text-wrap text-truncate-3 reset-p mb-3"> {{formatLinkNofollow .ParsedText}}
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="text-secondary small text-nowrap">{{.QuestionCount}}
|
||||
{{translator $.language "ui.tags.tag_label"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
{{template "page" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "footer" .}}
|
||||
Reference in New Issue
Block a user