-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
discover.html
86 lines (81 loc) · 4.72 KB
/
discover.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{% extends "base.html" %}
{% load i18n %}
{% load humanize %}
{% load static %}
{% load prices %}
{% block body_class %}page light{% endblock %}
{% block content %}
<section class="content">
<div class="row">
<div class="wrap">
<h1 class="section-title min-m">{% block title %}{% trans "Discover Weblate" %}{% endblock %}</h1>
<div class="page-desc">
<p>
{% block description %}
{% blocktrans %}Check out who’s using Weblate already. We are a community of translators and localization specialists who use and improve our common tool to empower readers and app users around the World. Find your favorite projects and start contributing together with us.{% endblocktrans %}
{% endblock %}
</p>
</div>
<div class="search-bar">
<a href="{% url "service-discovery-add" %}" class="link float-right discover-add">{% trans "Add yours" %}</a>
<form action="{% url 'discover' %}">
<input type="text" class="search-input" placeholder="{% trans "project name" %}" name="q" aria-label="{% trans "project name" %}" value="{{ query }}" />
<input type="submit" class="button inline black" value="{% trans "Search" %}" />
</form>
</div>
<div class="articles">
{% for service in discoverable_services %}
<div class="article discover" id="d{{ service.pk }}">
<div class="img">
<a href="{{ service.site_url }}" target="_blank" rel="ugc">
{% if service.discover_image %}
<img class="discover-img" src="{{ service.discover_image.url }}" />
{% else %}
<div class="discover-panel layered">
<img src="{% static "img/discover-bg.png" %}" />
<div class="discover-name">
<img src="{% static "img/discover-weblate-logo.png" %}" class="discover-logo" />
<span>{{ service.site_title }}</span>
</div>
</div>
{% endif %}
</a>
</div>
<div class="content">
<div class="counts float-right">
{% blocktrans count cnt=service.site_projects with count=service.site_projects|intcomma|make_strong %}{{ count }} project{% plural %}{{ count }} projects{% endblocktrans %}<br />
{% blocktrans count cnt=service.site_users with count=service.site_users|intcomma|make_strong %}{{ count }} translator{% plural %}{{ count }} translators{% endblocktrans %}
</div>
<h2><a href="{{ service.site_url }}" target="_blank" rel="ugc" lang="en" dir="ltr">{{ service.site_title }}</a></h2>
{% if service.discover_text %}
{% with discover_text=service.get_discover_text %}
{% if service.discover_text == discover_text %}
<p lang="en" dir="ltr">{{ service.get_discover_text }}</p>
{% else %}
{# Localized text for Hosted Weblate #}
<p>{{ service.get_discover_text }}</p>
{% endif %}
{% endwith %}
{% endif %}
<p lang="en" dir="ltr" class="projects">
{% for project in service.matched_projects %}
<a class="project" href="{{ service.site_url }}{{ project.url }}" target="_blank" rel="ugc">{{ project.name }}</a>
{% endfor %}
{% if service.non_matched_projects_count %}
<a href="{{ service.site_url }}/projects/" target="_blank" rel="ugc"><img src="{% static "img/three-dots.svg" %}" title="{% blocktrans count count=service.non_matched_projects_count %}…and {{ count }} more{% plural %}…and {{ count }} more{% endblocktrans %}" /></a>
{% endif %}
{% if service.pk in user_services %}
<a class="button small float-right" href="{% url "service-discovery" pk=service.pk %}">{% trans "Customize listing" %}</a>
{% endif %}
<div class="clear"></div>
</p>
</div>
</div>
{% empty %}
<h2 id="which" class="section-title payment-conditions">{% trans "No servers matched your search." %}</h2>
{% endfor %}
</div>
</div>
</div>
</section>
{% endblock %}