diff --git a/app/assets/images/karlsruher.png b/app/assets/images/karlsruher.png new file mode 100644 index 0000000..6e9a9d2 Binary files /dev/null and b/app/assets/images/karlsruher.png differ diff --git a/app/assets/stylesheets/reposts.css.scss b/app/assets/stylesheets/reposts.css.scss index 84c25fd..238cb6a 100644 --- a/app/assets/stylesheets/reposts.css.scss +++ b/app/assets/stylesheets/reposts.css.scss @@ -1,6 +1,36 @@ // Place all the styles related to the Reposts controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +body { background-color: #ffffff; font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana"; } +.logo-red { color: red; } +.logo-black { color: black; } +a { + color: orange; + text-decoration: none; +} + +h1 { + font-size: 25px; + margin-top: 15%; + margin-bottom: 25px; + margin-left: 20px; + vertical-align: baseline; +} +h1 a { + text-decoration: none; +} +div { + margin-left: 20px; +} +.bio { + margin-top: 3ex; + margin-bottom: 3ex; +} +.widget { + margin-top: 3ex; +} + /* flash messages */ #error { background-color: red; diff --git a/app/controllers/reposts_controller.rb b/app/controllers/reposts_controller.rb index f5a9083..3783e7f 100644 --- a/app/controllers/reposts_controller.rb +++ b/app/controllers/reposts_controller.rb @@ -4,29 +4,6 @@ require 'uri' class RepostsController < ApplicationController def index - config = YAML.load_file('config/client.yml') - client_id = config["client_id"] - client_secret = config["client_secret"] - - # connect to ADN via a user token - uri = URI.parse("https://account.app.net/oauth/authenticate") - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - - response = Net::HTTP::post_form( uri, {"client_id" => client_id, "response_type" => "code", "redirect_uri" => "http://repostmentions.sr-rolando.com/", "scope" => "stream"}) - - # [temp] status - @res_code = response.code - @res_message = response.message - @res_class = response.class.name - - if not response.is_a?(Net::HTTPSuccess) - flash[:error] = "Could not connect to ADN." - return - end - - # ... end # TODO: to secure the cronjob call test for 'InvokationPassword' header. diff --git a/app/views/reposts/index.html.erb b/app/views/reposts/index.html.erb index 1f6f36a..65490cd 100644 --- a/app/views/reposts/index.html.erb +++ b/app/views/reposts/index.html.erb @@ -1,21 +1,20 @@ -

- This is the helping hand behind the reposts of the @Karlsruher on App.net. -

+

@Karlsruher

-

- There is nothing much to see here directly, though. -

+
+ Ich retweete automatisch alle Posts, die mich mit @Karlsruher + erreichen.
-<% flash.each do |name, msg| %> -
"> - × - <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %> -
-<% end %> + Reposts alle 5 Minuten.
-

-

Response

- code: <%= @res_code %>
- message: <%= @res_message %>
- class: <%= @res_class %> -

+ Erstellt von @sr_rolando. Idee von @syn2. +
+ +
+ Den Code hinter dem Automatismus gibt's hier: https://bitbucket.org/sr_rolando/adn-repostmentions +
+ +
+Follow me on App.net +