Initial commit
This commit is contained in:
12
app/action.rb
Normal file
12
app/action.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/action"
|
||||
require "dry/monads"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
class Action < Hanami::Action
|
||||
# Provide `Success` and `Failure` for pattern matching on operation results
|
||||
include Dry::Monads[:result]
|
||||
end
|
||||
end
|
||||
0
app/actions/.keep
Normal file
0
app/actions/.keep
Normal file
5
app/assets/css/app.css
Normal file
5
app/assets/css/app.css
Normal file
@@ -0,0 +1,5 @@
|
||||
body {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
BIN
app/assets/images/favicon.ico
Normal file
BIN
app/assets/images/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 B |
1
app/assets/js/app.js
Normal file
1
app/assets/js/app.js
Normal file
@@ -0,0 +1 @@
|
||||
import "../css/app.css";
|
||||
10
app/db/relation.rb
Normal file
10
app/db/relation.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/relation"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
module DB
|
||||
class Relation < Hanami::DB::Relation
|
||||
end
|
||||
end
|
||||
end
|
||||
10
app/db/repo.rb
Normal file
10
app/db/repo.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/repo"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
module DB
|
||||
class Repo < Hanami::DB::Repo
|
||||
end
|
||||
end
|
||||
end
|
||||
10
app/db/struct.rb
Normal file
10
app/db/struct.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/struct"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
module DB
|
||||
class Struct < Hanami::DB::Struct
|
||||
end
|
||||
end
|
||||
end
|
||||
9
app/operation.rb
Normal file
9
app/operation.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "dry/operation"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
class Operation < Dry::Operation
|
||||
end
|
||||
end
|
||||
0
app/relations/.keep
Normal file
0
app/relations/.keep
Normal file
11
app/relations/cards.rb
Normal file
11
app/relations/cards.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module ClashDeckGenerator
|
||||
module Relations
|
||||
class Cards < DB::Relation
|
||||
schema :cards, infer: true
|
||||
|
||||
def meta
|
||||
where(is_meta: 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
0
app/repos/.keep
Normal file
0
app/repos/.keep
Normal file
9
app/repos/cards_repo.rb
Normal file
9
app/repos/cards_repo.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module ClashDeckGenerator
|
||||
module Repos
|
||||
class CardsRepo < DB::Repo[:cards]
|
||||
def meta_cards
|
||||
cards.meta.to_a
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
0
app/structs/.keep
Normal file
0
app/structs/.keep
Normal file
14
app/templates/layouts/app.html.erb
Normal file
14
app/templates/layouts/app.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Clash deck generator2</title>
|
||||
<%= favicon_tag %>
|
||||
<%= stylesheet_tag "app" %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
<%= javascript_tag "app" %>
|
||||
</body>
|
||||
</html>
|
||||
9
app/view.rb
Normal file
9
app/view.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/view"
|
||||
|
||||
module ClashDeckGenerator2
|
||||
class View < Hanami::View
|
||||
end
|
||||
end
|
||||
10
app/views/context.rb
Normal file
10
app/views/context.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ClashDeckGenerator2
|
||||
module Views
|
||||
class Context < Hanami::View::Context
|
||||
# Define your view context here. See https://guides.hanamirb.org/views/context/ for details.
|
||||
end
|
||||
end
|
||||
end
|
||||
10
app/views/helpers.rb
Normal file
10
app/views/helpers.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ClashDeckGenerator2
|
||||
module Views
|
||||
module Helpers
|
||||
# Add your view helpers here
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user