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;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
ul#blog_posts {
|
||||
|
|
|
@ -54,21 +54,24 @@ h3, h4, h5, h6, h7 {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background-color: var(--dark-background-color);
|
||||
font-size: 5em;
|
||||
text-align: center;
|
||||
color: var(--highlight-color);
|
||||
-webkit-text-stroke: 1px var(--background-color);
|
||||
padding: .25em 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
header {
|
||||
display: contents;
|
||||
h1 {
|
||||
background-color: var(--dark-background-color);
|
||||
font-size: 5em;
|
||||
text-align: center;
|
||||
color: var(--highlight-color);
|
||||
-webkit-text-stroke: 1px var(--background-color);
|
||||
padding: .25em 0;
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
|
@ -102,7 +105,7 @@ nav {
|
|||
}
|
||||
|
||||
p {
|
||||
margin: .5em 0;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
|
@ -124,6 +127,11 @@ dl {
|
|||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
padding: 1em 0 .5em 0;
|
||||
}
|
||||
|
||||
aside dt {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
dd {
|
||||
|
@ -165,8 +173,6 @@ form {
|
|||
border: 1px solid var(--border-color);
|
||||
border-radius: .5em;
|
||||
font-size: 1.2em;
|
||||
background-color: var(--inset-background-color);
|
||||
box-shadow: .5em .5em 3em var(--dark-background-color);
|
||||
|
||||
> label {
|
||||
grid-column: 1;
|
||||
|
|
|
@ -3,5 +3,7 @@
|
|||
class HomePagesController < ApplicationController
|
||||
skip_before_action :require_login
|
||||
|
||||
def index; end
|
||||
def index
|
||||
@latest_blog_post = BlogPost.published.order(created_at: :desc).first
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<%= form_with model: @blog_post, id: "blog_post_form" do |f| %>
|
||||
<h2><%= title %></h2>
|
||||
<section class="content">
|
||||
<%= form_with model: @blog_post, id: "blog_post_form" do |f| %>
|
||||
<h2><%= title %></h2>
|
||||
|
||||
<%= f.text_field :title, placeholder: t(".title") %>
|
||||
<%= f.text_field :title, placeholder: t(".title") %>
|
||||
|
||||
<%= f.rich_text_area :content %>
|
||||
<%= f.rich_text_area :content %>
|
||||
|
||||
<%= f.label :summary %>
|
||||
<%= f.text_area :summary %>
|
||||
<%= f.label :summary %>
|
||||
<%= f.text_area :summary %>
|
||||
|
||||
<%= f.label :slug %>
|
||||
<%= f.text_field :slug %>
|
||||
<%= f.label :slug %>
|
||||
<%= f.text_field :slug %>
|
||||
|
||||
<%= f.label :published %>
|
||||
<%= f.check_box :published %>
|
||||
<%= f.label :published %>
|
||||
<%= f.check_box :published %>
|
||||
|
||||
<%= f.submit button_text %>
|
||||
<% end %>
|
||||
<%= f.submit button_text %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
|
|
@ -1,23 +1,52 @@
|
|||
<section class="content">
|
||||
<h2>Hello.</h2>
|
||||
|
||||
<p>Welcome to my site! I’m a software engineer specialising in Ruby and Rails, with a love for *nix systems,
|
||||
NixOS and free software in general. I’m also a maker and dad, and here is where my thoughts get dumped.</p>
|
||||
<p>I’m a software engineer specialising in Ruby and Rails.</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>
|
||||
|
||||
<aside>
|
||||
<aside>
|
||||
<%= image_tag "avatar.png", alt: "T S Vallender", width: 200, height: 200, class: "avatar" %>
|
||||
</aside>
|
||||
|
||||
<aside class="bordered-aside">
|
||||
<h3>Find me:</h3>
|
||||
<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>
|
||||
<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>
|
||||
<dt>Email</dt>
|
||||
<dt><i class="nf nf-md-email"></i> Email</dt>
|
||||
<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>
|
||||
</aside>
|
||||
</aside>
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
<% @title = @user.username %>
|
||||
<h2><%= @user.username %></h2>
|
||||
<h4><%= @user.full_name %></h4>
|
||||
<aside>
|
||||
<%= image_tag "avatar.png", alt: "T S Vallender", width: 200, height: 200, class: "avatar" %>
|
||||
</aside>
|
||||
<section class="content">
|
||||
<% @title = @user.username %>
|
||||
<h2><%= @user.username %></h2>
|
||||
<h4><%= @user.full_name %></h4>
|
||||
|
||||
<% if @user == current_user %>
|
||||
<%= link_to t(".edit_user_details"), edit_user_path(@user) %>
|
||||
<% if @user == current_user %>
|
||||
<%= link_to t(".edit_user_details"), edit_user_path(@user) %>
|
||||
|
||||
<h2>Draft blog posts</h2>
|
||||
<%= render @user.blog_posts.draft %>
|
||||
<% end %>
|
||||
<h2>Draft blog posts</h2>
|
||||
<%= render @user.blog_posts.draft %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
|
52
bin/setup
52
bin/setup
|
@ -1,33 +1,33 @@
|
|||
#!/usr/bin/env ruby
|
||||
require "fileutils"
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = File.expand_path("..", __dir__)
|
||||
def setup
|
||||
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)
|
||||
system(*args, exception: true)
|
||||
log "Executing #{args}"
|
||||
if system(*args)
|
||||
log "…success!"
|
||||
else
|
||||
log "…failed"
|
||||
abort
|
||||
end
|
||||
end
|
||||
|
||||
FileUtils.chdir APP_ROOT do
|
||||
# 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.
|
||||
setup
|
||||
|
||||
puts "== Installing dependencies =="
|
||||
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
|
||||
# vi:syntax=ruby
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue