mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
110 lines
3.2 KiB
HTML
110 lines
3.2 KiB
HTML
{% extends "layout.html" %}
|
|
{% import "event.html" as eventutil with context %}
|
|
{% block title %}
|
|
<title>{{user.canonical_name}}</title>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<h2>
|
|
{{user.canonical_name}}
|
|
</h2>
|
|
{% if user.location %}
|
|
<p>{{user.location}}</p>
|
|
{% endif %}
|
|
{% if user.url %}
|
|
<p>
|
|
<a
|
|
href="{{user.url}}"
|
|
target="_blank"
|
|
rel="me noopener noreferrer nofollow"
|
|
>{{user.url}}</a>
|
|
</p>
|
|
{% endif %}
|
|
{% if user.bio %}
|
|
<p>{{user.bio | md}}</p>
|
|
{% endif %}
|
|
{% if current_user and user.id == current_user.id %}
|
|
<a
|
|
class="btn btn-primary btn-block"
|
|
href="{{url_for("projects.create_GET")}}"
|
|
>
|
|
Create new project {{icon("caret-right")}}
|
|
</a>
|
|
<a
|
|
style="margin-bottom: 1rem"
|
|
class="btn btn-white btn-sm btn-block"
|
|
href="{{get_origin("meta.sr.ht", external=True)}}/profile"
|
|
>
|
|
Edit your profile {{icon("caret-right")}}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="col-md-8">
|
|
{% if projects and page == 1 %}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<form action="{{url_for("users.projects_GET",
|
|
owner=user.canonical_name)}}"
|
|
>
|
|
<input
|
|
name="search"
|
|
type="text"
|
|
placeholder="Search {{user.canonical_name}}'s projects"
|
|
class="form-control" />
|
|
{% if search_error %}
|
|
<div class="invalid-feedback">{{ search_error }}</div>
|
|
{% endif %}
|
|
</form>
|
|
<div class="event-list">
|
|
{% for project in projects %}
|
|
<div class="event">
|
|
<h4>
|
|
{% if project.visibility.value != 'PUBLIC' %}
|
|
<small class="text-muted pull-right">{{project.visibility.value.lower()}}</small>
|
|
{% endif %}
|
|
<a href="{{url_for("projects.summary_GET",
|
|
owner=project.owner.canonical_name,
|
|
project_name=project.name)}}">{{project.name}}</a>
|
|
</h4>
|
|
<p>{{project.description}}</p>
|
|
{% if project.tags %}
|
|
<div class="tags">
|
|
{% for tag in project.tags %}
|
|
<a href="{{url_for("public.project_index",
|
|
search=((search or "").strip() + " #"+tag).lstrip())}}"
|
|
class="tag">#{{tag}}</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="pull-right">
|
|
<a
|
|
href="{{url_for("users.projects_GET",
|
|
owner=user.canonical_name)}}"
|
|
class="btn btn-link"
|
|
>More projects {{icon("caret-right")}}</a>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="row">
|
|
<div class="col-md-12 event-list">
|
|
<h3>Activity</h3>
|
|
{% for event in events %}
|
|
{{ eventutil.event(event, project=True) }}
|
|
{% endfor %}
|
|
{{pagination()}}
|
|
{% if not(events) %}
|
|
<div class="alert alert-info">No activity for this user.</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|