Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Style the tabs and the initial pay form
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jun 7, 2017
1 parent 3f428f8 commit 6978124
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 8 deletions.
4 changes: 1 addition & 3 deletions scss/elements/buttons-knobs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ button.selected:hover:not(:disabled), button.selected.drag,


.important-button {
margin: 38px auto 30px;
margin: 30px auto 30px;
text-align: center;

button.large {
Expand All @@ -81,5 +81,3 @@ button.selected:hover:not(:disabled), button.selected.drag,
left: 5%;
}
}


55 changes: 55 additions & 0 deletions scss/pages/npm.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#npm {

#notice {
display: none;
}

#main {
margin-top: 0;
}

#content {
.nav {
margin-bottom: 40px;

li {
width: 50%;
text-align: center;
display: block;
float: left;
margin: 40px 0 0;
padding: 0;
a {
font: normal 18pt/24pt $Ideal;
display: block;
height: 64pt;
padding: 20pt 0;
border-bottom: 0;

.textwrap {
color: $black;
display: inline-block;
border-bottom: 4pt solid transparent;
}

&:hover {
background: none;
}

&.selected {
.textwrap {
border-bottom-color: $green;
font-weight: bold;
}
}
}
}
}

textarea {
height: 192px;
width: 100%;
font: 10px/12px $Mono;
}
}
}
2 changes: 1 addition & 1 deletion templates/nav-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% for tab in tabs %}
<li>
<a href="{{ tab.link }}"{% if tab.is_selected %} class="selected"{% endif %}>
{{ tab.html|safe }}
<span class="textwrap">{{ tab.html|safe }}</span>
</a>
</li>
{% endfor %}
Expand Down
8 changes: 7 additions & 1 deletion tests/ttw/test_package_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ def test_anon_gets_sign_in_prompt(self):
self.visit('/on/npm/')
assert self.css('.instructions').text == 'Make or receive payments for npm packages:'

def test_auth_gets_pay_page_by_default(self):
def test_auth_gets_discovery_page_by_default(self):
self.make_participant('alice')
self.sign_in('alice')
self.visit('/on/npm/')
assert self.css('.instructions').text == 'Paste a package.json to find packages:'

def test_pasting_a_package_json_works(self):
self.make_participant('alice')
self.sign_in('alice')
self.visit('/on/npm/')
import pdb; pdb.set_trace()
1 change: 1 addition & 0 deletions www/assets/gratipay.css.spt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
@import "scss/pages/history";
@import "scss/pages/identities";
@import "scss/pages/team";
@import "scss/pages/npm";
@import "scss/pages/package";
@import "scss/pages/profile-edit";
@import "scss/pages/giving";
Expand Down
171 changes: 168 additions & 3 deletions www/on/npm/index.html.spt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from gratipay.utils import icons, tabs
[---]
banner = manager = "npm"
banner = manager = page_id = "npm"
suppress_sidebar = True
npackages, Npackages = website.db.one('''
select (select count(*) from teams_to_packages) as n, (select count(*) from packages) as t
Expand Down Expand Up @@ -54,11 +54,176 @@ tabs = tabs.make(tab_html, 'flow', flow, 'pay', 'receive')
{{ _('Paste a package.json to find packages:') }}
</p>

<textarea></textarea>
<textarea autofocus wrap="off">
{
"name": "ghost",
"version": "1.0.0-alpha.21",
"description": "Just a blogging platform.",
"author": "Ghost Foundation",
"homepage": "http://ghost.org",
"keywords": [
"ghost",
"blog",
"cms"
],
"repository": {
"type": "git",
"url": "git://github.com/TryGhost/Ghost.git"
},
"bugs": "https://github.com/TryGhost/Ghost/issues",
"contributors": "https://github.com/TryGhost/Ghost/graphs/contributors",
"license": "MIT",
"main": "./core/index",
"scripts": {
"start": "node index",
"test": "grunt validate --verbose",
"init": "yarn global add knex-migrator ember-cli grunt-cli && yarn install && grunt symlink && grunt init || true"
},
"engines": {
"node": "^4.5.0 || ^6.9.0"
},
"dependencies": {
"amperize": "0.3.4",
"archiver": "1.3.0",
"bcryptjs": "2.4.3",
"bluebird": "3.5.0",
"body-parser": "1.17.1",
"bookshelf": "0.10.3",
"brute-knex": "https://github.com/cobbspur/brute-knex/tarball/37439f56965b17d29bb4ff9b3f3222b2f4bd6ce3",
"bson-objectid": "1.1.5",
"chalk": "1.1.3",
"cheerio": "0.22.0",
"compression": "1.6.2",
"connect-slashes": "1.3.1",
"cookie-session": "1.2.0",
"cors": "2.8.3",
"csv-parser": "1.11.0",
"debug": "2.6.6",
"downsize": "0.0.8",
"express": "4.15.2",
"express-brute": "1.0.1",
"express-hbs": "1.0.4",
"extract-zip-fork": "1.5.1",
"fs-extra": "3.0.1",
"ghost-gql": "0.0.6",
"ghost-ignition": "2.8.11",
"ghost-storage-base": "0.0.1",
"glob": "5.0.15",
"gscan": "1.1.0",
"html-to-text": "3.2.0",
"icojs": "0.7.2",
"image-size": "0.5.2",
"intl": "1.2.5",
"intl-messageformat": "1.3.0",
"jsdom": "9.12.0",
"jsonpath": "0.2.11",
"knex": "0.12.9",
"knex-migrator": "2.0.16",
"lodash": "4.17.4",
"markdown-it": "8.3.1",
"markdown-it-footnote": "3.0.1",
"markdown-it-lazy-headers": "0.1.3",
"markdown-it-mark": "2.0.0",
"markdown-it-named-headers": "0.0.4",
"mobiledoc-dom-renderer": "0.6.5",
"moment": "2.18.1",
"moment-timezone": "0.5.13",
"multer": "1.3.0",
"mysql": "2.13.0",
"nconf": "0.8.4",
"netjet": "1.1.3",
"nodemailer": "0.7.1",
"oauth2orize": "1.8.0",
"passport": "0.3.2",
"passport-ghost": "2.3.1",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"path-match": "1.2.4",
"rss": "1.2.2",
"sanitize-html": "1.14.1",
"semver": "5.3.0",
"simple-dom": "0.3.2",
"simple-html-tokenizer": "0.4.1",
"superagent": "3.5.2",
"unidecode": "0.1.8",
"uuid": "3.0.1",
"validator": "6.3.0",
"xml": "1.0.1"
},
"optionalDependencies": {
"sqlite3": "3.1.8"
},
"devDependencies": {
"grunt": "1.0.1",
"grunt-bg-shell": "2.3.3",
"grunt-cli": "1.2.0",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-compress": "1.3.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-symlink": "^1.0.0",
"grunt-contrib-uglify": "2.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-cssnano": "2.1.0",
"grunt-docker": "0.0.11",
"grunt-express-server": "0.5.3",
"grunt-jscs": "3.0.1",
"grunt-mocha-cli": "2.1.0",
"grunt-mocha-istanbul": "5.0.2",
"grunt-shell": "1.3.1",
"grunt-subgrunt": "1.2.0",
"grunt-update-submodules": "0.4.1",
"istanbul": "0.4.5",
"jshint": "2.9.4",
"jshint-stylish": "2.2.1",
"matchdep": "1.0.1",
"minimist": "1.2.0",
"mocha": "3.3.0",
"nock": "9.0.13",
"rewire": "2.5.2",
"run-sequence": "1.2.2",
"should": "11.2.1",
"should-http": "0.1.1",
"sinon": "1.17.7",
"supertest": "3.0.0",
"tmp": "0.0.31"
},
"greenkeeper": {
"ignore": [
"glob",
"nodemailer",
"grunt",
"grunt-bg-shell",
"grunt-cli",
"grunt-contrib-clean",
"grunt-contrib-compress",
"grunt-contrib-copy",
"grunt-contrib-jshint",
"grunt-contrib-uglify",
"grunt-contrib-watch",
"grunt-docker",
"grunt-express-server",
"grunt-jscs",
"grunt-mocha-cli",
"grunt-mocha-istanbul",
"grunt-shell",
"grunt-subgrunt",
"grunt-update-submodules",
"sinon"
]
}
}
</textarea><pre>

<div class="important-button">
<button type="submit" class="apply selected large">
{{ _('Find packages') }}
</button>
</div>

{% else %}
<p class="instructions">
{{ _('Apply to receive payments for your npm packages:') }}
{{ _('Apply to accept payments for your npm packages:') }}
</p>
{% if not packages_for_claiming %}
<p class="sorry">{{ _("No packages found.") }}</p>
Expand Down

0 comments on commit 6978124

Please sign in to comment.