This commit is contained in:
Eeeros 2023-10-27 09:15:45 +08:00
commit 47534f7693
3 changed files with 773 additions and 774 deletions

1492
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -352,8 +352,7 @@ export function setSeoMeta(keyWords, title, description, url, owner, projectId)
document.querySelector(`meta[property='og:url']`).content = window.location.origin + url;
document.querySelector(`meta[property='og:description']`).content = description + ' - ' + title + ' for gitlink' + keyStatement + ' for git';
document.querySelector(`meta[property='og:image:alt']`).content = description + ' - ' + title + ' for gitlink' + keyStatement + ' for git';
document.querySelector('meta[name="Keywords"]').content=keyWords + 'gitLink,GitLink,gitlink,trustie,trustieforge,forge,开源,确实开源,代码托管,Git,开源,内源,项目管理,版本控制,开源代码,代码分享,项目协作,开源项目托管,免费代码托管,Git代码托管,Git托管服务,确实让创建更美好,协同开发平台';
document.querySelector('meta[name="Keywords"]').content= `${ keyWords } ${ keyWords ? '' : 'gitLink,GitLink,gitlink,trustie,trustieforge,forge,开源,确实开源,代码托管,Git,开源,内源,项目管理,版本控制,开源代码,代码分享,项目协作,开源项目托管,免费代码托管,Git代码托管,Git托管服务,确实让创建更美好,协同开发平台' }` ;
document.querySelector(`meta[name='description']`).content = description + keyStatement + ' for gitlink' + keyStatement + ' for git';
document.querySelector(`meta[name='go-import']`).content = window.location.host + url + ' git ' + window.location.origin + url;
document.querySelector(`meta[name='octolytics-dimension-user_login']`).content = owner;

View File

@ -345,35 +345,35 @@ class NewHeader extends Component {
var is_hidden = item.hidden;
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
var wl = waiLian && waiLian.length>0;
return (
<li key={key}
className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`}
style={{display:!is_hidden ? 'flex' : 'none'} }
if (item.name === '特色专区') {
// 特色专区下拉菜单
return zoneList && zoneList.length > 0 ? <li
className={`${this.matchZone() === true ? 'active drop-li' : 'drop-li'}`}
onMouseOver={ () => { this.setState( {showSubMenu: true }) } }
onMouseOut={ () => { this.setState( {showSubMenu: false }) } }
>
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
</li>
)
<a onClick={ () => { this.setState( {showSubMenu: true }) } }>特色专区</a>
<ul className={ `drop-down ${ showSubMenu ? 'drop-down-show' : '' }` } style={{ height : showSubMenu ? `${ current_user && current_user.login ? ((zoneList.length+1) * 46) : (zoneList.length * 46)}px` : 0 }}>
{
zoneList.map((e, k) => {
return <li className="drop-down-item" key={ k }><a href={ e.link } className="task-hide" title={ e.name } target="_blank">{ e.name }</a></li>
})
}
{current_user && current_user.login && <li className="drop-down-item"><Link to="/zone/apply" target="_blank">+申请创建</Link></li> }
</ul>
</li> : ''
} else {
return (
<li key={key}
className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`}
style={{display:!is_hidden ? 'flex' : 'none'} }
>
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
</li>
)
}
})
}
{
// 特色专区下拉菜单
zoneList && zoneList.length > 0 &&
<li
className={`${this.matchZone() === true ? 'active drop-li' : 'drop-li'}`}
onMouseOver={ () => { this.setState( {showSubMenu: true }) } }
onMouseOut={ () => { this.setState( {showSubMenu: false }) } }
>
<a onClick={ () => { this.setState( {showSubMenu: true }) } }>特色专区</a>
<ul className={ `drop-down ${ showSubMenu ? 'drop-down-show' : '' }` } style={{ height : showSubMenu ? `${ current_user && current_user.login ? ((zoneList.length+1) * 46) : (zoneList.length * 46)}px` : 0 }}>
{
zoneList.map((e, k) => {
return <li className="drop-down-item" key={ k }><a href={ e.link } className="task-hide" title={ e.name } target="_blank">{ e.name }</a></li>
})
}
{current_user && current_user.login && <li className="drop-down-item"><Link to="/zone/apply" target="_blank">+申请创建</Link></li> }
</ul>
</li>
}
</ul>
: ""
}