File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 < h3>< %= i18n .contribute ? .cta ? .title % >< / h3>
1616 < p>< %= i18n .contribute ? .cta ? .description % >< / p>
1717 < a href= " https://github.com/jzero-io/templates/fork" target= " _blank" rel= " noopener" class = " btn btn-primary" >
18- < %= i18n .contribution ? .button % >
18+ < %= i18n .contribute ? . cta ? .button % >
1919 < / a>
2020 < / div>
2121 < / div>
Original file line number Diff line number Diff line change 6363 < div class = " lang-dropdown" id= " langDropdown" >
6464 < % supportedLangs .forEach (l => { % >
6565 < % const langName = l === ' zh' ? ' 中文' : l === ' en' ? ' English' : l .toUpperCase (); % >
66- < % const href = l === defaultLang ? ' /' : ' /' + l + ' /' ; % >
67- < % if (currentPage === ' detail' && typeof templateId !== ' undefined' && typeof templateType !== ' undefined' ) { % >
68- < a
69- href= " <%= href %><%= templateType %>/<%= templateId %>/"
70- class = " lang-option <%= l === currentLang ? 'active' : '' %>"
71- >
72- < %= langName % >
73- < / a>
66+ < % let href = ' ' ; % >
67+ < % if (l === defaultLang) { % >
68+ < % href = ' /' + (currentPage === ' home' ? ' ' : currentPage + ' /' ); % >
69+ < % if (currentPage === ' detail' && typeof templateId !== ' undefined' && typeof templateType !== ' undefined' ) { % >
70+ < % href = ' /' + templateType + ' /' + templateId + ' /' ; % >
71+ < % } % >
7472 < % } else { % >
75- < a
76- href= " <%= href %>"
77- class = " lang-option <%= l === currentLang ? 'active' : '' %>"
78- >
79- < %= langName % >
80- < / a>
73+ < % href = ' /' + l + ' /' + (currentPage === ' home' ? ' ' : currentPage + ' /' ); % >
74+ < % if (currentPage === ' detail' && typeof templateId !== ' undefined' && typeof templateType !== ' undefined' ) { % >
75+ < % href = ' /' + l + ' /' + templateType + ' /' + templateId + ' /' ; % >
76+ < % } % >
8177 < % } % >
78+ < a
79+ href= " <%= href %>"
80+ class = " lang-option <%= l === currentLang ? 'active' : '' %>"
81+ >
82+ < %= langName % >
83+ < / a>
8284 < % }) % >
8385 < / div>
8486 < / div>
You can’t perform that action at this time.
0 commit comments