vipassana-design-standards 0.0.15 → 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.
@@ -1,6 +1,6 @@
|
|
1
1
|
# this is a copy of i18n.js, using ruby syntax instead of javascript syntax
|
2
2
|
|
3
|
-
|
3
|
+
VDS_TRANSLATIONS = {
|
4
4
|
"en": {
|
5
5
|
"language": "English",
|
6
6
|
"vipassana_meditation": "Vipassana Meditation",
|
@@ -8,6 +8,14 @@ VIPASSANA_TRANSLATIONS = {
|
|
8
8
|
"in_the_tradition": "in the Tradition of Sayagyi U Ba Khin",
|
9
9
|
"full": "Vipassana Meditation As Taught By S.N. Goenka in the Tradition of Sayagyi U Ba Khin",
|
10
10
|
},
|
11
|
+
"ar": {
|
12
|
+
"rtl": true,
|
13
|
+
"language": "Arabic",
|
14
|
+
"vipassana_meditation": "تأمل فيباسانا",
|
15
|
+
"as_taught": "كما تم تدريسه بواسطة S.N. جوينكا",
|
16
|
+
"in_the_tradition": "في تقليد Sayagyi U Ba Khin",
|
17
|
+
"full": "تأمل فيباسانا كما علمه S.N. Goenka في تقليد Sayagyi U Ba Khin",
|
18
|
+
},
|
11
19
|
"bg": {
|
12
20
|
"language": "Bulgarian",
|
13
21
|
"vipassana_meditation": "Випассана Медитация",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vipassana-design-standards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dhamma workers
|
@@ -19,7 +19,7 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- lib/vipassana-design-standards.rb
|
22
|
-
- lib/vipassana/
|
22
|
+
- lib/vipassana/design_standards_helper.rb
|
23
23
|
- lib/vipassana/logos_inline_svg.rb
|
24
24
|
- lib/vipassana/translations.rb
|
25
25
|
- lib/vipassana/translations_generator.rb
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
|
-
rubygems_version: 3.
|
44
|
+
rubygems_version: 3.1.6
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Include Vipassana SVG logos in your pages
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module Vipassana
|
2
|
-
module LogoHelper
|
3
|
-
require "vipassana/logos_inline_svg.rb"
|
4
|
-
require "vipassana/translations.rb"
|
5
|
-
|
6
|
-
def vipassana_logo_svg(locale: I18n.locale, disposition: "default", tagline: true, height: nil, width: nil)
|
7
|
-
height = 70 if height.nil? && width.nil?
|
8
|
-
|
9
|
-
data = VIPASSANA_SVGS[locale.to_sym] || VIPASSANA_SVGS[:en]
|
10
|
-
disposition += '-no-tagline' if tagline == false
|
11
|
-
string = data[disposition.to_sym] || data[:normal]
|
12
|
-
|
13
|
-
string.gsub!("<svg", "<svg height=\"#{height}\"") if height.present?
|
14
|
-
string.gsub!("<svg", "<svg width=\"#{width}\"") if width.present?
|
15
|
-
|
16
|
-
string.html_safe
|
17
|
-
end
|
18
|
-
|
19
|
-
def vipassana_logo_html(locale: I18n.locale, disposition: "default", size: '18', tagline: true, dark: false)
|
20
|
-
trans = VIPASSANA_TRANSLATIONS[locale.to_sym] || VIPASSANA_TRANSLATIONS[:en]
|
21
|
-
|
22
|
-
if disposition == "mobile"
|
23
|
-
disposition = "left-two-lines"
|
24
|
-
tagline = false
|
25
|
-
end
|
26
|
-
|
27
|
-
result = <<-HTML
|
28
|
-
<div class="vipassana-logo"
|
29
|
-
data-disposition="#{disposition}"
|
30
|
-
data-tagline="#{tagline}"
|
31
|
-
data-dark-mode="#{dark}"
|
32
|
-
data-reverse="#{trans[:reverse]}"
|
33
|
-
style="font-size: #{size}px">
|
34
|
-
<img class="logo-wheel" src="https://design-standards.dhamma.org/dist/dhamma-wheel.svg" />
|
35
|
-
<div class="logo-text">
|
36
|
-
<h1 class="logo-title">
|
37
|
-
<span data-start-with="#{trans[:vipassana_meditation].at(0).downcase}">
|
38
|
-
#{trans[:vipassana_meditation]}
|
39
|
-
</span>
|
40
|
-
<span class="logo-space"> </span>
|
41
|
-
<span>#{trans[:as_taught]}</span>
|
42
|
-
</h1>
|
43
|
-
<div class="logo-subtitle">#{trans[:in_the_tradition]}</div>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
HTML
|
47
|
-
result.html_safe
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|