9
9
%meta{:content => " width=device-width,initial-scale=1" , :name => " viewport" }/
10
10
= csrf_meta_tags
11
11
= csp_meta_tag
12
+ = stylesheet_link_tag " https://unpkg.com/@puzzleitc/puzzle-shell/dist/bundle.css"
13
+ = javascript_include_tag " https://unpkg.com/@puzzleitc/puzzle-shell/dist/bundle.js" , type: " module"
12
14
= stylesheet_link_tag " application" , " data-turbo-track" : " reload"
13
15
= javascript_include_tag " application" , " data-turbo-track" : " reload" , type: " module"
14
- = javascript_include_tag " application" , " https://unpkg.com/@puzzleitc/puzzle-shell/dist/bundle.js" , type: " module"
15
16
= favicon_link_tag " favicon.png"
17
+
16
18
%body#dropdown-wormhole.d-flex.justify-content-center{" data-controller" : " skills-empty-space" }
17
19
%div.content{"data-skills-empty-space-target" : " container" }
18
- %div.position-sticky.top-0.z-3
19
- %div.d-flex.justify-content-between.bg-white.flex-wrap
20
- = link_to root_path, class: " text-decoration-none text-dark" do
21
- %div.d-flex
22
- %div.mb-1.mt-1
23
- %img{:src=> " /assets/logo.svg" ,:height=>" 32" }
24
- %text.d-flex.align-items-end.ms-2.small= " 5.1.0"
25
- %ul.navbar.text-gray
20
+ %div.position-sticky.top-0.z-top
21
+ %pzsh-topbar{href: people_path}
22
+ %img{:src=> " /assets/pzsh_skills_logo.svg" }
23
+ %pzsh-banner
24
+ %pzsh-menu
25
+ %div{slot: 'actions'}
26
+ %pzsh-menu-action.d-flex.cursor-pointer.h-100.ps-2.pe-2.go-crazy{" data-action" : " click->skills-empty-space#goCrazy"}
26
27
-# Language selector
27
- %li.d-flex.align-items-center.cursor-pointer.border-start.border-end.h-100.ps-2.pe-2{" data-controller" : " dropdown" }
28
- = select :i18n, :language, language_selector, {}, class: " form-control" , data:{action: " change->dropdown#navigateOnChange"}
29
- -# Devise/Mockdata
30
- - if Rails.env.development?
31
- %li.d-flex.align-items-center.cursor-pointer.ps-2.pe-2.border-start.border-end.h-100
32
- %span#username
33
- - if devise?
34
- = ti(" devise.devise" )
35
- - else
36
- = ti(" devise.mockdata" )
28
+ %pzsh-menu-action{href: 'javascript:void(0);', 'data-controller': 'dropdown'}
29
+ = select :i18n, :language, language_selector, {}, class: " form-control" , data: {action: " change->dropdown#navigateOnChange" }
37
30
-# Admin panel
38
31
- if conf_admin?
39
- %li.d-flex.align-items-center.cursor-pointer.ps-2.pe-2.border-start.border-end.h-100
40
- = link_to ti(" devise.admin_panel" ), admin_index_path
41
- -# Username
32
+ %pzsh-menu-action{href: admin_index_path}
33
+ %pzsh-icon{name: 'sliders-v-alt'}
34
+ = ti(" devise.admin_panel" )
35
+ -# Help area
36
+ %pzsh-menu-action{href: 'https://github.com/puzzle/skills/issues'}
37
+ %pzsh-icon{name: 'question-circle'}
38
+ Help
39
+ -# User profile dropdown
42
40
- if auth_user_signed_in?
43
- %li.d-flex.align-items-center.cursor-pointer.ps-2.pe-2.border-start.border-end.h-100
44
- %div.scale-icon-06(name=" user" )
45
- %span#username
46
- - if find_person_by_auth_user.nil?
47
- = link_to current_auth_user&.name || current_auth_user&.email, people_path(alert: " true" )
48
- - else
49
- = link_to find_person_by_auth_user.name, person_path(find_person_by_auth_user)
50
- - if admin?
51
- = ti " devise.admin"
52
- -# Login/Logout
53
- - if devise?
54
- %li.d-flex.align-items-center.cursor-pointer.border-start.border-end.h-100.ps-2.pe-2
55
- - if auth_user_signed_in?
56
- =link_to ti(" devise.sign_out" ), destroy_auth_user_session_path, data: { " turbo-method" : :delete}, class: " btn btn-link"
57
- - elsif devise_mapping.omniauthable?
58
- =button_to ti(" devise.sign_in" ), omniauth_authorize_path(resource_name, resource_class.omniauth_providers.first), {data: { " turbo" : false, controller: " instant-click" }, class: " btn btn-link" }
59
- -# Help
60
- %li.d-flex.align-items-center.cursor-pointer.ps-2.pe-2.border-start.h-100
61
- %a.d-flex.align-items-center{:href => " https://github.com/puzzle/skills/issues" }
62
- %pzsh-icon.scale-icon-08.text-gray(name=" question-circle" )
63
- %li.d-flex.align-items-center.cursor-pointer.border-start.border-end.h-100.ps-2.pe-2{" data-action" : " click->skills-empty-space#goCrazy" }
64
- %div.puzzle-header
65
- %div.d-flex.h-100
66
- = render " application/tabbar" , tabs: global_tabs, bar_class: " skills-navbar" , active_path: global_navbar_path
67
- %div.container-fluid
41
+ %pzsh-menu-dropdown{href: '#'}
42
+ %div{slot: 'toggle'}
43
+ %pzsh-icon {name: 'user'}
44
+ %span #username
45
+ = current_auth_user&.name || current_auth_user&.email
46
+ = ti 'devise.admin' if admin?
47
+ %div {slot: 'items'}
48
+ - unless find_person_by_auth_user.nil?
49
+ %pzsh-menu-dropdown-item {href: person_path(find_person_by_auth_user)}
50
+ %pzsh-icon {name: 'setting'}
51
+ = ti('devise.profile')
52
+ - if devise?
53
+ %pzsh-menu-dropdown-item {href: destroy_auth_user_session_path, data: { "turbo-method" : :delete }}
54
+ %pzsh-icon{name: 'sign-out-alt'}
55
+ = ti(" devise.sign_out" )
56
+ - elsif devise? && devise_mapping.omniauthable?
57
+ =button_to ti(" devise.sign_in" ), omniauth_authorize_path(resource_name, resource_class.omniauth_providers.first), {data: { " turbo" : false, controller: " instant-click" }, class: " btn btn-link" }
58
+ = render " application/header_tabbar" , tabs: global_tabs, bar_class: " skills-navbar" , active_path: global_navbar_path
59
+ %div.container-fluid.min-vh-100
68
60
%div.row.d-flex.justify-content-center
69
61
%span#flash-messages
70
62
= render partial: 'layouts/flash', collection: [:notice, :alert], as: :level
73
65
= yield :actions
74
66
= content_for?(:content) ? yield(:content) : yield
75
67
76
- = turbo_frame_tag " remote_modal" , target: " _top"
68
+ = turbo_frame_tag " remote_modal" , target: " _top"
69
+ %pzsh-footer
70
+ %div{slot: 'start'}
71
+ %pzsh-footer-link{href: 'https://github.com/puzzle/skills'}
72
+ %pzsh-icon{name: 'github'}
73
+ Contribute on GitHub
74
+ %div{slot: 'center'}
75
+ - if Rails.env.development?
76
+ - if devise?
77
+ = ti(" devise.devise" )
78
+ - else
79
+ = ti(" devise.mockdata" )
80
+ %div{slot: 'end'}
81
+ %pzsh-footer-link{href: 'https://github.com/puzzle/skills/releases'} Version 5.1.0
0 commit comments