PluginProbe
WebTotem Security / 3.0.0
WebTotem Security v3.0.0
3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 2.2.4 All 109 releases
wt-security / includes / templates / layout.html.twig

layout.html.twig in WebTotem Security 3.0.0, at includes/templates/layout.html.twig

145 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script type="text/javascript">
2 jQuery(document).ready(function ($) {
3
4 AmplitudeAnalytics.setUser("{{ user_email }}");
5
6 jQuery('.wtotem_body').on('click', '#theme_mode', function (e) {
7 jQuery.post(ajaxurl, {
8 action: 'wtotem_ajax',
9 ajax_action: 'theme_mode',
10 wtotem_page_nonce: '{{ page_nonce }}',
11 }, function (data) {
12 if(data === "dark"){
13 jQuery('body').addClass('wtotem_theme—dark');
14 jQuery('.wtotem_body').addClass('wtotem_theme—dark');
15 } else {
16 jQuery('body').removeClass('wtotem_theme—dark');
17 jQuery('.wtotem_body').removeClass('wtotem_theme—dark');
18 }
19 });
20 });
21
22 let set_time_zone = () => {
23 let visitorTime = new Date();
24 let time_zone_offset = -visitorTime.getTimezoneOffset() / 60;
25 jQuery.post(ajaxurl, {
26 action: 'wtotem_ajax',
27 ajax_action: 'set_time_zone',
28 wtotem_page_nonce: '{{ page_nonce }}',
29 offset: time_zone_offset,
30 });
31 };
32 set_time_zone();
33
34 jQuery.post(ajaxurl, {
35 action: 'wtotem_ajax',
36 ajax_action: 'cash_update',
37 wtotem_page_nonce: '{{ page_nonce }}',
38 page: '{{ page }}',
39 }, function (data) {
40 jQuery('#wtotem_notifications').html(data.notifications);
41
42 console.log('cash_update');
43 });
44
45 console.log('{{ page }}');
46
47 AmplitudeAnalytics.pageVisited();
48
49 jQuery('body').addClass('{{ theme_mode.is_dark_mode }}');
50
51 });
52 </script>
53
54 <div class="wtotem_body {{ theme_mode.is_dark_mode }}">
55 <div id="wtotem_site_created_at" data-value="{{ site_created_at }}"></div>
56 <div class="wtotem_header wt_card">
57 <div class="wtotem_container">
58 <div class="wtotem_header__body">
59 <div class="wtotem_version">
60 <div class="wtotem_logo"></div>
61 <span class="wtotem_version__count">3.0</span>
62 </div>
63 <div class="wtotem_burger">
64 <span class="wtotem_burger__middle-line"></span>
65 </div>
66
67 <nav class="wtotem_nav">
68 <ul class="wtotem_nav__menu">
69 <li class="wtotem_control__checkbox" id="color_scheme_toggle">
70 <input type="checkbox" class="wtotem_control__input" id="theme_mode" {{ theme_mode.dark_mode_checked }} />
71 <label for="theme_mode" class="wtotem_control__label">
72 <span class="wtotem_control__switched-circle"></span>
73 </label>
74 </li>
75 {% if is_multisite and is_super_admin %}
76 <li class="wtotem_nav__item">
77 <a href="{{ menu_url }}_all_sites" class="wtotem_nav__link {{ is_active.all_sites }}">
78 {{ 'All sites'|trans }}
79 </a>
80 </li>
81 {% else %}
82 <li class="wtotem_nav__item">
83 <a href="{{ menu_url }}_dashboard" class="wtotem_nav__link {{ is_active.dashboard }}">
84 {{ 'Dashboard'|trans }}
85 </a>
86 </li>
87 <li class="wtotem_nav__item">
88 <a href="{{ menu_url }}_firewall" class="wtotem_nav__link {{ is_active.firewall }}">
89 {{ 'Firewall'|trans }}
90 </a>
91 </li>
92 <li class="wtotem_nav__item">
93 <a href="{{ menu_url }}_antivirus" class="wtotem_nav__link {{ is_active.antivirus }}">
94 {{ 'Antivirus'|trans }}
95 </a>
96 </li>
97 <li class="wtotem_nav__item">
98 <a href="{{ menu_url }}_settings" class="wtotem_nav__link {{ is_active.settings }}">
99 {{ 'Settings'|trans }}
100 </a>
101 </li>
102 {# <li class="wtotem_nav__item">#}
103 {# <a href="{{ menu_url }}_reports" class="wtotem_nav__link {{ is_active.reports }}">#}
104 {# {{ 'Reports'|trans }}#}
105 {# </a>#}
106 {# </li>#}
107 {% endif %}
108
109 <li class="wtotem_nav__item">
110 <a href="{{ menu_url }}_documentation" class="wtotem_nav__link {{ is_active.information }}">
111 {{ 'Documentation'|trans }}
112 </a>
113 </li>
114
115 <li class="wtotem_nav__item">
116 <a href="{{ menu_url }}_wpscan" class="wtotem_nav__link {{ is_active.wpscan }}">
117 {{ 'WP scan'|trans }}
118 </a>
119 </li>
120 <li class="wtotem_nav__item">
121 <a href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_nav__link" target="_blank">
122 {{ 'Help'|trans }} <img style="width: 20px; margin-left: 2px;" src="{{ images_path }}external-link.svg" class="svg-icon">
123 </a>
124 </li>
125 </ul>
126 </nav>
127 </div>
128 </div>
129 </div>
130
131 <div class="wtotem_content">
132 <div class="wtotem_container">
133 <div class="wtotem_notifications_wrapper" id="wtotem_notifications">
134 {% include 'notifications.html.twig' with {'notifications': notifications, 'images_path': images_path } %}
135 </div>
136 </div>
137 </div>
138
139 <div class="wtotem_content">
140 <div class="wtotem_container">
141 {{ content | raw}}
142 </div>
143 </div>
144 {% include 'footer.html.twig' with {'current_year': current_year, 'images_path': images_path } %}
145 </div>