adds js and css build, remove importmap, add tailwind and daisy

This commit is contained in:
2022-04-28 11:03:57 +03:00
parent d809e6f35b
commit 74a492c950
21 changed files with 2187 additions and 84 deletions

0
app/assets/builds/.keep Normal file
View File

View File

@ -1,4 +1,2 @@
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link_tree ../builds

View File

@ -1,15 +0,0 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/

View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -1,3 +0,0 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import "controllers"

View File

@ -1,9 +0,0 @@
import { Application } from "@hotwired/stimulus"
const application = Application.start()
// Configure Stimulus development experience
application.debug = false
window.Stimulus = application
export { application }

View File

@ -1,7 +0,0 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
connect() {
this.element.textContent = "Hello World!"
}
}

View File

@ -1,11 +0,0 @@
// Import and register all your controllers from the importmap under controllers/*
import { application } from "controllers/application"
// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
// lazyLoadControllersFrom("controllers", application)

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Gateway</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@ -6,7 +6,7 @@
%meta{:content => "width=device-width,initial-scale=1", :name => "viewport"}/
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag "application", "data-turbo-track": "reload"
= javascript_importmap_tags
= stylesheet_link_tag "application"
= javascript_include_tag "application", defer: true
%body
= yield

View File

@ -1,4 +1,17 @@
%h1 Hello Gateway
%p
Gateway to what? And so you may well ask . . .
Gateway to what? And so you may well ask . . .
.card.w-96.bg-base-100.shadow-xl
.card-body
%h2.card-title Shoes!
%p If a dog chews shoes whose shoes does he choose?
%figure
%img{:alt => "Shoes", :src => "https://api.lorem.space/image/shoes?w=400&h=225"}/
.card.w-96.bg-base-100.shadow-xl
.card-body
%h2.card-title Shoes!
%p If a dog chews shoes whose shoes does he choose?
%figure
%img{:alt => "Shoes", :src => "https://api.lorem.space/image/shoes?w=400&h=225"}/