vipassana-design-standards 0.0.3 → 0.0.5

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.
data/index.html CHANGED
@@ -146,17 +146,17 @@
146
146
  <g id="logo-text" :transform="isRtl ? `translate(${textTranslate},0)` : ''">
147
147
  <text v-if="disposition == 'left-one-line'"
148
148
  id="logo-title" :x="textLeft(fullTitle)" :y="pos.firstTitleTop"
149
- :font-family="titleFontFamily" :fill="titleColor" :font-size="titleFontSize">
149
+ :font-family="titleFontFamily" font-weight="500" :fill="titleColor" :font-size="titleFontSize">
150
150
  {{ fullTitle }}
151
151
  </text>
152
152
  <text v-if="disposition != 'left-one-line'"
153
153
  id="logo-title" :x="textLeft(t('vipassana_meditation'))" :y="pos.firstTitleTop"
154
- :font-family="titleFontFamily" :fill="titleColor" :font-size="titleFontSize">
154
+ :font-family="titleFontFamily" font-weight="500" :fill="titleColor" :font-size="titleFontSize">
155
155
  {{ t('vipassana_meditation') }}
156
156
  </text>
157
157
  <text v-if="disposition != 'left-one-line'"
158
158
  id="logo-title" :x="textLeft(t('as_taugh'))" :y="pos.secondTitleTop"
159
- :font-family="titleFontFamily" :fill="titleColor" :font-size="titleFontSize">
159
+ :font-family="titleFontFamily" font-weight="500" :fill="titleColor" :font-size="titleFontSize">
160
160
  {{ t('as_taught') }}
161
161
  </text>
162
162
  <text v-if="displayTagline" id="logo-tagline" :x="textLeft()" :y="pos.taglineTop"
@@ -1,9 +1,17 @@
1
- module Vipassana::LogoHelper
2
- require "vipassana/logos_inline_svg.rb"
1
+ module Vipassana
2
+ module LogoHelper
3
+ require "vipassana/logos_inline_svg.rb"
3
4
 
4
- def vipassana_logo(locale: I18n.locale, disposition: "normal")
5
- data = SVGS[locale.to_sym] || SVGS[:en]
6
- string = data[disposition.to_sym] || data[:normal]
7
- string.html_safe
5
+ def vipassana_logo(locale: I18n.locale, disposition: "normal", height: nil, width: nil)
6
+ height = 70 if height.nil? && width.nil?
7
+
8
+ data = SVGS[locale.to_sym] || SVGS[:en]
9
+ string = data[disposition.to_sym] || data[:normal]
10
+
11
+ string.gsub!("<svg", "<svg height=\"#{height}\"") if height.present?
12
+ string.gsub!("<svg", "<svg width=\"#{width}\"") if width.present?
13
+
14
+ string.html_safe
15
+ end
8
16
  end
9
17
  end