Compare commits
4 Commits
a7923ea96a
...
4677c90e60
Author | SHA1 | Date |
---|---|---|
Luna | 4677c90e60 | |
Luna | cda3a38af3 | |
Luna | 03ecfb2793 | |
Luna | 0ed0ce47be |
36
README.md
36
README.md
|
@ -4,34 +4,34 @@ An imageboard that's a little more social.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Ruby 2.7.3
|
- Ruby 2.7.3
|
||||||
- Node.js 14.x
|
- Node.js 14.x
|
||||||
- Java 11
|
- Java 11
|
||||||
- PostgreSQL 12
|
- PostgreSQL 12
|
||||||
|
|
||||||
## Information about application structure
|
## Information about application structure
|
||||||
|
|
||||||
- mintbooru runs on the main branch of Rails to get the newest features,
|
- mintbooru runs on the main branch of Rails to get the newest features,
|
||||||
so please keep that in mind. We are unapologetically modern in our backend,
|
so please keep that in mind. We are unapologetically modern in our backend,
|
||||||
and we don't apologize for it.
|
and we don't apologize for it.
|
||||||
|
|
||||||
- We use a combination of tools to make this app work. We use the
|
- We use a combination of tools to make this app work. We use the
|
||||||
[YUI Compressor](https://yui.github.io/yuicompressor/) to compress CSS
|
[YUI Compressor](https://yui.github.io/yuicompressor/) to compress CSS
|
||||||
(mainly because Luna wanted to mess around with it for shits and giggles),
|
(mainly because Luna wanted to mess around with it for shits and giggles),
|
||||||
and we use the Terser gem to compress JS.
|
and we use the Terser gem to compress JS.
|
||||||
|
|
||||||
- JS is compiled using Webpack, and is included in the Sprockets build process.
|
- JS is compiled using Webpack, and is included in the Sprockets build process.
|
||||||
|
|
||||||
- User authentication is implemented through
|
- User authentication is implemented through
|
||||||
[Devise](https://github.com/heartcombo/devise), and is modified as needed.
|
[Devise](https://github.com/heartcombo/devise), and is modified as needed.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- [Luna](https://luna.mint.lgbt) - Main developer
|
- [Luna](https://luna.mint.lgbt) - Main developer
|
||||||
|
|
||||||
- [mint](https://they.mint.lgbt) - Developer
|
|
||||||
|
|
||||||
- [Erin](https://the-system.eu.org) - For being with me in my darkest times
|
- [mint](https://they.mint.lgbt) - Developer
|
||||||
|
|
||||||
|
- [Erin](https://the-system.eu.org) - For being with me in my darkest times
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
def git_hash
|
def git_hash
|
||||||
exec 'git rev-parse --short HEAD'
|
`git rev-parse HEAD`.chomp
|
||||||
end
|
end
|
||||||
|
|
||||||
def meta_description
|
def meta_description
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module ImportmapTagsHelper
|
|
||||||
# Setup all script tags needed to use an importmap-powered entrypoint (which defaults to application.js)
|
|
||||||
def javascript_importmap_tags(entry_point = 'application')
|
|
||||||
safe_join [
|
|
||||||
javascript_inline_importmap_tag,
|
|
||||||
javascript_importmap_module_preload_tags,
|
|
||||||
javascript_importmap_shim_tag,
|
|
||||||
javascript_import_module_tag(entry_point)
|
|
||||||
], "\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Generate an inline importmap tag using the passed `importmap_json` JSON string.
|
|
||||||
# By default, `Rails.application.config.importmap.to_json(resolver: self)` is used.
|
|
||||||
def javascript_inline_importmap_tag(importmap_json = Rails.application.config.importmap.to_json(resolver: self))
|
|
||||||
tag.script(importmap_json.html_safe, type: 'importmap', nonce: content_security_policy_nonce,
|
|
||||||
"data-turbo-track": 'reload')
|
|
||||||
end
|
|
||||||
|
|
||||||
# Include the es-module-shim needed to make importmaps work in browsers without native support (like Firefox + Safari).
|
|
||||||
def javascript_importmap_shim_tag
|
|
||||||
javascript_include_tag 'es-module-shims', async: true, "data-turbo-track": 'reload'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Import a named JavaScript module using a script-module tag.
|
|
||||||
def javascript_import_module_tag(module_name)
|
|
||||||
tag.script %(import "#{module_name}").html_safe, type: 'module', nonce: content_security_policy_nonce
|
|
||||||
end
|
|
||||||
|
|
||||||
# Link tags for preloading all modules marked as preload: true in the `importmap`
|
|
||||||
# (defaults to Rails.application.config.importmap), such that they'll be fetched
|
|
||||||
# in advance by browsers supporting this link type (https://caniuse.com/?search=modulepreload).
|
|
||||||
def javascript_importmap_module_preload_tags(importmap = Rails.application.config.importmap)
|
|
||||||
javascript_module_preload_tag(*importmap.preloaded_module_paths(resolver: self))
|
|
||||||
end
|
|
||||||
|
|
||||||
# Link tag(s) for preloading the JavaScript module residing in `*paths`. Will return one link tag per path element.
|
|
||||||
def javascript_module_preload_tag(*paths)
|
|
||||||
safe_join(Array(paths).collect { |path| tag.link rel: 'modulepreload', href: path }, "\n")
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,4 +1,3 @@
|
||||||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
|
||||||
import "@hotwired/turbo-rails"
|
import "@hotwired/turbo-rails"
|
||||||
import "jquery"
|
import "jquery"
|
||||||
import "./controllers"
|
import "./controllers"
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :username %><br />
|
||||||
|
<%= f.text_field :username, autocomplete: 'username' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label :password %>
|
<%= f.label :password %>
|
||||||
<% if @minimum_password_length %>
|
<% if @minimum_password_length %>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<meta name="twitter:title" content="<%= page_title %>">
|
<meta name="twitter:title" content="<%= page_title %>">
|
||||||
<meta name="twitter:description" content="<%= meta_description %>">
|
<meta name="twitter:description" content="<%= meta_description %>">
|
||||||
|
|
||||||
<meta name="generator" content="mint-lgbt/mintbooru @ <%# git_hash %>">
|
<meta name="generator" content="mint-lgbt/mintbooru @ <%= git_hash %>">
|
||||||
|
|
||||||
<meta name="theme-color" content="#0073ff">
|
<meta name="theme-color" content="#0073ff">
|
||||||
|
|
||||||
|
@ -33,8 +33,9 @@
|
||||||
<body>
|
<body>
|
||||||
<%= render partial: 'layouts/navbar' %>
|
<%= render partial: 'layouts/navbar' %>
|
||||||
|
|
||||||
<%= render AlertComponent.new(content: alert) if alert %>
|
<%# idk what's wrong, but these spit out errors %>
|
||||||
<%= render NoticeComponent.new(content: notice) if notice %>
|
<%# render AlertComponent.new(content: alert) if alert %>
|
||||||
|
<%# render NoticeComponent.new(content: notice) if notice %>
|
||||||
|
|
||||||
<div id="output">
|
<div id="output">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
Loading…
Reference in New Issue