This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
networks: | |
development: | |
test: | |
volumes: | |
db_data: | |
gem_cache: | |
shared_data: | |
services: | |
restarone_redis: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.6.6-alpine | |
ENV APP_PATH /var/app | |
ENV BUNDLE_VERSION 2.1.4 | |
ENV BUNDLE_PATH /usr/local/bundle/gems | |
ENV TMP_PATH /tmp/ | |
ENV RAILS_LOG_TO_STDOUT true | |
ENV RAILS_PORT 3000 | |
# copy entrypoint scripts and grant execution permissions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= turbo_frame_tag dom_id(tweet) do %> | |
<div class="card m-4"> | |
<div class="card-body"> | |
<%= tweet.content %> | |
</div> | |
<div class="card-footer bg-transparent border-success"> | |
<%= link_to 'Show', tweet, class: 'btn btn-sm btn-primary text-white' %> | |
<%= link_to 'Edit', edit_tweet_path(tweet), class: 'btn btn-sm btn-warning text-white', remote: true %> | |
<%= link_to 'Destroy', tweet, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger text-white' %> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="notice"><%= notice %></p> | |
<h1>Tweets</h1> | |
<table> | |
<thead> | |
<tr> | |
<th colspan="3"></th> | |
</tr> | |
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tweet < ApplicationRecord | |
has_rich_text :content | |
after_create_commit {broadcast_prepend_to "tweets"} | |
after_update_commit {broadcast_replace_to "tweets"} | |
after_destroy_commit {broadcast_remove_to "tweets"} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* fix not rendering on chrome/safari */ | |
.react-transform-component { | |
width: unset !important; | |
height: unset !important; | |
} | |
.react-transform-element { | |
width: unset !important; | |
height: unset !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let faker = require('faker'); | |
export const todoList = () => { | |
let columnCount = 12 | |
let maxBlocksPerColumn = 12 | |
let layout = [] | |
let i = 0 | |
const cardWidth = 3 | |
const cardHeight = 8 | |
const inlineYaxis = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useEffect} from 'react' | |
import './index.css'; | |
import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch"; | |
import {todoList} from './constants/todo' | |
import {useState} from 'react' | |
import 'react-grid-layout/css/styles.css' | |
import 'react-resizable/css/styles.css' | |
import GridLayout from 'react-grid-layout'; | |
function App(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { define } from 'remount' | |
import App from './App' | |
define({ 'x-application': App }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const glob = require('glob'); | |
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = (env, options) => { | |
const devMode = options.mode !== 'production'; |