Skip to content

Commit

Permalink
⚡ Lay out language menu in two columns
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed May 5, 2020
1 parent 9b8bde9 commit a4d50ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/riotTags/main-menu.tag
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ main-menu.flexcol
};

const languageSubmenu = {
items: []
items: [],
columns: 2
};
const recentProjectsSubmenu = {
items: []
Expand Down
5 changes: 3 additions & 2 deletions src/riotTags/shared/context-menu.tag
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Expects a following structure:
{
opened: boolean, // mutable by a context-menu instance
items: Array<IMenuItem>
items: Array<IMenuItem>,
columns: number
}
IMenuItem is:
{
Expand All @@ -27,7 +28,7 @@
@method open
@method close

context-menu(class="{opened: opts.menu.opened}" ref="root")
context-menu(class="{opened: opts.menu.opened}" ref="root" style="{opts.menu.columns? 'columns: '+opts.menu.columns+';' : ''}")
a(
each="{item in opts.menu.items}"
href="javascript: void 0;"
Expand Down
1 change: 1 addition & 0 deletions src/styl/tags/shared/context-menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ context-menu
left 100%
top 0
a, context-menu a
break-inside avoid
color text
{trans}
&:first-child
Expand Down

0 comments on commit a4d50ec

Please sign in to comment.