From 933b5a49633b497af9557e94cf20cf280bae9e72 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sat, 20 Oct 2012 16:47:31 +0200 Subject: [PATCH 1/8] Replace dark empty_dots.png for Airy theme --- mediagoblin/themes/airy/assets/css/airy.css | 4 ++++ .../themes/airy/assets/images/empty_dots.png | Bin 0 -> 205 bytes 2 files changed, 4 insertions(+) create mode 100644 mediagoblin/themes/airy/assets/images/empty_dots.png diff --git a/mediagoblin/themes/airy/assets/css/airy.css b/mediagoblin/themes/airy/assets/css/airy.css index ba9048b2..09d447d2 100644 --- a/mediagoblin/themes/airy/assets/css/airy.css +++ b/mediagoblin/themes/airy/assets/css/airy.css @@ -86,3 +86,7 @@ input, textarea { .dropdown_items { background-color: #fff; } + +.empty_space { + background-image: url("../images/empty_dots.png"); +} diff --git a/mediagoblin/themes/airy/assets/images/empty_dots.png b/mediagoblin/themes/airy/assets/images/empty_dots.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee050b218fce0f869580f5060a4774bf7508788 GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u@pObhHwBu4M$1`kk47*5m^kR ztU#FYL&_vCprB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt*1jE{-7* zQxJ3EWj|NZ~}pJ#``Wgx{ZAtAA3=8PGaBtI}L1M^-UNSOct literal 0 HcmV?d00001 From e711d1cf7271c24597dcd7fb42746e7e474b63cb Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sat, 20 Oct 2012 18:09:45 +0200 Subject: [PATCH 2/8] Replace icon_feed.png with proper Airy version --- .../themes/airy/assets/images/icon_feed.png | Bin 0 -> 473 bytes .../mediagoblin/utils/feed_link.html | 23 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 mediagoblin/themes/airy/assets/images/icon_feed.png create mode 100644 mediagoblin/themes/airy/templates/mediagoblin/utils/feed_link.html diff --git a/mediagoblin/themes/airy/assets/images/icon_feed.png b/mediagoblin/themes/airy/assets/images/icon_feed.png new file mode 100644 index 0000000000000000000000000000000000000000..18c085b4c40c7e0043f354bee4c81688d7504f88 GIT binary patch literal 473 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^PK; zkR_TQD8gCb5m^k>ejS7voit`w00r4gJbhi+?{J9-F!HZVRI~+}66xvU7-DgH>14xI zha3dj_IH?HIOP?{!o7OSL1vCH=C1aDi5eab0xbLqIcFFzATF>>%F`FHJAi>~3Y3!7sC!Z^IBi4p7lvv5e z-p<>;o. +#} + + + {% trans %}feed icon{% endtrans %} + +{%- trans %}Atom feed{% endtrans -%} From f93ac9f28cf966f67af4a675a07fc79429e3095d Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sat, 20 Oct 2012 18:33:26 +0200 Subject: [PATCH 3/8] Implement new RSS icon for Airy theme --- .../themes/airy/templates/mediagoblin/utils/feed_link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/themes/airy/templates/mediagoblin/utils/feed_link.html b/mediagoblin/themes/airy/templates/mediagoblin/utils/feed_link.html index 6a41cef5..cf5099a2 100644 --- a/mediagoblin/themes/airy/templates/mediagoblin/utils/feed_link.html +++ b/mediagoblin/themes/airy/templates/mediagoblin/utils/feed_link.html @@ -17,7 +17,7 @@ #} - {% trans %}feed icon{% endtrans %} {%- trans %}Atom feed{% endtrans -%} From ac4c5aef5775d5c4a3d8ebd5528e6d2db8062174 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Sat, 20 Oct 2012 23:56:00 +0200 Subject: [PATCH 4/8] Added HTTP API auth plugin --- mediagoblin/plugins/httpapiauth/__init__.py | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 mediagoblin/plugins/httpapiauth/__init__.py diff --git a/mediagoblin/plugins/httpapiauth/__init__.py b/mediagoblin/plugins/httpapiauth/__init__.py new file mode 100644 index 00000000..d3d2065e --- /dev/null +++ b/mediagoblin/plugins/httpapiauth/__init__.py @@ -0,0 +1,58 @@ +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +import logging +import base64 + +from werkzeug.exceptions import BadRequest, Unauthorized + +from mediagoblin.plugins.api.tools import Auth + +_log = logging.getLogger(__name__) + + +def setup_http_api_auth(): + _log.info('Setting up HTTP API Auth...') + + +class HTTPAuth(Auth): + def trigger(self, request): + if request.authorization: + return True + + return False + + def __call__(self, request, *args, **kw): + _log.debug('Trying to authorize the user agent via HTTP Auth') + if not request.authorization: + return False + + user = request.db.User.query.filter_by( + username=request.authorization['username']).first() + + if user.check_login(request.authorization['password']): + request.user = user + return True + else: + raise Unauthorized() + + return False + + + +hooks = { + 'setup': setup_http_api_auth, + 'auth': HTTPAuth()} From c40cb686de2c5ea242af81ac749d9239ac6a2dab Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sun, 21 Oct 2012 02:17:38 +0200 Subject: [PATCH 5/8] Styling edits to Airy theme --- mediagoblin/themes/airy/assets/css/airy.css | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mediagoblin/themes/airy/assets/css/airy.css b/mediagoblin/themes/airy/assets/css/airy.css index 09d447d2..6143b6e1 100644 --- a/mediagoblin/themes/airy/assets/css/airy.css +++ b/mediagoblin/themes/airy/assets/css/airy.css @@ -3,16 +3,12 @@ body { background-color: #F7F7F7; } -h1,h2 { - color: #787878; -} - -h3 { +h1,h2,h3 { color: #4a4a4a; } a { - color: #37BD85; + color: #37AB74; } .navigation_button { @@ -52,7 +48,7 @@ footer { .button_action_highlight, .button_form { color: #fff; - background-color: #37BD85; + background-color: #37AB74; border-color: #6CAA8E; border-width: 1px 1px 2px; } From 30a8828f9b4efc4ff8026a375f11756ca76e412b Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sun, 21 Oct 2012 20:36:30 +0200 Subject: [PATCH 6/8] Add "Add collection" link to Airy theme --- mediagoblin/themes/airy/templates/mediagoblin/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mediagoblin/themes/airy/templates/mediagoblin/base.html b/mediagoblin/themes/airy/templates/mediagoblin/base.html index 8bd9a7f9..d243d331 100644 --- a/mediagoblin/themes/airy/templates/mediagoblin/base.html +++ b/mediagoblin/themes/airy/templates/mediagoblin/base.html @@ -65,6 +65,7 @@