diff --git a/media/css/core.css b/media/css/core.css index da96520489b..063edf5e585 100644 --- a/media/css/core.css +++ b/media/css/core.css @@ -297,6 +297,45 @@ div.menu-user div.menu-dropdown.menu-dropped { .home-header-links .login { font-weight: bold; color: #e3e3e3; text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.5); } .home-header-links .login:hover { text-align: center; color: #fff; } +section { + margin-bottom: 60px; +} +.home .lead { + font-size: 20px; + line-height: 30px; +} +.home .feature { + float: left; + width: 48%; + margin-left: 1%; + margin-right: 1%; +} + +a.cta-btn { + /* Make this link look like a button */ + width: 300px; + font-weight: bold; + text-align: center; + display: inline-block; + margin: .3em 0em; + font-size: 1.1em; + color: #fff; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); + background: #e6e6e6 url(../images/gradient.png) repeat-x bottom left; + background-color: #8ECC4C; + border: 1px solid #bfbfbf; + border-color: #6B9939; + border-bottom-color: #50732B; + padding: 8px 15px; + border-radius: 3px; + text-decoration: none; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; +} +a.cta-btn:hover, a.cta-btn:active { + color: #fff; +} /* wide search bar */ diff --git a/readthedocs/core/views/__init__.py b/readthedocs/core/views/__init__.py index 50c82533c03..b345ea3859d 100644 --- a/readthedocs/core/views/__init__.py +++ b/readthedocs/core/views/__init__.py @@ -39,20 +39,8 @@ class HomepageView(TemplateView): def get_context_data(self, **kwargs): """Add latest builds and featured projects.""" context = super(HomepageView, self).get_context_data(**kwargs) - latest = [] - latest_builds = ( - Build.objects - .filter( - project__privacy_level=constants.PUBLIC, - success=True, - ) - .order_by('-date') - )[:100] # yapf: disable - for build in latest_builds: - if (build.project not in latest and len(latest) < 10): - latest.append(build.project) - context['project_list'] = latest context['featured_list'] = Project.objects.filter(featured=True) + context['projects_count'] = Project.objects.count() return context diff --git a/readthedocs/templates/base.html b/readthedocs/templates/base.html index 4234a80bb0a..fc6358e080a 100644 --- a/readthedocs/templates/base.html +++ b/readthedocs/templates/base.html @@ -8,13 +8,15 @@ + {% block extra_metas %}{% endblock extra_metas %} + {% block title %}{% endblock %}{% block head_title %}{% endblock %} | {% block branding %}Read the Docs {% endblock %} - - - - + + + - - - - + + + @@ -55,13 +57,9 @@ {% block extra_scripts %}{% endblock %} - - - + + @@ -204,10 +202,10 @@

{% trans "Read the Docs" %}

- + - + diff --git a/readthedocs/templates/core/widesearchbar.html b/readthedocs/templates/core/widesearchbar.html index 7b647a435d7..12c3321add9 100644 --- a/readthedocs/templates/core/widesearchbar.html +++ b/readthedocs/templates/core/widesearchbar.html @@ -9,7 +9,7 @@

{% trans "Search all the docs" %}

- +
{% comment %} Translators: This is about starting a search {% endcomment %} diff --git a/readthedocs/templates/homepage.html b/readthedocs/templates/homepage.html index 580e80fbfb3..be14f06befa 100644 --- a/readthedocs/templates/homepage.html +++ b/readthedocs/templates/homepage.html @@ -1,9 +1,13 @@ {% extends "base.html" %} {% load i18n %} - +{% load humanize %} {% load pagination_tags %} +{% block extra_metas %} + +{% endblock extra_metas %} + {% block title %}{% trans "Home" %}{% endblock %} {% block body_class %}home {% if not request.user.is_authenticated %}splash{% endif %}{% endblock %} @@ -36,105 +40,129 @@ {% block content %} -
-
- -
-

{% trans "What is this place?" %}

-

-{% blocktrans %} -Read the Docs hosts documentation, making it fully searchable and easy to find. -You can import your docs using any major version control system, including Mercurial, Git, Subversion, and Bazaar. -We support webhooks so your docs get built when you commit code. -There's also support for versioning so you can build docs from tags and branches of your code in your repository. -{% endblocktrans %} -

-

-{% blocktrans %} - Hosting documentation is free and simple, - read our guide - to get started! -{% endblocktrans %} -

-

-{% blocktrans %} -Read the Docs is community supported. -It depends on users like you to contribute to development, -support, -and operations. -You can learn more about how to contribute in our docs. -Thanks so much to our wonderful community team who helps us run the site. -Read the Docs wouldn't be possible without them. -Please consider joining today, -as we always need more contributors to the project. -{% endblocktrans %} -

-
- -
-
- - {% include "core/widesearchbar.html" %} - - {% if featured_list %} - -
-
- -
-

{% trans "Featured Projects" %}

-
- -
-
-
    - {% include "core/project_list_featured.html" %} -
-
-
- -
-
- - {% endif %} - - -
-
- -
-

{% trans "Recently updated projects" %}

-
- -
-
-
    - {% include "core/project_list_detailed.html" %} -
-
-
- -
-
- - -
-

{% trans "Read the Docs is funded by the community" %}

-

- {% url "advertising" as advertising_url %} - {% url "donate" as sponsors_url %} - {% url "gold_detail" as gold_detail %} - - Read the Docs is a huge resource that millions of developers rely on - for software documentation. It would not be possible without the - support of our - sponsors, - advertisers, - and readers like you. -

-

- Hosting for the project is graciously provided by Rackspace. -

+ +
+

{% trans "Technical documentation lives here" %}

+

+ {% blocktrans %} + Read the Docs simplifies software documentation by automating building, + versioning, and hosting of your docs for you. + {% endblocktrans %} +

+
+ + +
+
+

Free docs hosting

+

+ {% with projects_count_intcomma=projects_count|intcomma %} + {% blocktrans %} + We will host your documentation for free forever. + There are no tricks. We help {{ projects_count_intcomma }} open source projects + share their docs. + {% endblocktrans %} + {% endwith %} +

+
+
+

Webhooks

+

+ {% blocktrans %} + Whenever you push code to your favorite version control system, + whether that is Git, Mercurial, Bazaar, or Subversion, we will + automatically build your docs so your code and documentation are + never out of sync. + {% endblocktrans %} +

+
+
+ +
+
+

Multiple formats

+

+ {% blocktrans %} + Of course we build and host your docs for the web, but they are + also vieweable as PDFs, as single page HTML, and for eReaders. + No additional configuration is required. + {% endblocktrans %} +

+
+
+

Multiple versions

+

+ {% blocktrans %} + We can host and build multiple versions of your docs so having a + 1.0 version of your docs and a 2.0 version of your docs is as easy + as having a separate branch or tag in your version control system. + {% endblocktrans %} +

+
+
+
+ + +
+

+ {% trans 'Getting started guide' %} +

+
+ + +
+ {% include "core/widesearchbar.html" %} +
+ + {% if featured_list %} + +
+

{% trans "Featured Projects" %}

+
+
+
    + {% include "core/project_list_featured.html" %} +
+
+
+
+ + {% endif %} + +
+

{% trans "Read the Docs is funded by the community" %}

+

+ + {% url "advertising" as advertising_url %} + {% url "donate" as sponsors_url %} + {% url "gold_detail" as gold_detail %} + + {% blocktrans %} + Read the Docs is a huge resource that millions of developers rely on + for software documentation. It would not be possible without the + support of our + sponsors, + advertisers, + and readers like you. + {% endblocktrans %} +

+ +

+ {% blocktrans %} + Read the Docs is community supported. + It depends on users like you to contribute to development, support, and operations. + You can learn more about how to contribute in our docs. + Thanks so much to our wonderful community team who helps us run the site. + Read the Docs wouldn't be possible without them. + {% endblocktrans %} +

+ +

+ {% blocktrans %} + Hosting for the project is graciously provided by Rackspace. + {% endblocktrans %} +

+
{% endblock %}