diff --git a/app/models.py b/app/models.py index c5ce4b6c..cfe19315 100644 --- a/app/models.py +++ b/app/models.py @@ -89,6 +89,7 @@ class Package(db.Model): author_id = db.Column(db.Integer, db.ForeignKey('user.id')) name = db.Column(db.String(100), nullable=False) title = db.Column(db.String(100), nullable=False) + shortDesc = db.Column(db.Text, nullable=True) desc = db.Column(db.Text, nullable=True) type = db.Column(db.Enum(PackageType)) diff --git a/app/static/style.css b/app/static/style.css index c9c28d68..551cc740 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -80,7 +80,6 @@ a:hover { text-align: center; color: #ddd; text-decoration: none; - margin: 5px 0 !important; } .buttonset li a:hover { @@ -96,6 +95,24 @@ a:hover { background: #474 !important; } +.linedbuttonset a { + border: 1px solid #eee; + border-radius: 3px; + padding: 4px 10px; + margin: 0; + display: block; +} + +.linedbuttonset { + display: block; + margin: 0; +} + +.linedbuttonset li { + display: inline-block; + margin: 10px 10px 0 0; +} + /* Alerts */ #alerts { @@ -196,6 +213,12 @@ footer a { color: #666; } +.asideright { + float: right; + margin: 0 0 0 15px; + max-width: 300px; +} + /* Mod */ @@ -243,3 +266,7 @@ footer a { .sidebar_container .right > *:first-child, .sidebar_container .left > *:first-child { margin-top: 0; } + +.package-short-large { + font-size: 120%; +} diff --git a/app/templates/package_details.html b/app/templates/package_details.html index c52cd626..b75be243 100644 --- a/app/templates/package_details.html +++ b/app/templates/package_details.html @@ -1,14 +1,33 @@ {% extends "base.html" %} {% block title %} -{{ package.title }} + {{ package.title }} {% endblock %} {% block content %} - {{ package.title }} - {{ package.author.display_name }} - {{ package.name }} - {{ package.desc }} - VCS Repo - Report Issue +
{{ package.shortDesc }}
+ + {{ package.desc | markdown }} {% endblock %} diff --git a/app/views/__init__.py b/app/views/__init__.py index ed90875e..94234532 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -7,8 +7,13 @@ import flask_menu as menu from flask.ext import markdown from sqlalchemy import func from werkzeug.contrib.cache import SimpleCache +from urllib.parse import urlparse cache = SimpleCache() +@app.template_filter() +def domain(url): + return urlparse(url).netloc + # TODO: remove on production! @app.route('/static/