First iteration of new homepage.
parent
a023a58c9e
commit
9529e02c98
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2412,7 +2412,13 @@ body.editing {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
html.homepage {
|
||||
background: white;
|
||||
}
|
||||
body.homepage {
|
||||
background: white;
|
||||
|
||||
a.button {
|
||||
background: #54737E;
|
||||
border: 2px solid white;
|
||||
|
@ -2546,6 +2552,42 @@ body.homepage {
|
|||
font: bold 26px $Rockwell;
|
||||
}
|
||||
}
|
||||
div.row {
|
||||
div.inner {
|
||||
margin: 0 auto;
|
||||
width: 460px;
|
||||
}
|
||||
h2 {
|
||||
color: #3A5159;
|
||||
font: bold 20px $Rockwell;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 35px;
|
||||
}
|
||||
p {
|
||||
color: #656565;
|
||||
font: 500 16px/24px $Helvetica;
|
||||
|
||||
code.good {
|
||||
color: #468847;
|
||||
}
|
||||
}
|
||||
&.feature {
|
||||
height: 232px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
&.blog {
|
||||
background: url('../img/homepage-feature-blog.png') 720px top no-repeat;
|
||||
}
|
||||
&.browse {
|
||||
background: url('../img/homepage-feature-browse.png') 78px top no-repeat;
|
||||
}
|
||||
&.share {
|
||||
background: url('../img/homepage-feature-share.png') 720px top no-repeat;
|
||||
}
|
||||
&.store {
|
||||
background: url('../img/homepage-feature-store.png') left top no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Large desktop */
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -11,7 +11,6 @@ urlpatterns = patterns('',
|
|||
url(r'^public/tag/(?P<tag_slug>[^/]+)/feed/$', views.redirect_public_tag_feed, name='redirect-public-tag-feed'),
|
||||
url(r'^(?P<username>[^/]+)/tag/(?P<tag_slug>[^/]+)/feed/$', views.redirect_user_tag_feed, name='redirect-user-tag-feed'),
|
||||
|
||||
url(r'^$', views.home, name='home'),
|
||||
url(r'^public/$', views.list_public, name='list-public'),
|
||||
url(r'^public/tag/(?P<tag_slug>[^/]+)/$', views.list_public, name='list-public-tag'),
|
||||
url(r'^embed/(?P<snipt_key>[^/]+)/$', views.embed, name='embed'),
|
||||
|
|
|
@ -19,16 +19,6 @@ from haystack.query import EmptySearchQuerySet, SearchQuerySet
|
|||
|
||||
RESULTS_PER_PAGE = getattr(settings, 'HAYSTACK_SEARCH_RESULTS_PER_PAGE', 20)
|
||||
|
||||
def home(request):
|
||||
|
||||
if request.blog_user:
|
||||
return blog_list(request)
|
||||
|
||||
if request.user.is_authenticated():
|
||||
return HttpResponseRedirect('/%s/' % request.user.username)
|
||||
else:
|
||||
return list_public(request)
|
||||
|
||||
@render_to('snipts/detail.html')
|
||||
def detail(request, username, snipt_slug):
|
||||
|
||||
|
|
|
@ -69,9 +69,33 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<header class="span4 offset4">
|
||||
<h1>Built For Coders</h1>
|
||||
<h1>Built for coders.</h1>
|
||||
</header>
|
||||
</div>
|
||||
<div class="feature row store">
|
||||
<div class="inner">
|
||||
<h2>Store private code snippets.</h2>
|
||||
<p>Your snipts are <code>private</code> by default, making them perfect for storing and organizing code you never want to forget.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature row share">
|
||||
<div class="inner">
|
||||
<h2>Store public code snippets, and share.</h2>
|
||||
<p>Mark a snipt as <code class="good">public</code> to share it with the world. Share on Twitter, comment with Disqus, etc.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature row browse">
|
||||
<div class="inner">
|
||||
<h2>Browse, search, learn.</h2>
|
||||
<p><a href="/public/">Browse</a> and <a href="/search/">search</a> through public snipts to learn new approaches and best practices.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature row blog">
|
||||
<div class="inner">
|
||||
<h2>Fast, code-focused blogging.</h2>
|
||||
<p><a href="/blogging/">A full blog in seconds</a>: mark a snipt as "Blog Post", and blog with ease. Markdown support built-in. Your domain, or ours.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
2
urls.py
2
urls.py
|
@ -33,7 +33,7 @@ private_api.register(PrivateUserProfileResource())
|
|||
|
||||
urlpatterns = patterns('',
|
||||
|
||||
url(r'^homepage/$', homepage),
|
||||
url(r'^$', homepage),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
|
||||
|
|
5
views.py
5
views.py
|
@ -1,4 +1,5 @@
|
|||
from accounts.models import UserProfile
|
||||
from blogs.views import blog_list
|
||||
from django.http import HttpResponseRedirect, HttpResponseBadRequest
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from annoying.decorators import ajax_request, render_to
|
||||
|
@ -14,10 +15,12 @@ import hashlib, stripe
|
|||
|
||||
from settings_local import STRIPE_SECRET_KEY
|
||||
|
||||
|
||||
@render_to('homepage.html')
|
||||
def homepage(request):
|
||||
|
||||
if request.blog_user:
|
||||
return blog_list(request)
|
||||
|
||||
coders = []
|
||||
|
||||
users_with_gravatars = User.objects.filter(
|
||||
|
|
Loading…
Reference in New Issue