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

[REVIEW] Layout desktop #629

Merged
merged 2 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions lib/scss/6_components/_conversations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $profile-label-clear-color: #30BFD3 !default;

.ConversationList {
@extend .Container;
max-width: 100%;

p {
padding: 0 $spacing-unit / 3;
Expand Down
7 changes: 7 additions & 0 deletions lib/scss/6_components/generic/_page-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ $header-box-shadow-lower: 0 -2px 4px 0 rgba(0, 0, 0, 0.2) !default;

&-topIcon {
cursor: pointer;
display: none;
}

@media only screen and (max-width: 960px) {
&-topIcon {
display: block;
}
}

// Elements
Expand Down
20 changes: 20 additions & 0 deletions lib/scss/6_components/generic/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ $page-title-font-size: 1.1 * $font-size-h1 !default;
}
}

&-content-container {
display: flex;

.NavMenu {
position: fixed;
}
}

@media only screen and (min-width: 960px) {
&-content.logged-in, #docs {
padding-left: 400px !important;
}
}

@media only screen and (max-width: 960px) {
.NavMenu-fixed {
display: none;
}
}

&-mainContainer {
background: $page-background-image;
background-size: contain;
Expand Down
51 changes: 30 additions & 21 deletions src/ej/templates/jinja2/base.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% from 'components/generic/page_header.jinja2' import page_header %}
{% from 'components/generic/page_top-header.jinja2' import page_top_header %}
{% from 'components/generic/page_menu.jinja2' import sidebar %}
{% from 'components/generic/page_menu.jinja2' import menu with context %}

{% set javascript_enabled = request.COOKIES.get('javascriptEnabled', 'No Cookie') if request else True %}
{% set target_context = request.GET.target|default('all') if request else 'all' %}
Expand All @@ -9,6 +9,7 @@
{% set page_title = page_title|default(content_title or settings.EJ_PAGE_TITLE) %}
{% set hide_footer = hide_footer|default(False) %}
{% set enable_navbar = enable_navbar|default(True) %}
{% set logged_in = request and request.user and request.user.is_authenticated %}

{% if target == 'all' %}
<!DOCTYPE html>
Expand Down Expand Up @@ -116,27 +117,35 @@
<div class="Page-mainContainer">
{% endif %}

{# MAIN BLOCK #}
{% block main %}

<main class="Page-content" {{ salt_attr()|safe }}>
{% if content_title %}
<div class="Page-title"><h1>{{ content_title }}</h1></div>{% endif %}
{% if content is defined %}
{{ content }}
{% else %}
{% block content %}
{% if content_html %}
<div class="Container">
{{ content_html|safe }}
</div>
{% else %}
<p>{{ _('Please override the "content" block of your template!') }}</p>
{% endif %}
{% endblock %}
<div class="Page-content-container">
<div class="NavMenu-fixed">
{% if logged_in and request.path != '/home/' %}
{{ menu(request.user) }}
{% endif %}
</main>
{% endblock %}
</div>

{# MAIN BLOCK #}
{% block main %}

<main class="Page-content {{ 'logged-in' if logged_in else '' }}" {{ salt_attr()|safe }}>
{% if content_title %}
<div class="Page-title"><h1>{{ content_title }}</h1></div>{% endif %}
{% if content is defined %}
{{ content }}
{% else %}
{% block content %}
{% if content_html %}
<div class="Container">
{{ content_html|safe }}
</div>
{% else %}
<p>{{ _('Please override the "content" block of your template!') }}</p>
{% endif %}
{% endblock %}
{% endif %}
</main>
{% endblock %}
</div>


{% endblock %}
Expand Down