Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#21 Make design aware to user sign up status

Merged
Dean Pleban merged 3 commits into DAGsHub-Official:main from DAGsHub-Official:sign-up-aware-menu
1 changed files with 0 additions and 63 deletions
  1. 0
    63
      docs/js/feedbackButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  1. $(document).ready(function() {
  2. // 1. Create feedback button
  3. var button = '<div class="feedback-button">' +
  4. '<a href="https://DAGsHub.com/DAGsHub-Official/DAGsHub-Issues?utm_source=dagshub&utm_medium=feedbackButton&utm_campaign=feedbackButton">FEEDBACK</a>' +
  5. '<i class="minimize-feedback fas fa-angle-down"></i>' +
  6. '</div>';
  7. // 2. Append somewhere
  8. var body = $("body");
  9. body.append(button);
  10. // 3. Add styles
  11. $(".feedback-button a").css({
  12. 'color': '#fff',
  13. });
  14. $(".feedback-button i").css({
  15. 'padding-left': '7px',
  16. 'margin-left': '7px',
  17. 'border-left': '1px solid #fff',
  18. 'cursor': 'pointer'
  19. });
  20. var feedbackButton = $(".feedback-button");
  21. feedbackButton.css({
  22. 'background-color': '#59747A',
  23. 'color': '#fff',
  24. 'font-size': '15px',
  25. 'font-weight': '400',
  26. 'position': 'fixed',
  27. 'border-radius': '5px 5px 0 0',
  28. 'top': '40%',
  29. 'right': '-57px',
  30. 'padding': '10px 15px',
  31. 'transform': 'rotate(-90deg)',
  32. '-webkit-transform': 'rotate(-90deg)',
  33. 'letter-spacing': '2px',
  34. 'transition': 'right 400ms ease-in',
  35. 'z-index': '2000000'
  36. });
  37. var feedbackButtonChoiceStorageKey = 'dagshub-showFeedbackButtonChoice';
  38. if (localStorage.getItem(feedbackButtonChoiceStorageKey) !== 'hide') {
  39. feedbackButton.css({'right': '-57px',});
  40. } else {
  41. feedbackButton.css({'right': '-84px',});
  42. }
  43. feedbackButton.mouseenter(function() {
  44. localStorage.setItem(feedbackButtonChoiceStorageKey, 'show');
  45. $(this).css({
  46. 'background-color': '#103037',
  47. 'right': '-57px'
  48. }).mouseleave(function(){
  49. $(this).css({
  50. 'background-color': '#59747A'
  51. })
  52. })
  53. });
  54. // 4. Add minimize action
  55. $(".minimize-feedback").click(function() {
  56. localStorage.setItem(feedbackButtonChoiceStorageKey, 'hide');
  57. feedbackButton.css({
  58. 'right': '-84px'
  59. })
  60. });
  61. });
Discard