Initial commit

This commit is contained in:
tofu
2026-03-03 21:42:51 +05:00
commit b1c3b657c2
43 changed files with 833 additions and 0 deletions

12
app/action.rb Normal file
View 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
View File

5
app/assets/css/app.css Normal file
View File

@@ -0,0 +1,5 @@
body {
background-color: #fff;
color: #000;
font-family: sans-serif;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

1
app/assets/js/app.js Normal file
View File

@@ -0,0 +1 @@
import "../css/app.css";

10
app/db/relation.rb Normal file
View 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
View 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
View 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
View 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
View File

11
app/relations/cards.rb Normal file
View 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
View File

9
app/repos/cards_repo.rb Normal file
View 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
View File

View 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
View 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
View 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
View 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