Skip to content

Commit df14e7e

Browse files
marie-jJoffrey LEVEUGLE
authored andcommitted
feat: add new navbar onboarding (#402)
1 parent 0f0b8af commit df14e7e

File tree

22 files changed

+337
-10
lines changed

22 files changed

+337
-10
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
jquery: true,
1010
},
1111
globals: {
12-
d3: true,
12+
d3: true
1313
},
1414
rules: {
1515
'no-bitwise': ['error', { allow: ['~'] }],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
"globals": {
33
"__FEEDBACK_URL__": true,
4+
Tour: true,
45
},
56
};

packages/manager/apps/public-cloud/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"angular-translate": "^2.18.1",
4848
"angular-ui-bootstrap": "^1.3.3",
4949
"angular-ui-validate": "^1.2.3",
50+
"bootstrap-tour": "^0.12.0",
5051
"bootstrap4": "twbs/bootstrap#v4.0.0",
5152
"font-awesome": "^4.0.0",
5253
"jquery": "^2.1.3",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import './_variables.less';
2+
3+
.oui-icon {
4+
color: @primary-color;
5+
}

packages/manager/apps/public-cloud/src/assets/theme/_variables.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@background-color: #fff;
55
@light-color: #fff;
66
@primary-color: rgb(40, 89, 192);
7+
@secondary-color: rgb(71, 255, 250);
78
@text-color: rgb(17,63,109);
89

910
// Success

packages/manager/apps/public-cloud/src/assets/theme/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.ovhstack {
22
@import './_button.less';
3+
@import './_icons.less';
34
@import './_input.less';
45
@import './_link.less';
56
@import './_message.less';
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import angular from 'angular';
2+
import translate from 'angular-translate';
3+
import ngOvhUserPref from '@ovh-ux/ng-ovh-user-pref';
4+
5+
/* eslint-disable import/no-webpack-loader-syntax, import/extensions */
6+
import 'script-loader!bootstrap-tour/build/js/bootstrap-tour-standalone.min.js';
7+
/* eslint-enable import/no-webpack-loader-syntax, import/extensions */
8+
9+
import 'bootstrap-tour/build/css/bootstrap-tour.min.css';
10+
import './walkme.less';
11+
12+
import service from './walkme.service';
13+
14+
const moduleName = 'publicCloudWalkMe';
15+
16+
angular
17+
.module(moduleName, [
18+
ngOvhUserPref,
19+
translate,
20+
])
21+
.service('WalkMe', service)
22+
.run(/* @ngTranslationsInject:json ./translations */);
23+
24+
export default moduleName;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import indicator from './templates/indicator.html';
2+
import nextButton from './templates/nextButton.html';
3+
import prevButton from './templates/prevButton.html';
4+
5+
export default class WalkMeTemplate {
6+
static getNavigation(currentIndex, steps) {
7+
return `
8+
${prevButton.replace('{{ visibility }}', currentIndex === 0 ? 'invisible' : 'visible')}
9+
<div class="oui-slideshow__indicators mr-4 text-center">
10+
${steps.map((step, index) => indicator.replace('{{ id }}', index)).join('')}
11+
</div>
12+
${nextButton.replace('{{ visibility }}', currentIndex === steps.length - 1 ? 'invisible' : 'visible')}
13+
`;
14+
}
15+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="walkme-indicator" id="indicator-{{ id }}"></div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<button class="oui-button oui-button_icon-alone {{ visibility }} mr-0" data-role="next">
2+
<span class="oui-icon oui-icon-arrow-right_extra-thin"></span>
3+
</button>

0 commit comments

Comments
 (0)