Moved the site over to Ruby on Rails

This commit is contained in:
2022-07-04 01:21:08 -04:00
commit 3a2ce2a9de
90 changed files with 1713 additions and 0 deletions

View File

@ -0,0 +1,4 @@
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js

0
app/assets/images/.keep Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

BIN
app/assets/images/bg-banner.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

BIN
app/assets/images/bg-icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 KiB

View File

@ -0,0 +1,4 @@
$footer-height: 165px
$color-primary: #1e76d1
$color-primary-hover: darken(#1e76d1, 10%)

View File

@ -0,0 +1,156 @@
@import "_variables"
body
font-family: "Gill Sans", sans-serif
font-size: 2rem
margin: 0
padding-bottom: $footer-height
a
color: $color-primary
font-weight: 500
text-decoration: none
transition: color 300ms ease-in-out
&:hover
color: $color-primary-hover
hr
margin-top: 35px
margin-bottom: 35px
.u-text-center
text-align: center
.post-info
color: #999
font-style: italic
// this wrapper is only used to hide the footer
#wrapper
position: relative
z-index: 10
width: 100%
height: 100%
margin: 0
padding: 0
background: white
// header
#header-box
position: relative
z-index: 2
height: 500px
background:
image: url(<%= asset_data_uri 'bg-banner.jpg' %>)
size: auto 600px
position: top center
attachment: fixed
overflow: hidden
#header-logo
height: 350px
width: 350px
background:
image: url(<%= asset_data_uri 'bg-icon.png' %>)
position: center
repeat: no-repeat
size: contain
position: absolute
top: 40px
left: 50%
transform: translateX(-50%)
h1
margin-top: calc(100% + 25px)
color: white
font:
weight: bold
text-align: center
#navigation
width: 100%
margin-top: 40px
margin-bottom: 40px
text-align: center
ul
list-style: none
li
display: inline-block
margin: 0
padding: 0
border-radius: 10px
font-size: 3rem
transition: all 300ms ease-in-out
&:hover
background: rgba(#000000, 0.1)
margin-left: 25px
margin-right: 25px
transform: scale(1.1)
a
padding: 20px 30px
text-decoration: underline
#main-content
padding-bottom: 40px
// home page styles
.youtube-section
@media only screen and (min-device-width: 960px)
.row
position: relative
.video-card:nth-child(1)
transform: translate(100px, 20px)
.video-card:nth-child(2)
position: relative
z-index: 20
.video-card:nth-child(3)
transform: translate(-100px, 20px)
.video-card a
display: block
margin-bottom: 25px
padding: 15px 20px 0
background: white
border: 2px solid #bbb
img, p
transition: all 300ms ease-in-out
&:hover
img
transform: scale(1.1)
p
transform: translate(20px, 10px) scale(1.1)
// Blog posts page
#post-list
list-style: none
li
padding: 15px 20px 0
border: 2px solid #bbb
.post-title
margin-bottom: 3px
.post-body
margin-bottom: 0
// footer section
#footer
box-sizing: border-box
position: fixed
z-index: 1
bottom: 0
width: 100%
height: $footer-height
padding-top: 35px
background: #212121
color: white

View File

@ -0,0 +1,4 @@
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end

View File

@ -0,0 +1,4 @@
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end

View File

@ -0,0 +1,2 @@
class ApplicationController < ActionController::Base
end

View File

View File

@ -0,0 +1,10 @@
class WelcomeController < ApplicationController
def index
end
def contact
end
def support
end
end

View File

@ -0,0 +1,2 @@
module ApplicationHelper
end

View File

@ -0,0 +1,2 @@
module WelcomeHelper
end

View File

@ -0,0 +1,3 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import "controllers"

View File

@ -0,0 +1,9 @@
import { Application } from "@hotwired/stimulus"
const application = Application.start()
// Configure Stimulus development experience
application.debug = false
window.Stimulus = application
export { application }

View File

@ -0,0 +1,11 @@
// Import and register all your controllers from the importmap under controllers/*
import { application } from "controllers/application"
// Eager load all controllers defined in the import map under controllers/**/*_controller
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
eagerLoadControllersFrom("controllers", application)
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
// lazyLoadControllersFrom("controllers", application)

View File

@ -0,0 +1,15 @@
$(window).scroll ->
wScroll = $(this).scrollTop()
# Header parallax
$('#header-logo').css('transform', 'translate(-50%, ' + (wScroll / 2) + 'px)')
$('#header-logo h1').css('transform', 'translateY(-' + (wScroll / 2) + 'px)')
# YouTube section parallax
if not (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
$('.youtube-section').each (i, e) ->
if wScroll >= ($(e).offset().top - $(window).height())
offset = (Math.min(0, wScroll - $(e).offset().top + $(window).height() - 500)).toFixed()
$(e).find('.video-card:first-child').css('transform': 'translate(' + offset + 'px, ' + Math.abs(offset * 0.2) + 'px)')
$(e).find('.video-card:last-child').css('transform': 'translate(' + Math.abs(offset) + 'px, ' + Math.abs(offset * 0.2) + 'px)')

View File

@ -0,0 +1,7 @@
class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end

View File

@ -0,0 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: "from@example.com"
layout "mailer"
end

View File

@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
primary_abstract_class
end

View File

View File

@ -0,0 +1,55 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bit Goblin Website</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<%= stylesheet_link_tag "lumbridge", "data-turbo-track": "reload" %>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<%= javascript_include_tag 'varrock' %>
<%= javascript_importmap_tags %>
</head>
<body>
<div id="wrapper">
<header id="header-box">
<div id="header-logo">
<h1>Bit Goblin</h1>
</div>
</header>
<nav id="navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/blog">Blog Posts</a></li>
<li><a href="/support">Support</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
<div id="main-content" class="container">
<div class="row">
<div class="columns twelve">
<%= yield %>
</div>
</div>
</div>
</div>
<footer id="footer">
<div class="row">
<div class="columns three">
<p>Support me over on <a href="https://patreon.com/BitGoblin">Patreon</a>!</p>
</div>
<div class="columns six">
<p class="u-text-center">The Bit Goblin official website.</p>
<p class="u-text-center">&copy; Bit Goblin | all rights reserved.</p>
</div>
<div class="columns three">
<p>Feel free to <a href="/contact">contact me</a> for any business inquiries.</p>
</div>
</div>
</footer>
</body>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Email styles need to be inline */
</style>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@ -0,0 +1 @@
<%= yield %>

View File

@ -0,0 +1 @@
<p>If you're looking to contact me for business inqueries, feel free to email me at <a href='mailto:gballantine@bitgoblin.tech'>gballantine@bitgoblin.tech</a>.</p>

View File

@ -0,0 +1,91 @@
<div class="row">
<div class="columns twelve">
<p>Welcome! My name is Greg Ballantine and Bit Goblin is my passion project for creating YouTube videos on tech. I love tinkering with all things related to computers, and I enjoy documenting the things that I do so that others can use my struggles to ease their own. Whether its buildings PCs, playing with networking gear, or exploring the beauty of Linux, there are lots of things to play with and try to help others with.</p>
<p>Not only do I create tech videos for Bit Goblin, but Im also trying to build a community around it for great people to just chill, have fun, and help each other out when need arises. Ranging from the aforementioned YouTube videos on computer hardware, networking and Linux, to a community Minecraft server, a Discord server for everyone to relax and chat with each other, a future community forum and other services. Everyone is welcome to join the community, all I ask is that you simply just be excellent to each other. Easy enough, right?</p>
<p>I do work with sponsors to help fund my projects. If youre curious about who Ive worked with before, check out the <a href="/sponsors.html">Sponsors page</a>.</p>
<hr>
<!-- Bit Goblin YouTube channel section -->
<section id="bitgoblin-section" class="youtube-section">
<h3>Find Bit Goblin on <a href="https://youtube.com/BitGoblin">YouTube</a>.</h3>
<div class="row">
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=cYSLW1qIzKE">
<%= image_tag('bitgoblin-thumbnails/bg-46-thumbnail.png', :class => 'u-max-full-width') %>
<p>How to Install the NVIDIA Driver on Linux</p>
</a></div>
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=4oCuX4xFieo">
<%= image_tag('bitgoblin-thumbnails/bg-20-thumbnail.png', :class => 'u-max-full-width') %>
<p>How About a Cheap, Used AMD Graphics Card? (R9 270X)</p>
</a></div>
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=kMaFYUNwE5U">
<%= image_tag('bitgoblin-thumbnails/bg-36-thumbnail.png', :class => 'u-max-full-width') %>
<p>Let's Take a Look at Debian 10 "Buster"</p>
</a></div>
</div>
</section>
<hr>
<!-- Ascendings YouTube channel section -->
<section id="Ascendings-section" class="youtube-section">
<h3>Like watching Old School RuneScape videos? Go watch <a href="https://www.youtube.com/channel/UCCWlMg8oP9pz4Zlu4iZjPFw">Ascendings</a>.</h3>
<div class="row">
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=LtOpQv6ZBq0&list=PLIg6BQwweIwGdQNrbDMwGPxifgJ7iIXnE">
<%= image_tag('ascendings-thumbnails/asc-37-thumbnail.png', :class => 'u-max-full-width') %>
<p>F2P Hardcore Ironman Playlist</p>
</a></div>
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=AhcCiqDegr0">
<%= image_tag('ascendings-thumbnails/asc-30-thumbnail.jpg', :class => 'u-max-full-width') %>
<p>Is Daeyalt Essence Worth Using?</p>
</a></div>
<div class="video-card columns four"><a href="https://www.youtube.com/watch?v=W3pFR_e3OuM">
<%= image_tag('ascendings-thumbnails/asc-19-thumbnail.jpg', :class => 'u-max-full-width') %>
<p>Karambwan Cooking alt</p>
</a></div>
</div>
</section>
<hr>
<!-- Minecraft server callout section -->
<section id="minecraft-section">
<h3>Play Minecraft? Go check out the <a href="https://mc.bitgoblin.tech">community Minecraft server</a>!</h3>
<img class="u-max-full-width" src="https://static.wikia.nocookie.net/minecraft_gamepedia/images/f/ff/Java_Edition_logo_12.png" alt="Minecraft Java Edition logo">
<p>This world is open to everyone who would like to play on it. There are no mods installed, and currently only world is available. I am open to adding mods in the future and even adding more worlds, just let me know!</p>
<p><strong>Note:</strong> The website is currently a work in progress, but it will be up soon!</p>
</section>
<hr>
<!-- Bit Goblin forum callout section -->
<section id="forum-section">
<h3>You can also participate in the <a href="https://forum.bitgoblin.tech">community forum</a>!</h3>
<p>Some of us love the old-style internet forums to converse and help others out. Anything you would like to discuss may happen here under the proper forum sections.</p>
<p><strong>Note:</strong> Currently the Bit Goblin forum is under construction, but check back soon if you'd like to participate!</p>
</section>
</div>
</div>

View File

@ -0,0 +1,9 @@
<div class="row">
<div class="columns twelve">
<p>Unfortunately money doesnt grow on trees, and a lot of the stuff that I purchase to make videos on can be quite expensive. My content is available free-of-charge on YouTube, but if you dont mind helping support me financially any help would be much appreciated.</p>
<p>The primary way to support my work is through donations on <a href="https://patreon.com/BitGoblin">my Patreon page</a>. I dont have any reward tiers over there yet, but I do plan on adding some rewards at some point in the future.</p>
<p>You can also support me by <a href="https://www.joinhoney.com/ref/9ohqcf9">joining Honey using my referral link</a>! Honey helps you save money on popular websites by searching for coupons to get you discounts while youre shopping. And the best part is that its free!</p>
</div>
</div>