Proyectos de Subversion Moodle

Rev

Rev 857 | Rev 859 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
513 ariadna 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
 
19
    @template theme_universe/navbar
20
 
21
    This template renders the top navbar.
22
 
23
    Example context (json):
24
    {
25
        "output": {
26
            "should_display_navbar_logo": true,
27
            "get_compact_logo_url": "http://placekitten.com/50/50",
28
            "custom_menu": "<li>..</li>",
29
            "page_heading_menu": "<li>..</li>",
30
            "search_box": "<div><input type='text'></div>",
31
            "navbar_plugin_output": "<div class='dropdown'>Messaging</div>",
32
            "user_menu": "<div class='dropdown'>John Doe</div>"
33
        },
34
        "config": {
35
            "wwwroot": "#",
36
            "homeurl": "/my/"
37
        },
38
        "sitename": "Moodle Site",
39
        "mobileprimarynav": [
40
            {
41
                "text": "Dashboard",
42
                "url": "/my",
43
                "isactive": true
44
            },
45
            {
46
                "text": "Site home",
47
                "url": "/",
48
                "isactive": false
49
            },
50
            {
51
                "text": "My courses",
52
                "url": "/course",
53
                "isactive": false
54
            }
55
        ]
56
    }
57
}}
58
<nav id="topBar" class="rui-topbar-wrapper moodle-has-zindex">
59
 
60
    <div class="rui-mobile-nav">
595 ariadna 61
        <div class="dropdown mobile-dropdown d-md-none" id="dropdown-topbar">
554 ariadna 62
            <button class="rui-topbar-btn dropdown-toggle content-none" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
552 ariadna 63
                <svg width="18" height="18" fill="none" viewBox="0 0 24 24">
64
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 5.75H19.25"></path>
65
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 18.25H19.25"></path>
66
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 12H19.25"></path>
67
                </svg>
68
            </button>
69
            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
857 ariadna 70
                <a class="dropdown-item" href="/my/index.php">Área Personal</a>
552 ariadna 71
                <a class="dropdown-item" href="/calendar/view.php">Calendario</a>
72
                <a class="dropdown-item" href="/cesa/courses.php">Catálogo de cursos</a>
73
                <a class="dropdown-item" href="/message/index.php">Mensajes</a>
74
                <a class="dropdown-item" href="/my/courses.php">Mis Cursos</a>
858 ariadna 75
                <a class="dropdown-item" href="/cesa/progress.php">Progreso</a>
552 ariadna 76
                <a class="dropdown-item" href="/cesa/forums.php">Foros</a>
77
            </div>
78
        </div>
79
 
513 ariadna 80
        {{#topbarlogoareaon}}
81
            <a id="logo" href="{{{ config.wwwroot }}}" class="d-inline-flex aabtn {{# output.should_display_navbar_logo }}has-logo{{/ output.should_display_navbar_logo }}">
82
                {{^output.custom_course_logo}}
83
                    {{#customlogo}}
84
                        <span class="rui-logo {{#navbarlogobox}}rui-logo-box{{/navbarlogobox}} {{#customdmlogo}}dark-mode-logo{{/customdmlogo}}">
85
                            <img src="{{customlogo}}" class="rui-custom-logo" alt="{{sitename}}" />
86
                            {{#customdmlogo}}<img src="{{customdmlogo}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/customdmlogo}}
87
                        </span>
88
                    {{/customlogo}}
89
                    {{^customlogo}}
90
                        {{#customlogoandname}}
91
                            <span class="site-name">
92
                                {{^ customlogotxt }}{{{ sitename }}}{{/ customlogotxt }}
93
                                    {{{ customlogotxt }}}
94
                            </span>
95
                        {{/customlogoandname}}
96
                    {{/customlogo}}
97
                {{/output.custom_course_logo}}
98
 
99
                {{#output.custom_course_logo}}
100
                    <span class="rui-logo {{#navbarlogobox}}rui-logo-box{{/navbarlogobox}}">
101
                        <img src="{{{output.custom_course_logo}}}" class="rui-custom-logo" alt="{{sitename}}" />
102
                        {{^output.custom_course_dmlogo}}<img src="{{{output.custom_course_logo}}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/output.custom_course_dmlogo}}
103
                        {{#output.custom_course_dmlogo}}<img src="{{{output.custom_course_dmlogo}}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/output.custom_course_dmlogo}}
104
                    </span>
105
                {{/output.custom_course_logo }}
106
 
107
                {{^customlogo}}
108
                    <span class="site-name">
109
                        {{^ customlogotxt }}{{{ sitename }}}{{/ customlogotxt }}
110
                            {{{ customlogotxt }}}
111
                    </span>
112
                {{/customlogo}}
113
            </a>
114
        {{/topbarlogoareaon}}
115
 
116
        <button id="mobileNav" class="rui-mobile-nav-btn rui-topbar-btn">
117
            <svg width="18" height="18" fill="none" viewBox="0 0 24 24">
118
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 5.75H19.25"></path>
119
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 18.25H19.25"></path>
120
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 12H19.25"></path>
121
            </svg>
122
        </button>
123
    </div>
124
 
125
    <div class="rui-topbar wrapper-fw {{# output.custom_menu }}rui-topbar--custom-menu{{/ output.custom_menu }}">
126
        <div id="topbarLeft" class="d-inline-flex align-items-center">
127
 
128
            <div class="d-inline-flex align-items-center">
129
                {{#topbarlogoareaon}}
130
                    <a id="logo" href="{{{ config.wwwroot }}}" class="d-sm-none d-md-inline-flex align-items-center rui-navbar-brand {{#customlogo}}rui-navbar-brand--img{{/customlogo}} aabtn {{# output.should_display_navbar_logo }}has-logo{{/ output.should_display_navbar_logo }}">
131
 
132
                        {{^output.custom_course_logo}}
133
                            {{#customlogo}}
134
                                <span class="rui-logo {{#navbarlogobox}}rui-logo-box{{/navbarlogobox}} {{#customdmlogo}}dark-mode-logo{{/customdmlogo}}">
135
                                    <img src="{{customlogo}}" class="rui-custom-logo" alt="{{sitename}}" />
136
                                    {{#customdmlogo}}<img src="{{customdmlogo}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/customdmlogo}}
137
                                </span>
138
                                {{#customlogoandname}}
139
                                    <span class="site-name">
140
                                        {{^ customlogotxt }}{{{ sitename }}}{{/ customlogotxt }}
141
                                            {{{ customlogotxt }}}
142
                                    </span>
143
                                {{/customlogoandname}}
144
                            {{/customlogo}}
145
                            {{^customlogo}}
146
                                {{#customlogoandname}}
147
                                    <span class="site-name">
148
                                        {{^ customlogotxt }}{{{ sitename }}}{{/ customlogotxt }}
149
                                            {{{ customlogotxt }}}
150
                                    </span>
151
                                {{/customlogoandname}}
152
                            {{/customlogo}}
153
                        {{/output.custom_course_logo}}
154
 
155
                        {{#output.custom_course_logo}}
156
                            <span class="rui-logo {{#navbarlogobox}}rui-logo-box{{/navbarlogobox}}">
157
                                <img src="{{{output.custom_course_logo}}}" class="rui-custom-logo" alt="{{sitename}}" />
158
                                {{^output.custom_course_dmlogo}}<img src="{{{output.custom_course_logo}}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/output.custom_course_dmlogo}}
159
                                {{#output.custom_course_dmlogo}}<img src="{{{output.custom_course_dmlogo}}}" class="rui-custom-dmlogo" alt="{{sitename}}" />{{/output.custom_course_dmlogo}}
160
                            </span>
161
                            <span class="site-name">{{{ output.custom_course_name }}}</span>
162
                        {{/output.custom_course_logo }}
163
 
164
                    </a>
165
                {{/topbarlogoareaon}}
166
            </div>
167
        </div>
528 ariadna 168
 
595 ariadna 169
        <div class="dropdown d-none d-md-block ml-md-2" id="dropdown-topbar">
170
            <button class="rui-topbar-btn dropdown-toggle content-none" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
551 ariadna 171
                <svg width="18" height="18" fill="none" viewBox="0 0 24 24">
172
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 5.75H19.25"></path>
173
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 18.25H19.25"></path>
174
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 12H19.25"></path>
175
                </svg>
528 ariadna 176
            </button>
664 ariadna 177
            <div class="dropdown-menu topbar-menu-dropdown" aria-labelledby="dropdownMenuButton">
666 ariadna 178
                    <a class="dropdown-item topbar-menu" href="/calendar/view.php?view=month">
694 ariadna 179
                        <img src="{{{output.get_navbar_image_personal_area}}}" alt="Área Personal" class="menu-icon">
688 ariadna 180
                        ÁREA PERSONAL
687 ariadna 181
                    </a>
182
                    <a class="dropdown-item topbar-menu" href="/calendar/view.php?view=month">
686 ariadna 183
                        <img src="{{{output.get_navbar_image_calendar}}}" alt="Calendario" class="menu-icon">
688 ariadna 184
                        CALENDARIO
660 ariadna 185
                    </a>
666 ariadna 186
                    <a class="dropdown-item topbar-menu" href="/cesa/courses.php">
660 ariadna 187
                        <img src="{{{output.get_navbar_image_courses}}}" alt="Catálogo de cursos" class="menu-icon-topbar">
688 ariadna 188
                        CATÁLOGO DE CURSOS
660 ariadna 189
                    </a>
686 ariadna 190
                    <a class="dropdown-item topbar-menu" href="/cesa/forums.php">
191
                        <img src="{{{output.get_navbar_image_forums}}}" alt="Foros" class="menu-icon">
688 ariadna 192
                        FOROS
686 ariadna 193
                    </a>
666 ariadna 194
                    <a class="dropdown-item topbar-menu" href="/message/index.php">
694 ariadna 195
                        <img src="{{{output.get_navbar_image_messages}}}" alt="Mensajes" class="menu-icon">
688 ariadna 196
                        MENSAJES
660 ariadna 197
                    </a>
666 ariadna 198
                    <a class="dropdown-item topbar-menu" href="/cesa/progress.php">
686 ariadna 199
                        <img src="{{{output.get_navbar_image_progress}}}" alt="Progreso" class="menu-icon">
688 ariadna 200
                        PROGRESO
660 ariadna 201
                    </a>
528 ariadna 202
            </div>
656 ariadna 203
 
528 ariadna 204
        </div>
552 ariadna 205
 
513 ariadna 206
        {{#primarymoremenu}}
552 ariadna 207
            <div class="primary-navigation">
513 ariadna 208
                {{> core/moremenu}}
209
            </div>
210
        {{/primarymoremenu}}
211
 
212
 
213
        {{#topbarcustomhtml}}
214
            <div class="rui-topbar-customfield px-3 ml-auto mr-3">{{{.}}}</div>
215
        {{/topbarcustomhtml}}
216
 
217
        <ul class="rui-icon-menu rui-icon-menu--right {{^topbarcustomhtml}}ml-auto{{/topbarcustomhtml}}">
218
            {{^isnotloggedin}}
219
                <li class="rui-icon-menu-search rui-drawer-search">
220
                    {{{ output.search_box }}}
221
                </li>
222
                {{#darkmodetheme}}
223
                    <li class="rui-icon-menu-darkmode">
224
                        <button id="darkModeBtn" class="btn--darkmode" aria-checked="false" type="button" data-preference="darkmode-on" {{^sdarkmode}}data-toggle="tooltip" data-placement="left" title="Dark Mode" {{/sdarkmode}}>
225
                            <div class="rui-dark-mode-status--on rui-tooltip--bottom" data-title="{{{slightmode}}}"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
226
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18Z" fill="currentColor" />
227
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0H13V4.06189C12.6724 4.02104 12.3387 4 12 4C11.6613 4 11.3276 4.02104 11 4.06189V0ZM7.0943 5.68018L4.22173 2.80761L2.80752 4.22183L5.6801 7.09441C6.09071 6.56618 6.56608 6.0908 7.0943 5.68018ZM4.06189 11H0V13H4.06189C4.02104 12.6724 4 12.3387 4 12C4 11.6613 4.02104 11.3276 4.06189 11ZM5.6801 16.9056L2.80751 19.7782L4.22173 21.1924L7.0943 18.3198C6.56608 17.9092 6.09071 17.4338 5.6801 16.9056ZM11 19.9381V24H13V19.9381C12.6724 19.979 12.3387 20 12 20C11.6613 20 11.3276 19.979 11 19.9381ZM16.9056 18.3199L19.7781 21.1924L21.1923 19.7782L18.3198 16.9057C17.9092 17.4339 17.4338 17.9093 16.9056 18.3199ZM19.9381 13H24V11H19.9381C19.979 11.3276 20 11.6613 20 12C20 12.3387 19.979 12.6724 19.9381 13ZM18.3198 7.0943L21.1923 4.22183L19.7781 2.80762L16.9056 5.6801C17.4338 6.09071 17.9092 6.56608 18.3198 7.0943Z" fill="currentColor" />
228
                                </svg></div>
229
                            <div class="rui-dark-mode-status--off rui-tooltip--bottom" data-title="{{{sdarkmode}}}"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
230
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.2256 2.00253C9.59172 1.94346 6.93894 2.9189 4.92893 4.92891C1.02369 8.83415 1.02369 15.1658 4.92893 19.071C8.83418 22.9763 15.1658 22.9763 19.0711 19.071C21.0811 17.061 22.0565 14.4082 21.9975 11.7743C21.9796 10.9772 21.8669 10.1818 21.6595 9.40643C21.0933 9.9488 20.5078 10.4276 19.9163 10.8425C18.5649 11.7906 17.1826 12.4053 15.9301 12.6837C14.0241 13.1072 12.7156 12.7156 12 12C11.2844 11.2844 10.8928 9.97588 11.3163 8.0699C11.5947 6.81738 12.2094 5.43511 13.1575 4.08368C13.5724 3.49221 14.0512 2.90664 14.5935 2.34046C13.8182 2.13305 13.0228 2.02041 12.2256 2.00253ZM17.6569 17.6568C18.9081 16.4056 19.6582 14.8431 19.9072 13.2186C16.3611 15.2643 12.638 15.4664 10.5858 13.4142C8.53361 11.362 8.73568 7.63895 10.7814 4.09281C9.1569 4.34184 7.59434 5.09193 6.34315 6.34313C3.21895 9.46732 3.21895 14.5326 6.34315 17.6568C9.46734 20.781 14.5327 20.781 17.6569 17.6568Z" fill="currentColor" />
231
                                </svg></div>
232
                        </button>
233
                    </li>
234
                {{/darkmodetheme}}
235
            {{/isnotloggedin}}
236
            <li class="rui-icon-menu-plugins">{{{ output.navbar_plugin_output }}}</li>
237
            <li class="d-inline-flex mr-2 ml-0">
238
                {{{ output.render_lang_menu }}}
239
            </li>
240
            <li class="rui-icon-menu-user m-0">{{{ output.user_menu }}}</li>
241
            {{#isnotloggedin}}
242
                {{#topbaradditionalbtn}}
243
                    <li class="ml-1">
244
                        {{#topbaradditionalbtnurl}}
245
                            <a class="rui-topbar-btn rui-signup-btn" href="{{topbaradditionalbtnurl}}">
246
                                <span class="rui-login-btn-txt">{{{stopbaradditionalbtn}}}</span>
247
                            </a>
248
                        {{/topbaradditionalbtnurl}}
249
                        {{{topbaradditionalbtnhtml}}}
250
                    </li>
251
                {{/topbaradditionalbtn}}
252
            {{/isnotloggedin}}
253
        </ul>
254
 
255
        {{{ output.edit_switch }}}
256
 
257
    </div>
664 ariadna 258
</nav>
259