Skip to content

Commit

Permalink
didn't like that section
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Jul 14, 2024
1 parent 00046a6 commit fd10923
Showing 1 changed file with 2 additions and 98 deletions.
100 changes: 2 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3051,6 +3051,7 @@ I haven't thought of the following or where to put them yet.
* services (job queues, cache servers, search engines, etc.)
* deployment instructions
* pointing a domain at the application with cloudflare for secure connection
* vite-rails using deprecated CJS [here](https://github.com/ElMassimo/vite_ruby/issues/431)

## Upgrading the Landing Page for "Linux for Pirates! 2 - Ruby on Whales" Book Promotion

Expand Down Expand Up @@ -3094,107 +3095,10 @@ export default defineConfig({
})
```

### Step 4: Update HTML Structure

Create or update your `index.html` file in the `app/frontend` directory to include the necessary meta tags for Open Graph and favicon.

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linux for Pirates! 2 - Ruby on Whales</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= vite_client_tag %>
<%= vite_stylesheet_tag 'application' %>
<!-- Open Graph Tags -->
<meta property="og:title" content="Linux for Pirates! 2 - Ruby on Whales">
<meta property="og:description" content="Join the ultimate pirate-themed adventure on the high seas with Ruby on Whales!">
<meta property="og:image" content="<%= vite_asset_url 'images/social-banner.png' %>">
<meta property="og:url" content="https://yourwebsite.com">
<!-- Favicon -->
<link rel="icon" type="image/png" href="<%= vite_asset_path 'images/favicon.png' %>">
</head>
<body>
<div class="min-h-screen bg-blue-900 flex items-center justify-center">
<div class="max-w-2xl bg-gray-800 text-white p-10 rounded-lg shadow-lg">
<h1 class="text-5xl font-bold mb-4 text-center">Ahoy, Matey!</h1>
<p class="text-xl mb-6 text-center">Welcome to Pirate App, the ultimate pirate-themed adventure on the high seas!</p>
<div class="text-center">
<a href="#get-started" class="bg-yellow-500 text-black font-bold py-2 px-4 rounded hover:bg-yellow-600">Get Started</a>
</div>
</div>
</div>
<%= vite_javascript_tag 'application' %>
</body>
</html>
```

### Step 5: Add Styling and Script

Update or create your CSS and JavaScript files in the `app/frontend/entrypoints` directory.

#### main.css

```css
/* app/frontend/styles/main.css */
body {
font-family: 'Pirata One', cursive;
}
h1 {
font-size: 5rem;
color: #ffdd00;
}
p {
font-size: 1.5rem;
}
a {
transition: background-color 0.3s ease;
}
```
### Step 4: Update Rails Layout

#### main.js

```javascript
// app/frontend/entrypoints/main.js
import '../styles/main.css';

// Additional JS can be added here if needed
```

### Step 6: Update Rails Layout

Ensure your Rails layout file includes Vite helpers and references the entrypoints.

```erb
<!-- app/views/layouts/application.html.erb -->
<!DOCTYPE html>
<html>
<head>
<title>Linux for Pirates! 2 - Ruby on Whales</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= vite_client_tag %>
<%= vite_stylesheet_tag 'main' %>
</head>
<body>
<%= yield %>
<%= vite_javascript_tag 'main' %>
</body>
</html>
```

### Step 7: Testing and Deployment

Expand Down

0 comments on commit fd10923

Please sign in to comment.