Continue wth freshen up
/ test (push) Has been cancelled
Details
/ test (push) Has been cancelled
Details
This commit is contained in:
parent
65a14e9f19
commit
4ab60b6409
File diff suppressed because one or more lines are too long
|
@ -38,6 +38,10 @@ form#blog_post_form {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#blog_posts {
|
ul#blog_posts {
|
||||||
|
|
|
@ -54,21 +54,24 @@ h3, h4, h5, h6, h7 {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h2 {
|
||||||
|
font-size: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
display: contents;
|
||||||
|
h1 {
|
||||||
background-color: var(--dark-background-color);
|
background-color: var(--dark-background-color);
|
||||||
font-size: 5em;
|
font-size: 5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--highlight-color);
|
color: var(--highlight-color);
|
||||||
-webkit-text-stroke: 1px var(--background-color);
|
-webkit-text-stroke: 1px var(--background-color);
|
||||||
padding: .25em 0;
|
padding: .25em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 2.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
display: contents;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
|
@ -102,7 +105,7 @@ nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin: .5em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link, a:visited {
|
a:link, a:visited {
|
||||||
|
@ -124,6 +127,11 @@ dl {
|
||||||
|
|
||||||
dt {
|
dt {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
padding: 1em 0 .5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside dt {
|
||||||
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
|
@ -165,8 +173,6 @@ form {
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: .5em;
|
border-radius: .5em;
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
background-color: var(--inset-background-color);
|
|
||||||
box-shadow: .5em .5em 3em var(--dark-background-color);
|
|
||||||
|
|
||||||
> label {
|
> label {
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
|
|
|
@ -3,5 +3,7 @@
|
||||||
class HomePagesController < ApplicationController
|
class HomePagesController < ApplicationController
|
||||||
skip_before_action :require_login
|
skip_before_action :require_login
|
||||||
|
|
||||||
def index; end
|
def index
|
||||||
|
@latest_blog_post = BlogPost.published.order(created_at: :desc).first
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<%= form_with model: @blog_post, id: "blog_post_form" do |f| %>
|
<section class="content">
|
||||||
|
<%= form_with model: @blog_post, id: "blog_post_form" do |f| %>
|
||||||
<h2><%= title %></h2>
|
<h2><%= title %></h2>
|
||||||
|
|
||||||
<%= f.text_field :title, placeholder: t(".title") %>
|
<%= f.text_field :title, placeholder: t(".title") %>
|
||||||
|
@ -15,4 +16,5 @@
|
||||||
<%= f.check_box :published %>
|
<%= f.check_box :published %>
|
||||||
|
|
||||||
<%= f.submit button_text %>
|
<%= f.submit button_text %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</section>
|
||||||
|
|
|
@ -1,23 +1,52 @@
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<h2>Hello.</h2>
|
<h2>Hello.</h2>
|
||||||
|
|
||||||
<p>Welcome to my site! I’m a software engineer specialising in Ruby and Rails, with a love for *nix systems,
|
<p>I’m a software engineer specialising in Ruby and Rails.</p>
|
||||||
NixOS and free software in general. I’m also a maker and dad, and here is where my thoughts get dumped.</p>
|
|
||||||
|
|
||||||
<p>The code for my personal projects <%= link_to "can be found here", "https://git.tsvallender.co.uk/tsv" %></p>
|
<p>I’m passionate about <abbr title="Free and Open Source Software">FOSS</abbr> and building high quality
|
||||||
|
systems through modern software engineering techniques.</p>
|
||||||
|
|
||||||
|
<p>Check out some of the articles I’ve written on <%= link_to "my blog", blog_posts_path %>, or read
|
||||||
|
<%= link_to "the latest one", @latest_blog_post %>.</p>
|
||||||
|
|
||||||
|
<h3>Some of my personal projects:</h3>
|
||||||
|
<dl>
|
||||||
|
<dt><%= link_to "This site", "https://git.tsvallender.co.uk/tsv/Soc" %></dt>
|
||||||
|
<dd>The code for this very masterpiece.</dd>
|
||||||
|
<dt><%= link_to "Birthdaze", "https://git.tsvallender.co.uk/tsv/birthdaze" %></dt>
|
||||||
|
<dd>Generate an iCalendar feed of your contacts’ birthdays via a CardDAV server.</dd>
|
||||||
|
<dt><%= link_to "Redmine Jobs", "https://git.tsvallender.co.uk/tsv/Redmine-Jobs" %></dt>
|
||||||
|
<dd>A <%= link_to "Redmine", "https://redmine.org" %> plugin to make it simpler to manage client
|
||||||
|
jobs and their budgets.</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<p>My <%= link_to "dotfiles", "https://git.tsvallender.co.uk/tsv/dotfiles" %> are also available.</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<aside>
|
||||||
<aside>
|
<aside>
|
||||||
<%= image_tag "avatar.png", alt: "T S Vallender", width: 200, height: 200, class: "avatar" %>
|
<%= image_tag "avatar.png", alt: "T S Vallender", width: 200, height: 200, class: "avatar" %>
|
||||||
|
</aside>
|
||||||
|
|
||||||
<aside class="bordered-aside">
|
<aside class="bordered-aside">
|
||||||
<h3>Find me:</h3>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Mastodon</dt>
|
<dt><i class="nf nf-linux-forgejo"></i> Code (Forgejo)</dt>
|
||||||
|
<dd><%= link_to "git.tsvallender.co.uk", "https://git.tsvallender.co.uk" %></dd>
|
||||||
|
<dt><i class="nf nf-md-github"></i> GitHub</dt>
|
||||||
|
<dd>
|
||||||
|
<%= link_to "github.com/tsvallender", "https://github.com/tsvallender" %>
|
||||||
|
<br>Note my own projects live on the Forgejo instance above.
|
||||||
|
</dd>
|
||||||
|
<dt><i class="nf nf-md-mastodon"></i> Mastodon</dt>
|
||||||
<dd><%= link_to "@tsvallender@ruby.social", "https://ruby.social/@tsvallender" %></dd>
|
<dd><%= link_to "@tsvallender@ruby.social", "https://ruby.social/@tsvallender" %></dd>
|
||||||
<dt>Pixelfed</dt>
|
<dt><i class="nf nf-fa-camera_retro"></i> Pixelfed</dt>
|
||||||
<dd><%= link_to "@tsvallender@pixelfed.sdf.org", "https://pixelfed.sdf.org/tsvallender" %></dd>
|
<dd><%= link_to "@tsvallender@pixelfed.sdf.org", "https://pixelfed.sdf.org/tsvallender" %></dd>
|
||||||
<dt>Email</dt>
|
<dt><i class="nf nf-md-email"></i> Email</dt>
|
||||||
<dd><%= mail_to "t@tsvallender.co.uk" %></dd>
|
<dd><%= mail_to "t@tsvallender.co.uk" %></dd>
|
||||||
|
<dt><i class="nf nf-md-chat"></i> Matrix</dt>
|
||||||
|
<dd><%= link_to "tsvallender:matrix.org", "https://matrix.to/#/@tsvallender:matrix.org" %></dd>
|
||||||
|
<dt><i class="nf nf-md-linkedin"></i> LinkedIn</dt>
|
||||||
|
<dd><%= link_to "linkedin.com/in/tsvallender", "https://www.linkedin.com/in/tsvallender/" %></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</aside>
|
</aside>
|
||||||
|
</aside>
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<% @title = @user.username %>
|
<aside>
|
||||||
<h2><%= @user.username %></h2>
|
<%= image_tag "avatar.png", alt: "T S Vallender", width: 200, height: 200, class: "avatar" %>
|
||||||
<h4><%= @user.full_name %></h4>
|
</aside>
|
||||||
|
<section class="content">
|
||||||
|
<% @title = @user.username %>
|
||||||
|
<h2><%= @user.username %></h2>
|
||||||
|
<h4><%= @user.full_name %></h4>
|
||||||
|
|
||||||
<% if @user == current_user %>
|
<% if @user == current_user %>
|
||||||
<%= link_to t(".edit_user_details"), edit_user_path(@user) %>
|
<%= link_to t(".edit_user_details"), edit_user_path(@user) %>
|
||||||
|
|
||||||
<h2>Draft blog posts</h2>
|
<h2>Draft blog posts</h2>
|
||||||
<%= render @user.blog_posts.draft %>
|
<%= render @user.blog_posts.draft %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</section>
|
||||||
|
|
52
bin/setup
52
bin/setup
|
@ -1,33 +1,33 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require "fileutils"
|
|
||||||
|
|
||||||
# path to your application root.
|
def setup
|
||||||
APP_ROOT = File.expand_path("..", __dir__)
|
log "Installing gems…"
|
||||||
|
system!("bundle check || bundle install")
|
||||||
|
|
||||||
|
log "Dropping, creating and seeding development database…"
|
||||||
|
system!("RAILS_ENV=development bin/rails db:seed:replant")
|
||||||
|
|
||||||
|
log "Dropping, creating and seeding test database…"
|
||||||
|
system!("RAILS_ENV=test bin/rails db:reset")
|
||||||
|
|
||||||
|
log "Loading fixtures…"
|
||||||
|
system!("bin/rails db:fixtures:load")
|
||||||
|
end
|
||||||
|
|
||||||
|
def log(message)
|
||||||
|
puts "[ bin/setup ] #{message}"
|
||||||
|
end
|
||||||
|
|
||||||
def system!(*args)
|
def system!(*args)
|
||||||
system(*args, exception: true)
|
log "Executing #{args}"
|
||||||
|
if system(*args)
|
||||||
|
log "…success!"
|
||||||
|
else
|
||||||
|
log "…failed"
|
||||||
|
abort
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.chdir APP_ROOT do
|
setup
|
||||||
# This script is a way to set up or update your development environment automatically.
|
|
||||||
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
|
||||||
# Add necessary setup steps to this file.
|
|
||||||
|
|
||||||
puts "== Installing dependencies =="
|
# vi:syntax=ruby
|
||||||
system! "gem install bundler --conservative"
|
|
||||||
system("bundle check") || system!("bundle install")
|
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
|
||||||
# unless File.exist?("config/database.yml")
|
|
||||||
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
|
||||||
# end
|
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
|
||||||
system! "bin/rails db:prepare"
|
|
||||||
|
|
||||||
puts "\n== Removing old logs and tempfiles =="
|
|
||||||
system! "bin/rails log:clear tmp:clear"
|
|
||||||
|
|
||||||
puts "\n== Restarting application server =="
|
|
||||||
system! "bin/rails restart"
|
|
||||||
end
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue