vipassana-design-standards 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/HOW_TO_PUBLISH.md +7 -11
  2. package/README.md +26 -17
  3. package/TODO +9 -11
  4. package/demo/.gitattributes +5 -0
  5. package/demo/.ruby-version +1 -0
  6. package/demo/Gemfile +29 -0
  7. package/demo/Gemfile.lock +182 -0
  8. package/demo/Rakefile +6 -0
  9. package/demo/app/assets/config/manifest.js +2 -0
  10. package/demo/app/assets/stylesheets/application.css +15 -0
  11. package/demo/app/controllers/application_controller.rb +3 -0
  12. package/demo/app/controllers/demo_controller.rb +4 -0
  13. package/demo/app/views/demo/index.html.erb +2 -0
  14. package/demo/app/views/layouts/application.html.erb +73 -0
  15. package/demo/bin/bundle +114 -0
  16. package/demo/bin/rails +4 -0
  17. package/demo/bin/rake +4 -0
  18. package/demo/bin/setup +25 -0
  19. package/demo/config/application.rb +37 -0
  20. package/demo/config/boot.rb +3 -0
  21. package/demo/config/credentials.yml.enc +1 -0
  22. package/demo/config/environment.rb +5 -0
  23. package/demo/config/environments/development.rb +56 -0
  24. package/demo/config/environments/production.rb +72 -0
  25. package/demo/config/environments/test.rb +50 -0
  26. package/demo/config/initializers/assets.rb +12 -0
  27. package/demo/config/initializers/content_security_policy.rb +25 -0
  28. package/demo/config/initializers/filter_parameter_logging.rb +8 -0
  29. package/demo/config/initializers/inflections.rb +16 -0
  30. package/demo/config/initializers/permissions_policy.rb +11 -0
  31. package/demo/config/locales/en.yml +33 -0
  32. package/demo/config/puma.rb +43 -0
  33. package/demo/config/routes.rb +5 -0
  34. package/demo/config.ru +6 -0
  35. package/demo/public/404.html +67 -0
  36. package/demo/public/422.html +67 -0
  37. package/demo/public/500.html +66 -0
  38. package/demo/public/apple-touch-icon-precomposed.png +0 -0
  39. package/demo/public/apple-touch-icon.png +0 -0
  40. package/demo/public/favicon.ico +0 -0
  41. package/demo/public/robots.txt +1 -0
  42. package/demo.html +55 -0
  43. package/dist/0.0.16/css/bootstrap5-theme.css +12623 -0
  44. package/dist/0.0.16/css/bootstrap5-theme.css.map +1 -0
  45. package/dist/0.0.16/css/bootstrap5-theme.min.css +6 -0
  46. package/dist/0.0.16/css/bootstrap5-theme.rtl.css +12586 -0
  47. package/dist/0.0.16/css/bootstrap5-theme.rtl.min.css +6 -0
  48. package/dist/0.0.16/css/fonts-gu.css +65 -0
  49. package/dist/0.0.16/css/fonts-gu.min.css +1 -0
  50. package/dist/0.0.16/css/fonts-ja.css +2399 -0
  51. package/dist/0.0.16/css/fonts-ja.min.css +1 -0
  52. package/dist/0.0.16/css/fonts-km.css +2399 -0
  53. package/dist/0.0.16/css/fonts-km.min.css +1 -0
  54. package/dist/0.0.16/css/fonts.css +472 -0
  55. package/dist/0.0.16/css/fonts.css.map +1 -0
  56. package/dist/0.0.16/css/fonts.min.css +1 -0
  57. package/dist/0.0.16/css/logo.css +135 -0
  58. package/dist/0.0.16/css/logo.css.map +1 -0
  59. package/dist/0.0.16/css/logo.min.css +1 -0
  60. package/dist/0.0.16/js/bootstrap.bundle.js +7075 -0
  61. package/dist/0.0.16/js/bootstrap.bundle.js.map +1 -0
  62. package/dist/0.0.16/js/bootstrap.bundle.min.js +7 -0
  63. package/dist/0.0.16/js/bootstrap.bundle.min.js.map +1 -0
  64. package/dist/css/bootstrap5-theme.css +201 -4552
  65. package/dist/css/bootstrap5-theme.css.map +1 -1
  66. package/dist/css/bootstrap5-theme.min.css +1 -1
  67. package/dist/css/bootstrap5-theme.rtl.css +12586 -0
  68. package/dist/css/bootstrap5-theme.rtl.min.css +6 -0
  69. package/dist/css/fonts-gu.css +65 -0
  70. package/dist/css/fonts-gu.min.css +1 -0
  71. package/dist/css/fonts-ja.css +2399 -0
  72. package/dist/css/fonts-ja.min.css +1 -0
  73. package/dist/css/fonts-km.css +2399 -0
  74. package/dist/css/fonts-km.min.css +1 -0
  75. package/dist/css/fonts.css +23 -4386
  76. package/dist/css/fonts.css.map +1 -1
  77. package/dist/css/fonts.min.css +1 -1
  78. package/dist/css/logo.css +0 -9
  79. package/dist/css/logo.css.map +1 -1
  80. package/dist/css/logo.min.css +1 -0
  81. package/dist/js/bootstrap.bundle.js +7075 -0
  82. package/dist/js/bootstrap.bundle.js.map +1 -0
  83. package/dist/js/bootstrap.bundle.min.js +7 -0
  84. package/dist/js/bootstrap.bundle.min.js.map +1 -0
  85. package/index.html +8 -8
  86. package/lib/vipassana/design_standards_helper.rb +111 -0
  87. package/lib/vipassana/logos_inline_svg.rb +1 -1
  88. package/lib/vipassana/translations.rb +9 -1
  89. package/lib/vipassana-design-standards.rb +1 -1
  90. package/package.json +13 -2
  91. package/src/javascripts/index.js +4 -7
  92. package/src/stylesheets/bootstrap5-theme.scss +11 -1
  93. package/src/stylesheets/fonts.scss +16 -4867
  94. package/src/stylesheets/layout/vds-header.scss +8 -0
  95. package/src/stylesheets/layout/vds-layout.scss +6 -5
  96. package/src/stylesheets/logo.scss +1 -8
  97. package/src/stylesheets/specific-fonts/fonts-gu.css +65 -0
  98. package/src/stylesheets/specific-fonts/fonts-ja.css +2399 -0
  99. package/src/stylesheets/specific-fonts/fonts-km.css +2399 -0
  100. package/vipassana-design-standards.gemspec +1 -1
  101. package/lib/vipassana/logo_helper.rb +0 -50
package/HOW_TO_PUBLISH.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ## Compile CSS
2
2
 
3
- Install compilers
3
+ Install compilers libs
4
4
  ```
5
- npm install -g sass clean-css-cli
5
+ npm install -g sass clean-css-cli rtlcss
6
6
  ```
7
7
 
8
8
  Install local dependecies
@@ -12,24 +12,20 @@ yarn
12
12
 
13
13
  Compile
14
14
  ```
15
- sass --load-path=node_modules src/stylesheets/bootstrap5-theme.scss dist/css/bootstrap5-theme.css
16
- sass src/stylesheets/fonts.scss dist/css/fonts.css
17
- sass src/stylesheets/logo.scss dist/css/logo.css
18
-
19
- cleancss -o dist/css/bootstrap5-theme.min.css dist/css/bootstrap5-theme.css
20
- cleancss -o dist/css/fonts.min.css dist/css/fonts.css
15
+ npm run build
21
16
  ```
22
17
 
23
18
  ## Deploy
24
19
 
25
- Npm package: Bump version in `package.json` and run `npm publish`
20
+ Bump version in both `package.json` and `vipassana-design-standards.gemspec`
26
21
 
27
- Gem : Bum version in `vipassana-design-standards.gemspec` and run
28
22
  ```
23
+ npm run dist
29
24
  gem build vipassana-design-standards.gemspec
30
25
  gem push vipassana-design-standards-XXXX.gem
31
26
  ```
32
27
 
33
28
  Global replace `?ver=old_version` by `?ver=new_version`
34
29
 
35
- Update https://design-standards.dhamma.org by pushing new files via FTP
30
+ Update https://design-standards.dhamma.org by pushing new files via FTP
31
+ At least you need to push the new versionned dist folder
package/README.md CHANGED
@@ -21,7 +21,7 @@ If you are not using our `bootstrap5-theme` (see below), then you need to manual
21
21
  <!-- Load fonts -->
22
22
  <link rel="stylesheet" href="https://design-standards.dhamma.org/dist/css/fonts.css" />
23
23
 
24
- <!-- If you use vipassana_logo_html, load this specific file -->
24
+ <!-- If you use vds_logo_html, load this specific file -->
25
25
  <link rel="stylesheet" href="https://design-standards.dhamma.org/dist/css/logo.css" />
26
26
  ```
27
27
 
@@ -29,7 +29,7 @@ If you are not using our `bootstrap5-theme` (see below), then you need to manual
29
29
 
30
30
  Install the gem
31
31
  ```
32
- gem install vipassana-design-standard
32
+ gem install vipassana-design-standards
33
33
  ```
34
34
 
35
35
  Adds helper to your application
@@ -37,7 +37,7 @@ Adds helper to your application
37
37
  class ApplicationController < ActionController::Base
38
38
  # ...
39
39
 
40
- helper Vipassana::LogoHelper
40
+ helper Vipassana::DesignStandardsHelper
41
41
 
42
42
  # ...
43
43
  end
@@ -46,20 +46,20 @@ end
46
46
  Use the helpers
47
47
  ```html
48
48
  <!-- SVG logo -->
49
- <%= vipassana_logo_svg %>
50
- <%= vipassana_logo_svg(height: 80) %>
51
- <%= vipassana_logo_svg(width: 500) %>
52
- <%= vipassana_logo_svg(disposition: "mobile") %>
49
+ <%= vds_logo_svg %>
50
+ <%= vds_logo_svg(height: 80) %>
51
+ <%= vds_logo_svg(width: 500) %>
52
+ <%= vds_logo_svg(disposition: "mobile") %>
53
53
  <!-- All options -->
54
- <%= vipassana_logo_svg(locale: "fr", disposition: "default", tagline: true, height: 200) %>
54
+ <%= vds_logo_svg(locale: "fr", disposition: "default", tagline: true, height: 200) %>
55
55
 
56
56
  <!-- HTML Logo -->
57
57
  <!-- logo.css will need to be loaded, see above -->
58
- <%= vipassana_logo_html %>
59
- <%= vipassana_logo_html(size: 10) %>
60
- <%= vipassana_logo_html(dispositon: "mobile") %>
58
+ <%= vds_logo_html %>
59
+ <%= vds_logo_html(size: 10) %>
60
+ <%= vds_logo_html(dispositon: "mobile") %>
61
61
  <!-- All options -->
62
- <%= vipassana_logo_html(locale: "fr", disposition: "default", tagline: true, size: 18, dark: false) %>
62
+ <%= vds_logo_html(locale: "fr", disposition: "default", tagline: true, size: 18, dark: false) %>
63
63
  ```
64
64
 
65
65
  ### Without ruby
@@ -83,12 +83,21 @@ The best way to implement the whole design is to use our custom `bootstrap5-them
83
83
  - fonts styles
84
84
  - logo styles
85
85
 
86
+ ### Load with the gem (recommended)
87
+
88
+ See a [complete example here](https://github.com/dhammaorg/design-standards/blob/master/demo/app/views/layouts/application.html.erb)
89
+ ```html
90
+ <head>
91
+ <%= vds_bootstrap_theme_css_tag %>
92
+ <%= vds_bootstrap_theme_js_tag %>
93
+ </head>
94
+ ```
95
+
86
96
  ### Load with CDN
87
97
 
88
98
  ```html
89
99
  <link rel="stylesheet" href="https://design-standards.dhamma.org/dist/css/bootstrap5-theme.min.css" />
90
- <!-- Don't forget to also include bootstrap javascript -->
91
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
100
+ <script src="https://design-standards.dhamma.org/dist/js/bootstrap.bundle.min.js"></script>
92
101
  ```
93
102
 
94
103
  ### Install locally
@@ -102,7 +111,7 @@ yarn add vipassana-design-standards
102
111
  Then include it
103
112
  ```
104
113
  // application.scss
105
- @import "vipassana-design-standards/scss/bootstrap5-theme";
114
+ @import "vipassana-design-standards/src/stylesheets/bootstrap5-theme";
106
115
  ```
107
116
 
108
117
  ```
@@ -114,13 +123,13 @@ import 'bootstrap5';
114
123
 
115
124
  We have made a custom layout, with basic header and sidenav. In case you want to use it, you need to align with following page structure
116
125
  ```html
117
- <html lang="xx">
126
+ <html lang="xx" class="vds-html">
118
127
  <body class="vds-body">
119
128
  <div class="vds-header-and-content">
120
129
  <!-- Header -->
121
130
  <header class="vds-header">
122
131
  <div class="vds-container">
123
- <a href class="vds-logo-link"><!-- Logo vipassana_logo_svg --></a>
132
+ <a href class="vds-logo-link"><!-- Logo vds_logo_svg --></a>
124
133
  </div>
125
134
  </header>
126
135
 
package/TODO CHANGED
@@ -1,16 +1,14 @@
1
- generate all logos, ensure they all work okay
1
+ make repo public, and use jsdeliver
2
+ compile also bootstrap js and make it avaiable with CDN
3
+ -> ask sysadmin for them opportunity to comment
2
4
 
3
- provide zip with to download in th home page with all logo and fonts
5
+ in CALM, VIS, DO use VDS css and not scss so it's cached
4
6
 
5
- include "dark" version of logo : title in shiny gold, tagline in light grey, so it can be displayed on dark background
7
+ fonts: provide Noto font or not? only on demand?
8
+ fonts: make font-weight consistent
9
+ -> start with easy one, and optimize later if needed
6
10
 
7
- can we use cloudfront to deliver logo? or jsdeliver
8
- https://cdn.jsdelivr.net/gh/dhammaorg/design-standards/logo-en.svg
11
+ open sans
9
12
 
10
- regenarate
11
- hi
12
-
13
- try firefox, hindi and telugu is cropped on the top
14
-
15
- handle bottom to top languages : hi, gu, mr
13
+ locale picker make it the same everywhere?
16
14
 
@@ -0,0 +1,5 @@
1
+ # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2
+
3
+
4
+ # Mark any vendored files as having been vendored.
5
+ vendor/* linguist-vendored
@@ -0,0 +1 @@
1
+ ruby-2.7.4
package/demo/Gemfile ADDED
@@ -0,0 +1,29 @@
1
+ source "https://rubygems.org"
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby "2.7.4"
5
+
6
+ # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7
+ gem "rails", "~> 7.0.5"
8
+
9
+ # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10
+ gem "sprockets-rails"
11
+
12
+ # Use the Puma web server [https://github.com/puma/puma]
13
+ gem "puma", "~> 5.0"
14
+
15
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
16
+ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
17
+
18
+ group :development, :test do
19
+ # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
20
+ gem "debug", platforms: %i[ mri mingw x64_mingw ]
21
+ end
22
+
23
+ group :development do
24
+ # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
25
+ # gem "spring"
26
+ end
27
+
28
+
29
+ gem "vipassana-design-standards", path: "/home/websites/design-standards"
@@ -0,0 +1,182 @@
1
+ PATH
2
+ remote: /home/websites/design-standards
3
+ specs:
4
+ vipassana-design-standards (0.0.16)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ actioncable (7.0.5)
10
+ actionpack (= 7.0.5)
11
+ activesupport (= 7.0.5)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (7.0.5)
15
+ actionpack (= 7.0.5)
16
+ activejob (= 7.0.5)
17
+ activerecord (= 7.0.5)
18
+ activestorage (= 7.0.5)
19
+ activesupport (= 7.0.5)
20
+ mail (>= 2.7.1)
21
+ net-imap
22
+ net-pop
23
+ net-smtp
24
+ actionmailer (7.0.5)
25
+ actionpack (= 7.0.5)
26
+ actionview (= 7.0.5)
27
+ activejob (= 7.0.5)
28
+ activesupport (= 7.0.5)
29
+ mail (~> 2.5, >= 2.5.4)
30
+ net-imap
31
+ net-pop
32
+ net-smtp
33
+ rails-dom-testing (~> 2.0)
34
+ actionpack (7.0.5)
35
+ actionview (= 7.0.5)
36
+ activesupport (= 7.0.5)
37
+ rack (~> 2.0, >= 2.2.4)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.0)
40
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
41
+ actiontext (7.0.5)
42
+ actionpack (= 7.0.5)
43
+ activerecord (= 7.0.5)
44
+ activestorage (= 7.0.5)
45
+ activesupport (= 7.0.5)
46
+ globalid (>= 0.6.0)
47
+ nokogiri (>= 1.8.5)
48
+ actionview (7.0.5)
49
+ activesupport (= 7.0.5)
50
+ builder (~> 3.1)
51
+ erubi (~> 1.4)
52
+ rails-dom-testing (~> 2.0)
53
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
54
+ activejob (7.0.5)
55
+ activesupport (= 7.0.5)
56
+ globalid (>= 0.3.6)
57
+ activemodel (7.0.5)
58
+ activesupport (= 7.0.5)
59
+ activerecord (7.0.5)
60
+ activemodel (= 7.0.5)
61
+ activesupport (= 7.0.5)
62
+ activestorage (7.0.5)
63
+ actionpack (= 7.0.5)
64
+ activejob (= 7.0.5)
65
+ activerecord (= 7.0.5)
66
+ activesupport (= 7.0.5)
67
+ marcel (~> 1.0)
68
+ mini_mime (>= 1.1.0)
69
+ activesupport (7.0.5)
70
+ concurrent-ruby (~> 1.0, >= 1.0.2)
71
+ i18n (>= 1.6, < 2)
72
+ minitest (>= 5.1)
73
+ tzinfo (~> 2.0)
74
+ builder (3.2.4)
75
+ concurrent-ruby (1.2.2)
76
+ crass (1.0.6)
77
+ date (3.3.3)
78
+ debug (1.8.0)
79
+ irb (>= 1.5.0)
80
+ reline (>= 0.3.1)
81
+ erubi (1.12.0)
82
+ globalid (1.1.0)
83
+ activesupport (>= 5.0)
84
+ i18n (1.14.1)
85
+ concurrent-ruby (~> 1.0)
86
+ io-console (0.6.0)
87
+ irb (1.7.0)
88
+ reline (>= 0.3.0)
89
+ loofah (2.21.3)
90
+ crass (~> 1.0.2)
91
+ nokogiri (>= 1.12.0)
92
+ mail (2.8.1)
93
+ mini_mime (>= 0.1.1)
94
+ net-imap
95
+ net-pop
96
+ net-smtp
97
+ marcel (1.0.2)
98
+ method_source (1.0.0)
99
+ mini_mime (1.1.2)
100
+ mini_portile2 (2.8.2)
101
+ minitest (5.18.0)
102
+ net-imap (0.3.6)
103
+ date
104
+ net-protocol
105
+ net-pop (0.1.2)
106
+ net-protocol
107
+ net-protocol (0.2.1)
108
+ timeout
109
+ net-smtp (0.3.3)
110
+ net-protocol
111
+ nio4r (2.5.9)
112
+ nokogiri (1.15.2)
113
+ mini_portile2 (~> 2.8.2)
114
+ racc (~> 1.4)
115
+ puma (5.6.5)
116
+ nio4r (~> 2.0)
117
+ racc (1.7.1)
118
+ rack (2.2.7)
119
+ rack-test (2.1.0)
120
+ rack (>= 1.3)
121
+ rails (7.0.5)
122
+ actioncable (= 7.0.5)
123
+ actionmailbox (= 7.0.5)
124
+ actionmailer (= 7.0.5)
125
+ actionpack (= 7.0.5)
126
+ actiontext (= 7.0.5)
127
+ actionview (= 7.0.5)
128
+ activejob (= 7.0.5)
129
+ activemodel (= 7.0.5)
130
+ activerecord (= 7.0.5)
131
+ activestorage (= 7.0.5)
132
+ activesupport (= 7.0.5)
133
+ bundler (>= 1.15.0)
134
+ railties (= 7.0.5)
135
+ rails-dom-testing (2.0.3)
136
+ activesupport (>= 4.2.0)
137
+ nokogiri (>= 1.6)
138
+ rails-html-sanitizer (1.6.0)
139
+ loofah (~> 2.21)
140
+ nokogiri (~> 1.14)
141
+ railties (7.0.5)
142
+ actionpack (= 7.0.5)
143
+ activesupport (= 7.0.5)
144
+ method_source
145
+ rake (>= 12.2)
146
+ thor (~> 1.0)
147
+ zeitwerk (~> 2.5)
148
+ rake (13.0.6)
149
+ reline (0.3.5)
150
+ io-console (~> 0.5)
151
+ sprockets (4.2.0)
152
+ concurrent-ruby (~> 1.0)
153
+ rack (>= 2.2.4, < 4)
154
+ sprockets-rails (3.4.2)
155
+ actionpack (>= 5.2)
156
+ activesupport (>= 5.2)
157
+ sprockets (>= 3.0.0)
158
+ thor (1.2.2)
159
+ timeout (0.3.2)
160
+ tzinfo (2.0.6)
161
+ concurrent-ruby (~> 1.0)
162
+ websocket-driver (0.7.5)
163
+ websocket-extensions (>= 0.1.0)
164
+ websocket-extensions (0.1.5)
165
+ zeitwerk (2.6.8)
166
+
167
+ PLATFORMS
168
+ ruby
169
+
170
+ DEPENDENCIES
171
+ debug
172
+ puma (~> 5.0)
173
+ rails (~> 7.0.5)
174
+ sprockets-rails
175
+ tzinfo-data
176
+ vipassana-design-standards!
177
+
178
+ RUBY VERSION
179
+ ruby 2.7.4p191
180
+
181
+ BUNDLED WITH
182
+ 2.1.4
package/demo/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,2 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ helper Vipassana::DesignStandardsHelper
3
+ end
@@ -0,0 +1,4 @@
1
+ class DemoController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ <h1>Demo#index</h1>
2
+ <p>Find me in app/views/demo/index.html.erb</p>
@@ -0,0 +1,73 @@
1
+ <!DOCTYPE html>
2
+ <%- locale = "en" %>
3
+
4
+ <html class="vds-html" lang="<%= locale %>" dir="<%= is_rtl?(locale) && 'rtl' %>">
5
+ <head>
6
+ <title>Demo</title>
7
+ <meta name="viewport" content="width=device-width,initial-scale=1">
8
+ <%= csrf_meta_tags %>
9
+ <%= csp_meta_tag %>
10
+
11
+ <%= stylesheet_link_tag "application" %>
12
+
13
+ <%= vds_favicon_tag %>
14
+ <%= vds_bootstrap_theme_css_tag(locale: locale, localhost: true) %>
15
+ <%= vds_bootstrap_theme_js_tag(locale: locale, localhost: true) %>
16
+ </head>
17
+
18
+ <body class="vds-body">
19
+ <div class="vds-header-and-content">
20
+ <!-- Header -->
21
+ <header class="vds-header">
22
+ <div class="vds-container d-flex">
23
+ <!-- Logo -->
24
+ <a href class="vds-logo-link me-auto">
25
+ <%= vds_logo_html(locale: locale, size: 14) %>
26
+ </a>
27
+
28
+ <div class="d-flex align-items-center">
29
+ <!-- Locale Picker -->
30
+ <span class="d-flex align-items-center flex-shrink-0">
31
+ <%= vds_icon_locale %>
32
+ </span>
33
+ <select class="form-select vds-locale-picker">
34
+ <option selected>English</option>
35
+ </select>
36
+
37
+ <!-- Account Dropdown -->
38
+ <div class="dropdown account-dropdown">
39
+ <button class="btn btn-link pe-0 dropdown-toggle text-secondary" id="header-menu" data-bs-toggle="dropdown"
40
+ data-bs-auto-close="outside" aria-expanded="false">
41
+ <%= vds_icon_account %>
42
+ </button>
43
+ <ul class="dropdown-menu dropdown-menu-end dropdown-with-modal-inside" aria-labelledby="header-menu">
44
+ <li><a class="dropdown-item" href="#">Link</a></li>
45
+ </ul>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </header>
50
+
51
+ <!-- Page -->
52
+ <div class="vds-page vds-container">
53
+ <div class="vds-sidenav">
54
+ <ul>
55
+ <li><a href="#" class="active">Home Page</a></li>
56
+ <li><a href="#">My Settings</a></li>
57
+ </ul>
58
+ </div>
59
+ <div class="vds-page-content">
60
+ <!-- Page content -->
61
+ <%= yield %>
62
+ </div>
63
+ </div>
64
+ </div>
65
+
66
+ <!-- Footer -->
67
+ <footer class="vds-footer">
68
+ <div class="vds-container">
69
+ Footer
70
+ </div>
71
+ </footer>
72
+ </body>
73
+ </html>
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env ruby2.7
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'bundle' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "rubygems"
12
+
13
+ m = Module.new do
14
+ module_function
15
+
16
+ def invoked_as_script?
17
+ File.expand_path($0) == File.expand_path(__FILE__)
18
+ end
19
+
20
+ def env_var_version
21
+ ENV["BUNDLER_VERSION"]
22
+ end
23
+
24
+ def cli_arg_version
25
+ return unless invoked_as_script? # don't want to hijack other binstubs
26
+ return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
+ bundler_version = nil
28
+ update_index = nil
29
+ ARGV.each_with_index do |a, i|
30
+ if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
+ bundler_version = a
32
+ end
33
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
+ bundler_version = $1
35
+ update_index = i
36
+ end
37
+ bundler_version
38
+ end
39
+
40
+ def gemfile
41
+ gemfile = ENV["BUNDLE_GEMFILE"]
42
+ return gemfile if gemfile && !gemfile.empty?
43
+
44
+ File.expand_path("../../Gemfile", __FILE__)
45
+ end
46
+
47
+ def lockfile
48
+ lockfile =
49
+ case File.basename(gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
+ else "#{gemfile}.lock"
52
+ end
53
+ File.expand_path(lockfile)
54
+ end
55
+
56
+ def lockfile_version
57
+ return unless File.file?(lockfile)
58
+ lockfile_contents = File.read(lockfile)
59
+ return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
+ Regexp.last_match(1)
61
+ end
62
+
63
+ def bundler_version
64
+ @bundler_version ||=
65
+ env_var_version || cli_arg_version ||
66
+ lockfile_version
67
+ end
68
+
69
+ def bundler_requirement
70
+ return "#{Gem::Requirement.default}.a" unless bundler_version
71
+
72
+ bundler_gem_version = Gem::Version.new(bundler_version)
73
+
74
+ requirement = bundler_gem_version.approximate_recommendation
75
+
76
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
+
78
+ requirement += ".a" if bundler_gem_version.prerelease?
79
+
80
+ requirement
81
+ end
82
+
83
+ def load_bundler!
84
+ ENV["BUNDLE_GEMFILE"] ||= gemfile
85
+
86
+ activate_bundler
87
+ end
88
+
89
+ def activate_bundler
90
+ gem_error = activation_error_handling do
91
+ gem "bundler", bundler_requirement
92
+ end
93
+ return if gem_error.nil?
94
+ require_error = activation_error_handling do
95
+ require "bundler/version"
96
+ end
97
+ return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
+ warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
+ exit 42
100
+ end
101
+
102
+ def activation_error_handling
103
+ yield
104
+ nil
105
+ rescue StandardError, LoadError => e
106
+ e
107
+ end
108
+ end
109
+
110
+ m.load_bundler!
111
+
112
+ if m.invoked_as_script?
113
+ load Gem.bin_path("bundler", "bundle")
114
+ end
package/demo/bin/rails ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path("../config/application", __dir__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
package/demo/bin/rake ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../config/boot"
3
+ require "rake"
4
+ Rake.application.run
package/demo/bin/setup ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ require "fileutils"
3
+
4
+ # path to your application root.
5
+ APP_ROOT = File.expand_path("..", __dir__)
6
+
7
+ def system!(*args)
8
+ system(*args) || abort("\n== Command #{args} failed ==")
9
+ end
10
+
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts "== Installing dependencies =="
17
+ system! "gem install bundler --conservative"
18
+ system("bundle check") || system!("bundle install")
19
+
20
+ puts "\n== Removing old logs and tempfiles =="
21
+ system! "bin/rails log:clear tmp:clear"
22
+
23
+ puts "\n== Restarting application server =="
24
+ system! "bin/rails restart"
25
+ end