vipassana-design-standards 0.0.18 → 0.0.20

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 (57) hide show
  1. package/HOW_TO_PUBLISH.md +1 -3
  2. package/about.html +66 -0
  3. package/dist/0.0.19/css/bootstrap5-theme.css +12637 -0
  4. package/dist/0.0.19/css/bootstrap5-theme.css.map +1 -0
  5. package/dist/0.0.19/css/bootstrap5-theme.min.css +6 -0
  6. package/dist/0.0.19/css/bootstrap5-theme.rtl.css +12600 -0
  7. package/dist/0.0.19/css/bootstrap5-theme.rtl.min.css +6 -0
  8. package/dist/0.0.19/css/fonts-gu.css +65 -0
  9. package/dist/0.0.19/css/fonts-gu.min.css +1 -0
  10. package/dist/0.0.19/css/fonts-ja.css +2399 -0
  11. package/dist/0.0.19/css/fonts-ja.min.css +1 -0
  12. package/dist/0.0.19/css/fonts-km.css +2399 -0
  13. package/dist/0.0.19/css/fonts-km.min.css +1 -0
  14. package/dist/0.0.19/css/fonts.css +472 -0
  15. package/dist/0.0.19/css/fonts.css.map +1 -0
  16. package/dist/0.0.19/css/fonts.min.css +1 -0
  17. package/dist/0.0.19/css/logo.css +135 -0
  18. package/dist/0.0.19/css/logo.css.map +1 -0
  19. package/dist/0.0.19/css/logo.min.css +1 -0
  20. package/dist/0.0.19/js/bootstrap5-theme.min.js +37 -0
  21. package/dist/0.0.19/js/bootstrap5-theme.min.js.map +1 -0
  22. package/dist/0.0.20/css/bootstrap5-theme.css +12637 -0
  23. package/dist/0.0.20/css/bootstrap5-theme.css.map +1 -0
  24. package/dist/0.0.20/css/bootstrap5-theme.min.css +6 -0
  25. package/dist/0.0.20/css/bootstrap5-theme.rtl.css +12600 -0
  26. package/dist/0.0.20/css/bootstrap5-theme.rtl.min.css +6 -0
  27. package/dist/0.0.20/css/fonts-gu.css +65 -0
  28. package/dist/0.0.20/css/fonts-gu.min.css +1 -0
  29. package/dist/0.0.20/css/fonts-ja.css +2399 -0
  30. package/dist/0.0.20/css/fonts-ja.min.css +1 -0
  31. package/dist/0.0.20/css/fonts-km.css +2399 -0
  32. package/dist/0.0.20/css/fonts-km.min.css +1 -0
  33. package/dist/0.0.20/css/fonts.css +472 -0
  34. package/dist/0.0.20/css/fonts.css.map +1 -0
  35. package/dist/0.0.20/css/fonts.min.css +1 -0
  36. package/dist/0.0.20/css/logo.css +135 -0
  37. package/dist/0.0.20/css/logo.css.map +1 -0
  38. package/dist/0.0.20/css/logo.min.css +1 -0
  39. package/dist/0.0.20/js/bootstrap5-theme.min.js +37 -0
  40. package/dist/0.0.20/js/bootstrap5-theme.min.js.map +1 -0
  41. package/dist/0.0.20/js/helper.js +96 -0
  42. package/dist/0.0.20/js/i18n.js +309 -0
  43. package/dist/css/bootstrap5-theme.css +5 -0
  44. package/dist/css/bootstrap5-theme.css.map +1 -1
  45. package/dist/css/bootstrap5-theme.min.css +1 -1
  46. package/dist/css/bootstrap5-theme.rtl.css +5 -0
  47. package/dist/css/bootstrap5-theme.rtl.min.css +1 -1
  48. package/dist/js/helper.js +96 -0
  49. package/dist/js/i18n.js +309 -0
  50. package/index.html +45 -17
  51. package/package.json +7 -4
  52. package/replace-version.js +24 -0
  53. package/src/javascripts/helper.js +96 -0
  54. package/src/javascripts/index.js +6 -3
  55. package/src/stylesheets/custom-bootstrap-utilities.scss +6 -0
  56. package/src/stylesheets/index.css +11 -2
  57. package/vipassana-design-standards.gemspec +3 -3
@@ -0,0 +1,96 @@
1
+ import i18n from './i18n.js'
2
+
3
+ function isRtl(locale) {
4
+ return ['ar', 'fa', 'he'].includes(locale)
5
+ }
6
+
7
+ export function vdsFaviconTag() {
8
+ return `<link rel="shortcut icon" type="image/x-icon" href="https://design-standards.dhamma.org/dist/favicon.png">`
9
+ }
10
+
11
+ function vdsAssetUrl(path, localhost = false) {
12
+ // For localhost dev, just run vscode liveserver
13
+ if (localhost) return `http://localhost:5500/dist/${path}`
14
+
15
+ return `https://design-standards.dhamma.org/dist/@PACKAGE_VERSION@/${path}`
16
+ }
17
+
18
+ function stylesheetLinkTag(url) {
19
+ return `<link rel="stylesheet" type="text/css" href="${url}">`
20
+ }
21
+
22
+ function javascriptIncludeTag(url) {
23
+ return `<script type="text/javascript" src="${url}"></script>`
24
+ }
25
+
26
+ export function vdsBootstrapThemeCssTag(locale, localhost = false) {
27
+ let tags = [
28
+ stylesheetLinkTag(vdsAssetUrl(`css/bootstrap5-theme${isRtl(locale) ? '.rtl' : ''}.min.css`, localhost))
29
+ ]
30
+ // Add specific fonts for languages not compatible with Footlight and Lato
31
+ if (['gu', 'ja', 'km'].includes(locale))
32
+ tags.push(stylesheetLinkTag(vdsAssetUrl(`css/fonts-${locale}.min.css`)))
33
+
34
+ return tags.join('')
35
+ }
36
+
37
+ export function vdsBootstrapThemeJsTag(locale, localhost = false) {
38
+ return javascriptIncludeTag(vdsAssetUrl("js/bootstrap5-theme.min.js", localhost))
39
+ }
40
+
41
+ export function vdsLogo(locale, disposition = "default", size = '18', tagline = true, dark = false) {
42
+ let trans = i18n[locale] || i18n.en
43
+
44
+ if (disposition == "mobile") {
45
+ disposition = "left-two-lines"
46
+ tagline = false
47
+ }
48
+
49
+ return `
50
+ <div class="vipassana-logo"
51
+ data-disposition="${disposition}"
52
+ data-tagline="${tagline}"
53
+ data-dark-mode="${dark}"
54
+ data-reverse="${trans.reverse}"
55
+ style="font-size: ${size}px">
56
+ <img class="logo-wheel" src="https://design-standards.dhamma.org/dist/dhamma-wheel.svg" />
57
+ <div class="logo-text">
58
+ <h1 class="logo-title">
59
+ <span data-start-with="${trans.vipassana_meditation.charAt(0).toLowerCase()}">
60
+ ${trans.vipassana_meditation}
61
+ </span>
62
+ <span class="logo-space">&nbsp;</span>
63
+ <span>${trans.as_taught}</span>
64
+ </h1>
65
+ <div class="logo-subtitle">${trans.in_the_tradition}</div>
66
+ </div>
67
+ </div>
68
+ `
69
+ }
70
+
71
+ // Some icons from bootstrap icons, so all websites use the same
72
+ export function vdsIconLocale() {
73
+ return `
74
+ <svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" fill="currentColor" class="bi bi-translate" viewBox="0 0 16 16">
75
+ <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/>
76
+ <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/>
77
+ </svg>
78
+ `
79
+ }
80
+
81
+ export function vdsIconAccount() {
82
+ return `
83
+ <svg xmlns="http://www.w3.org/2000/svg" width="2.2em" height="2.2em" fill="currentColor" class="bi bi-person-circle" viewBox="0 0 16 16">
84
+ <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
85
+ <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
86
+ </svg>
87
+ `
88
+ }
89
+
90
+ export function vdsIconMenu() {
91
+ return `
92
+ <svg xmlns="http://www.w3.org/2000/svg" width="1.8em" height="1.8em" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">
93
+ <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
94
+ </svg>
95
+ `
96
+ }
@@ -1,5 +1,5 @@
1
1
  // i18n JSON
2
- import i18nJson from './i18n.js?ver=0.17'
2
+ import i18nJson from './i18n.js?ver=0.20'
3
3
 
4
4
  // Dependencies
5
5
  import { Canvg } from 'https://cdn.skypack.dev/canvg@^4.0.0';
@@ -33,7 +33,8 @@ export default {
33
33
  { color: "#B78730", text: "Buttons and graphical elements", name: "Light Gold" },
34
34
  { color: "#1E3461", text: "Header text, buttons and graphical elements", name: "Blue" },
35
35
  { color: "#4F4D47", text: "Paragraph Text", name: "Grey" },
36
- ]
36
+ ],
37
+ logoCodeLarge: false
37
38
  }
38
39
  },
39
40
  computed: {
@@ -188,7 +189,9 @@ export default {
188
189
  return this.night ? "#ffffff90" : "#4F4D47"
189
190
  },
190
191
  logoCode() {
191
- return `<img height="64" src="https://design-standards.dhamma.org/dist/logos/logo-${this.locale}.png" alt="${this.fullTitle}"/>`
192
+ let height= this.logoCodeLarge ? 80 : 64
193
+ let suffix = this.logoCodeLarge ? '-large': ''
194
+ return `<img height="${height}" src="https://design-standards.dhamma.org/dist/logos/logo-${this.locale}${suffix}.png" alt="${this.fullTitle}"/>`
192
195
  }
193
196
  },
194
197
  mounted() {
@@ -23,6 +23,12 @@
23
23
  --bs-box-shadow: #{$box-shadow};
24
24
  --bs-box-shadow-sm: #{$box-shadow-sm};
25
25
  --bs-box-shadow-lg: #{$box-shadow-lg};
26
+ // those variables are used to make custom inputs similar to bootstrap inputs
27
+ --bs-input-padding: #{$input-padding-y} #{$input-padding-x};
28
+ --bs-form-floating-padding-x: #{$form-floating-padding-x};
29
+ --bs-form-floating-padding-y: #{$form-floating-padding-y};
30
+ --bs-form-floating-input-padding-t: #{$form-floating-input-padding-t};
31
+ --bs-form-floating-input-padding-b: #{$form-floating-input-padding-b};
26
32
 
27
33
  // adds other variables
28
34
  --layout-padding: 1rem;
@@ -29,6 +29,9 @@ header {
29
29
  font-size: 2rem;
30
30
  margin: 0;
31
31
  }
32
+ header.bordered {
33
+ border-bottom: 2px solid var(--gold);
34
+ }
32
35
  header .container {
33
36
  padding-bottom: .5rem;
34
37
  }
@@ -36,12 +39,15 @@ header .container {
36
39
  section.main {
37
40
  background: var(--black);
38
41
  padding: 1rem 0;
39
- text-align: center
42
+ text-align: center;
43
+ color: white;
40
44
  }
41
45
  section.main h2 {
42
46
  line-height: 2rem;
43
47
  margin-top: 0;
44
- color: white;
48
+ }
49
+ section.main p {
50
+ opacity: .8;
45
51
  }
46
52
  .logo-container {
47
53
  margin-top: 2rem;
@@ -77,6 +83,9 @@ button.btn-outline-primary {
77
83
  background-color: transparent;
78
84
  color: var(--gold);
79
85
  }
86
+ button.btn-secondary {
87
+ background-color: var(--blue);
88
+ }
80
89
 
81
90
  button i {
82
91
  display: inline-block !important;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'vipassana-design-standards'
5
- gem.version = '0.0.18'
5
+ gem.version = '0.0.20'
6
6
  # gem.license = 'MIT'
7
- gem.summary = 'Include Vipassana SVG logos in your pages'
8
- gem.description = 'A ruby module to offer inline SVG images for each language'
7
+ gem.summary = 'Helper to include UI components in your pages'
8
+ gem.description = 'Provide a custom bootstrap theme, logos and icons according to the design standards of Vipassana Meditation as Taught yb S.N. Goenka'
9
9
  gem.authors = ['Dhamma workers']
10
10
  gem.email = ['sebastian.castro@dhamma.org', 'webmaster@dhamma.org']
11
11
  gem.homepage = 'https://design-standards.dhamma.org'