Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project page header #2030

Merged
merged 37 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e768bae
Moved the register-block to the project header section on desktop
anishTP Apr 19, 2024
88e869f
Added spacing between the registerblock and project title and moved t…
anishTP Apr 22, 2024
0705cd2
Improve responsiveness of register block for project subpages and imp…
anishTP Apr 25, 2024
e1f1abe
Changed the register button to full width inside the card when render…
anishTP Apr 26, 2024
168c61c
Merge branch 'main' into project-page-header
jace Apr 27, 2024
15926e2
Comparison with true is not required
jace Apr 27, 2024
4fb4d48
Template fixes
jace Apr 27, 2024
b9ee56a
Improved styling on the buttons in the register block for edge cases …
anishTP Apr 29, 2024
50aa925
Merge branch 'main' into project-page-header
jace May 1, 2024
d7b1b1c
Merge branch 'main' into project-page-header
jace May 1, 2024
14b8aa5
Avoid the ambiguous term "project"
jace May 3, 2024
6ace718
Merge branch 'main' into project-page-header
jace May 3, 2024
b66bedd
Removed the member label from project-details__box in the project header
anishTP May 9, 2024
8945e4f
Include bio field in account edit form (#2049)
jace May 3, 2024
4309d5e
Use client-hint headers to identify browser and platform (#2050)
jace May 3, 2024
651825f
Consistent formatting between apps and login sessions list (#2051)
jace May 3, 2024
3fafb67
Follow button UI fixes (#2047)
vidya-ram May 6, 2024
b9f2dd3
Fix ajax followers page (#2054)
vidya-ram May 7, 2024
1b9c497
Upgrade dependencies; fix type hint (#2055)
jace May 8, 2024
877ee54
[pre-commit.ci] pre-commit autoupdate (#2053)
pre-commit-ci[bot] May 8, 2024
f5f8a65
Fix copy url function to pick clicked share button url (#2056)
vidya-ram May 10, 2024
432ebbf
Merge branch 'main' into project-page-header
vidya-ram May 14, 2024
5cdc382
Cleanup macros
vidya-ram May 30, 2024
3823b61
Merge branch 'main' into project-page-header
vidya-ram May 30, 2024
f769dee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 30, 2024
5ccdcf0
Remove shoelace
vidya-ram May 30, 2024
1dd5249
Merge branch 'project-page-header' of https://github.com/hasgeek/funn…
vidya-ram May 30, 2024
2dfed16
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 30, 2024
8af5a26
Added length validator
djamg May 31, 2024
79fe12d
Add title length validators
jace May 31, 2024
2451937
Do cheaper test first
jace May 31, 2024
6c0e47c
Spacing fixes
jace May 31, 2024
4ebf326
Correct view name
jace May 31, 2024
4ca4b0d
Merge branch 'main' into project-page-header
jace May 31, 2024
caf711f
Fix project header for sm screens
vidya-ram May 31, 2024
01e01fd
Merge branch 'project-page-header' of https://github.com/hasgeek/funn…
vidya-ram May 31, 2024
d226577
Fix preview of markdown fields
vidya-ram May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def rq_background_worker(*args: Any, **kwargs: Any) -> Any:
# Only start RQ worker within the reloader environment
background_rq = BackgroundWorker(
rq_background_worker,
mock_transports=bool(getbool(os.environ.get('MOCK_TRANSPORTS', False))),
mock_transports=bool(getbool(os.environ.get('MOCK_TRANSPORTS', True))),
)
background_rq.start()

Expand Down
12 changes: 12 additions & 0 deletions funnel/assets/sass/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
margin: 0;
width: 100%;
display: none;
font-weight: 600;
justify-content: space-between;

.calendar__month__counting {
Expand Down Expand Up @@ -187,6 +188,10 @@
}
}

.calendar__weekdays__dates__date--flex {
width: auto !important;
}

.calendar__weekdays__dates__date--today {
.calendar__weekdays__dates__date__day {
color: $mui-text-dark;
Expand Down Expand Up @@ -222,6 +227,9 @@
z-index: 1;
border: 1px solid $mui-primary-color-lighter;
}
.calendar__weekdays__dates__date--flex:after {
margin: 0 -8px !important;
}
.calendar__weekdays__dates__date--active:before {
content: '';
border-left: 5px solid transparent;
Expand Down Expand Up @@ -297,6 +305,10 @@
.calendar__weekdays__dates--latest {
display: flex;
}

.calendar__weekdays__dates--justify {
justify-content: space-between;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion funnel/assets/sass/components/_ticket-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
.price-btn {
min-width: 150px;
font-size: inherit;
padding: 0;
padding: 0 8px;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
37 changes: 28 additions & 9 deletions funnel/assets/sass/pages/project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@
display: none;
}
.register-block__content__txt {
font-size: 9px;
font-size: 12px;
line-height: 16px;
letter-spacing: -0.07rem;
width: 100%;
display: block;
font-style: italic;
font-weight: 600;
margin-bottom: $mui-grid-padding * 0.25;
}
.register-block__btn {
Expand All @@ -92,6 +94,9 @@
&:hover {
border-color: $mui-text-danger;
}
.register-block__btn__member-txt {
font-size: 12px;
}
}
.register-block__btn.mui--is-disabled:hover {
border-color: inherit;
Expand All @@ -101,8 +106,12 @@
width: calc(50% - $mui-grid-padding/2);
align-self: flex-end;
}
.register-block__btn--full-width {
width: 100% !important;
margin-top: $mui-grid-padding;
}
.register-block__content:only-child {
width: 100%;
width: 100% !important;
align-self: flex-end;
}
}
Expand All @@ -111,7 +120,7 @@
.register-block {
.register-block__content {
.register-block__content__txt {
font-size: 10px;
font-size: 12px;
}
}
}
Expand Down Expand Up @@ -152,18 +161,20 @@

@media (min-width: 768px) {
.project-footer {
padding: 16px 0 0 !important;
.register-block {
display: block;
.register-block__content {
width: 100%;
width: calc(50% - $mui-grid-padding/2);
margin-right: 0;
margin-bottom: $mui-grid-padding;
.register-block__content__rsvp-txt {
font-size: 12px;
}
.register-block__content__txt {
font-size: 14px;
line-height: 21px;
font-size: 12px;
line-height: 16px;
letter-spacing: -0.01rem;
margin-bottom: $mui-grid-padding * 0.5;
}
.register-block__btn {
Expand All @@ -179,6 +190,11 @@
}
}
}
.flex-content {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
}

Expand Down Expand Up @@ -370,6 +386,7 @@
.calendar__weekdays .calendar__weekdays__dates--latest {
display: flex;
margin-bottom: $mui-grid-padding * 0.5;
font-weight: 600;
}

.calendar__weekdays .calendar__weekdays__dates:last-child {
Expand All @@ -391,6 +408,9 @@
}
}
}
.project-banner__right--flex-direction {
flex-direction: column;
}
}

.project-banner__left,
Expand Down Expand Up @@ -433,7 +453,7 @@
}
.project-banner__left {
width: 67%;
margin: 0 $mui-grid-padding 0 0;
margin: 0 $mui-grid-padding * 2 0 0;
.embed-video-wrapper--shaped {
border-radius: 16px;
}
Expand Down Expand Up @@ -557,10 +577,9 @@
}

.project-section__map {
height: 400px;
height: 300px;
width: 100%;
z-index: 0;
margin: 0 0 $mui-grid-padding;
position: relative;
outline: none;
}
Expand Down
2 changes: 1 addition & 1 deletion funnel/forms/auth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AuthClientForm(forms.Form):

title = forms.StringField(
__("Application title"),
validators=[forms.validators.DataRequired()],
validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)],
filters=[forms.filters.strip()],
description=__("The name of your application"),
)
Expand Down
5 changes: 4 additions & 1 deletion funnel/forms/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class ProjectForm(forms.Form):

title = forms.StringField(
__("Title"),
validators=[forms.validators.DataRequired()],
validators=[
forms.validators.DataRequired(),
forms.validators.Length(max=Project.__title_length__),
],
filters=[forms.filters.strip()],
)
tagline = forms.StringField(
Expand Down
5 changes: 4 additions & 1 deletion funnel/forms/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class SessionForm(forms.Form):

title = forms.StringField(
__("Title"),
validators=[forms.validators.DataRequired()],
validators=[
forms.validators.DataRequired(),
forms.validators.Length(max=Session.__title_length__),
],
filters=[forms.filters.strip()],
)
venue_room_id = forms.SelectField(
Expand Down
5 changes: 4 additions & 1 deletion funnel/forms/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class UpdateForm(forms.Form):

title = forms.StringField(
__("Title"),
validators=[forms.validators.DataRequired()],
validators=[
forms.validators.DataRequired(),
forms.validators.Length(max=Update.__title_length__),
],
filters=[forms.filters.strip()],
)
body = forms.MarkdownField(
Expand Down
10 changes: 8 additions & 2 deletions funnel/forms/venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class VenueForm(forms.Form):
title = forms.StringField(
__("Name"),
description=__("Name of the venue"),
validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)],
validators=[
forms.validators.DataRequired(),
forms.validators.Length(max=Venue.__title_length__),
],
filters=[forms.filters.strip()],
)
description = forms.MarkdownField(
Expand Down Expand Up @@ -88,7 +91,10 @@ class VenueRoomForm(forms.Form):
title = forms.StringField(
__("Name"),
description=__("Name of the room"),
validators=[forms.validators.DataRequired(), forms.validators.Length(max=250)],
validators=[
forms.validators.DataRequired(),
forms.validators.Length(max=VenueRoom.__title_length__),
],
filters=[forms.filters.strip()],
)
description = forms.MarkdownField(
Expand Down
8 changes: 4 additions & 4 deletions funnel/templates/macros.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<input id="csrf_token" name="csrf_token" type="hidden" value="{{ csrf_token() }}"/>
{%- endmacro %}

{% macro calendarwidget(calendar, compact=true) %}
{% macro calendarwidget(calendar, compact=true, flex=false) %}
<div class="card__calendar {% if compact %} card__calendar--compact {% endif %}" aria-hidden="true">
<div class="calendar">
{% set event = namespace(month='', year='', first_week='', previous='', next='') %}
Expand All @@ -42,15 +42,15 @@
{% set event.next = true %}
{% endif %}
{% endif %}
<p class="calendar__month {% if week.upcoming %}calendar__month--upcoming{% endif %} {% if event.first_week == week %}calendar__month--upcoming--first calendar__month--latest{% endif %} {% if week.month != event.month %}calendar__month--unique{% endif %} {% if loop.index == calendar.weeks|length and not week.upcoming %}calendar__month--latest{% endif %}"><span class="calendar__month__counting" data-today="{{ calendar.today }}" data-month="{{ week.month }}"></span><span class="calendar__month__name mui--text-light">{{ week.month }} {{ week.year }}</span></p>
<p class="calendar__month {% if week.upcoming %}calendar__month--upcoming{% endif %} {% if event.first_week == week %}calendar__month--upcoming--first calendar__month--latest{% endif %} {% if week.month != event.month %}calendar__month--unique{% endif %} {% if loop.index == calendar.weeks|length and not week.upcoming %}calendar__month--latest{% endif %}{% if flex %} zero-padding{% endif %}"><span class="calendar__month__counting" data-today="{{ calendar.today }}" data-month="{{ week.month }}"></span><span class="calendar__month__name mui--text-light">{{ week.month }} {{ week.year }}</span></p>
{% set event.month = week.month %}
{% set event.year = week.year %}
<div class="calendar__weekdays__dates {% if week.upcoming %}calendar__weekdays__dates--upcoming{% endif %} {% if event.first_week == week %}calendar__weekdays__dates--upcoming--first calendar__weekdays__dates--latest {% endif %} {% if loop.index == calendar.weeks|length and not week.upcoming %}calendar__weekdays__dates--latest {% endif %}" data-month="{{ week.month }}">
<div class="calendar__weekdays__dates {% if week.upcoming %}calendar__weekdays__dates--upcoming{% endif %} {% if event.first_week == week %}calendar__weekdays__dates--upcoming--first calendar__weekdays__dates--latest {% endif %} {% if flex %} calendar__weekdays__dates--justify {% endif %} {% if loop.index == calendar.weeks|length and not week.upcoming %}calendar__weekdays__dates--latest {% endif %}" data-month="{{ week.month }}">
<p class="calendar__weekdays__dates__date calendar__weekdays__dates__icon calendar__weekdays__dates__icon--left">
{% if event.previous %}{{ faicon(icon='chevron-left', icon_size='caption', baseline=false, css_class="calendar__weekdays__dates__icon__next") }}{% endif %}
</p>
{% for date in week.dates %}
<p class="calendar__weekdays__dates__date {% if date.count > 0 %}calendar__weekdays__dates__date--active {% elif date.isoformat == calendar.today %} calendar__weekdays__dates__date--today{% endif %} {% if date.day_start_at %} calendar__weekdays__dates__date--showtime{% endif %} {% if date.isoformat >= calendar.today %} calendar__weekdays__dates__date--latest{% endif %} calendar__weekdays__dates__date--{{ (loop.index - 1) % 7 }}" {% if date.count > 0 %} data-event-date="{{ date.isoformat }}" {% endif %} data-event-month="{{ week.month }}">
<p class="calendar__weekdays__dates__date {% if date.count > 0 %}calendar__weekdays__dates__date--active {% elif date.isoformat == calendar.today %} calendar__weekdays__dates__date--today{% endif %} {% if date.day_start_at %} calendar__weekdays__dates__date--showtime{% endif %} {% if date.isoformat >= calendar.today %} calendar__weekdays__dates__date--latest{% endif %} {% if flex %}calendar__weekdays__dates__date--flex {% endif %} {% if date.count > 0 and flex %} calendar__weekdays__dates__date--flex {% endif %} calendar__weekdays__dates__date--{{ (loop.index - 1) % 7 }}" {% if date.count > 0 %} data-event-date="{{ date.isoformat }}" {% endif %} data-event-month="{{ week.month }}">
<span class="calendar__weekdays__dates__date__day">{{ date.day }}</span>
<span class="calendar__weekdays__dates__date__name">{{ calendar.days[(loop.index - 1) % 7] }}</span>
{% if date.day_start_at %}<span class="calendar__weekdays__dates__time">{{ date.day_start_at }} – {{ date.day_end_at }}</span>{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/past_projects_section.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</td>
</tr>
{%- else -%}
<p class="mui--text-subhead margin-top">{% trans %}No past projects{% endtrans %}</p>
<p class="mui--text-subhead margin-top">{% trans %}No past sessions{% endtrans %}</p>
{%- endfor -%}
{% if next_page %}
<tr {% if profile %}
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/profile_layout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
<thead class="bg-primary-dark">
<tr>
<th class="mui--text-subhead text-capitalize">{% trans %}Date{% endtrans %}</th>
<th class="mui--text-subhead text-capitalize">{% trans %}Project{% endtrans %}</th>
<th class="mui--text-subhead text-capitalize">{% trans %}Session{% endtrans %}</th>
<th class="mui--text-subhead text-capitalize">{% trans %}Location{% endtrans %}</th>
</tr>
</thead>
Expand Down
47 changes: 23 additions & 24 deletions funnel/templates/project.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% extends "project_layout.html.jinja2" %}
{%- else -%}
{% extends "project_spa_layout.html.jinja2" %}
{%- from "project_layout.html.jinja2" import pinned_update, project_about with context %}
{% endif %}
{% block titleblock %}{% block title %}{{ project.title }}{%- endblock title %}{%- endblock titleblock %}
{%- from "macros.html.jinja2" import proposal_card, video_thumbnail, projectcard %}
Expand Down Expand Up @@ -65,9 +64,29 @@
{% endblock baseheadline %}

{% block left_col %}
<div class="mui--hidden-xs mui--hidden-sm">
{{ pinned_update(project) }}
{{ project_about(project) }}
{% with pinned_update = project.pinned_update %}{%- if pinned_update %}
<ul class="mui-list--unstyled page-card pinned {% if current_page != 'project' %}pinned--inner{%- endif %}">
<li>
<p class="top-padding left-padding right-padding zero-bottom-margin">{{ faicon(icon='thumbtack', baseline=false, css_class="mui--text-light mui--align-middle fa-icon--right-margin") }}<span class="pinned__heading mui--text-subhead mui--text-light">{% trans %}Pinned update{% endtrans %}</span></p>
<a href="{{ pinned_update.urls['view'] }}" class="pinned__update">
<p class="pinned__update__heading mui-container"><span class="mui--text-subhead text-bold mui--text-dark">{{ pinned_update.title }}</span> <span class="mui--text-subhead mui--text-light pinned__update__body">{%- if not pinned_update.is_currently_restricted %}{{ pinned_update.body.html|preview }} <span class="chip">{% trans %}more{% endtrans %}{{ faicon(icon='caret-right-solid', baseline=false, css_class="mui--align-middle") }}</span>{% else %}<em>{% trans %}This update is for participants only{% endtrans %}</em>{%- endif %}</span></p>
</a>
</li>
</ul>
{%- endif %}{%- endwith %}
{% if project.state.DRAFT and project.view_for('settings').is_available() %}
<div class="page-card page-card--nooverflow">
<div class="alert alert--warning zero-top-margin zero-bottom-margin">
<a href="{{ project.url_for('settings') }}" class="alert__text nounderline">{% trans %}This project is not published. Visit settings to publish{% endtrans %} {{ faicon(icon='arrow-right') }}</a>
</div>
</div>
{% endif %}
<div class="page-card">
<div class="project-section">
<div class="about bg-primary" id="about">
<div class="markdown">{{ project.description }}</div>
</div>
</div>
</div>
{% if project.has_featured_proposals %}
<div class="page-card">
Expand Down Expand Up @@ -157,26 +176,6 @@
</div>
{%- endif %}

{%- if project.primary_venue -%}
<div class="page-card">
<div class="project-section" id="venue">
<h2 class="mui--text-left project-section__headline zero-top-margin">{% trans %}Venue{% endtrans %}</h2>
<div class="mui--text-body2 bottom-padding">
<p class="zero-bottom-margin">{{ project.primary_venue.title }}</p>
<p class="zero-bottom-margin">{{ project.primary_venue.address1 }}</p>
<p class="zero-bottom-margin">{{ project.primary_venue.address2 }}</p>
<p class="zero-bottom-margin">{{ project.primary_venue.city }}{% if project.primary_venue.city and project.primary_venue.postcode %} - {{ project.primary_venue.postcode }}{%- endif %}</p>
{%- if project.primary_venue.state and project.primary_venue.country -%}
<p>{{ project.primary_venue.state }}, {{ project.primary_venue.country }}</p>
{%- endif %}
</div>
{%- if project.primary_venue.has_coordinates -%}
<div id="venue-map" class="project-section__map" data-label="{{ project.primary_venue.title|striptags }}" data-markerlat="{{ project.primary_venue.latitude }}" data-markerlng="{{ project.primary_venue.longitude }}"><h2>{% trans %}Loading…{% endtrans %}</h2></div>
{%- endif %}
</div>
</div>
{%- endif %}

{%- if project.subprojects or project.parent_project %}
<div>
<h3 class="mui--text-left left-padding">{% trans %}Related events{% endtrans %}</h3>
Expand Down
Loading
Loading