Merge pull request #793 from gpodder/remove-advertise
[mygpo.git] / mygpo / web / templates / dashboard.html
blobfa52e20534cc1b513b6c21cb621728e76ab8a168
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load devices %}
4 {% load episodes %}
5 {% load podcasts %}
6 {% load humanize %}
7 {% load cache %}
8 {% load utils %}
10 {% load menu %}
11 {% block mainmenu %}{{ "/"|main_menu }}{% endblock %}
12 {% block sectionmenu %}{{ "/"|section_menu }}{% endblock %}
14 {% block title %}{% trans "Overview" %}{% endblock %}
16 {% block header %}
17 <h1>{% trans "Hi, " %}{{ user.username }}</h1>
18 {% endblock %}
21 {% block content %}
22 {% cache 600 newest_episodes user.username %}
23 {% if newest_episodes %}
24 <h2>{% trans "Newest Episodes" %}</h2>
25 <table class="list">
26 {% for episode in newest_episodes %}
27 <tr>
28 <td class="logo">{{ episode.podcast|podcast_logo }}</td>
29 <td>
30 {% episode_link episode episode.podcast %}<br/>
31 <span class="from_podcast">{% podcast_group_link episode.podcast %}</span>
32 </td>
33 <td>{{ episode.released|naturalday|nbsp }}</td>
34 </tr>
35 {% endfor %}
36 </table>
37 {% else %}
38 <p>
39 {% blocktrans %}Welcome to {{ site }}! If this is your first visit, you should set up your <a href="https://gpoddernet.readthedocs.io/en/latest/user/clients.html">podcast client</a> and try to check as many <em>Explore</em> boxes as you can.{% endblocktrans %}
40 </p>
42 <p>
43 {% url "help" as help %}
44 {% blocktrans %}If you have problems, have a look at the <a href="{{ help }}">docs</a> or ask questions on the <a href="https://gpodder.github.io/docs/mailing-list.html">mailing list</a> or <a href="https://github.com/gpodder/mygpo/issues">forum</a>.{% endblocktrans %}
45 </p>
47 {% endif %}
48 {% endcache %}
49 {% endblock %}
51 {% block sidebar %}
53 {% include "podcast-ad-box.html" with podcast_ad=podcast_ad only %}
55 {% if random_podcast %}
56 {% cache 3600 random_podcast_box %}
57 <div class="well">
59 <h4><small>{% trans "Random" %}</small></h4>
62 <a href="{% podcast_link_target random_podcast %}">
63 <div id="podcastlogo">{{ random_podcast|podcast_logo_medium }}</div>
64 </a>
66 <h4>{{ random_podcast.title }}</h4>
68 <p class="description">
69 {{ random_podcast.description|default:""|truncatewords:"50" }}
70 </p>
72 <p>
73 <a href="{% podcast_link_target random_podcast %}">{% trans "more..." %}</a>
74 </p>
76 </div>
77 {% endcache %}
78 {% endif %}
80 <div class="well">
81 <h4>{% blocktrans %}Explore {{ site }}{% endblocktrans %}</h4>
82 <ul class="icons">
83 <li><i class="icon-check"></i>
84 <a href="{% url "home" %}">
85 {% blocktrans %}Sign up to {{ site }}{% endblocktrans %}
86 </a>
87 </li>
88 <li><i class="icon-check{% if not "devices" in checklist %}-empty{% endif %}"></i>
89 <a href="{% url "devices" %}">
90 {% trans "Connect your Podcast Clients" %}
91 </a>
92 </li>
93 <li><i class="icon-check{% if not "subscriptions" in checklist %}-empty{% endif %}"></i>
94 <a href="{% url "subscriptions" %}">
95 {% trans "Subscribe to Podcasts" %}
96 </a>
97 </li>
98 <li><i class="icon-check{% if not "favorites" in checklist %}-empty{% endif %}"></i>
99 <a href="{% url "favorites" %}">
100 {% trans "Mark your Favorite Episodes" %}
101 </a>
102 </li>
103 <li><i class="icon-check{% if not "share" in checklist %}-empty{% endif %}"></i>
104 <a href="{% url "share" %}">
105 {% trans "Share your Subscriptions" %}
106 </a>
107 </li>
108 <li><i class="icon-check{% if not "share-favorites" in checklist %}-empty{% endif %}"></i>
109 <a href="{% url "share" %}">
110 {% trans "Share your Favorite Episodes" %}
111 </a>
112 </li>
113 <li><i class="icon-check{% if not "userpage" in checklist %}-empty{% endif %}"></i>
114 <a href="{% url "share" %}">
115 {% trans "Share your Userpage" %}
116 </a>
117 </li>
118 <li><i class="icon-check{% if not "tags" in checklist %}-empty{% endif %}"></i>
119 <a href="{% url "tags" %}">
120 {% trans "Tag Podcasts" %}
121 </a>
122 </li>
123 <li><i class="icon-check{% if not "lists" in checklist %}-empty{% endif %}"></i>
124 <a href="{% url "lists-overview" %}">
125 {% trans "Create Podcast Lists" %}
126 </a>
127 </li>
128 <li><i class="icon-check{% if not "publish" in checklist %}-empty{% endif %}"></i>
129 <a href="{% url "publisher" %}">
130 {% trans "Publish your own Podcast" %}
131 </a>
132 </li>
133 </ul>
134 </p>
136 </div>
138 {% if show_install_reader %}
139 <div class="well">
140 <h4>{% trans "Subscribe in Your Browser" %}</h4>
142 {% blocktrans %}Register {{ site.domain }} as a feed reader, and subscribe to podcasts directly from your browser{% endblocktrans %}
143 </p>
144 <a class="btn btn-primary" href="#" onclick="registerHandler();">
145 {% trans "Install" %}
146 </a>
148 </div>
149 {% endif %}
151 {% endblock %}
154 {% block javascript %}
155 <script type="text/javascript">
156 function registerHandler()
158 navigator.registerProtocolHandler("application/vnd.mozilla.maybe.feed",
159 document.location.protocol + "//{{ site.domain }}/subscribe?url=%s",
160 "{{ site.domain }}");
162 </script>
163 {% endblock %}