Module: Mxrb::Scaffold::Templates
- Defined in:
- lib/mxrb/scaffold/templates.rb
Overview
Source templates used by artifact scaffolds. rubocop:disable Metrics/ModuleLength
Constant Summary collapse
- ENTITY_GUIDE =
'https://github.com/lucamykael/mxrb/blob/main/docs/pt-BR/entity-dsl.md'
Class Method Summary collapse
- .constant(_module_name, name) ⇒ Object
- .consumed_rest(_module_name, name) ⇒ Object
- .demo_user(_module_name, name, entity:, roles:, password_env:) ⇒ Object
- .design_system(_module_name, _name) ⇒ Object
- .entity(_module_name, name) ⇒ Object
- .enumeration(_module_name, name) ⇒ Object
- .evaluation(_module_name, name) ⇒ Object
- .flow(name, description, entry_point: false) ⇒ Object
- .functional_test(module_name, name) ⇒ Object
- .github_workflow(_module_name, _name) ⇒ Object
- .humanize(name) ⇒ Object
- .infrastructure(_module_name, _name) ⇒ Object
- .integration(_module_name, name) ⇒ Object
- .java_action(_module_name, name) ⇒ Object
- .nanoflow(_module_name, name) ⇒ Object
- .page(module_name, name) ⇒ Object
- .page_chain_action(_module_name, name) ⇒ Object
- .page_chain_client_server(module_name, name) ⇒ Object
- .page_chain_entity(_module_name, name) ⇒ Object
- .page_chain_loader(module_name, name) ⇒ Object
- .page_chain_nanoflow(_module_name, name) ⇒ Object
- .page_chain_navigation(module_name, name) ⇒ Object
- .page_from_template(module_name, name, template:, refresh_action: nil) ⇒ Object
- .page_template_blank(module_name, name, refresh_action) ⇒ Object
- .page_template_dashboard(module_name, name, refresh_action) ⇒ Object
- .page_template_form_vertical(module_name, name, refresh_action) ⇒ Object
- .page_template_starter(module_name, name, refresh_action) ⇒ Object
- .presentation(_module_name, _name) ⇒ Object
- .project_security(module_name, _name) ⇒ Object
- .published_rest(_module_name, name) ⇒ Object
- .query(_module_name, name) ⇒ Object
- .refresh_button(action, indentation: 2) ⇒ Object
- .render(kind, module_name: nil, name: nil, **options) ⇒ Object
- .repository(module_name, name) ⇒ Object
- .repository_implementation(_module_name, name) ⇒ Object
- .scheduled_event(module_name, name) ⇒ Object
- .security(module_name, _name) ⇒ Object
- .snake_case(value) ⇒ Object
- .theme_compiled(_module_name, _name) ⇒ Object
- .theme_custom_variables(_module_name, _name) ⇒ Object
- .theme_exclusion_variables(_module_name, _name) ⇒ Object
- .theme_main(_module_name, _name) ⇒ Object
- .theme_settings(_module_name, _name) ⇒ Object
- .use_case(_module_name, name) ⇒ Object
- .validation(_module_name, name) ⇒ Object
Class Method Details
.constant(_module_name, name) ⇒ Object
319 320 321 322 323 324 325 |
# File 'lib/mxrb/scaffold/templates.rb', line 319 def constant(_module_name, name) <<~RUBY # frozen_string_literal: true constant :#{name}, type: :string, value: "" RUBY end |
.consumed_rest(_module_name, name) ⇒ Object
342 343 344 345 346 347 348 349 350 351 |
# File 'lib/mxrb/scaffold/templates.rb', line 342 def consumed_rest(_module_name, name) <<~RUBY # frozen_string_literal: true microflow :#{name}, kind: :infrastructure do mark_as_used # call_rest method: :get, location: "https://api.example.test/resource" end RUBY end |
.demo_user(_module_name, name, entity:, roles:, password_env:) ⇒ Object
296 297 298 299 300 301 302 303 304 305 |
# File 'lib/mxrb/scaffold/templates.rb', line 296 def demo_user(_module_name, name, entity:, roles:, password_env:) <<~RUBY # frozen_string_literal: true demo_user #{name.inspect}, entity: #{entity.inspect}, roles: #{roles.inspect}, password: ENV.fetch(#{password_env.inspect}) RUBY end |
.design_system(_module_name, _name) ⇒ Object
389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/mxrb/scaffold/templates.rb', line 389 def design_system(_module_name, _name) <<~RUBY # frozen_string_literal: true design_system do # color :primary, value: "#1a1a1a" # spacing :medium, value: "1rem" forbid_literal_colors false end RUBY end |
.entity(_module_name, name) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/mxrb/scaffold/templates.rb', line 16 def entity(_module_name, name) <<~RUBY # frozen_string_literal: true # Entity DSL reference: #{ENTITY_GUIDE} entity :#{name} do end RUBY end |
.enumeration(_module_name, name) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/mxrb/scaffold/templates.rb', line 26 def enumeration(_module_name, name) <<~RUBY # frozen_string_literal: true enumeration :#{name} do # value :Example, caption: "Example" end RUBY end |
.evaluation(_module_name, name) ⇒ Object
376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/mxrb/scaffold/templates.rb', line 376 def evaluation(_module_name, name) <<~RUBY # frozen_string_literal: true no_call_cycles no_missing_internal_references check "#{humanize(name)}" do |_project| true end RUBY end |
.flow(name, description, entry_point: false) ⇒ Object
712 713 714 715 716 717 718 719 720 721 |
# File 'lib/mxrb/scaffold/templates.rb', line 712 def flow(name, description, entry_point: false) <<~RUBY # frozen_string_literal: true # #{description} microflow :#{name} do #{entry_point ? ' mark_as_used' : ''} end RUBY end |
.functional_test(module_name, name) ⇒ Object
366 367 368 369 370 371 372 373 374 |
# File 'lib/mxrb/scaffold/templates.rb', line 366 def functional_test(module_name, name) <<~RUBY # frozen_string_literal: true microflow "#{humanize(name)}", call: "#{module_name}.#{name}", expect: {} RUBY end |
.github_workflow(_module_name, _name) ⇒ Object
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 |
# File 'lib/mxrb/scaffold/templates.rb', line 667 def github_workflow(_module_name, _name) <<~YAML name: MXRB on: push: pull_request: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: "4.0" bundler-cache: true - run: bundle exec rspec - run: bundle exec rubocop - run: bundle exec ruby project.rb YAML end |
.humanize(name) ⇒ Object
723 724 725 |
# File 'lib/mxrb/scaffold/templates.rb', line 723 def humanize(name) name.to_s.gsub(/_+/, ' ').gsub(/([a-z\d])([A-Z])/, '\\1 \\2').strip end |
.infrastructure(_module_name, _name) ⇒ Object
701 702 703 704 705 706 707 708 709 710 |
# File 'lib/mxrb/scaffold/templates.rb', line 701 def infrastructure(_module_name, _name) <<~RUBY # frozen_string_literal: true evaluate_dir File.join(__dir__, "repositories") evaluate_dir File.join(__dir__, "integrations") evaluate_dir File.join(__dir__, "endpoints") evaluate_dir File.join(__dir__, "actions") RUBY end |
.integration(_module_name, name) ⇒ Object
327 |
# File 'lib/mxrb/scaffold/templates.rb', line 327 def integration(_module_name, name) = flow(name, 'Infrastructure integration adapter', entry_point: true) |
.java_action(_module_name, name) ⇒ Object
353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/mxrb/scaffold/templates.rb', line 353 def java_action(_module_name, name) <<~RUBY # frozen_string_literal: true # Adapter scaffold. Define the Java Action in the native baseline, # then uncomment and qualify the call below. microflow :#{name}, kind: :infrastructure do mark_as_used # call_java "Module.JavaActionName" end RUBY end |
.nanoflow(_module_name, name) ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/mxrb/scaffold/templates.rb', line 65 def nanoflow(_module_name, name) <<~RUBY # frozen_string_literal: true nanoflow :#{name} do mark_as_used end RUBY end |
.page(module_name, name) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/mxrb/scaffold/templates.rb', line 49 def page(module_name, name) <<~RUBY # frozen_string_literal: true page :#{name} do title "#{humanize(name)}" layout "#{module_name}.ApplicationLayout" # allowed_roles "Module.User" container :pageHeader, class_name: "mxrb-page-header" do text :pageTitle, caption: "#{humanize(name)}" end end RUBY end |
.page_chain_action(_module_name, name) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/mxrb/scaffold/templates.rb', line 103 def page_chain_action(_module_name, name) feature = name.to_s.delete_prefix('ACT_Refresh') <<~RUBY # frozen_string_literal: true microflow :#{name} do mark_as_used log_message "#{humanize(feature)} refreshed from the page scaffold" end RUBY end |
.page_chain_client_server(module_name, name) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/mxrb/scaffold/templates.rb', line 127 def page_chain_client_server(module_name, name) feature = name.to_s.delete_prefix('NAN_Refresh') <<~RUBY # frozen_string_literal: true nanoflow :#{name} do mark_as_used call_microflow "#{module_name}.ACT_Refresh#{feature}" show_message "#{humanize(feature)} refreshed", type: :information end RUBY end |
.page_chain_entity(_module_name, name) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mxrb/scaffold/templates.rb', line 75 def page_chain_entity(_module_name, name) <<~RUBY # frozen_string_literal: true # Executable vertical slice generated by `mxrb page --chain`. entity :#{name} do string :Reference, length: 80 decimal :Total, default: 0 boolean :Active, default: true end RUBY end |
.page_chain_loader(module_name, name) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/mxrb/scaffold/templates.rb', line 88 def page_chain_loader(module_name, name) feature = name.to_s.delete_prefix('ACT_Load') <<~RUBY # frozen_string_literal: true microflow :#{name} do mark_as_used return_type :#{feature} create_object "#{module_name}.#{feature}", as: :record, set: { Reference: "'NEW'", Total: 0, Active: true } return_value :record end RUBY end |
.page_chain_nanoflow(_module_name, name) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mxrb/scaffold/templates.rb', line 115 def page_chain_nanoflow(_module_name, name) feature = name.to_s.delete_prefix('NAN_Refresh') <<~RUBY # frozen_string_literal: true nanoflow :#{name} do mark_as_used show_message "#{humanize(feature)} refreshed", type: :information end RUBY end |
.page_chain_navigation(module_name, name) ⇒ Object
253 254 255 256 257 258 259 |
# File 'lib/mxrb/scaffold/templates.rb', line 253 def (module_name, name) <<~RUBY # frozen_string_literal: true item "#{humanize(name)}", page: "#{module_name}.#{name}", icon: "file" RUBY end |
.page_from_template(module_name, name, template:, refresh_action: nil) ⇒ Object
140 141 142 |
# File 'lib/mxrb/scaffold/templates.rb', line 140 def page_from_template(module_name, name, template:, refresh_action: nil) public_send("page_template_#{template.tr('-', '_')}", module_name, name, refresh_action) end |
.page_template_blank(module_name, name, refresh_action) ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/mxrb/scaffold/templates.rb', line 161 def page_template_blank(module_name, name, refresh_action) <<~RUBY # frozen_string_literal: true page :#{name} do title "#{humanize(name)}" layout "#{module_name}.ApplicationLayout" container :content, class_name: "mxrb-page-content" do #{(refresh_action, indentation: 4)} end end RUBY end |
.page_template_dashboard(module_name, name, refresh_action) ⇒ Object
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/mxrb/scaffold/templates.rb', line 176 def page_template_dashboard(module_name, name, refresh_action) <<~RUBY # frozen_string_literal: true page :#{name} do title "#{humanize(name)}" layout "#{module_name}.ApplicationLayout" container :pageHeader, class_name: "mxrb-page-header" do text :pageTitle, caption: "#{humanize(name)}" text :pageSubtitle, caption: "Dashboard overview" end container :dashboard, class_name: "mxrb-dashboard-grid" do container(:primaryMetric, class_name: "mxrb-card") do text :primaryLabel, caption: "PRIMARY" text :primaryValue, caption: "0" text :primaryHelp, caption: "Connect this card to your domain data." end container(:secondaryMetric, class_name: "mxrb-card") do text :secondaryLabel, caption: "SECONDARY" text :secondaryValue, caption: "0" text :secondaryHelp, caption: "Replace this metric with a business signal." end container(:activityMetric, class_name: "mxrb-card") do text :activityLabel, caption: "ACTIVITY" text :activityValue, caption: "Ready" text :activityHelp, caption: "Add charts, lists or actions here." end end #{(refresh_action)} end RUBY end |
.page_template_form_vertical(module_name, name, refresh_action) ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/mxrb/scaffold/templates.rb', line 211 def page_template_form_vertical(module_name, name, refresh_action) <<~RUBY # frozen_string_literal: true page :#{name} do title "#{humanize(name)}" layout "#{module_name}.ApplicationLayout" data_source microflow: "#{module_name}.ACT_Load#{name}" container :pageHeader, class_name: "mxrb-page-header" do text :pageTitle, caption: "#{humanize(name)}" text :pageSubtitle, caption: "Executable page scaffold" end container :form, class_name: "mxrb-card" do text_box :reference, attribute: :Reference, caption: "Reference" number_input :total, attribute: :Total, caption: "Total" check_box :active, attribute: :Active, caption: "Active" button :save, caption: "Save" do on_click action: :save_changes end button :cancel, caption: "Cancel" do on_click action: :cancel_changes end #{(refresh_action, indentation: 4)} end end RUBY end |
.page_template_starter(module_name, name, refresh_action) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/mxrb/scaffold/templates.rb', line 144 def page_template_starter(module_name, name, refresh_action) <<~RUBY # frozen_string_literal: true page :#{name} do title "#{humanize(name)}" layout "#{module_name}.ApplicationLayout" container :pageHeader, class_name: "mxrb-page-header" do text :pageTitle, caption: "#{humanize(name)}" text :pageSubtitle, caption: "Page generated from the starter template" end #{(refresh_action)} end RUBY end |
.presentation(_module_name, _name) ⇒ Object
690 691 692 693 694 695 696 697 698 699 |
# File 'lib/mxrb/scaffold/templates.rb', line 690 def presentation(_module_name, _name) <<~RUBY # frozen_string_literal: true layout :ApplicationLayout evaluate_dir File.join(__dir__, "pages") evaluate_dir File.join(__dir__, "client_actions") RUBY end |
.project_security(module_name, _name) ⇒ Object
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/mxrb/scaffold/templates.rb', line 285 def project_security(module_name, _name) <<~RUBY security do security_level "CheckEverything" user_role :User, module_roles: ["#{module_name}.User"] user_role :Administrator, module_roles: ["#{module_name}.Administrator"], admin: true end RUBY end |
.published_rest(_module_name, name) ⇒ Object
329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/mxrb/scaffold/templates.rb', line 329 def published_rest(_module_name, name) <<~RUBY # frozen_string_literal: true # Handler scaffold. Publishing the REST document currently remains a # native Studio Pro/baseline operation; this microflow is editable Ruby. microflow :#{name}, kind: :infrastructure, public: true do documentation "Published REST handler #{humanize(name)}" mark_as_used end RUBY end |
.query(_module_name, name) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/mxrb/scaffold/templates.rb', line 39 def query(_module_name, name) <<~RUBY # frozen_string_literal: true query :#{name} do mark_as_used end RUBY end |
.refresh_button(action, indentation: 2) ⇒ Object
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/mxrb/scaffold/templates.rb', line 242 def (action, indentation: 2) return '' unless action indent = ' ' * indentation <<~RUBY.lines.map { "#{indent}#{_1}" }.join.rstrip button :refresh, caption: "Refresh" do on_click #{action} end RUBY end |
.render(kind, module_name: nil, name: nil, **options) ⇒ Object
12 13 14 |
# File 'lib/mxrb/scaffold/templates.rb', line 12 def render(kind, module_name: nil, name: nil, **) public_send(kind, module_name, name, **) end |
.repository(module_name, name) ⇒ Object
261 262 263 264 265 266 267 |
# File 'lib/mxrb/scaffold/templates.rb', line 261 def repository(module_name, name) <<~RUBY # frozen_string_literal: true repository :#{name}, implementation: "#{module_name}.#{name}Implementation" RUBY end |
.repository_implementation(_module_name, name) ⇒ Object
269 270 271 |
# File 'lib/mxrb/scaffold/templates.rb', line 269 def repository_implementation(_module_name, name) flow("#{name}Implementation", 'Infrastructure repository adapter', entry_point: true) end |
.scheduled_event(module_name, name) ⇒ Object
307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/mxrb/scaffold/templates.rb', line 307 def scheduled_event(module_name, name) <<~RUBY # frozen_string_literal: true microflow :#{name} do end scheduled_event :#{name}, microflow: "#{module_name}.#{name}", interval: 1, unit: :days, enabled: true RUBY end |
.security(module_name, _name) ⇒ Object
273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/mxrb/scaffold/templates.rb', line 273 def security(module_name, _name) <<~RUBY # frozen_string_literal: true module_role :User, description: "Application user" module_role :Administrator, description: "Module administrator" # Add access_rule declarations inside each entity. # Example: access_rule "#{module_name}.User", read: :all RUBY end |
.snake_case(value) ⇒ Object
727 728 729 730 |
# File 'lib/mxrb/scaffold/templates.rb', line 727 def snake_case(value) value.gsub(/([A-Z]+)([A-Z][a-z])/, '\\1_\\2') .gsub(/([a-z\d])([A-Z])/, '\\1_\\2').tr('-', '_').downcase end |
.theme_compiled(_module_name, _name) ⇒ Object
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/mxrb/scaffold/templates.rb', line 408 def theme_compiled(_module_name, _name) <<~SCSS :root { color: #17324d; background: #f4f7fb; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; } body { margin: 0; background: #f4f7fb; } *, *::before, *::after { box-sizing: border-box; } button, input, select, textarea { font: inherit; } .btn, .mx-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin: 8px 8px 0 0; padding: 10px 18px; border: 0; border-radius: 10px; color: #fff; background: #087f8c; font-weight: 700; cursor: pointer; } input, select, textarea, .form-control { width: 100%; min-height: 42px; margin-top: 6px; padding: 10px 12px; border: 1px solid #cbd8e2; border-radius: 10px; color: #17324d; background: #fff; } label, .control-label { display: block; margin-top: 14px; color: #36546c; font-weight: 650; } .mxrb-application-shell { min-height: 100vh; } .region-topbar { z-index: 20; border-bottom: 1px solid rgb(23 50 77 / 10%); background: rgb(255 255 255 / 92%); box-shadow: 0 8px 28px rgb(23 50 77 / 8%); backdrop-filter: blur(16px); } .mxrb-topbar { display: flex; height: 100%; align-items: center; gap: 16px; padding: 0 24px; } .mxrb-sidebar-toggle.btn { min-width: auto; padding: 9px 14px; border: 0; border-radius: 10px; background: #087f8c; } .mxrb-brand { font-size: 1.125rem; font-weight: 750; letter-spacing: -0.025em; } .region-sidebar { color: #dceaf0; background: linear-gradient(180deg, #102f42, #092331); box-shadow: 12px 0 36px rgb(9 35 49 / 16%); } .mxrb-navigation { padding: 20px 14px; } .mxrb-navigation ul { margin: 0; padding: 0; list-style: none; } .mxrb-navigation .navbar-inner > ul > li > a { display: block; margin: 4px 0; padding: 12px 16px; color: #dceaf0; border-radius: 12px; font-weight: 650; } .mxrb-navigation .navbar-inner > ul > li > a:hover, .mxrb-navigation .navbar-inner > ul > li.active > a { color: #fff; background: rgb(255 255 255 / 12%); } .region-content { box-sizing: border-box; background: #f4f7fb; } .region-content > .mx-scrollcontainer-wrapper { padding: clamp(24px, 4vw, 48px); } .region-content .mx-page { box-sizing: border-box; width: 100%; max-width: 1120px; margin: 0 auto; } .mxrb-page-header { box-sizing: border-box; flex: 0 0 auto !important; width: 100%; min-height: 0; margin-bottom: 24px; padding: 28px 32px; color: #fff; border-radius: 20px; background: linear-gradient(135deg, #087f8c, #0b5d75); box-shadow: 0 16px 40px rgb(20 73 94 / 18%); } .mxrb-page-header .mx-text, .mxrb-page-header > span { display: block; } .mxrb-page-header .mx-text:first-child, .mxrb-page-header > span:first-of-type { font-size: clamp(2rem, 5vw, 3rem); font-weight: 750; letter-spacing: -0.04em; } .mxrb-page-header .mx-text + .mx-text, .mxrb-page-header > span + span { max-width: 680px; margin-top: 8px; color: rgb(255 255 255 / 82%); font-size: 1rem; } .mxrb-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .mxrb-card { box-sizing: border-box; min-height: 190px; padding: 24px; border: 1px solid rgb(23 50 77 / 8%); border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgb(23 50 77 / 8%); } .mxrb-card .mx-text, .mxrb-card > span { display: block; } .mxrb-card .mx-text:first-child, .mxrb-card > span:first-of-type { margin-bottom: 14px; color: #087f8c; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; } .mxrb-card .mx-text:nth-child(2), .mxrb-card > span:nth-of-type(2) { margin-bottom: 10px; color: #17324d; font-size: 1.25rem; font-weight: 750; } .mxrb-card .mx-text:nth-child(3), .mxrb-card > span:nth-of-type(3) { color: #60768a; line-height: 1.6; } @media (max-width: 767px) { .mxrb-dashboard-grid { grid-template-columns: 1fr; } .region-content > .mx-scrollcontainer-wrapper { padding: 20px 16px; } .mxrb-page-header { padding: 24px; border-radius: 16px; } } SCSS end |
.theme_custom_variables(_module_name, _name) ⇒ Object
645 646 647 648 649 650 |
# File 'lib/mxrb/scaffold/templates.rb', line 645 def theme_custom_variables(_module_name, _name) <<~SCSS // Project-specific Sass variables belong here. When Atlas Core is // installed, mxrb marketplace adds its legacy variable definitions. SCSS end |
.theme_exclusion_variables(_module_name, _name) ⇒ Object
660 661 662 663 664 665 |
# File 'lib/mxrb/scaffold/templates.rb', line 660 def theme_exclusion_variables(_module_name, _name) <<~SCSS // Atlas Core imports this file. Add Sass variables here to exclude // optional Atlas components from the compiled theme. SCSS end |
.theme_main(_module_name, _name) ⇒ Object
401 402 403 404 405 406 |
# File 'lib/mxrb/scaffold/templates.rb', line 401 def theme_main(_module_name, _name) <<~SCSS + theme_compiled(nil, nil) @import "custom-variables"; SCSS end |
.theme_settings(_module_name, _name) ⇒ Object
652 653 654 655 656 657 658 |
# File 'lib/mxrb/scaffold/templates.rb', line 652 def theme_settings(_module_name, _name) <<~JSON { "cssFiles": ["theme.compiled.css"] } JSON end |
.use_case(_module_name, name) ⇒ Object
36 |
# File 'lib/mxrb/scaffold/templates.rb', line 36 def use_case(_module_name, name) = flow(name, 'Application use case', entry_point: true) |
.validation(_module_name, name) ⇒ Object
37 |
# File 'lib/mxrb/scaffold/templates.rb', line 37 def validation(_module_name, name) = flow(name, 'Application validation') |