sibu 0.7.3 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +38 -38
  4. data/Rakefile +36 -36
  5. data/app/assets/config/sibu_manifest.js +2 -2
  6. data/app/assets/fonts/sibu/Sibu.eot +0 -0
  7. data/app/assets/fonts/sibu/Sibu.svg +13 -13
  8. data/app/assets/fonts/sibu/Sibu.ttf +0 -0
  9. data/app/assets/fonts/sibu/Sibu.woff +0 -0
  10. data/app/assets/javascripts/cropper/cropper.js +3694 -3694
  11. data/app/assets/javascripts/quill/quill.js +11401 -11401
  12. data/app/assets/javascripts/sibu/common.js +6 -6
  13. data/app/assets/javascripts/sibu/sibu.js.erb +155 -177
  14. data/app/assets/javascripts/tabs/van11y-accessible-tab-panel-aria.js +466 -0
  15. data/app/assets/stylesheets/cropper/cropper.css +304 -304
  16. data/app/assets/stylesheets/quill/quill.snow.css +945 -945
  17. data/app/assets/stylesheets/sibu/defaults.scss +336 -284
  18. data/app/assets/stylesheets/sibu/icons.scss +40 -40
  19. data/app/assets/stylesheets/sibu/sibu.css +131 -136
  20. data/app/controllers/sibu/application_controller.rb +14 -14
  21. data/app/controllers/sibu/documents_controller.rb +35 -35
  22. data/app/controllers/sibu/images_controller.rb +78 -78
  23. data/app/controllers/sibu/pages_controller.rb +197 -197
  24. data/app/controllers/sibu/sites_controller.rb +81 -81
  25. data/app/helpers/sibu/application_helper.rb +11 -11
  26. data/app/helpers/sibu/documents_helper.rb +4 -4
  27. data/app/helpers/sibu/images_helper.rb +4 -4
  28. data/app/helpers/sibu/pages_helper.rb +194 -194
  29. data/app/helpers/sibu/sites_helper.rb +23 -23
  30. data/app/jobs/sibu/application_job.rb +4 -4
  31. data/app/mailers/sibu/application_mailer.rb +6 -6
  32. data/app/models/concerns/sibu/document_uploader.rb +8 -8
  33. data/app/models/concerns/sibu/image_uploader.rb +31 -31
  34. data/app/models/concerns/sibu/sections_concern.rb +134 -134
  35. data/app/models/concerns/sibu/style_uploader.rb +1 -1
  36. data/app/models/concerns/sibu/user_concern.rb +8 -8
  37. data/app/models/sibu/application_record.rb +5 -5
  38. data/app/models/sibu/document.rb +16 -16
  39. data/app/models/sibu/dynamic_style.rb +76 -76
  40. data/app/models/sibu/image.rb +19 -19
  41. data/app/models/sibu/page.rb +66 -66
  42. data/app/models/sibu/site.rb +97 -97
  43. data/app/models/sibu/site_template.rb +22 -17
  44. data/app/views/layouts/sibu/application.html.erb +23 -23
  45. data/app/views/layouts/sibu/edit_content.html.erb +262 -255
  46. data/app/views/layouts/sibu/site.html.erb +45 -45
  47. data/app/views/sibu/documents/_form.html.erb +14 -14
  48. data/app/views/sibu/documents/index.html.erb +37 -37
  49. data/app/views/sibu/documents/new.html.erb +12 -12
  50. data/app/views/sibu/images/_edit_form.html.erb +23 -23
  51. data/app/views/sibu/images/_form.html.erb +34 -34
  52. data/app/views/sibu/images/edit.js.erb +2 -2
  53. data/app/views/sibu/images/index.html.erb +13 -13
  54. data/app/views/sibu/images/new.html.erb +12 -12
  55. data/app/views/sibu/images/show.html.erb +2 -2
  56. data/app/views/sibu/pages/_code_edit_panel.html.erb +17 -17
  57. data/app/views/sibu/pages/_element_actions.html.erb +4 -4
  58. data/app/views/sibu/pages/_error_panel.html.erb +4 -4
  59. data/app/views/sibu/pages/_form.html.erb +62 -62
  60. data/app/views/sibu/pages/_group_edit_panel.html.erb +3 -3
  61. data/app/views/sibu/pages/_link_edit_panel.html.erb +50 -50
  62. data/app/views/sibu/pages/_map_edit_panel.html.erb +27 -27
  63. data/app/views/sibu/pages/_media_edit_panel.html.erb +46 -46
  64. data/app/views/sibu/pages/_new_section_panel.html.erb +43 -27
  65. data/app/views/sibu/pages/_paragraph_edit_panel.html.erb +18 -18
  66. data/app/views/sibu/pages/_text_edit_panel.html.erb +19 -19
  67. data/app/views/sibu/pages/child_element.js.erb +6 -6
  68. data/app/views/sibu/pages/clone_element.js.erb +6 -6
  69. data/app/views/sibu/pages/create_section.js.erb +6 -6
  70. data/app/views/sibu/pages/delete_element.js.erb +6 -6
  71. data/app/views/sibu/pages/delete_section.js.erb +6 -6
  72. data/app/views/sibu/pages/destroy.html.erb +2 -2
  73. data/app/views/sibu/pages/edit.html.erb +8 -8
  74. data/app/views/sibu/pages/edit_content.html.erb +3 -3
  75. data/app/views/sibu/pages/edit_element.js.erb +100 -100
  76. data/app/views/sibu/pages/edit_section.js.erb +7 -7
  77. data/app/views/sibu/pages/index.html.erb +40 -40
  78. data/app/views/sibu/pages/new.html.erb +8 -8
  79. data/app/views/sibu/pages/new_section.js.erb +19 -18
  80. data/app/views/sibu/pages/show.html.erb +3 -3
  81. data/app/views/sibu/pages/update.html.erb +2 -2
  82. data/app/views/sibu/pages/update_element.js.erb +5 -5
  83. data/app/views/sibu/pages/update_section.js.erb +5 -5
  84. data/app/views/sibu/sites/_form.html.erb +125 -125
  85. data/app/views/sibu/sites/destroy.html.erb +2 -2
  86. data/app/views/sibu/sites/edit.html.erb +9 -9
  87. data/app/views/sibu/sites/edit_styles.html.erb +8 -8
  88. data/app/views/sibu/sites/index.html.erb +41 -41
  89. data/app/views/sibu/sites/new.html.erb +18 -18
  90. data/app/views/sibu/sites/update.html.erb +2 -2
  91. data/config/initializers/constants.rb +2 -2
  92. data/config/initializers/shrine.rb +18 -18
  93. data/config/routes.rb +30 -30
  94. data/config/tinymce.yml +5 -5
  95. data/db/migrate/20180124095041_create_sibu_sites.rb +12 -12
  96. data/db/migrate/20180124095213_create_sibu_pages.rb +15 -15
  97. data/db/migrate/20180124145030_create_sibu_site_templates.rb +10 -10
  98. data/db/migrate/20180125231638_add_user_id_to_sites.rb +5 -5
  99. data/db/migrate/20180126114522_rename_url_to_path_in_pages.rb +5 -5
  100. data/db/migrate/20180126114628_add_domain_to_sites.rb +5 -5
  101. data/db/migrate/20180127211533_create_sibu_images.rb +11 -11
  102. data/db/migrate/20180208082317_rename_images_user_id_to_site_id.rb +5 -5
  103. data/db/migrate/20180208125024_rename_image_data_column.rb +5 -5
  104. data/db/migrate/20180210181644_add_defaults_to_site_templates.rb +6 -6
  105. data/db/migrate/20180214134653_add_fields_to_sites.rb +5 -5
  106. data/db/migrate/20180227151519_add_default_templates_to_site_templates.rb +5 -5
  107. data/db/migrate/20180301121902_add_style_data_to_sites.rb +5 -5
  108. data/db/migrate/20180301152101_add_default_styles_to_templates.rb +5 -5
  109. data/db/migrate/20180321144021_move_images_to_user_level.rb +7 -7
  110. data/db/migrate/20180321170310_add_version_to_sibu_sites.rb +7 -7
  111. data/db/migrate/20180405095448_create_sibu_documents.rb +10 -10
  112. data/db/migrate/20190110204854_add_custom_data_to_sibu_pages.rb +5 -5
  113. data/lib/sibu.rb +4 -4
  114. data/lib/sibu/engine.rb +19 -19
  115. data/lib/sibu/utils.rb +14 -14
  116. data/lib/sibu/version.rb +3 -3
  117. data/lib/tasks/sibu_tasks.rake +4 -4
  118. metadata +4 -3
@@ -1,41 +1,41 @@
1
- @font-face {
2
- font-family: 'Sibu';
3
- src: font-url('sibu/Sibu.eot');
4
- src: font-url('sibu/Sibu.eot') format('embedded-opentype'), font-url('sibu/Sibu.ttf') format('truetype'),
5
- font-url('sibu/Sibu.woff') format('woff'), font-url('sibu/Sibu.svg') format('svg');
6
- font-weight: normal;
7
- font-style: normal;
8
- }
9
-
10
- a[class^="sb-"]:before, a[class*=" sb-"]:before {
11
- /* use !important to prevent issues with browser extensions that change fonts */
12
- font-family: 'Sibu' !important;
13
- speak: none;
14
- font-style: normal;
15
- font-weight: normal;
16
- font-variant: normal;
17
- text-transform: none;
18
- line-height: 1;
19
- display: inline-block;
20
- margin-right: 3px;
21
-
22
- /* Better Font Rendering =========== */
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
25
- }
26
-
27
- .sb-facebook:before {
28
- content: "\e900";
29
- }
30
-
31
- .sb-pinterest:before {
32
- content: "\e901";
33
- }
34
-
35
- .sb-twitter:before {
36
- content: "\e902";
37
- }
38
-
39
- .sb-instagram:before {
40
- content: "\e903";
1
+ @font-face {
2
+ font-family: 'Sibu';
3
+ src: font-url('sibu/Sibu.eot');
4
+ src: font-url('sibu/Sibu.eot') format('embedded-opentype'), font-url('sibu/Sibu.ttf') format('truetype'),
5
+ font-url('sibu/Sibu.woff') format('woff'), font-url('sibu/Sibu.svg') format('svg');
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ }
9
+
10
+ a[class^="sb-"]:before, a[class*=" sb-"]:before {
11
+ /* use !important to prevent issues with browser extensions that change fonts */
12
+ font-family: 'Sibu' !important;
13
+ speak: none;
14
+ font-style: normal;
15
+ font-weight: normal;
16
+ font-variant: normal;
17
+ text-transform: none;
18
+ line-height: 1;
19
+ display: inline-block;
20
+ margin-right: 3px;
21
+
22
+ /* Better Font Rendering =========== */
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ }
26
+
27
+ .sb-facebook:before {
28
+ content: "\e900";
29
+ }
30
+
31
+ .sb-pinterest:before {
32
+ content: "\e901";
33
+ }
34
+
35
+ .sb-twitter:before {
36
+ content: "\e902";
37
+ }
38
+
39
+ .sb-instagram:before {
40
+ content: "\e903";
41
41
  }
@@ -1,137 +1,132 @@
1
- /*
2
- *= require ../quill/quill.snow
3
- *= require_self
4
- */
5
-
6
- .sibu_content_panel {
7
- position: relative
8
- }
9
-
10
- .sb-editable {
11
- cursor: pointer;
12
- outline: dashed rgba(94, 219, 255, 0.8) 3px;
13
- outline-offset: -3px;
14
- }
15
-
16
- .sb-editable[data-type='map'] {
17
- border: dashed rgba(94, 219, 255, 0.8) 3px;
18
- }
19
-
20
- #edit_mode_overlay {
21
- display: none;
22
- }
23
-
24
- #edit_mode_overlay > div {
25
- position: absolute;
26
- z-index: 99;
27
- }
28
-
29
- #edit_mode_overlay .overlay_top,
30
- #edit_mode_overlay .overlay_bottom,
31
- #edit_mode_overlay .overlay_left,
32
- #edit_mode_overlay .overlay_right {
33
- background-color: rgba(94, 219, 255, 0.5);
34
- }
35
-
36
- #edit_mode_overlay > .overlay_top {
37
- top: 0;
38
- left: 0;
39
- width: 100%;
40
- }
41
-
42
- #edit_mode_overlay > .overlay_bottom {
43
- bottom: 0;
44
- left: 0;
45
- width: 100%;
46
- }
47
-
48
- #edit_mode_overlay > .overlay_left {
49
- left: 0;
50
- }
51
-
52
- #edit_mode_overlay > .overlay_right {
53
- right: 0;
54
- }
55
-
56
- #edit_panel, #sections_panel {
57
- position: fixed;
58
- left: 0;
59
- bottom: 0;
60
- width: 100%;
61
- display: none;
62
- z-index: 1000;
63
- background-color: white;
64
- }
65
-
66
- #sections_panel .sibu_sections {
67
- max-height: 60vh;
68
- overflow-y: scroll;
69
- }
70
-
71
- #element_actions button {
72
- display: none;
73
- }
74
-
75
- #edit_overlays > * {
76
- position: absolute;
77
- z-index: 999;
78
- background-color: rgba(94, 219, 255, 0.5);
79
- opacity: 0;
80
- display: flex;
81
- justify-content: center;
82
- align-items: center;
83
- cursor: pointer;
84
- }
85
-
86
- .sb-editing [data-type] {
87
- min-width: 1em;
88
- min-height: 0.5em;
89
- }
90
-
91
- .ql-snow .ql-tooltip[data-mode="link"]::before {
92
- content: "Adresse du lien :";
93
- }
94
-
95
- .ql-snow div.ql-tooltip.ql-editing a.ql-action::after {
96
- content: "Enregistrer";
97
- }
98
-
99
- .ql-snow div.ql-tooltip::before {
100
- content: "Accéder au site :";
101
- }
102
-
103
- .ql-snow div.ql-tooltip a.ql-action::after {
104
- content: 'Modifier';
105
- }
106
-
107
- .ql-snow div.ql-tooltip a.ql-remove::before {
108
- content: 'Supprimer';
109
- }
110
-
111
- .ql-snow.ql-toolbar button.ql-facebook {
112
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3251.088 6300.088 16.219 30'%3E%3Cpath fill='%23444' d='M37.686.006,33.8,0c-4.371,0-7.2,2.9-7.2,7.383v3.4H22.689a.612.612,0,0,0-.612.612v4.932a.612.612,0,0,0,.612.612H26.6V29.388a.612.612,0,0,0,.612.612h5.1a.612.612,0,0,0,.612-.612V16.943H37.5a.612.612,0,0,0,.612-.612l0-4.932a.612.612,0,0,0-.612-.612H32.927V7.9c0-1.387.331-2.091,2.137-2.091h2.621A.612.612,0,0,0,38.3,5.2V.618A.612.612,0,0,0,37.686.006Z' transform='translate%28-3273.165 6300.088%29'/%3E%3C/svg%3E");
113
- background-repeat: no-repeat;
114
- background-size: 18px 18px;
115
- background-position: center;
116
- }
117
-
118
- .ql-snow.ql-toolbar button.ql-twitter {
119
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3139.088 6300.088 36.933 30'%3E%3Cpath fill='%23444' d='M36.934,60.99a15.13,15.13,0,0,1-4.35,1.193,7.608,7.608,0,0,0,3.33-4.189A15.274,15.274,0,0,1,31.1,59.834a7.582,7.582,0,0,0-12.91,6.907A21.51,21.51,0,0,1,2.574,58.826,7.585,7.585,0,0,0,4.919,68.939a7.577,7.577,0,0,1-3.432-.951v.095a7.584,7.584,0,0,0,6.077,7.429,7.674,7.674,0,0,1-2,.265,7.271,7.271,0,0,1-1.426-.141A7.58,7.58,0,0,0,11.217,80.9a15.2,15.2,0,0,1-9.409,3.238A16.1,16.1,0,0,1,0,84.032a21.416,21.416,0,0,0,11.613,3.409c13.937,0,21.555-11.544,21.555-21.555l-.025-.981A15.13,15.13,0,0,0,36.934,60.99Z' transform='translate%28-3139.089 6242.647%29'/%3E%3C/svg%3E");
120
- background-repeat: no-repeat;
121
- background-size: 18px 18px;
122
- background-position: center;
123
- }
124
-
125
- .ql-snow.ql-toolbar button.ql-instagram {
126
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3202.088 6300.088 30 30'%3E%3Cg transform='translate%28-4031.088 -1288.912%29'%3E%3Cpath fill='%23444' d='M21.721,0H8.279A8.288,8.288,0,0,0,0,8.279V21.721A8.288,8.288,0,0,0,8.279,30H21.721A8.288,8.288,0,0,0,30,21.721V8.279A8.288,8.288,0,0,0,21.721,0Zm5.618,21.721a5.624,5.624,0,0,1-5.617,5.617H8.279a5.623,5.623,0,0,1-5.617-5.617V8.279A5.624,5.624,0,0,1,8.279,2.662H21.721a5.624,5.624,0,0,1,5.617,5.617V21.721Z' transform='translate%28829 7589%29'/%3E%3Cpath fill='%23444' d='M48.7,40.97a7.73,7.73,0,1,0,7.73,7.73A7.739,7.739,0,0,0,48.7,40.97Zm0,12.8A5.068,5.068,0,1,1,53.767,48.7,5.074,5.074,0,0,1,48.7,53.768Z' transform='translate%28795.302 7555.3%29'/%3E%3Cpath fill='%23444' d='M120.873,28.251a1.951,1.951,0,1,0,1.381.571A1.96,1.96,0,0,0,120.873,28.251Z' transform='translate%28731.181 7565.762%29'/%3E%3C/g%3E%3C/svg%3E");
127
- background-repeat: no-repeat;
128
- background-size: 18px 18px;
129
- background-position: center;
130
- }
131
-
132
- .ql-snow.ql-toolbar button.ql-pinterest {
133
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3005.088 6300.088 23.579 30'%3E%3Cpath fill='%23444' d='M53.7,3.074A11.5,11.5,0,0,0,45.655,0a12.649,12.649,0,0,0-9.329,3.6,10.629,10.629,0,0,0-3.145,7.367c0,3.339,1.4,5.9,3.736,6.856a1.237,1.237,0,0,0,.47.1,1.045,1.045,0,0,0,1.02-.841c.079-.3.262-1.03.341-1.348a1.265,1.265,0,0,0-.339-1.368,4.36,4.36,0,0,1-.992-2.979,7.5,7.5,0,0,1,7.775-7.548c4.007,0,6.5,2.277,6.5,5.943a12.35,12.35,0,0,1-1.4,6.033,4.15,4.15,0,0,1-3.433,2.4,2.276,2.276,0,0,1-1.81-.827,2.082,2.082,0,0,1-.365-1.808c.179-.756.422-1.545.658-2.307a14.278,14.278,0,0,0,.836-3.757,2.728,2.728,0,0,0-2.746-3c-2.087,0-3.722,2.12-3.722,4.825a7.176,7.176,0,0,0,.512,2.7c-.263,1.114-1.825,7.736-2.122,8.985-.171.729-1.2,6.487.5,6.946,1.92.516,3.636-5.092,3.81-5.725.142-.515.637-2.464.94-3.662a5.8,5.8,0,0,0,3.871,1.5,8.633,8.633,0,0,0,6.932-3.468,13.922,13.922,0,0,0,2.606-8.513A9.816,9.816,0,0,0,53.7,3.074Z' transform='translate%28-3038.269 6300.088%29'/%3E%3C/svg%3E");
134
- background-repeat: no-repeat;
135
- background-size: 18px 18px;
136
- background-position: center;
1
+ /*
2
+ *= require ../quill/quill.snow
3
+ *= require_self
4
+ */
5
+
6
+ .sibu_content_panel {
7
+ position: relative
8
+ }
9
+
10
+ .sb-editable {
11
+ cursor: pointer;
12
+ outline: dashed rgba(94, 219, 255, 0.8) 3px;
13
+ outline-offset: -3px;
14
+ }
15
+
16
+ .sb-editable[data-type='map'] {
17
+ border: dashed rgba(94, 219, 255, 0.8) 3px;
18
+ }
19
+
20
+ #edit_mode_overlay {
21
+ display: none;
22
+ }
23
+
24
+ #edit_mode_overlay > div {
25
+ position: absolute;
26
+ z-index: 99;
27
+ }
28
+
29
+ #edit_mode_overlay .overlay_top,
30
+ #edit_mode_overlay .overlay_bottom,
31
+ #edit_mode_overlay .overlay_left,
32
+ #edit_mode_overlay .overlay_right {
33
+ background-color: rgba(94, 219, 255, 0.5);
34
+ }
35
+
36
+ #edit_mode_overlay > .overlay_top {
37
+ top: 0;
38
+ left: 0;
39
+ width: 100%;
40
+ }
41
+
42
+ #edit_mode_overlay > .overlay_bottom {
43
+ bottom: 0;
44
+ left: 0;
45
+ width: 100%;
46
+ }
47
+
48
+ #edit_mode_overlay > .overlay_left {
49
+ left: 0;
50
+ }
51
+
52
+ #edit_mode_overlay > .overlay_right {
53
+ right: 0;
54
+ }
55
+
56
+ #edit_panel, #sections_panel {
57
+ position: fixed;
58
+ left: 0;
59
+ bottom: 0;
60
+ width: 100%;
61
+ display: none;
62
+ z-index: 1000;
63
+ background-color: white;
64
+ }
65
+
66
+ #element_actions button {
67
+ display: none;
68
+ }
69
+
70
+ #edit_overlays > * {
71
+ position: absolute;
72
+ z-index: 999;
73
+ background-color: rgba(94, 219, 255, 0.5);
74
+ opacity: 0;
75
+ display: flex;
76
+ justify-content: center;
77
+ align-items: center;
78
+ cursor: pointer;
79
+ }
80
+
81
+ .sb-editing [data-type] {
82
+ min-width: 1em;
83
+ min-height: 0.5em;
84
+ }
85
+
86
+ .ql-snow .ql-tooltip[data-mode="link"]::before {
87
+ content: "Adresse du lien :";
88
+ }
89
+
90
+ .ql-snow div.ql-tooltip.ql-editing a.ql-action::after {
91
+ content: "Enregistrer";
92
+ }
93
+
94
+ .ql-snow div.ql-tooltip::before {
95
+ content: "Accéder au site :";
96
+ }
97
+
98
+ .ql-snow div.ql-tooltip a.ql-action::after {
99
+ content: 'Modifier';
100
+ }
101
+
102
+ .ql-snow div.ql-tooltip a.ql-remove::before {
103
+ content: 'Supprimer';
104
+ }
105
+
106
+ .ql-snow.ql-toolbar button.ql-facebook {
107
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3251.088 6300.088 16.219 30'%3E%3Cpath fill='%23444' d='M37.686.006,33.8,0c-4.371,0-7.2,2.9-7.2,7.383v3.4H22.689a.612.612,0,0,0-.612.612v4.932a.612.612,0,0,0,.612.612H26.6V29.388a.612.612,0,0,0,.612.612h5.1a.612.612,0,0,0,.612-.612V16.943H37.5a.612.612,0,0,0,.612-.612l0-4.932a.612.612,0,0,0-.612-.612H32.927V7.9c0-1.387.331-2.091,2.137-2.091h2.621A.612.612,0,0,0,38.3,5.2V.618A.612.612,0,0,0,37.686.006Z' transform='translate%28-3273.165 6300.088%29'/%3E%3C/svg%3E");
108
+ background-repeat: no-repeat;
109
+ background-size: 18px 18px;
110
+ background-position: center;
111
+ }
112
+
113
+ .ql-snow.ql-toolbar button.ql-twitter {
114
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3139.088 6300.088 36.933 30'%3E%3Cpath fill='%23444' d='M36.934,60.99a15.13,15.13,0,0,1-4.35,1.193,7.608,7.608,0,0,0,3.33-4.189A15.274,15.274,0,0,1,31.1,59.834a7.582,7.582,0,0,0-12.91,6.907A21.51,21.51,0,0,1,2.574,58.826,7.585,7.585,0,0,0,4.919,68.939a7.577,7.577,0,0,1-3.432-.951v.095a7.584,7.584,0,0,0,6.077,7.429,7.674,7.674,0,0,1-2,.265,7.271,7.271,0,0,1-1.426-.141A7.58,7.58,0,0,0,11.217,80.9a15.2,15.2,0,0,1-9.409,3.238A16.1,16.1,0,0,1,0,84.032a21.416,21.416,0,0,0,11.613,3.409c13.937,0,21.555-11.544,21.555-21.555l-.025-.981A15.13,15.13,0,0,0,36.934,60.99Z' transform='translate%28-3139.089 6242.647%29'/%3E%3C/svg%3E");
115
+ background-repeat: no-repeat;
116
+ background-size: 18px 18px;
117
+ background-position: center;
118
+ }
119
+
120
+ .ql-snow.ql-toolbar button.ql-instagram {
121
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3202.088 6300.088 30 30'%3E%3Cg transform='translate%28-4031.088 -1288.912%29'%3E%3Cpath fill='%23444' d='M21.721,0H8.279A8.288,8.288,0,0,0,0,8.279V21.721A8.288,8.288,0,0,0,8.279,30H21.721A8.288,8.288,0,0,0,30,21.721V8.279A8.288,8.288,0,0,0,21.721,0Zm5.618,21.721a5.624,5.624,0,0,1-5.617,5.617H8.279a5.623,5.623,0,0,1-5.617-5.617V8.279A5.624,5.624,0,0,1,8.279,2.662H21.721a5.624,5.624,0,0,1,5.617,5.617V21.721Z' transform='translate%28829 7589%29'/%3E%3Cpath fill='%23444' d='M48.7,40.97a7.73,7.73,0,1,0,7.73,7.73A7.739,7.739,0,0,0,48.7,40.97Zm0,12.8A5.068,5.068,0,1,1,53.767,48.7,5.074,5.074,0,0,1,48.7,53.768Z' transform='translate%28795.302 7555.3%29'/%3E%3Cpath fill='%23444' d='M120.873,28.251a1.951,1.951,0,1,0,1.381.571A1.96,1.96,0,0,0,120.873,28.251Z' transform='translate%28731.181 7565.762%29'/%3E%3C/g%3E%3C/svg%3E");
122
+ background-repeat: no-repeat;
123
+ background-size: 18px 18px;
124
+ background-position: center;
125
+ }
126
+
127
+ .ql-snow.ql-toolbar button.ql-pinterest {
128
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3005.088 6300.088 23.579 30'%3E%3Cpath fill='%23444' d='M53.7,3.074A11.5,11.5,0,0,0,45.655,0a12.649,12.649,0,0,0-9.329,3.6,10.629,10.629,0,0,0-3.145,7.367c0,3.339,1.4,5.9,3.736,6.856a1.237,1.237,0,0,0,.47.1,1.045,1.045,0,0,0,1.02-.841c.079-.3.262-1.03.341-1.348a1.265,1.265,0,0,0-.339-1.368,4.36,4.36,0,0,1-.992-2.979,7.5,7.5,0,0,1,7.775-7.548c4.007,0,6.5,2.277,6.5,5.943a12.35,12.35,0,0,1-1.4,6.033,4.15,4.15,0,0,1-3.433,2.4,2.276,2.276,0,0,1-1.81-.827,2.082,2.082,0,0,1-.365-1.808c.179-.756.422-1.545.658-2.307a14.278,14.278,0,0,0,.836-3.757,2.728,2.728,0,0,0-2.746-3c-2.087,0-3.722,2.12-3.722,4.825a7.176,7.176,0,0,0,.512,2.7c-.263,1.114-1.825,7.736-2.122,8.985-.171.729-1.2,6.487.5,6.946,1.92.516,3.636-5.092,3.81-5.725.142-.515.637-2.464.94-3.662a5.8,5.8,0,0,0,3.871,1.5,8.633,8.633,0,0,0,6.932-3.468,13.922,13.922,0,0,0,2.606-8.513A9.816,9.816,0,0,0,53.7,3.074Z' transform='translate%28-3038.269 6300.088%29'/%3E%3C/svg%3E");
129
+ background-repeat: no-repeat;
130
+ background-size: 18px 18px;
131
+ background-position: center;
137
132
  }
@@ -1,14 +1,14 @@
1
- module Sibu
2
- class ApplicationController < ActionController::Base
3
- protect_from_forgery with: :exception
4
- before_action Rails.application.config.sibu[:auth_filter]
5
-
6
- def conf
7
- Rails.application.config.sibu
8
- end
9
-
10
- def sibu_user
11
- send(conf[:current_user])
12
- end
13
- end
14
- end
1
+ module Sibu
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ before_action Rails.application.config.sibu[:auth_filter]
5
+
6
+ def conf
7
+ Rails.application.config.sibu
8
+ end
9
+
10
+ def sibu_user
11
+ send(conf[:current_user])
12
+ end
13
+ end
14
+ end
@@ -1,35 +1,35 @@
1
- require_dependency "sibu/application_controller"
2
-
3
- module Sibu
4
- class DocumentsController < ApplicationController
5
- def index
6
- @documents = Sibu::Document.for_user(sibu_user)
7
- end
8
-
9
- def new
10
- @document = Sibu::Document.new(user_id: send(Rails.application.config.sibu[:current_user]).id)
11
- end
12
-
13
- def create
14
- @document = Sibu::Document.new(document_params)
15
- if @document.save
16
- redirect_to documents_url, notice: "Le document a bien été téléchargé."
17
- else
18
- flash.now[:alert] = "Une erreur s'est produite lors du téléchargement du document."
19
- render :new
20
- end
21
- end
22
-
23
- def destroy
24
- @document = Sibu::Document.find(params[:id])
25
- @document.destroy
26
- redirect_to documents_url, notice: "Le document a bien été supprimé."
27
- end
28
-
29
- private
30
-
31
- def document_params
32
- params.require(:document).permit!
33
- end
34
- end
35
- end
1
+ require_dependency "sibu/application_controller"
2
+
3
+ module Sibu
4
+ class DocumentsController < ApplicationController
5
+ def index
6
+ @documents = Sibu::Document.for_user(sibu_user)
7
+ end
8
+
9
+ def new
10
+ @document = Sibu::Document.new(user_id: send(Rails.application.config.sibu[:current_user]).id)
11
+ end
12
+
13
+ def create
14
+ @document = Sibu::Document.new(document_params)
15
+ if @document.save
16
+ redirect_to documents_url, notice: "Le document a bien été téléchargé."
17
+ else
18
+ flash.now[:alert] = "Une erreur s'est produite lors du téléchargement du document."
19
+ render :new
20
+ end
21
+ end
22
+
23
+ def destroy
24
+ @document = Sibu::Document.find(params[:id])
25
+ @document.destroy
26
+ redirect_to documents_url, notice: "Le document a bien été supprimé."
27
+ end
28
+
29
+ private
30
+
31
+ def document_params
32
+ params.require(:document).permit!
33
+ end
34
+ end
35
+ end