digital_heroes_startkit 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +37 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/config/digital_heroes_startkit_manifest.js +0 -0
  6. data/app/assets/javascripts/authorization.coffee +79 -0
  7. data/app/assets/javascripts/avatar.coffee +16 -0
  8. data/app/assets/javascripts/datepicker.js +2 -0
  9. data/app/assets/javascripts/digital_heroes_startkit/cable.js +13 -0
  10. data/app/assets/javascripts/digital_heroes_startkit/channels/pills.coffee +23 -0
  11. data/app/assets/javascripts/digital_heroes_startkit/input.coffee +5 -0
  12. data/app/assets/javascripts/digital_heroes_startkit/pills.coffee +2 -0
  13. data/app/assets/javascripts/digital_heroes_startkit/snap.svg-min.js +21 -0
  14. data/app/assets/javascripts/digital_heroes_startkit.js +26 -0
  15. data/app/assets/javascripts/profile.coffee +53 -0
  16. data/app/assets/javascripts/profile_geodata.coffee +68 -0
  17. data/app/assets/javascripts/reg_fields_checkup.coffee +96 -0
  18. data/app/assets/javascripts/registration.coffee +35 -0
  19. data/app/assets/javascripts/resurrection.coffee +20 -0
  20. data/app/channels/application_cable/channel.rb +4 -0
  21. data/app/channels/application_cable/connection.rb +4 -0
  22. data/app/channels/pills_channel.rb +10 -0
  23. data/app/controllers/avatars_controller.rb +11 -0
  24. data/app/controllers/clients_controller.rb +62 -0
  25. data/app/controllers/email_access_cards_controller.rb +28 -0
  26. data/app/controllers/geodata_controller.rb +84 -0
  27. data/app/controllers/nickname_access_cards_controller.rb +30 -0
  28. data/app/controllers/oauth_controller.rb +178 -0
  29. data/app/controllers/openid_controller.rb +124 -0
  30. data/app/controllers/phone_access_cards_controller.rb +28 -0
  31. data/app/controllers/profile_controller.rb +114 -0
  32. data/app/controllers/response_controller.rb +17 -0
  33. data/app/controllers/start_kit_controller.rb +86 -0
  34. data/app/controllers/user_cards_controller.rb +305 -0
  35. data/app/jobs/log_analyzer_job.rb +50 -0
  36. data/app/jobs/password_resurrection_kill_job.rb +9 -0
  37. data/app/mailers/admin_mailer.rb +9 -0
  38. data/app/mailers/client_mailer.rb +3 -0
  39. data/app/mailers/kreator_mailer.rb +9 -0
  40. data/app/mailers/manager_mailer.rb +9 -0
  41. data/app/mailers/prometeus_mailer.rb +16 -0
  42. data/app/mailers/user_cards_mailer.rb +9 -0
  43. data/app/models/admin.rb +3 -0
  44. data/app/models/avatar.rb +23 -0
  45. data/app/models/city.rb +7 -0
  46. data/app/models/client.rb +31 -0
  47. data/app/models/country.rb +7 -0
  48. data/app/models/delayed_job.rb +20 -0
  49. data/app/models/email_access_card.rb +30 -0
  50. data/app/models/kreator.rb +3 -0
  51. data/app/models/log_error.rb +56 -0
  52. data/app/models/log_error_type.rb +3 -0
  53. data/app/models/manager.rb +3 -0
  54. data/app/models/nickname_access_card.rb +18 -0
  55. data/app/models/oauth_access_card.rb +38 -0
  56. data/app/models/phone_access_card.rb +19 -0
  57. data/app/models/prometeus.rb +50 -0
  58. data/app/models/user_card.rb +158 -0
  59. data/app/views/admin_mailer/greetings_email.html.erb +191 -0
  60. data/app/views/client_mailer/greetings_email.html.erb +191 -0
  61. data/app/views/kreator_mailer/greetings_email.html.erb +191 -0
  62. data/app/views/manager_mailer/greetings_email.html.erb +191 -0
  63. data/app/views/oauth/verify.slim +1 -0
  64. data/app/views/profile/_add_avatar.slim +12 -0
  65. data/app/views/profile/_user_profile.slim +95 -0
  66. data/app/views/profile/index.slim +12 -0
  67. data/app/views/user_cards/authorization.slim +72 -0
  68. data/app/views/user_cards/confirmation_but_access_code.slim +7 -0
  69. data/app/views/user_cards/confirmation_complete.slim +7 -0
  70. data/app/views/user_cards/registration.slim +86 -0
  71. data/app/views/user_cards/resurrection.slim +19 -0
  72. data/app/views/user_cards/resurrection_but_access_code.slim +7 -0
  73. data/app/views/user_cards/resurrection_no_access_code.slim +7 -0
  74. data/app/views/user_cards_mailer/email.html.erb +191 -0
  75. data/app/views/user_cards_mailer/resurrection.html.erb +191 -0
  76. data/config/initializers/session_manager.rb +2 -0
  77. data/config/routes.rb +53 -0
  78. data/lib/access_control.rb +3 -0
  79. data/lib/digital_heroes_startkit/engine.rb +25 -0
  80. data/lib/digital_heroes_startkit/version.rb +3 -0
  81. data/lib/digital_heroes_startkit.rb +5 -0
  82. data/lib/generators/digital_heroes_startkit/install_generator.rb +61 -0
  83. data/lib/generators/project/Capfile +36 -0
  84. data/lib/generators/project/Procfile +3 -0
  85. data/lib/generators/project/app/assets/stylesheets/application.scss +16 -0
  86. data/lib/generators/project/app/assets/stylesheets/base/_auth.scss +37 -0
  87. data/lib/generators/project/app/assets/stylesheets/base/_buttons.scss +62 -0
  88. data/lib/generators/project/app/assets/stylesheets/base/_checkbox.scss +71 -0
  89. data/lib/generators/project/app/assets/stylesheets/base/_datepicker.scss +620 -0
  90. data/lib/generators/project/app/assets/stylesheets/base/_form.scss +81 -0
  91. data/lib/generators/project/app/assets/stylesheets/base/_notice.scss +14 -0
  92. data/lib/generators/project/app/assets/stylesheets/base/_pills.scss +39 -0
  93. data/lib/generators/project/app/assets/stylesheets/base/_profile.scss +67 -0
  94. data/lib/generators/project/app/assets/stylesheets/base/_reset.scss +49 -0
  95. data/lib/generators/project/app/assets/stylesheets/base/_social.scss +52 -0
  96. data/lib/generators/project/app/assets/stylesheets/base/_user.scss +0 -0
  97. data/lib/generators/project/app/assets/stylesheets/base/_user_avatar.scss +18 -0
  98. data/lib/generators/project/app/assets/stylesheets/base/styles.scss.txt +35 -0
  99. data/lib/generators/project/app/assets/stylesheets/plugins/sumoselect.scss +296 -0
  100. data/lib/generators/project/app/controllers/application_controller.rb +3 -0
  101. data/lib/generators/project/app/views/layouts/_counts.html.erb +29 -0
  102. data/lib/generators/project/app/views/layouts/_footer.slim +6 -0
  103. data/lib/generators/project/app/views/layouts/_head.slim +7 -0
  104. data/lib/generators/project/app/views/layouts/_header.slim +47 -0
  105. data/lib/generators/project/app/views/layouts/_mobile_menu.slim +11 -0
  106. data/lib/generators/project/app/views/layouts/application.slim +26 -0
  107. data/lib/generators/project/app/views/layouts/mailer.html.erb +13 -0
  108. data/lib/generators/project/app/views/layouts/mailer.text.erb +1 -0
  109. data/lib/generators/project/config/application.access.yml +66 -0
  110. data/lib/generators/project/config/application.db.yml +5 -0
  111. data/lib/generators/project/config/application.google.yml +3 -0
  112. data/lib/generators/project/config/application.oauth.yml +135 -0
  113. data/lib/generators/project/config/application.robokassa.yml +10 -0
  114. data/lib/generators/project/config/application.sendgrid.yml +3 -0
  115. data/lib/generators/project/config/application.telegram.yml +22 -0
  116. data/lib/generators/project/config/application.yml +28 -0
  117. data/lib/generators/project/config/cable.yml +6 -0
  118. data/lib/generators/project/config/capistrano.yml +78 -0
  119. data/lib/generators/project/config/database.yml +52 -0
  120. data/lib/generators/project/config/deploy/application.secrets.yml +4 -0
  121. data/lib/generators/project/config/deploy/domain.crt +92 -0
  122. data/lib/generators/project/config/deploy/domain.key +51 -0
  123. data/lib/generators/project/config/deploy/nginx.conf +50 -0
  124. data/lib/generators/project/config/deploy/production.rb +67 -0
  125. data/lib/generators/project/config/deploy/secrets.yml +32 -0
  126. data/lib/generators/project/config/deploy/secrets.yml.enc +1 -0
  127. data/lib/generators/project/config/deploy/secrets.yml.key +1 -0
  128. data/lib/generators/project/config/deploy/staging.rb +61 -0
  129. data/lib/generators/project/config/deploy/virgin_conf/database.yml +42 -0
  130. data/lib/generators/project/config/deploy/virgin_conf/nginx_site.conf +47 -0
  131. data/lib/generators/project/config/deploy/virgin_conf/nginx_site_ssl.conf +57 -0
  132. data/lib/generators/project/config/deploy/virgin_conf/postfix.cf +685 -0
  133. data/lib/generators/project/config/deploy/virgin_conf/production.rb +67 -0
  134. data/lib/generators/project/config/deploy/virgin_conf/puma.rb +66 -0
  135. data/lib/generators/project/config/deploy/virgin_sh/capistrano.sh +18 -0
  136. data/lib/generators/project/config/deploy/virgin_sh/foreman.sh +19 -0
  137. data/lib/generators/project/config/deploy/virgin_sh/rvm_install.sh +10 -0
  138. data/lib/generators/project/config/deploy.rb +377 -0
  139. data/lib/generators/project/config/environments/development.rb +91 -0
  140. data/lib/generators/project/config/environments/production.rb +142 -0
  141. data/lib/generators/project/config/initializers/session_store.rb +3 -0
  142. data/lib/generators/project/config/locales/ru.yml +444 -0
  143. data/lib/generators/project/db/migrate/10_create_user_cards.rb +19 -0
  144. data/lib/generators/project/db/migrate/12_create_email_access_cards.rb +15 -0
  145. data/lib/generators/project/db/migrate/13_create_nickname_access_cards.rb +15 -0
  146. data/lib/generators/project/db/migrate/14_create_phone_access_cards.rb +16 -0
  147. data/lib/generators/project/db/migrate/15_create_oauth_access_cards.rb +19 -0
  148. data/lib/generators/project/db/migrate/1_create_kreators.rb +9 -0
  149. data/lib/generators/project/db/migrate/21_create_avatars.rb +12 -0
  150. data/lib/generators/project/db/migrate/30_create_countries.rb +12 -0
  151. data/lib/generators/project/db/migrate/32_create_cities.rb +12 -0
  152. data/lib/generators/project/db/migrate/3_create_admins.rb +9 -0
  153. data/lib/generators/project/db/migrate/44_add_sessions_table.rb +12 -0
  154. data/lib/generators/project/db/migrate/4_create_managers.rb +10 -0
  155. data/lib/generators/project/db/migrate/5_create_clients.rb +17 -0
  156. data/lib/generators/project/db/migrate/60_create_log_error_types.rb +9 -0
  157. data/lib/generators/project/db/migrate/61_create_log_errors.rb +12 -0
  158. data/lib/generators/project/db/migrate/78_create_delayed_jobs.rb +22 -0
  159. data/lib/generators/project/db/seeds.rb +27 -0
  160. data/lib/generators/project/geodata/cities.csv +25305 -0
  161. data/lib/generators/project/geodata/countries.csv +250 -0
  162. data/lib/generators/project/public/401.html +75 -0
  163. data/lib/generators/project/public/404.html +67 -0
  164. data/lib/generators/project/public/422.html +67 -0
  165. data/lib/generators/project/public/500.html +66 -0
  166. data/lib/generators/project/public/_receiver.html +10 -0
  167. data/lib/generators/project/public/apple-touch-icon-precomposed.png +0 -0
  168. data/lib/generators/project/public/apple-touch-icon.png +0 -0
  169. data/lib/generators/project/public/favicon.ico +0 -0
  170. data/lib/generators/project/public/robots.txt +1 -0
  171. data/lib/happy_birthday.rb +5 -0
  172. data/lib/link.rb +16 -0
  173. data/lib/oauth/oauth.rb +72 -0
  174. data/lib/oauth/oauth_fb.rb +48 -0
  175. data/lib/oauth/oauth_gg.rb +50 -0
  176. data/lib/oauth/oauth_im.rb +51 -0
  177. data/lib/oauth/oauth_mr.rb +53 -0
  178. data/lib/oauth/oauth_vk.rb +3 -0
  179. data/lib/oauth/oauth_yx.rb +51 -0
  180. data/lib/openid/openid.rb +46 -0
  181. data/lib/openid/openid_st.rb +2 -0
  182. data/lib/phone_cutter.rb +9 -0
  183. data/lib/response.rb +51 -0
  184. data/lib/session_manager.rb +47 -0
  185. data/lib/sms_lib.rb +30 -0
  186. data/lib/social_networks.rb +328 -0
  187. data/lib/tasks/digital_heroes_startkit_tasks.rake +83 -0
  188. data/lib/telegram.rb +33 -0
  189. metadata +497 -0
@@ -0,0 +1,39 @@
1
+ .red-pill, .blue-pill {
2
+ position: fixed;
3
+ right: 16px;
4
+ bottom: 16px;
5
+ max-width: 280px;
6
+ text-align: center;
7
+ padding: 12px 16px;
8
+ border-radius: 3px 3px 0 3px;
9
+ color: #fff;
10
+ display: none;
11
+ &:after {
12
+ position: absolute;
13
+ content: '';
14
+ right: -12px;
15
+ bottom: 0;
16
+ width: 12px;
17
+ height: 12px;
18
+ box-sizing: border-box;
19
+ border-right: 6px solid rgba(0,0,0,0);
20
+ border-top: 6px solid rgba(0,0,0,0);
21
+ border-left: 6px solid #2756db;
22
+ border-bottom: 6px solid #2756db;
23
+ }
24
+ &.active {
25
+ display: block;
26
+ }
27
+ }
28
+ .blue-pill {
29
+ background-color: #2756db;
30
+ color: #fff;
31
+ }
32
+ .red-pill {
33
+ background-color: #db3727;
34
+ color: #fff;
35
+ &:after {
36
+ border-left: 6px solid #db3727;
37
+ border-bottom: 6px solid #db3727;
38
+ }
39
+ }
@@ -0,0 +1,67 @@
1
+ .form--profile {
2
+ .profile__avatar {
3
+ width: 33.3333%;
4
+ }
5
+ .profile__data {
6
+ width: 66.6666%
7
+ }
8
+ .form__input {
9
+
10
+ }
11
+ .form--profile_name {
12
+
13
+ }
14
+ .form--profile_nickname {
15
+
16
+ }
17
+ .form--profile_email {
18
+
19
+ }
20
+ .form--profile_phone {
21
+
22
+ }
23
+ .form--profile_country {
24
+ width: 50%;
25
+ }
26
+ .form--profile_city {
27
+ width: 50%;
28
+ }
29
+ .form--profile_password {
30
+
31
+ }
32
+ }
33
+
34
+ .signin-inputs {
35
+ float: left;
36
+ margin-top: 1.5em;
37
+ margin-right: -1.5em;
38
+ padding: 1em 1.5em 1.25em 0;
39
+ background-color: #d6e0e0;
40
+ }
41
+ .signin-inputs__notice {
42
+ margin-top: .5em;
43
+ padding: 0 1em;
44
+ color: #718484;
45
+ }
46
+
47
+ @media (max-width: 960px) {
48
+ .form--profile {
49
+ .form--profile_country {
50
+ width: 100%;
51
+ }
52
+ .form--profile_city {
53
+ width: 100%;
54
+ }
55
+ }
56
+ }
57
+
58
+ @media (max-width: 768px) {
59
+ .form--profile {
60
+ .profile__avatar {
61
+ width: 100%;
62
+ }
63
+ .profile__data {
64
+ width: 100%
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,49 @@
1
+ html, body, div, span, applet, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ a, abbr, acronym, address, big, cite, code,
4
+ del, dfn, em, img, ins, kbd, q, s, samp,
5
+ small, strike, strong, sub, sup, tt, var,
6
+ b, u, i, center,
7
+ dl, dt, dd, ol, ul, li,
8
+ fieldset, form, label, legend,
9
+ table, caption, tbody, tfoot, thead, tr, th, td,
10
+ article, aside, canvas, details, embed,
11
+ figure, figcaption, footer, header,
12
+ menu, nav, output, ruby, section, summary,
13
+ time, mark, audio, video {
14
+ margin: 0;
15
+ padding: 0;
16
+ border: 0;
17
+ font-size: 100%;
18
+ font: inherit;
19
+ vertical-align: baseline;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ article, aside, details, figcaption, figure,
24
+ footer, header, menu, nav, section {
25
+ display: block;
26
+ }
27
+ body {
28
+ line-height: 1;
29
+ }
30
+ ol, ul {
31
+ list-style: none;
32
+ }
33
+ blockquote, q {
34
+ quotes: none;
35
+ }
36
+ blockquote:before, blockquote:after,
37
+ q:before, q:after {
38
+ content: '';
39
+ content: none;
40
+ }
41
+ table {
42
+ border-collapse: collapse;
43
+ border-spacing: 0;
44
+ }
45
+ a, textarea, input, button, select {
46
+ &:active, &:focus {
47
+ outline: none;
48
+ }
49
+ }
@@ -0,0 +1,52 @@
1
+ .enter-social {
2
+ margin-top: 1em;
3
+ text-align: center;
4
+ }
5
+
6
+ .enter-social__inner {
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+ justify-content: space-between;
10
+ }
11
+
12
+ .btn-social {
13
+ margin-top: 16px;
14
+ width: 32px;
15
+ height: 32px;
16
+ background-position: center;
17
+ background-repeat: no-repeat;
18
+ background-size: 100%;
19
+ border-radius: 50%;
20
+ opacity: .75;
21
+ transition: margin-top .125s ease-out;
22
+ transition: box-shadow .125s ease-out;
23
+ transition: opacity .125s ease-out;
24
+ &:hover {
25
+ margin-top: 15px;
26
+ @include shadow-lg;
27
+ opacity: 1;
28
+ cursor: pointer;
29
+ }
30
+ }
31
+
32
+ .btn-social--vk {
33
+ background-image: asset-data-url('svg/social/vk.svg');
34
+ }
35
+ .btn-social--fb {
36
+ background-image: asset-data-url('svg/social/fb.svg');
37
+ }
38
+ .btn-social--gg {
39
+ background-image: asset-data-url('svg/social/gg.svg');
40
+ }
41
+ .btn-social--yx {
42
+ background-image: asset-data-url('svg/social/yx.svg');
43
+ }
44
+ .btn-social--mr {
45
+ background-image: asset-data-url('svg/social/mr.svg');
46
+ }
47
+ .btn-social--st {
48
+ background-image: asset-data-url('svg/social/st.svg');
49
+ }
50
+ .btn-social--im {
51
+ background-image: asset-data-url('svg/social/im.svg');
52
+ }
@@ -0,0 +1,18 @@
1
+ .user-avatar {
2
+ display: inline-block;
3
+ width: 60%;
4
+ margin-top: 2em;
5
+ position: relative;
6
+ .avatar-input {
7
+ display: none;
8
+ }
9
+ .add-avatar {
10
+ cursor: pointer;
11
+ }
12
+ img {
13
+ width: 100%;
14
+ &.img-present {
15
+ border-radius: 50%;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,35 @@
1
+ @charset "UTF-8";
2
+
3
+ @import url('https://fonts.googleapis.com/css?family=Noto+Sans:400,700&subset=cyrillic');
4
+ @import url('https://fonts.googleapis.com/css?family=Play:400,700&subset=cyrillic-ext');
5
+ // font-family: 'Noto Sans', sans-serif;
6
+ // font-family: 'Yanone Kaffeesatz', sans-serif;
7
+
8
+ // variables styles
9
+ @import 'mixins',
10
+ 'grid',
11
+ 'body';
12
+
13
+ // base styles
14
+ @import 'base/reset',
15
+ 'base/form',
16
+ 'base/user',
17
+ 'base/buttons',
18
+ 'base/checkbox',
19
+ 'base/notice',
20
+ 'base/auth';
21
+
22
+ // project styles
23
+ @import 'buttons',
24
+ 'blocks',
25
+ 'showcases',
26
+ 'plugins/sumoselect',
27
+ 'header',
28
+ 'main',
29
+ 'part',
30
+ 'page',
31
+ 'search',
32
+ 'filters',
33
+ 'catalog',
34
+ 'listing',
35
+ 'footer';
@@ -0,0 +1,296 @@
1
+ .SumoSelect p {
2
+ margin: 0;
3
+ }
4
+ .SumoSelect {
5
+ width: 100%;
6
+ }
7
+
8
+ .SelectBox {
9
+ padding: 11px 1em;
10
+ }
11
+
12
+ .sumoStopScroll {
13
+ overflow:hidden;
14
+ }
15
+
16
+ /* Filtering style */
17
+ .SumoSelect .hidden {
18
+ display:none;
19
+ }
20
+ .SumoSelect .search-txt {
21
+ display:none;
22
+ outline:none;
23
+ background-color: #f4f4f4;
24
+ }
25
+ .SumoSelect .no-match {
26
+ display:none;
27
+ padding: 6px;
28
+ }
29
+ .SumoSelect.open .search-txt {
30
+ display: inline-block;
31
+ position: absolute;
32
+ top: 0;
33
+ left: 0;
34
+ width: 100%;
35
+ padding: .75em;
36
+ border: none;
37
+ box-sizing: border-box;
38
+ min-height: 14px;
39
+ background-color: #f4f4f4;
40
+ border-radius: 0;
41
+ margin: 0;
42
+ font-size: 1em;
43
+ line-height: 44px;
44
+ }
45
+ .SumoSelect.open>.search>span,
46
+ .SumoSelect.open>.search>label {
47
+ visibility:hidden;
48
+ }
49
+
50
+ /*this is applied on that hidden select. DO NOT USE display:none; or visiblity:hidden; and Do not override any of these properties. */
51
+ .SelectClass,
52
+ .SumoUnder {
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ right: 0;
57
+ height: 100%;
58
+ width: 100%;
59
+ border-radius: 6px;
60
+ background-color: #f4f4f4;
61
+ border: none;
62
+ -webkit-box-sizing: border-box;
63
+ -moz-box-sizing: border-box;
64
+ box-sizing: border-box;
65
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
66
+ filter: alpha(opacity=0);
67
+ -moz-opacity: 0;
68
+ -khtml-opacity: 0;
69
+ opacity: 0;
70
+ }
71
+ .SelectClass{
72
+ z-index: 1;
73
+ }
74
+
75
+ .SumoSelect > .optWrapper > .options li.opt label,
76
+ .SumoSelect > .CaptionCont,
77
+ .SumoSelect .select-all > label {
78
+ user-select: none;
79
+ -o-user-select: none;
80
+ -moz-user-select: none;
81
+ -khtml-user-select: none;
82
+ -webkit-user-select: none;
83
+ }
84
+
85
+ .SumoSelect {
86
+ display: inline-block;
87
+ position: relative;
88
+ outline:none;
89
+ }
90
+ .SumoSelect:focus > .CaptionCont,
91
+ .SumoSelect:hover > .CaptionCont,
92
+ .SumoSelect.open > .CaptionCont {
93
+ box-shadow: none;
94
+ border-color: #ccc;
95
+ }
96
+ .SumoSelect:hover > .CaptionCont {
97
+ cursor: pointer;
98
+ }
99
+ .SumoSelect {
100
+ .CaptionCont {
101
+ position: relative;
102
+ //border: 1px solid #cbcbcb;
103
+ min-height: 14px;
104
+ background-color: transparent;
105
+ //border-radius: 4px;
106
+ margin: 0;
107
+ transition: border 100ms;
108
+ transition-delay: 100ms;
109
+ &:hover, &:focus {
110
+ border-color: #999;
111
+ }
112
+ }
113
+ }
114
+
115
+ .SumoSelect > .CaptionCont > span {
116
+ display: block;
117
+ padding-right: 20px;
118
+ text-overflow: ellipsis;
119
+ white-space: nowrap;
120
+ overflow: hidden;
121
+ }
122
+ /*placeholder style*/
123
+ .SumoSelect > .CaptionCont > span.placeholder {
124
+ color: #555;
125
+ font-style: normal;
126
+ }
127
+
128
+ .SumoSelect > .CaptionCont > label {
129
+ position: absolute;
130
+ top: 0;
131
+ right: 0;
132
+ bottom: 0;
133
+ width: 40px;
134
+ }
135
+ .SumoSelect > .CaptionCont > label > i {
136
+ width: 16px;
137
+ height: 16px;
138
+ display: block;
139
+ position: absolute;
140
+ top: 2px;
141
+ left: 0;
142
+ right: 0;
143
+ bottom: 0;
144
+ margin: auto;
145
+ background-image: image-url('svg/arrow-b.svg');
146
+ background-size: 12px;
147
+ background-position: center;
148
+ background-repeat: no-repeat;
149
+ transform: rotate(90deg);
150
+ }
151
+
152
+ .SumoSelect > .optWrapper {
153
+ display: none;
154
+ z-index: 1000;
155
+ top: 30px;
156
+ width: 100%;
157
+ position: absolute;
158
+ left: 0;
159
+ -webkit-box-sizing: border-box;
160
+ -moz-box-sizing: border-box;
161
+ box-sizing: border-box;
162
+ background: #fff;
163
+ border: none;
164
+ box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.1);
165
+ border-radius: 0;
166
+ overflow: hidden;
167
+ }
168
+ .SumoSelect.open > .optWrapper {
169
+ top:44px;
170
+ display:block;
171
+ }
172
+ .SumoSelect.open > .optWrapper.up {
173
+ top: auto;
174
+ bottom: 100%;
175
+ margin-bottom: 5px;
176
+ }
177
+
178
+ .SumoSelect > .optWrapper ul {
179
+ list-style: none;
180
+ display: block;
181
+ padding: 0;
182
+ margin: 0;
183
+ overflow: auto;
184
+ }
185
+ .SumoSelect > .optWrapper > .options {
186
+ border-radius: 2px;
187
+ position:relative;
188
+ /*Set the height of pop up here (only for desktop mode)*/
189
+ max-height: 250px;
190
+ /*height*/
191
+ }
192
+ .SumoSelect > .optWrapper.okCancelInMulti > .options { border-radius: 2px 2px 0 0;}
193
+ .SumoSelect > .optWrapper.selall > .options { border-radius: 0 0 2px 2px;}
194
+ .SumoSelect > .optWrapper.selall.okCancelInMulti > .options { border-radius: 0;}
195
+ .SumoSelect > .optWrapper > .options li.group.disabled > label{opacity:0.5;}
196
+ .SumoSelect > .optWrapper > .options li ul li.opt{padding-left: 22px;}
197
+ .SumoSelect > .optWrapper.multiple > .options li ul li.opt{padding-left: 50px;}
198
+ .SumoSelect > .optWrapper.isFloating > .options {max-height: 100%;box-shadow: 0 0 100px #595959;}
199
+ .SumoSelect > .optWrapper > .options li.opt {
200
+ padding: 5px 15px;
201
+ position: relative;
202
+ border-bottom: none;
203
+ }
204
+ .SumoSelect > .optWrapper > .options > li.opt:first-child { border-radius: 2px 2px 0 0; }
205
+ .SumoSelect > .optWrapper.selall > .options > li.opt:first-child { border-radius:0; }
206
+ .SumoSelect > .optWrapper > .options > li.opt:last-child {
207
+ border-radius: 0 0 2px 2px;
208
+ border-bottom: none;
209
+ margin-bottom: 0;
210
+ padding-bottom: .75em;
211
+ }
212
+ .SumoSelect > .optWrapper.okCancelInMulti > .options > li.opt:last-child {border-radius: 0;}
213
+ .SumoSelect > .optWrapper > .options li.opt:hover { background-color: #E4E4E4; }
214
+ .SumoSelect > .optWrapper > .options li.opt.sel, .SumoSelect .select-all.sel{background-color: #a1c0e4;}
215
+
216
+ .SumoSelect > .optWrapper > .options li label { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: block;cursor: pointer;}
217
+ .SumoSelect > .optWrapper > .options li span { display: none; }
218
+ .SumoSelect > .optWrapper > .options li.group > label {cursor: default;padding: 8px 6px;font-weight: bold;}
219
+
220
+ /*Floating styles*/
221
+ .SumoSelect > .optWrapper.isFloating { position: fixed; top: 0; left: 0; right: 0; width: 90%; bottom: 0; margin: auto; max-height: 90%; }
222
+
223
+ /*disabled state*/
224
+ .SumoSelect > .optWrapper > .options li.opt.disabled { background-color: inherit;pointer-events: none;}
225
+ .SumoSelect > .optWrapper > .options li.opt.disabled * { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 5-7 */ filter: alpha(opacity=50); /* Netscape */ -moz-opacity: 0.5; /* Safari 1.x */ -khtml-opacity: 0.5; /* Good browsers */ opacity: 0.5; }
226
+
227
+
228
+ /*styling for multiple select*/
229
+ .SumoSelect > .optWrapper.multiple > .options li.opt {
230
+ padding-left: 35px;
231
+ cursor: pointer;
232
+ }
233
+ .SumoSelect > .optWrapper.multiple > .options li.opt span,
234
+ .SumoSelect .select-all > span{position:absolute;display:block;width:30px;top:0;bottom:0;margin-left:-35px;}
235
+ .SumoSelect > .optWrapper.multiple > .options li.opt span i,
236
+ .SumoSelect .select-all > span i{
237
+ position: absolute;
238
+ margin: auto;
239
+ left: 0;
240
+ right: 0;
241
+ top: 2px;
242
+ bottom: 0;
243
+ width: 16px;
244
+ height: 16px;
245
+ border: 2px solid #ddd;
246
+ border-radius: 3px;
247
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0);
248
+ background-color: transparent;
249
+ }
250
+ .SumoSelect > .optWrapper.multiple > .options li.opt {
251
+ &:hover {
252
+ span i {
253
+ border-color: #fc4349;
254
+ }
255
+ }
256
+ }
257
+ .SumoSelect > .optWrapper > .MultiControls { display: none; border-top: 1px solid #ddd; background-color: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, 0.13); border-radius: 0 0 3px 3px; }
258
+ .SumoSelect > .optWrapper.multiple.isFloating > .MultiControls { display: block; margin-top: 5px; position: absolute; bottom: 0; width: 100%; }
259
+
260
+ .SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls { display: block; }
261
+ .SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls > p { padding: 6px; }
262
+ .SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls > p:focus {box-shadow: 0 0 2px #a1c0e4;border-color: #a1c0e4;outline: none;background-color: #a1c0e4;}
263
+
264
+ .SumoSelect > .optWrapper.multiple > .MultiControls > p { display: inline-block; cursor: pointer; padding: 12px; width: 50%; box-sizing: border-box; text-align: center; }
265
+ .SumoSelect > .optWrapper.multiple > .MultiControls > p:hover { background-color: #f1f1f1; }
266
+ .SumoSelect > .optWrapper.multiple > .MultiControls > p.btnOk { border-right: 1px solid #DBDBDB; border-radius: 0 0 0 3px; }
267
+ .SumoSelect > .optWrapper.multiple > .MultiControls > p.btnCancel { border-radius: 0 0 3px 0; }
268
+ /*styling for select on popup mode*/
269
+ .SumoSelect > .optWrapper.isFloating > .options li.opt { padding: 12px 6px; }
270
+
271
+ /*styling for only multiple select on popup mode*/
272
+ .SumoSelect > .optWrapper.multiple.isFloating > .options li.opt { padding-left: 35px; }
273
+ .SumoSelect > .optWrapper.multiple.isFloating { padding-bottom: 43px; }
274
+
275
+ .SumoSelect > .optWrapper.multiple > .options li.opt.selected span i,
276
+ .SumoSelect .select-all.selected > span i,
277
+ .SumoSelect .select-all.partial > span i{
278
+ background-color: #fc4349;
279
+ box-shadow: none;
280
+ border-color: transparent;
281
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAABMSURBVAiZfc0xDkAAFIPhd2Kr1WRjcAExuIgzGUTIZ/AkImjSofnbNBAfHvzAHjOKNzhiQ42IDFXCDivaaxAJd0xYshT3QqBxqnxeHvhunpu23xnmAAAAAElFTkSuQmCC');
282
+ background-repeat: no-repeat;
283
+ background-position: center center;
284
+ }
285
+ /*disabled state*/
286
+ .SumoSelect.disabled { opacity: 0.25;cursor: not-allowed !important;}
287
+ .SumoSelect.disabled > .CaptionCont{border-color:#ccc;box-shadow:none;}
288
+
289
+ /**Select all button**/
290
+ .SumoSelect .select-all{border-radius: 3px 3px 0 0;position: relative;border-bottom: 1px solid #ddd;background-color: #fff;padding: 8px 0 3px 35px;height: 20px;cursor: pointer;}
291
+ .SumoSelect .select-all > label, .SumoSelect .select-all > span i{cursor: pointer;}
292
+ .SumoSelect .select-all.partial > span i{background-color:#ccc;}
293
+
294
+
295
+ /*styling for optgroups*/
296
+ .SumoSelect > .optWrapper > .options li.optGroup { padding-left: 5px; text-decoration: underline; }
@@ -0,0 +1,3 @@
1
+ class ApplicationController < StartKitController
2
+
3
+ end
@@ -0,0 +1,29 @@
1
+ <!-- Yandex.Metrika counter -->
2
+ <script type="text/javascript" >
3
+ (function (d, w, c) {
4
+ (w[c] = w[c] || []).push(function() {
5
+ try {
6
+ w.yaCounter418103 = new Ya.Metrika({
7
+ id:418103,
8
+ clickmap:true,
9
+ trackLinks:true,
10
+ accurateTrackBounce:true,
11
+ webvisor:true
12
+ });
13
+ } catch(e) { }
14
+ });
15
+
16
+ var n = d.getElementsByTagName("script")[0],
17
+ s = d.createElement("script"),
18
+ f = function () { n.parentNode.insertBefore(s, n); };
19
+ s.type = "text/javascript";
20
+ s.async = true;
21
+ s.src = "https://mc.yandex.ru/metrika/watch.js";
22
+
23
+ if (w.opera == "[object Opera]") {
24
+ d.addEventListener("DOMContentLoaded", f, false);
25
+ } else { f(); }
26
+ })(document, window, "yandex_metrika_callbacks");
27
+ </script>
28
+ <noscript><div><img src="https://mc.yandex.ru/watch/418103" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
29
+ <!-- /Yandex.Metrika counter -->
@@ -0,0 +1,6 @@
1
+ footer
2
+ .footer__inner.container__inner
3
+ .fl
4
+ | racewing.ru © 2018
5
+ .fr
6
+ a href="http://digitalheroes.club" title="Разработка и развитие проекта" target="_blank" Сделано в DHC
@@ -0,0 +1,7 @@
1
+ = display_meta_tags
2
+ link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon"
3
+ meta name="viewport" content="width=device-width, initial-scale=1.0"
4
+ = stylesheet_link_tag "application", 'data-turbolinks-track': 'reload'
5
+ = javascript_include_tag "application", 'data-turbolinks-track': 'reload'
6
+ = yield :head
7
+ = csrf_meta_tags
@@ -0,0 +1,47 @@
1
+ header class="#{'header--main' if controller.controller_name == 'main'}"
2
+ .header-area.container__inner
3
+ .header-inner
4
+ a.logo href="/"
5
+ | race
6
+ span
7
+ | wing
8
+ - if @current_user
9
+ a.btn.btn--success.btn--sm.fr href="/parts/new" Добавить объявление
10
+ = link_to 'Выйти', logout_path, class: 'btn btn--sm fr', data: {turbolinks: 'false'}
11
+ = link_to 'Профиль', profile_path, class: 'btn btn--sm fr', data: {turbolinks: 'false'}
12
+ - else
13
+ a.btn.btn--success.btn--sm.fr href="/registration" Добавить объявление
14
+ a.btn.btn--sm.fr href="/authorization" Вход
15
+ / = link_to root_path, class: 'logo'
16
+ / = image_tag 'autosim-logo-old.png', alt: 'autosim.ru'
17
+ / .h-menu.xs-disable
18
+ / = link_to 'Новости', root_path, class: 'btn btn-transparent', data: {turbolinks: 'false'}
19
+ / = link_to 'Форум', forum_path, class: 'btn btn-transparent'
20
+ / = link_to 'Календарь', root_path, class: 'btn btn-transparent', data: {turbolinks: 'false'}
21
+ / = link_to 'Чемпионаты', root_path, class: 'btn btn-transparent', data: {turbolinks: 'false'}
22
+ / .right.h-user-info
23
+ / .right.mobile-menu-button
24
+ / .btn-mobile-menu.left
25
+ / span.mobile-icon
26
+ / = render 'layouts/mobile_menu'
27
+ / - unless @current_user
28
+ / = link_to 'Регистрация', registration_path, class: 'btn btn-transparent', data: {turbolinks: 'false'}
29
+ / = link_to 'Вход', signin_path, class: 'btn btn-transparent', data: {turbolinks: 'false'}
30
+ / - else
31
+ / .h-user-info__data.right
32
+ / = link_to @current_user_card, class: 'nickname left', data: {turbolinks: 'false'} do
33
+ / - if @current_user_card.my_nickname.present?
34
+ / = @current_user_card.my_nickname
35
+ / - else
36
+ / | Пользователь ##{@current_user_card.id}
37
+ / br
38
+ / i.user-coins.left
39
+ / = image_tag 'svg/coins.svg'
40
+ / span id="my-coins" #{coins_left}
41
+ / .h-user-info__ava.right
42
+ / - if @current_user_card.avatar.nil?
43
+ / = image_tag 'svg/user.svg', alt: 'Изображение пользователя', class: 'right margin-r-xs'
44
+ / - else
45
+ / = image_tag @current_user_card.avatar.uploaded_file.url(:default), alt: 'Изображение пользователя', class: 'right margin-r-xs'
46
+
47
+ = yield :header
@@ -0,0 +1,11 @@
1
+ #mobile-menu.mobile-menu
2
+ - if @current_user
3
+ = link_to 'Моя лента', root_path, class: 'left full-width feed', data: {turbolinks: 'false'}
4
+ = link_to 'Сообщения', root_path, class: 'left full-width chat', data: {turbolinks: 'false'}
5
+ = link_to 'Профиль', @current_user_card, class: 'left full-width profile', data: {turbolinks: 'false'}
6
+ = link_to 'Добавить пост', new_post_path, class: 'left full-width new-post', data: {turbolinks: 'false'}
7
+ - if check_access_level :admin
8
+ = link_to 'Админ панель', admin_index_path, class: 'left full-width admin', data: {turbolinks: 'false'}
9
+ = link_to 'Выйти', logout_path, class: 'left full-width exit', data: {turbolinks: 'false'}
10
+ - else
11
+ = link_to 'О проекте', root_path, class: 'left full-width about', data: {turbolinks: 'false'}