#2329 项目内默认头像的更改

Merged
zouap merged 3 commits from fix-2227 into V20220630 1 year ago
  1. +54
    -31
      public/home/search.js
  2. +1
    -1
      routers/search.go
  3. +48
    -19
      templates/explore/repo_list.tmpl

+ 54
- 31
public/home/search.js View File

@@ -3,7 +3,6 @@ if(isEmpty(token)){
var meta = $("meta[name=_uid]");
if (!isEmpty(meta)) {
token = meta.attr("content");
console.log("token is uid:" + token);
}
}

@@ -11,10 +10,8 @@ var html =document.documentElement;
var lang = html.attributes["lang"]
var isZh = true;
if (lang != null && lang.nodeValue == "en-US") {
console.log("the language is " + lang.nodeValue);
isZh = false;
} else {
console.log("default lang=zh");
}
function isEmpty(str) {
if (typeof str == "undefined" || str == null || str == "") {
@@ -100,7 +97,6 @@ function initPageInfo(){
}

function searchItem(type, sortType) {
console.log("enter item 2.");
if (OnlySearchLabel) {
doSearchLabel(currentSearchTableName, currentSearchKeyword, sortBy[sortType], sortAscending[sortType])
} else {
@@ -121,7 +117,6 @@ function searchItem(type,sortType){


function search() {
console.log("enter here 1.");
currentSearchKeyword = document.getElementById("keyword_input").value;
if (!isEmpty(currentSearchKeyword)) {
currentSearchKeyword = currentSearchKeyword.trim();
@@ -229,7 +224,6 @@ function searchLabel(tableName,keyword,sortBy="",ascending="false"){
sessionStorage.setItem("searchLabel", true);
sessionStorage.setItem("sortBy", sortBy);
sessionStorage.setItem("ascending", ascending);
console.log("enter label search.");
window.open("/all/search/");
}

@@ -260,12 +254,9 @@ function doSearch(tableName,keyword,page,pageSize=15,onlyReturnNum=true,sortBy="
},
async: true,
success: function (json) {
console.log("tableName=" + tableName);
console.log(json);
displayResult(tableName, page, json, onlyReturnNum, keyword);
},
error: function (response) {
console.log(response);
}
});
}
@@ -285,7 +276,6 @@ function displayResult(tableName,page,jsonResult,onlyReturnNum,keyword){
displayPrResult(page, jsonResult, onlyReturnNum, keyword);
}
if (!onlyReturnNum) {
console.log("set total num." + tableName);
totalPage = Math.ceil(jsonResult.Total / pageSize);
totalNum = jsonResult.Total;
privateTotal = jsonResult.PrivateTotal;
@@ -422,7 +412,6 @@ function getTaskDesc(isZh,key){
}

function getActiveItem(sort_type) {
console.log("currentSearchSortBy=" + currentSearchSortBy + " sort_type=" + sortBy[sort_type]);
if (currentSearchSortBy == sortBy[sort_type] && currentSearchAscending == sortAscending[sort_type]) {
return "active ";
} else {
@@ -663,6 +652,52 @@ function setActivate(name){
$(tmp).addClass("active");
}


function LetterAvatar(name, size, color) {
name = name || '';
size = size || 60;
var colours = [
"#1abc9c", "#2ecc71", "#3498db", "#9b59b6", "#34495e", "#16a085", "#27ae60", "#2980b9", "#8e44ad", "#2c3e50",
"#f1c40f", "#e67e22", "#e74c3c", "#00bcd4", "#95a5a6", "#f39c12", "#d35400", "#c0392b", "#bdc3c7", "#7f8c8d"
],
nameSplit = String(name).split(' '),
initials, charIndex, colourIndex, canvas, context, dataURI;
if (nameSplit.length == 1) {
initials = nameSplit[0] ? nameSplit[0].charAt(0) : '?';
} else {
initials = nameSplit[0].charAt(0) + nameSplit[1].charAt(0);
}
if (w.devicePixelRatio) {
size = (size * w.devicePixelRatio);
}

charIndex = (initials == '?' ? 72 : initials.charCodeAt(0)) - 64;
colourIndex = charIndex % 20;
canvas = d.createElement('canvas');
canvas.width = size;
canvas.height = size;
context = canvas.getContext("2d");

context.fillStyle = color ? color : colours[colourIndex - 1];
context.fillRect(0, 0, canvas.width, canvas.height);
context.font = Math.round(canvas.width / 2) + "px 'Microsoft Yahei'";
context.textAlign = "center";
context.fillStyle = "#FFF";
context.fillText(initials, size / 2, size / 1.5);
dataURI = canvas.toDataURL();
canvas = null;
return dataURI;
}
LetterAvatar.transform = function () {
Array.prototype.forEach.call(d.querySelectorAll('img[avatar]'), function (img, name, color) {
name = img.getAttribute('avatar');
color = img.getAttribute('color');
img.src = LetterAvatar(name, img.getAttribute('width'), color);
img.removeAttribute('avatar');
img.setAttribute('alt', name);
});
};

function displayRepoResult(page, jsonResult, onlyReturnNum, keyword) {
var data = jsonResult.Result;
var total = jsonResult.Total;
@@ -689,9 +724,12 @@ function displayRepoResult(page,jsonResult,onlyReturnNum,keyword){
for (var i = 0; i < data.length; i++) {
var recordMap = data[i];
html += "<div class=\"item\">";
if(!isEmpty(recordMap['avatar'])){
html += "<img class=\"ui avatar image\" src=\"" + recordMap['avatar'] + "\">";
if (recordMap['avatar']) {
html += `<img class="ui avatar image" src="${recordMap["avatar"]}">`
} else {
html += `<img class="ui avatar image" avatar="${recordMap["owner_name"]}">`
}

html += " <div class=\"content\">";
html += " <div class=\"ui header\">";
html += " <a class=\"name\" href=\"/" + recordMap["owner_name"] + "/" + recordMap["real_name"] + "\" target=\"_blank\"> <span>" + recordMap["owner_name"] + "</span> <span>/</span> <strong>" + recordMap["alias"] + "</strong></a>";
@@ -731,6 +769,7 @@ function displayRepoResult(page,jsonResult,onlyReturnNum,keyword){
}

document.getElementById("child_search_item").innerHTML = html;
LetterAvatar.transform()
}
}

@@ -741,7 +780,6 @@ function getTime(UpdatedUnix,currentTime){
if (timeEscSecond < 0) {
timeEscSecond = 1;
}
console.log("currentTime=" + currentTime + " updateUnix=" + UpdatedUnix);

var hours = Math.floor(timeEscSecond / 3600);
//计算相差分钟数
@@ -816,24 +854,19 @@ function page(current){

function nextPage() {
currentPage = currentPage + 1;
console.log("currentPage=" + currentPage);
page(currentPage);
}

function prePage() {
console.log("currentPage=" + currentPage);
if (currentPage > 1) {
currentPage = currentPage - 1;
console.log("currentPage=" + (currentPage));
page(currentPage);
}
}

function getXPosition(e) {
var x = e.offsetLeft;
while(e=e.offsetParent)
{
while (e = e.offsetParent) {
x += e.offsetLeft;
}
return x + 20;//-260防止屏幕超出
@@ -841,8 +874,7 @@ function getXPosition(e){
//获取y坐标
function getYPosition(e) {
var y = e.offsetTop;
while(e=e.offsetParent)
{
while (e = e.offsetParent) {
y += e.offsetTop;
}
return y + 20;//80为input高度
@@ -870,17 +902,13 @@ function getYPosition(e){
var $tip = $('#tipmsg');
var tipmsg = document.getElementById("tipmsg")
var style = "z-index:10024;top:" + top + "px;left:" + left + "px;position:absolute;width:200px;height:60px;vertical-align:middle;";
console.log(style);
tipmsg.style = style;
var html = "<p>" + tip + "</p>"
$tip.stop(true).prop('class', 'alert alert-' + type).html(html).fadeIn(500).delay(2000).fadeOut(500);
}

function setPage(currentPage) {
console.log("totalPage=" + totalPage);
var html = "";
console.log("currentPage=" + currentPage);
console.log("privateTotal=" + privateTotal);
startIndex = currentPage - 1;
if (startIndex < 1) {
startIndex = 1;
@@ -924,7 +952,6 @@ function getYPosition(e){
}

html += "<div class=\"item\"> " + getLabel(isZh, "search_go_to") + "<div id=\"inputpage_div\" class=\"ui input\"><input id=\"inputpage\" type=\"text\"></div>" + getLabel(isZh, "search_go_page") + "</div>";
console.log("html=" + html)
document.getElementById("page_menu").innerHTML = html;
$('#inputpage').on('keypress', function (event) {
if (event.keyCode == 13) {
@@ -1288,20 +1315,16 @@ var zhCN={
document.onreadystatechange = function () {
if (document.readyState === "complete") {
var tmpSearchLabel = sessionStorage.getItem("searchLabel");
console.log("tmpSearchLabel=" + tmpSearchLabel);
if (tmpSearchLabel) {
console.log("search label....");
sessionStorage.removeItem("searchLabel");
doSearchLabel(sessionStorage.getItem("tableName"), sessionStorage.getItem("keyword"), sessionStorage.getItem("sortBy"), sessionStorage.getItem("ascending"));
} else {
var specifySearch = sessionStorage.getItem("specifySearch");
if (specifySearch) {
sessionStorage.removeItem("specifySearch");
console.log("search sepcial keyword=...." + sessionStorage.getItem("keyword"));
document.getElementById("keyword_input").value = sessionStorage.getItem("keyword");
doSpcifySearch(sessionStorage.getItem("tableName"), sessionStorage.getItem("keyword"), sessionStorage.getItem("sortBy"), sessionStorage.getItem("ascending"));
} else {
console.log("normal search....");
search();
}



+ 1
- 1
routers/search.go View File

@@ -489,7 +489,7 @@ func makeRepoResult(sRes *elastic.SearchResult, Key string, OnlyReturnNum bool,
if recordSource["avatar"] != nil {
avatarstr := recordSource["avatar"].(string)
if len(avatarstr) == 0 {
record["avatar"] = setting.RepositoryAvatarFallbackImage
// record["avatar"] = setting.RepositoryAvatarFallbackImage
} else {
record["avatar"] = setting.AppSubURL + "/repo-avatars/" + avatarstr
}


+ 48
- 19
templates/explore/repo_list.tmpl View File

@@ -6,17 +6,22 @@
margin-bottom: 1.0rem;
padding: 1.0rem !important;
}

.ui.repository.list>.item .header {
font-size: 1.4rem !important;
font-weight: 200;
}

.ui.list>.item>.content {
margin-left: 36px;
}
.ui.list .list>.item>img.image+.content, .ui.list>.item>img.image+.content{

.ui.list .list>.item>img.image+.content,
.ui.list>.item>img.image+.content {
width: calc(100% - 30px);
margin-left: 0;
}

.ui.repository.list>.item::before {
position: absolute;
left: 0;
@@ -26,13 +31,16 @@
background-color: #E1E3E6;
bottom: 2.8rem;
}

.repository .ui.mini.menu {
font-size: .6rem;
}

.repository .ui.right.compact .item {
padding-top: 0;
padding-bottom: 0;
}

.ui.repository.list .item .time {
margin-top: 1.5rem;
}
@@ -40,20 +48,23 @@

<div class="ui secondary pointing tabular top attached borderless menu navbar">
{{if .PageIsExplore}}
<a class="{{if eq .SortType "hot"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=hot&tab={{$.TabName}}">
<a class="{{if eq .SortType "hot"}}active{{end}} item"
href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=hot&tab={{$.TabName}}">
<svg class="svg octicon-repo" width="16" height="16" aria-hidden="true">
<use xlink:href="#octicon-repo" />
</svg>
{{.i18n.Tr "explore.hot_repo"}}
</a>
<a class="{{if eq .SortType "active"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=active&tab={{$.TabName}}">
<a class="{{if eq .SortType "active"}}active{{end}} item"
href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=active&tab={{$.TabName}}">
<svg class="svg octicon-inbox" width="16" height="16" aria-hidden="true">
<use xlink:href="#octicon-inbox" />
</svg>
{{.i18n.Tr "explore.active_repo"}}
</a>
{{end}}
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=recentupdate&tab={{$.TabName}}">
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item"
href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=recentupdate&tab={{$.TabName}}">
<svg class="svg octicon-organization" width="16" height="16" aria-hidden="true">
<use xlink:href="#octicon-organization" />
</svg> {{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}
@@ -67,16 +78,26 @@
<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
<a class="{{if eq .SortType "newest"}}active{{end}} item"
href="{{$.Link}}?sort=newest&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active{{end}} item"
href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active{{end}} item"
href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item"
href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item"
href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item"
href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active{{end}} item"
href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active{{end}} item"
href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active{{end}} item"
href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active{{end}} item"
href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&topic={{$.Topic}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
</div>
</div>
</div>
@@ -87,13 +108,16 @@
<div class="item">
{{if .RelAvatarLink}}
<img class="ui avatar image" src="{{.RelAvatarLink}}">
{{else}}
<img class="ui avatar image" avatar="{{.Owner.Name}}">
{{end}}
<div class="content">
<div class="ui header">
<div class="ui grid">
<div class="ui sixteen wide mobile ten wide tablet twelve wide computer column">
<a class="name" href="{{.Link}}">
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} <span>/</span> {{end}}{{end}}<strong>{{.DisplayName}}</strong>
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}}
<span>/</span> {{end}}{{end}}<strong>{{.DisplayName}}</strong>
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
</a>
{{if .IsPrivate}}
@@ -113,14 +137,16 @@
{{if eq $.SortType "hot"}}
<a class="item">
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24">
<path fill="currentColor" d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z" />
<path fill="currentColor"
d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z" />
</svg>
{{.Hot}}
</a>
{{else if eq $.SortType "active"}}
<a class="item">
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24">
<path fill="currentColor" d="M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z" />
<path fill="currentColor"
d="M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z" />
</svg> {{.Active}}
</a>
{{else}}
@@ -143,14 +169,17 @@
{{if .Topics }}
<div class="ui tags">
{{range .Topics}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic={{$.Topic}}"><div class="ui small label topic">{{.}}</div></a>{{end}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic={{$.Topic}}">
<div class="ui small label topic">{{.}}</div>
</a>{{end}}
{{end}}
</div>
{{end}}
<p class="time">
{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}
{{if .PrimaryLanguage }}
<span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
<span class="text grey"><i class="color-icon"
style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
{{end}}
</p>
</div>


Loading…
Cancel
Save