Arie/serveme

View on GitHub
app/views/pages/welcome.html.haml

Summary

Maintainability
Test Coverage
= render 'shared/nag_message' if current_user

- content_for :jumbotron do
  .jumbotron
    .container
      .row
        .col-md-8.buttons
          %h1 Welcome to #{SITE_HOST}!
          %p The easiest way to get a TF2 server
          = link_to new_reservation_path, :class => 'btn btn-lg btn-primary', :title => "Get a server right now, or make a reservation" do
            Get server
            %i.fa.fa-crosshairs
          = link_to i_am_feeling_lucky_reservations_path, :class => 'btn btn-lg btn-warning', :method => :post, :title => "Make a reservation in 1 click", data: { disable_with: "1-click-server <i class='fa fa-refresh fa-spin'></i>"} do

            1-click-server
            %i.fa.fa-bolt

        .col-md-4.align-self-end
          = render 'reservations/available_servers'

= render 'shared/point_to_na'

.row
  .col-md-12
    %p.lead
      = link_to("Book a server", new_reservation_path)
      and within a few seconds your server will be ready and yours to use.
      Feel free to use the server for any kind of match you want.

.row
  .col-md-12
    %p
      Please
      = link_to('consider contributing to the operating costs by donating.', donate_path)
      All donations get divided between the server providers based on time played on their servers.

      You can also
      - if sea_system?
        = link_to('send the tradebot a trade offer.', 'https://steamcommunity.com/tradeoffer/new/?partner=328658734&token=3vDIZUwa')

        The current rate is 2 keys per month, but you can also send some items just to say thanks.
      - elsif au_system?
        = link_to('support ozfortress on Patreon to get access to au.serveme.tf Premium.', 'https://patreon.com/ozfortress')

        All of ozfortress' Patreon Tiers include au.serveme.tf Premium!
      - else
        = link_to('send me a TF2 trade offer.', 'https://steamcommunity.com/tradeoffer/new/?partner=231702&token=POpKIGaL')

        The current rate is 2 keys per month, but you can also send some items just to say thanks.


- if au_system?
  .row &nbsp;

- else
  .row
    = render "shared/donation_target"

.row &nbsp;

.row
  .col-md-12
    = link_to("Leave a comment", "#leave-a-comment")
    if you like this service, had a problem or suggestion, I'd really appreciate it!
    - if au_system?
      Alternatively, you can reach out in the
      = link_to "ozfortress Discord.", 'https://discord.gg/7E6kC2H', :target => '_blank'
    - else
      Alternatively, you could leave a message on
      = link_to "our Discord", 'https://discord.gg/0s38RdItLiCmARMm', :target => '_blank'

.row &nbsp;


- if @users_games && @users_games.any?
  %h3 Reservations you played in
  .row
    .col-md-12
      = render 'reservations/users_games'

- if @users_reservations && @users_reservations.any?
  %h3 Your most recent reservations
  .row
    .col-md-12
      = render 'reservations/users_reservations'

.row
  .col-md-12
    %h3 Comments

    #leave-a-comment
      = render 'shared/disqus'