move to opal dir, still trying

This commit is contained in:
2023-02-08 12:50:18 +02:00
parent 53b549e921
commit 6d48e0cdd4
13 changed files with 12 additions and 26 deletions

View File

@ -1,3 +1,3 @@
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link vue_r_manifest.js
//= link_directory ../javascript .js

View File

@ -0,0 +1,12 @@
require "opal"
# Uncomment the following to print out you're hello-world with Opal:
#
# puts "hello world!"
#
# The following will append a hello-world to your <body> element:
#
# require "native"
# $$[:document].addEventListener :DOMContentLoaded do
# $$[:document][:body][:innerHTML] += '<h2>Hello World!</h2>'
# end

View File

@ -1,10 +0,0 @@
= form_for @kantum do |f|
- if @kantum.errors.any?
#error_explanation
%h2= "#{pluralize(@kantum.errors.count, "error")} prohibited this kantum from being saved:"
%ul
- @kantum.errors.full_messages.each do |message|
%li= message
.actions
= f.submit 'Save'

View File

@ -1,7 +0,0 @@
%h1 Editing kantum
= render 'form'
= link_to 'Show', @kantum
\|
= link_to 'Back', kanta_path

View File

@ -1,5 +0,0 @@
%h1 New kantum
= render 'form'
= link_to 'Back', kanta_path

View File

@ -6,6 +6,9 @@
%a.underline{ e_click: "bg_change" , r_class: 'back'}
{{ back }}
:opal
puts "HI"
:plain
class Clicker < VueR::Application
def bg_change
self.state = !self.state

View File

@ -7,7 +7,8 @@
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "vue_r.js" %>
<%= javascript_include_tag "vue_r" %>
<%= javascript_include_tag "application" %>
</head>
<body>