station 0.0.106 → 0.0.111

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/bin/nexmo-developer +7 -0
  3. data/lib/nexmo_developer/Gemfile +10 -25
  4. data/lib/nexmo_developer/Gemfile.lock +130 -146
  5. data/lib/nexmo_developer/app/assets/config/manifest.js +1 -4
  6. data/lib/nexmo_developer/app/assets/javascripts/application.js +2 -7
  7. data/lib/nexmo_developer/app/assets/stylesheets/application.css +1 -1
  8. data/lib/nexmo_developer/app/controllers/static_controller.rb +3 -11
  9. data/lib/nexmo_developer/app/helpers/application_helper.rb +2 -0
  10. data/lib/nexmo_developer/app/models/tutorial.rb +10 -12
  11. data/lib/nexmo_developer/app/models/tutorial/prerequisite.rb +3 -1
  12. data/lib/nexmo_developer/app/models/tutorial/task.rb +24 -11
  13. data/lib/nexmo_developer/app/services/translator/files_list_coordinator.rb +90 -0
  14. data/lib/nexmo_developer/app/services/translator/smartling/api/download_file.rb +6 -1
  15. data/lib/nexmo_developer/app/services/translator/smartling/api/file_status.rb +7 -1
  16. data/lib/nexmo_developer/app/services/translator/utils.rb +1 -1
  17. data/lib/nexmo_developer/app/views/admin/feedbacks/_steps.html.erb +1 -1
  18. data/lib/nexmo_developer/app/views/layouts/partials/_footer.html.erb +4 -4
  19. data/lib/nexmo_developer/app/views/layouts/partials/_head.html.erb +4 -5
  20. data/lib/nexmo_developer/app/views/layouts/partials/_header.html.erb +3 -3
  21. data/lib/nexmo_developer/app/views/layouts/partials/_improve_this_page.html.erb +1 -1
  22. data/lib/nexmo_developer/app/views/static/_products.html.erb +20 -17
  23. data/lib/nexmo_developer/app/views/static/default_landing/partials/_join_slack.html.erb +1 -1
  24. data/lib/nexmo_developer/app/views/static/landing.html.erb +8 -8
  25. data/lib/nexmo_developer/app/views/static/{robots.txt.erb → robots.text.erb} +0 -0
  26. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Black.woff +0 -0
  27. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Black.woff2 +0 -0
  28. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Regular.woff +0 -0
  29. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Regular.woff2 +0 -0
  30. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Semibold.woff +0 -0
  31. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/Lato-Semibold.woff2 +0 -0
  32. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/icomoon.eot +0 -0
  33. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/icomoon.json +0 -0
  34. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/icomoon.svg +0 -0
  35. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/icomoon.ttf +0 -0
  36. data/lib/nexmo_developer/app/{assets → webpacker}/fonts/icomoon.woff +0 -0
  37. data/lib/nexmo_developer/app/{assets → webpacker}/images/.keep +0 -0
  38. data/lib/nexmo_developer/app/{assets → webpacker}/images/logo@3x.png +0 -0
  39. data/lib/nexmo_developer/app/{assets → webpacker}/images/logo_vonage.png +0 -0
  40. data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-developer-logo.svg +0 -0
  41. data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-logo-collapsed.svg +0 -0
  42. data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-vonage-white.svg +0 -0
  43. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/chatapp.jpg +0 -0
  44. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/chatapp_small.png +0 -0
  45. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/nexmo.jpg +0 -0
  46. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/numberinsight.jpg +0 -0
  47. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/numberinsight_small.png +0 -0
  48. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/sms.jpg +0 -0
  49. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/sms_small.png +0 -0
  50. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/verify.jpg +0 -0
  51. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/verify_small.png +0 -0
  52. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/voice.jpg +0 -0
  53. data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/voice_small.png +0 -0
  54. data/lib/nexmo_developer/app/{assets → webpacker}/images/select-dropdown.png +0 -0
  55. data/lib/nexmo_developer/app/{assets → webpacker}/images/slack.svg +0 -0
  56. data/lib/nexmo_developer/app/{assets → webpacker}/images/themes/ea/topography.png +0 -0
  57. data/lib/nexmo_developer/app/webpacker/javascript/code_snippet_events/index.js +23 -85
  58. data/lib/nexmo_developer/app/webpacker/javascript/volta/volta.js +1 -1
  59. data/lib/nexmo_developer/app/webpacker/javascript/volta_tabbed_examples/index.js +23 -3
  60. data/lib/nexmo_developer/app/webpacker/packs/active_admin.js +5 -0
  61. data/lib/nexmo_developer/app/webpacker/packs/active_admin/print.scss +2 -0
  62. data/lib/nexmo_developer/app/webpacker/packs/application.js +12 -0
  63. data/lib/nexmo_developer/app/{assets → webpacker}/stylesheets/active_admin.scss +4 -4
  64. data/lib/nexmo_developer/app/webpacker/stylesheets/application.scss +0 -1
  65. data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_core.scss +1 -1
  66. data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_icons.scss +1 -0
  67. data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_navigation.scss +1 -2
  68. data/lib/nexmo_developer/config/environments/development.rb +1 -1
  69. data/lib/nexmo_developer/config/environments/production.rb +8 -1
  70. data/lib/nexmo_developer/config/initializers/active_admin.rb +3 -0
  71. data/lib/nexmo_developer/config/initializers/assets.rb +0 -2
  72. data/lib/nexmo_developer/config/webpack/environment.js +10 -0
  73. data/lib/nexmo_developer/config/webpack/plugins/jquery.js +7 -0
  74. data/lib/nexmo_developer/lib/tasks/smartling.rake +7 -0
  75. data/lib/nexmo_developer/nexmo_developer.rb +1 -4
  76. data/lib/nexmo_developer/version.rb +1 -1
  77. data/package.json +23 -15
  78. data/station.gemspec +6 -12
  79. data/yarn.lock +1490 -1013
  80. metadata +173 -239
  81. data/lib/nexmo_developer/app/assets/fonts/nexmo-developer.json +0 -36483
  82. data/lib/nexmo_developer/app/assets/javascripts/active_admin.js.coffee +0 -1
  83. data/lib/nexmo_developer/app/assets/javascripts/stats.js +0 -14
  84. data/lib/nexmo_developer/app/assets/regex/matching_chars.rb +0 -1
  85. data/lib/nexmo_developer/app/assets/regex/sequence_diagram_regex.rb +0 -1
  86. data/lib/nexmo_developer/app/assets/regex/stats_regex.rb +0 -1
  87. data/lib/nexmo_developer/app/assets/regex/webfont_regex.rb +0 -1
  88. data/lib/nexmo_developer/app/views/slack/join.html.erb +0 -25
  89. data/lib/nexmo_developer/app/views/static/_community.html.erb +0 -24
  90. data/lib/nexmo_developer/app/views/static/_dotnet.html.erb +0 -26
  91. data/lib/nexmo_developer/app/views/static/_slack.html.erb +0 -2
  92. data/lib/nexmo_developer/app/views/static/_xwithy.html.erb +0 -33
  93. data/lib/nexmo_developer/app/views/static/podcast.html.erb +0 -40
  94. data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_building-block.scss +0 -32
  95. data/lib/nexmo_developer/vendor/assets/javascripts/jquery-scrolltofixed.js +0 -567
  96. data/lib/nexmo_developer/vendor/assets/javascripts/mermaid.js +0 -49
  97. data/lib/nexmo_developer/vendor/assets/javascripts/underscore.js +0 -5
  98. data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/jquery.tablesorter.js +0 -1031
  99. data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/prism.js +0 -22
  100. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/side-navigation/volta.menu.js +0 -377
  101. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.accordion.js +0 -249
  102. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.dropdown.js +0 -145
  103. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.flash.js +0 -175
  104. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.modal.js +0 -312
  105. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tab.js +0 -203
  106. data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tooltip.js +0 -71
  107. data/lib/nexmo_developer/vendor/assets/javascripts/volta/popper.min.js +0 -5
  108. data/lib/nexmo_developer/vendor/assets/javascripts/volta/svgxuse.min.js +0 -12
  109. data/lib/nexmo_developer/vendor/assets/javascripts/volta/tooltip.min.js +0 -5
  110. data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.core.js +0 -238
  111. data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.js +0 -2141
  112. data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.min.js +0 -1
@@ -1,3 +1,3 @@
1
1
  <h2 class="Vlt-title--nomargin Vlt-center">
2
- <%= image_tag 'slack.svg', id: 'community-slack-image' %> Join the <%= link_to "Vonage Developer Community Slack", community_slack_path, { :class=>"Vlt-text-btn" } %>
2
+ <%= image_pack_tag 'slack.svg', id: 'community-slack-image' %> Join the <%= link_to "Vonage Developer Community Slack", community_slack_path, { :class=>"Vlt-text-btn" } %>
3
3
  </h2>
@@ -2,8 +2,8 @@
2
2
 
3
3
  <div class="row">
4
4
  <div class="center">
5
- <h1 class="Vlt-title--margin-top2">Connected Code</h1>
6
- <p class="p-large">Everything you need to build connected applications with Vonage APIs</p>
5
+ <h1 class="Vlt-title--margin-top2">Default Entry Page</h1>
6
+ <p class="p-large">This is the default landing page for a developer portal running on Station.</p>
7
7
  </div>
8
8
  <div class="columns small-12">
9
9
  <a name="products"></a>
@@ -17,10 +17,10 @@
17
17
  <h2>
18
18
  <a href="/tools">
19
19
  <div><svg class="Vlt-icon Vlt-icon--large Vlt-purple-dark"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-design-tools"/></svg></div>
20
- SDKs &amp; Tools
20
+ Featured Topic 1
21
21
  </a>
22
22
  </h2>
23
- <p>The Nexmo libraries allow you to get up and running with<br>Nexmo APIs quickly in your language of choice.</p>
23
+ <p>You can choose to highlight an area of your portal on the landing page.</p>
24
24
  </div>
25
25
  </div>
26
26
  <div class="Vlt-col Vlt-col--M-1of2">
@@ -28,10 +28,10 @@
28
28
  <h2>
29
29
  <a href="/community">
30
30
  <div><svg class="Vlt-icon Vlt-icon--large Vlt-purple-dark"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-group"/></svg></div>
31
- Community
31
+ Featured Topic 2
32
32
  </a>
33
33
  </h2>
34
- <p>Find out about our talks, community hacks,<br>and what events we'll be at.</p>
34
+ <p>You can highlight more than one area.</p>
35
35
  </div>
36
36
  </div>
37
37
  </div>
@@ -39,8 +39,8 @@
39
39
  <hr class="hr--tall">
40
40
 
41
41
  <div class="center">
42
- <h3>Do you have a question?</h3>
43
- <p class="p-large">We're always here to help. Check out our <a href="https://help.nexmo.com">support FAQs</a>, contact our super helpful <a href="https://help.nexmo.com/hc/en-us/requests/new">support team</a> or get in touch on <a href="http://stackoverflow.com/questions/tagged/nexmo">Stack Overflow</a>.<br />Your data will be treated in accordance with our <a href="https://www.nexmo.com/privacy-policy">Privacy Policy</a>, which sets out the rights you have in respect of your data.</p>
42
+ <h3>Modifying This Content</h3>
43
+ <p class="p-large">To modify this content you can copy <a href="https://raw.githubusercontent.com/Nexmo/station/master/lib/nexmo_developer/app/views/static/landing.html.erb">this file</a> to the `custom/views/static` folder in your documentation folder and modify that copy. More detailed instructions to create your own landing page can be found on the <a href="https://nexmo.github.io/station/How-To-Use#customization-options">Station documentation</a>.</p>
44
44
  </div>
45
45
  </div>
46
46
  </div>
@@ -1,89 +1,27 @@
1
- export default () => {
2
- let hasTriggeredCopyStat = {};
3
- let hasTriggeredLinkStat = {};
4
-
5
- // Track copy to clipboard usage
6
- var clipboard = new Clipboard('.copy-button',{
7
- text: function(trigger) {
8
- return $(trigger).next().find('.main-code').text();
9
- }
10
- });
11
-
12
- clipboard.on('success', function(e) {
13
- let trigger = $(e.trigger);
14
-
15
- let params = {
16
- "language": trigger.attr("data-lang"),
17
- "snippet": trigger.attr("data-block"),
18
- "section": trigger.attr("data-section"),
19
- "event": "copy"
20
- };
21
-
22
- let key = params['language'] + params['section'] + params['snippet'];
23
-
24
- // We only want to track each copy once per page load
25
- if (hasTriggeredCopyStat[key]) { return true; }
26
-
27
- trigger.find('span').text('Copied');
28
-
29
- fetch(createRequest(params))
30
- .then((response) => {
31
- if (response.ok) { return response.json() }
32
- return Promise.reject({ message: 'Bad response from server', response })
33
- })
34
- .then((payload) => {
35
- hasTriggeredCopyStat[key] = true;
36
- })
37
-
38
- // Can we point them to the dependencies too?
39
- if (trigger.parent().hasClass("main-code")) {
40
- trigger.parent().parent().find(".configure-dependencies").prepend("<span class='label label--small'>Don't forget me!</span>");
41
- }
1
+ import Clipboard from 'clipboard';
42
2
 
43
- });
44
-
45
-
46
- clipboard.on('error', function(e) {
47
- console.error('Action:', e.action);
48
- console.error('Trigger:', e.trigger);
49
- });
50
-
51
- // Track source link usage
52
- $(document).on('mousedown', '.source-link', function(e){
53
- if (e.which === 3) { return; }
54
- let trigger = $(this);
55
-
56
- let section = trigger.attr("data-section");
57
-
58
- let params = {
59
- "language": trigger.attr("data-lang"),
60
- "snippet": trigger.attr("data-block"),
61
- "section": section,
62
- "event": "source"
63
- };
64
-
65
- let key = params['language'] + params['section'];
66
-
67
- if (hasTriggeredLinkStat[key]) { return true; }
68
-
69
- fetch(createRequest(params))
70
- .then((response) => {
71
- if (response.ok) { return response.json() }
72
- return Promise.reject({ message: 'Bad response from server', response })
73
- })
74
- .then((payload) => {
75
- hasTriggeredLinkStat[key] = true;
76
- })
77
- });
3
+ export default () => {
4
+ document.querySelectorAll('.code-toolbar button').forEach(function(button) {
5
+ button.addEventListener('click', createRequest, { once: true })
6
+ });
78
7
  };
79
8
 
80
- function createRequest(params) {
81
- return new Request('/usage/code_snippet', {
82
- method: 'POST',
83
- credentials: 'same-origin',
84
- body: JSON.stringify(params),
85
- headers: {
86
- 'Content-Type': 'application/json'
87
- }
88
- });
9
+ function createRequest(event) {
10
+ let dataset = event.target.closest('.code-toolbar').firstChild.dataset;
11
+
12
+ let params = {
13
+ "language": dataset.lang,
14
+ "snippet": dataset.block,
15
+ "section": dataset.section,
16
+ "event": "copy"
17
+ };
18
+
19
+ fetch(new Request('/usage/code_snippet', {
20
+ method: 'POST',
21
+ credentials: 'same-origin',
22
+ body: JSON.stringify(params),
23
+ headers: {
24
+ 'Content-Type': 'application/json'
25
+ }
26
+ }));
89
27
  }
@@ -1455,7 +1455,7 @@ Volta.tab = function () {
1455
1455
 
1456
1456
  this._activeLink.setAttribute('tabindex', '0');
1457
1457
  this._activeLink.setAttribute('aria-selected', 'true');
1458
- this._activeLink.focus();
1458
+ this._activeLink.focus({ preventScroll: true });
1459
1459
  if (this._activePanel) {
1460
1460
  this._activePanel.removeAttribute('hidden');
1461
1461
  }
@@ -11,6 +11,7 @@ export default class VoltaTabbedExamples {
11
11
  this.onTabClick = this.onTabClick.bind(this)
12
12
  this.onPopState = this.onPopState.bind(this)
13
13
  this.persistLanguage = this.persistLanguage.bind(this)
14
+ this.activateTabFromURLHash = this.activateTabFromURLHash.bind(this);
14
15
  this.restoreTabs()
15
16
  this.setupEvents()
16
17
  }
@@ -55,6 +56,9 @@ export default class VoltaTabbedExamples {
55
56
  setupEvents() {
56
57
  $('.Vlt-tabs__link').click(this.onTabClick)
57
58
  $(window).on('popstate', this.onPopState)
59
+
60
+ window.addEventListener("load", this.activateTabFromURLHash);
61
+ window.addEventListener("hashchange", this.activateTabFromURLHash);
58
62
  }
59
63
 
60
64
  onPopState(event) {
@@ -64,12 +68,14 @@ export default class VoltaTabbedExamples {
64
68
  }
65
69
 
66
70
  onTabClick(event) {
71
+ const target = $(event.currentTarget);
67
72
  // Prevent nested tabs from changing the url
68
73
  if ($(event.target).parents('.Vlt-tabs').length > 1) { return; }
69
74
 
70
- const language = $(event.currentTarget).data('language')
71
- const languageType = $(event.currentTarget).data('language-type')
72
- const linkable = $(event.currentTarget).data('language-linkable')
75
+ const language = target.data('language')
76
+ const languageType = target.data('language-type')
77
+ const linkable = target.data('language-linkable')
78
+ const tabId = target.attr('id');
73
79
 
74
80
  if (language) {
75
81
  if (linkable) {
@@ -81,6 +87,8 @@ export default class VoltaTabbedExamples {
81
87
  }
82
88
 
83
89
  this.persistLanguage(language, languageType, linkable)
90
+ } else if (tabId) {
91
+ window.location.hash = tabId;
84
92
  }
85
93
  }
86
94
 
@@ -103,4 +111,16 @@ export default class VoltaTabbedExamples {
103
111
  setPlatform(platform) {
104
112
  setTimeout(() => { $(`[data-platform='${platform}']`).click(); }, 0);
105
113
  }
114
+
115
+ activateTabFromURLHash() {
116
+ let tabId = window.location.hash;
117
+
118
+ if (tabId !== "") {
119
+ let tab = document.querySelector(`.Vlt-tabs__link${tabId}`);
120
+ if (tab) {
121
+ tab.focus();
122
+ tab.click();
123
+ }
124
+ }
125
+ }
106
126
  }
@@ -0,0 +1,5 @@
1
+ // Load Active Admin's styles into Webpacker,
2
+ // see `active_admin.scss` for customization.
3
+ import "../stylesheets/active_admin";
4
+
5
+ import "@activeadmin/activeadmin";
@@ -0,0 +1,2 @@
1
+ /* Active Admin Print Stylesheet */
2
+ @import "~@activeadmin/activeadmin/src/scss/print";
@@ -14,14 +14,26 @@ import Rails from "@rails/ujs"
14
14
 
15
15
  import '../stylesheets/application'
16
16
 
17
+ require.context('../images', true);
18
+ require.context('../fonts', true);
19
+
17
20
  require.context('@vonagevolta/volta2/images/logos', true)
18
21
  require.context('@vonagevolta/volta2/dist/symbol', true)
19
22
 
23
+ require('chartkick');
24
+ require('chart.js');
25
+ require('jquery');
26
+ require('clipboard');
27
+ require('underscore');
28
+ require('@googlemaps/google-maps-services-js');
29
+
20
30
  // XXX: hack for Volta, unfortunately it doesn't provide modules :(
21
31
  import Volta from "../javascript/volta/volta.js"
22
32
 
23
33
  import Vue from 'vue'
24
34
 
35
+ import mermaid from 'mermaid'
36
+
25
37
  import { TweenLite, CSSPlugin } from 'gsap'
26
38
  import GithubCards from '../javascript/github_cards'
27
39
  import VoltaTabbedExamples from '../javascript/volta_tabbed_examples'
@@ -1,4 +1,4 @@
1
- // SASS variable overrides must be declared before loading up Active Admin's styles.
1
+ // Sass variable overrides must be declared before loading up Active Admin's styles.
2
2
  //
3
3
  // To view the variables that Active Admin provides, take a look at
4
4
  // `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
@@ -8,10 +8,10 @@
8
8
  // $sidebar-width: 242px;
9
9
 
10
10
  // Active Admin's got SASS!
11
- @import "active_admin/mixins";
12
- @import "active_admin/base";
11
+ @import "~@activeadmin/activeadmin/src/scss/mixins";
12
+ @import "~@activeadmin/activeadmin/src/scss/base";
13
13
 
14
- // Overriding any non-variable SASS must be done after the fact.
14
+ // Overriding any non-variable Sass must be done after the fact.
15
15
  // For example, to change the default status-tag color:
16
16
  //
17
17
  // .status_tag { background: #6090DB; }
@@ -34,7 +34,6 @@
34
34
  @import "./custom/syntax";
35
35
  @import "./custom/mixins";
36
36
 
37
- @import "./objects/building-block";
38
37
  @import "./objects/card";
39
38
  @import "./objects/collapsible";
40
39
  @import "./objects/content-block";
@@ -19,7 +19,7 @@ em {
19
19
  font-style: italic;
20
20
  }
21
21
 
22
- #logo {
22
+ #logo, #logo-small {
23
23
  display: flex;
24
24
  }
25
25
 
@@ -58,6 +58,7 @@ $icon-callback: "\ea2d";
58
58
  url('/public/assets/fonts/icomoon.svg?vz4q9h#icomoon') format('svg');
59
59
  font-weight: normal;
60
60
  font-style: normal;
61
+ font-display: swap;
61
62
  }
62
63
 
63
64
  [class^="icon-"], [class*=" icon-"] {
@@ -65,12 +65,11 @@
65
65
 
66
66
  #Vlt-sidenav-mobile-trigger {
67
67
  display: inline-block;
68
- margin-top: $unit0;
69
- margin-right: $unit2;
70
68
 
71
69
  svg {
72
70
  height: 24px;
73
71
  width: 24px;
72
+ fill: #131415;
74
73
  }
75
74
 
76
75
  @media #{$M-plus} {
@@ -47,7 +47,7 @@ Rails.application.configure do
47
47
  # Debug mode disables concatenation and preprocessing of assets.
48
48
  # This option may cause significant delays in view rendering with a large
49
49
  # number of complex assets.
50
- config.assets.debug = true
50
+ # config.assets.debug = true
51
51
 
52
52
  config.assets.check_precompiled_asset = false
53
53
 
@@ -20,7 +20,14 @@ Rails.application.configure do
20
20
 
21
21
  # Disable serving static files from the `/public` folder by default since
22
22
  # Apache or NGINX already handles this.
23
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
23
+ if ENV['RAILS_SERVE_STATIC_FILES'].present?
24
+ config.public_file_server.enabled = true
25
+
26
+ config.public_file_server.headers = {
27
+ 'Cache-Control' => 'public, max-age=31536000',
28
+ 'Expires' => 1.year.from_now.to_formatted_s(:rfc822),
29
+ }
30
+ end
24
31
 
25
32
  # Compress JavaScripts and CSS.
26
33
  # config.assets.js_compressor = Uglifier.new(harmony: true)
@@ -13,6 +13,9 @@ ActiveAdmin.setup do |config|
13
13
  #
14
14
  # config.site_title_link = "/"
15
15
 
16
+ # Webpacker
17
+ config.use_webpacker = true
18
+
16
19
  # Set an optional image to be displayed for the header
17
20
  # instead of a string (overrides :site_title)
18
21
  #
@@ -12,5 +12,3 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
12
12
  # application.js, application.css, and all non-JS/CSS in the app/assets
13
13
  # folder are already added.
14
14
  # Rails.application.config.assets.precompile += %w( admin.js admin.css )
15
-
16
- Rails.application.config.assets.paths << Rails.root.join('app', 'assets', 'fonts')