Help understanding styling

8 views
Skip to first unread message

James Lawton

unread,
Dec 28, 2017, 7:10:23 AM12/28/17
to Church.IO
Hi,

Firstly, thanks to all those who have contributed to this project over the years!

I have a working onebody installation and I want to play around with some of the styling. I am very comfortable with unix and navigating through the installation via SSH but I am new to Ruby and therefore also Rails. I am struggling to find relevant documentation to help. Is onebody built using a common framework in rails that I can read about elsewhere? Here is an example of something I have tried and failed to modify.

On the login page, alter the colour of the site title which defaults to a light blue. Incidentally, this page seems to have styling separate to the settings applied via the admin page once logged in. I have poked around a lot of the installation including app/views and app/assets/stylesheets and tried a bunch of grep’ing to try and find files that might control this title.

Thanks
James

Tim Morgan

unread,
Dec 29, 2017, 11:33:23 AM12/29/17
to chur...@googlegroups.com
James, that style has the CSS selector `.main-header .logo`, so you should be able to add the following CSS to override it:

    :css
      .main-header .logo {
        color: #f00;
      }


You could add the CSS to a an existing CSS file and then recompile the assets, but that's a bit of a hassle. I recommend just updating the layout view file, which is at `app/views/layouts/signed_out.html.haml`. You could insert the CSS like so:

!!!
%html{ class: "full-height #{@body_class}" }
  %head
    %meta{charset: "UTF-8"}
    %title
      = setting(:name, :site)
      - if @title.present?
        == | #{@title}
    %meta{content: "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no", name: "viewport"}
    = yield(:meta)
    = stylesheet_link_tag 'application'
    = yield(:css)
    :css
      .main-header .logo {
        color: #f00;
      }
    = csrf_meta_tags
    = render partial: 'layouts/favicons'

I hope this helps!!

--
https://church.io
https://github.com/churchio
http://chat.church.io
---
You received this message because you are subscribed to the Google Groups "Church.IO" group.
To unsubscribe from this group and stop receiving emails from it, send an email to churchio+u...@googlegroups.com.
To post to this group, send email to chur...@googlegroups.com.
Visit this group at https://groups.google.com/group/churchio.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages