Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: making side menu sticky #3621

Merged
merged 9 commits into from
Feb 13, 2020
120 changes: 61 additions & 59 deletions app/templates/components/public/side-menu.hbs
Original file line number Diff line number Diff line change
@@ -1,73 +1,75 @@
{{#if (and (not-eq session.currentRouteName 'public.cfs.new-session') (not-eq session.currentRouteName 'public.cfs.new-speaker') (not-eq session.currentRouteName 'public.cfs.edit-speaker') (not-eq session.currentRouteName 'public.cfs.edit-session'))}}
<div class="ui fluid vertical {{unless device.isMobile 'pointing'}} menu">
{{#if (eq session.currentRouteName 'public.index')}}
{{#scroll-to href='#info' class='item active'}}
{{t 'Info'}}
{{/scroll-to}}
{{#if event.tickets.length}}
{{#scroll-to href='#tickets' class='item'}}
{{t 'Tickets'}}
<div class = "ui {{unless device.isMobile 'rail'}}">
<div class="ui sticky fluid vertical {{unless device.isMobile 'pointing'}} menu">
{{#if (eq session.currentRouteName 'public.index')}}
{{#scroll-to href='#info' class='active item'}}
{{t 'Info'}}
{{/scroll-to}}
{{#if event.tickets.length}}
{{#scroll-to href='#tickets' class='item'}}
{{t 'Tickets'}}
{{/scroll-to}}
{{/if}}
{{#if event.speakers.length}}
{{#link-to 'public.speakers' class='item'}}
{{t 'Speakers'}}
{{/link-to}}
{{/if}}
{{else}}
<a class="item" href="{{href-to 'public.index'}}">
{{t 'Info'}}
</a>
{{#if event.tickets.length}}
<a class="item" href="{{href-to 'public.index'}}#tickets">
{{t 'Tickets'}}
</a>
{{/if}}
{{#if event.speakers.length}}
{{#link-to 'public.speakers' class='item'}}
{{t 'Speakers'}}
{{/link-to}}
{{/if}}
{{/if}}
{{#if event.speakers.length}}
{{#link-to 'public.speakers' class='item'}}
{{t 'Speakers'}}
{{#if event.sessions.length}}
{{#link-to 'public.sessions' class='item'}}
{{t 'Sessions'}}
{{/link-to}}
{{/if}}
{{else}}
<a class="item" href="{{href-to 'public.index'}}">
{{t 'Info'}}
</a>
{{#if event.tickets.length}}
<a class="item" href="{{href-to 'public.index'}}#tickets">
{{t 'Tickets'}}
</a>
{{/if}}
{{#if event.speakers.length}}
{{#link-to 'public.speakers' class='item'}}
{{t 'Speakers'}}
{{#if isSchedulePublished}}
{{#link-to 'public.schedule' class='item'}}
{{t 'Schedule'}}
{{/link-to}}
{{/if}}
{{#if shouldShowCallforSpeakers }}
{{#link-to 'public.cfs' class='item'}}
{{t 'Call for Speakers'}}
{{/link-to}}
{{/if}}
{{#if event.hasOwnerInfo}}
{{#if (eq session.currentRouteName 'public.index')}}
{{#scroll-to href='#owner' class='item'}}
{{t 'Owner'}}
{{/scroll-to}}
{{else}}
<a class="item" href="{{href-to 'public.index'}}#owner">
{{t 'Owner'}}
</a>
{{/if}}
{{/if}}
{{/if}}
{{#if event.sessions.length}}
{{#link-to 'public.sessions' class='item'}}
{{t 'Sessions'}}
{{/link-to}}
{{/if}}
{{#if isSchedulePublished}}
{{#link-to 'public.schedule' class='item'}}
{{t 'Schedule'}}
{{/link-to}}
{{/if}}
{{#if shouldShowCallforSpeakers }}
{{#link-to 'public.cfs' class='item'}}
{{t 'Call for Speakers'}}
{{/link-to}}
{{/if}}
{{#if event.hasOwnerInfo}}
{{#if (eq session.currentRouteName 'public.index')}}
{{#scroll-to href='#owner' class='item'}}
{{t 'Owner'}}
{{#scroll-to href='#getting-here' class='item'}}
{{t 'Getting here'}}
{{/scroll-to}}
{{else}}
<a class="item" href="{{href-to 'public.index'}}#owner">
{{t 'Owner'}}
<a class="item" href="{{href-to 'public.index'}}#getting-here">
{{t 'Getting here'}}
</a>
{{/if}}
{{/if}}
{{#if (eq session.currentRouteName 'public.index')}}
{{#scroll-to href='#getting-here' class='item'}}
{{t 'Getting here'}}
{{/scroll-to}}
{{else}}
<a class="item" href="{{href-to 'public.index'}}#getting-here">
{{t 'Getting here'}}
</a>
{{/if}}
{{#if event.codeOfConduct}}
{{#link-to 'public.coc' class='item'}}
{{t 'Code of Conduct'}}
{{/link-to}}
{{/if}}
{{#if event.codeOfConduct}}
{{#link-to 'public.coc' class='item'}}
{{t 'Code of Conduct'}}
{{/link-to}}
{{/if}}
</div>
</div>
{{/if}}