From dd9e271bbb6051d35b44d041c8540173144d9761 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sat, 1 Jun 2013 02:11:17 -0400 Subject: [PATCH] Implement The Horn; #7 #145 This is an implementation of communication between people on the site. --- schema.sql | 16 ++++++ templates/gittip.scss | 65 +++++++++++++++++++++++ templates/profile.html | 9 +++- www/%username/horn/index.html | 41 ++++++++++++++ www/%username/horn/toot.json | 16 ++++++ www/%username/horn/toots.json | 61 +++++++++++++++++++++ www/assets/%version/gittip.css | 2 +- www/assets/%version/gittip.js | 97 ++++++++++++++++++++++++++++++++++ 8 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 www/%username/horn/index.html create mode 100644 www/%username/horn/toot.json create mode 100644 www/%username/horn/toots.json diff --git a/schema.sql b/schema.sql index 191c498812..45452e9be4 100644 --- a/schema.sql +++ b/schema.sql @@ -671,3 +671,19 @@ BEGIN; , mtime DESC; END; + + +------------------------------------------------------------------------------- +-- https://github.com/gittip/www.gittip.com/issues/7 +-- https://github.com/gittip/www.gittip.com/issues/145 + +CREATE TABLE toots +( id bigserial PRIMARY KEY +, ctime timestamp with time zone NOT NULL + DEFAULT CURRENT_TIMESTAMP +, tooter text NOT NULL REFERENCES participants + ON UPDATE CASCADE ON DELETE RESTRICT +, tootee text NOT NULL REFERENCES participants + ON UPDATE CASCADE ON DELETE RESTRICT +, toot text NOT NULL + ); diff --git a/templates/gittip.scss b/templates/gittip.scss index d3eec1de00..0ebce3bd07 100644 --- a/templates/gittip.scss +++ b/templates/gittip.scss @@ -989,6 +989,71 @@ UL.community-memberships { } +#horn { + textarea { + width: 100%; + height: 40px; + font: normal 16px/20px $Helvetica; + } + .help { + font: normal 10px/12px $Helvetica; + color: $brown; + text-transform: uppercase; + display: block; + + span { + display: inline-block; + white-space: nowrap; + padding: 2pt 0; + } + } + .datetime { + display: block; + padding: 0 0 3pt; + } + button#toot-button { + float: right; + } + li { + margin: 0; + padding: 0 0 2pt; + + &.me.theirs { + font: bold 18px/19px $Helvetica; + } + &.them { + font: normal 12px/13px $Helvetica; + } + &.them.own { + font-weight: bold; + } + .meta { + text-align: right; + text-transform: none; + font: normal 11px/13px $Helvetica; + color: $light-brown; + + span { + display: inline-block; + white-space: nowrap; + padding: 2pt 0; + } + + .re { + text-align: left; + padding-right: 3pt; + } + .tootee { + font-weight: bold; + } + .time { + font-style: italic; + } + } + } +} + + #history { th { padding: 0 3pt; diff --git a/templates/profile.html b/templates/profile.html index 2695c92b75..f17badf5df 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -17,7 +17,7 @@ {% if participant == user or user.ADMIN %}