Skip to content

Commit

Permalink
feat: add individual profile, clean up account/login/registration tem…
Browse files Browse the repository at this point in the history
…plates (#101)

* feat: styling account templates (#15)

* feat: more polish to account management templates

* fix: further polish

* feat: finish #15

* feat: partial implementation of individual profile (#7)

* feat: implement relationships to orgs

* feat: complete individual profile

* feat: user social network localization

* fix: adjust typography

* fix: remove time from updated, add dividers

* feat: switch to appropriate tab for overflow
greatislander authored Jun 22, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 09e8ad8 commit a70ee0a
Showing 39 changed files with 628 additions and 378 deletions.
141 changes: 141 additions & 0 deletions maps/static/maps/css/app.scss
Original file line number Diff line number Diff line change
@@ -210,6 +210,14 @@ select[multiple] {
}

@media (min-width: 60rem) {
.menu li:last-child {
&.menu__submenu-wrapper .menu__submenu {
min-width: unset;
right: 0;
width: auto;
}
}

@supports (display:grid) {
.my-profiles .cards {
grid-template-columns: repeat(2, 1fr);
@@ -276,3 +284,136 @@ select[multiple] {
.card__role + .card__role {
margin-top: rem(9);
}

.box {
border: dashed rem(1) var(--grey-500);
padding: var(--gutter);
}

.account {
background: $off-white;

.page-header {
padding-bottom: rem(50);
position: relative;
z-index: 0;

@include breakpoint-up(md) {
padding-bottom: rem(65);
}
}

.stack,
.page-header {
@include breakpoint-up(md) {
margin-left: auto;
margin-right: auto;
width: 50%;
}
}
}

.input-group + .buttons {
margin-top: 1.5rem;
}

.buttons .button + .button {
margin-top: 1.5rem;
}

.radio label.primary {
font-weight: $font-weight-bold;

.badge {
font-weight: $font-weight-normal;
}
}

.stack > * + .h4 {
margin-top: 3rem;
}

.profile__meta {
font-size: 0.875rem;
line-height: (20 / 14);
}

h1 + .profile__meta {
margin-top: 1.5rem;
}

.profile__meta + .profile__meta {
margin-top: 0.75rem;
}

.profile__meta svg {
color: var(--grey-500);
}

.panel__content * + h2::before {
background-color: var(--grey-400);
content: "";
display: block;
height: rem(1);
margin-bottom: rem(48);
margin-top: rem(-16);
width: 100%;
}

.panel__content .cards + h2::before {
margin-top: 0;
}

@include breakpoint-up(lg) {
#overview {
grid-gap: $gutter;
grid-template-columns: repeat(12, 1fr);

&:not([hidden]) {
display: grid;
}

.panel__sidebar {
grid-column: 1 / 4;
}

.panel__content {
grid-column: 4 / 13;
}

.cards {
grid-template-columns: repeat(2, 1fr);
}
}
}

@include breakpoint-up(xl) {
#overview {
grid-template-columns: repeat(16, 1fr);

.panel__sidebar {
grid-column: 1 / 4;
}

.panel__content {
grid-column: 5 / 17;
}
}
}

.profile__meta a,
.no-bullet a {
line-height: inherit;
}

.profile__roles {
font-weight: $font-weight-bold;

svg {
color: inherit;
}
}

.h4 + .profile__meta {
margin-top: 1rem;
}
22 changes: 22 additions & 0 deletions maps/static/maps/js/app.js
Original file line number Diff line number Diff line change
@@ -10,6 +10,13 @@ if (menu && menuToggle) {
new Pinecone.Menu(menu, menuToggle);
}

const tabGroups = document.querySelectorAll( '.tabs' );
if ( tabGroups ) {
Array.prototype.forEach.call( tabGroups, tabGroup => {
new Pinecone.Tabs( tabGroup );
} );
}

const icons = document.querySelectorAll( 'svg' );
if (icons) {
Array.prototype.forEach.call(icons, icon => {
@@ -27,6 +34,21 @@ if (dialogBtn) {
});
}

const coopsBtn = document.getElementById('coops-btn');
const clientsBtn = document.getElementById('clients-btn');

if (coopsBtn || clientsBtn) {
document.addEventListener('click', (event) => {
if (event.target.id == 'founded-by-coops-btn' || event.target.id == 'member-of-coops-btn') {
coopsBtn.click();
}

if (event.target.id == 'worked-with-btn') {
clientsBtn.click();
}
});
}

const searchToggle = document.querySelector('.search-toggle');
if (searchToggle) {
new Pinecone.SearchToggle(searchToggle, searchToggle.nextElementSibling);
18 changes: 18 additions & 0 deletions maps/templates/maps/account_settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends 'maps/base.html' %}
{% load static %}
{% load maps_extras %}
{% load i18n %}
{% block title %}{{ 'Account settings' | titlify }}{% endblock %}
{% block bodyclass %}account{% endblock %}
{% block content %}
<div class="page-header">
<p><a class="link--breadcrumb" href="{% url 'index' %}">{% trans "Home" %}</a></p>
<h1>{% trans 'Account settings' %}</h1>
</div>
<div class="stack">
<ul class="link-list">
<li class="link-list__item"><a href="{% url 'account_email' %}">{% trans 'Manage email addresses' %}</a></li>
<li class="link-list__item"><a href="{% url 'account_change_password' %}">{% trans 'Change password' %}</a></li>
</ul>
</div>
{% endblock %}
3 changes: 2 additions & 1 deletion maps/templates/maps/base.html
Original file line number Diff line number Diff line change
@@ -20,10 +20,11 @@
<div class="wrap container" role="document">
<div class="content">
<main>
{% block content %}{% endblock %}
{% block content %}{% endblock %}
</main>
</div>
</div>
{% include 'maps/footer.html' %}
{% block extra_body %}{% endblock %}
</body>
</html>
10 changes: 5 additions & 5 deletions maps/templates/maps/header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
{% url 'index' as home_url %}
<div class="banner-pattern"></div>
<header role="banner">
@@ -69,16 +70,15 @@
<li class="menu-item"><a href="{% url 'about' %}" class="menu__item">About</a></li>
{% if user.is_authenticated %}
<li class="menu__submenu-wrapper">
<a class="menu__item" href="#">Account</a>
<a class="menu__item" href="#">{% trans 'Account' %}</a>
<ul class="menu__submenu">
<li class="menu-item"><a
href="/accounts/logout/" class="menu__item">Log out</a>
</li>
<li class="menu-item"><a href="{% url 'account-settings' %}" class="menu__item">{% trans 'Account settings' %}</a></li>
<li class="menu-item"><a href="/accounts/logout/" class="menu__item">{% trans 'Log out' %}</a></li>
</ul>
{% else %}

<li class="menu-item"><a
href="/accounts/login/" class="menu__item">Login / Sign up</a>
href="/accounts/login/" class="menu__item">{% trans 'Log in / Sign up' %}</a>
</li>
{% endif %}

Loading

0 comments on commit a70ee0a

Please sign in to comment.