mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
blog: fix bug (#527)
This commit is contained in:
1 parent
44a579878b
commit
203195685d
3 files changed
+6
-5
No files matched your search
@@ -212,9 +212,8 @@ export async function apply(ctx: Context) {
|
|||||||
ctx.Route('blog_create', '/blog/:uid/create', BlogEditHandler, PRIV.PRIV_USER_PROFILE);
|
ctx.Route('blog_create', '/blog/:uid/create', BlogEditHandler, PRIV.PRIV_USER_PROFILE);
|
||||||
ctx.Route('blog_detail', '/blog/:uid/:did', BlogDetailHandler);
|
ctx.Route('blog_detail', '/blog/:uid/:did', BlogDetailHandler);
|
||||||
ctx.Route('blog_edit', '/blog/:uid/:did/edit', BlogEditHandler, PRIV.PRIV_USER_PROFILE);
|
ctx.Route('blog_edit', '/blog/:uid/:did/edit', BlogEditHandler, PRIV.PRIV_USER_PROFILE);
|
||||||
ctx.inject('UserDropdown', 'blog_main', {
|
ctx.inject('UserDropdown', 'blog_main', (h) => ({ icon: 'book', displayName: 'Blog', uid: h.user._id.toString() }),
|
||||||
icon: 'book', displayName: 'Blog', args: (h) => ({ uid: h.user._id }),
|
PRIV.PRIV_USER_PROFILE);
|
||||||
}, PRIV.PRIV_USER_PROFILE);
|
|
||||||
ctx.i18n.load('zh', {
|
ctx.i18n.load('zh', {
|
||||||
"{0}'s blog": '{0} 的博客',
|
"{0}'s blog": '{0} 的博客',
|
||||||
Blog: '博客',
|
Blog: '博客',
|
||||||
|
|||||||
@@ -256,4 +256,5 @@ $contest-color = {
|
|||||||
'ioi': #2E9AFE,
|
'ioi': #2E9AFE,
|
||||||
'ledo': #8076A3,
|
'ledo': #8076A3,
|
||||||
'homework': #FFCDCD,
|
'homework': #FFCDCD,
|
||||||
|
'strictioi': #6EA2C7,
|
||||||
}
|
}
|
||||||
@@ -83,8 +83,9 @@
|
|||||||
<li class="menu__seperator"></li>
|
<li class="menu__seperator"></li>
|
||||||
{%- for item in ui.getNodes('UserDropdown') -%}
|
{%- for item in ui.getNodes('UserDropdown') -%}
|
||||||
<li class="menu__item nojs--hide">
|
<li class="menu__item nojs--hide">
|
||||||
<a href="{{ url(item.name, (item.args(handler) if typeof(item.args)=='function' else item.args) or {}) }}" class="menu__link">
|
{% set args = (item.args(handler) if typeof(item.args)=='function' else item.args) or {} %}
|
||||||
<span class="icon icon-{{ item.args.icon }}"></span> {{ _(item.args.displayName or item.name) }}
|
<a href="{{ url(item.name, args) }}" class="menu__link">
|
||||||
|
<span class="icon icon-{{ args.icon }}"></span> {{ _(args.displayName or item.name) }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|||||||
Reference in new issue
Block a user