Changeset View
Changeset View
Standalone View
Standalone View
common/templates/common/base.html
| {% load pipeline %} | {% load pipeline %} | ||||
| {% load static %} | {% load static %} | ||||
| {% load comment_extras %} | {% load comment_extras %} | ||||
| {% load common_extras %} | {% load common_extras %} | ||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||
| <html lang="en"> | <html lang="en"> | ||||
| <head> | <head> | ||||
| <meta charset="utf-8"> | <meta charset="utf-8"> | ||||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
| <link rel="shortcut icon" href="{% static 'common/images/favicon/favicon.ico' %}"> | <link rel="shortcut icon" href="{% static 'common/images/favicon/favicon.ico' %}"> | ||||
| {% comment %} | {% comment %} | ||||
| <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" rel="stylesheet"> {% endcomment %} | <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" rel="stylesheet"> {% endcomment %} | ||||
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||||
| <title>{% block title_prepend %}{% endblock title_prepend %}Blender Cloud{% block title_append %}{% endblock title_append %}</title> | <title>{% block title_prepend %}{% endblock title_prepend %}Blender | ||||
| Cloud{% block title_append %}{% endblock title_append %}</title> | |||||
| <meta name="google-site-verification" content="r-8DuUEYwMyb14SRVj0I4mSUSEPmdRRMrT-zMSbFkas"> | <meta name="google-site-verification" content="r-8DuUEYwMyb14SRVj0I4mSUSEPmdRRMrT-zMSbFkas"> | ||||
| {% block meta %} | {% block meta %} | ||||
| {% include 'common/components/meta.html' %} | {% include 'common/components/meta.html' %} | ||||
| {% endblock meta %} | {% endblock meta %} | ||||
| {% stylesheet 'studio' %} | {% stylesheet 'studio' %} | ||||
| {% javascript 'vendor' %} | {% javascript 'vendor' %} | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | <div class="navdrawer-offset"> | ||||
| {% if request.user.is_authenticated %} | {% if request.user.is_authenticated %} | ||||
| <div class="navbar-main-nav-toolbar"> | <div class="navbar-main-nav-toolbar"> | ||||
| <a href="{% url 'search' %}" class="btn btn-secondary btn-nav btn-icon search-button"> | <a href="{% url 'search' %}" class="btn btn-secondary btn-nav btn-icon search-button"> | ||||
| <i class="material-icons">search</i> | <i class="material-icons">search</i> | ||||
| </a> | </a> | ||||
| <div> | |||||
| <button href="{% url 'profile-notifications' %}" data-toggle="dropdown" | |||||
| class="btn btn-secondary btn-nav btn-icon notification-button mr-2"> | |||||
| <i class="material-icons">notifications</i> | |||||
| {% if user.profile.notifications_unread.count >= 1 %} | |||||
| <span class="notifications-counter">{{ user.profile.notifications_unread.count }}</span> | |||||
| {% endif %} | |||||
| </button> | |||||
| <div class="dropdown-menu dropdown-menu-right notification-dropdown"> | |||||
| <div class="dropdown-double"> | |||||
| <a href="{% url 'profile-notifications' %}" class="dropdown-item"> | |||||
| <i class="material-icons">notifications</i> | |||||
| <span>Notifications</span> | |||||
| </a> | |||||
| <button class="dropdown-item icon {% if user.profile.notifications_unread.count >= 1 %}unread{% endif %}" data-toggle="tooltip" data-placement="top" | |||||
| data-mark-all-read-url="{% url 'api-notifications-mark-read' %}" title="Mark all as read"> | |||||
| <i class="material-icons">markunread_mailbox</i> | |||||
| </button> | |||||
| </div> | |||||
| <div class="dropdown-menu-nested"> | |||||
| {% for notification in user.profile.notifications.all|slice:":10" %} | |||||
| {% with action=notification.action %} | |||||
| {% include 'profiles/components/nav_action.html' %} | |||||
| {% endwith %} | |||||
| {% empty %} | |||||
| <p class="px-2 py-2 subtitle text-center"> | |||||
| No notifications yet | |||||
| </p> | |||||
| {% endfor %} | |||||
| </div> | |||||
| <a href="{% url 'profile-notifications' %}" class="dropdown-item small"> | |||||
| <span>See all notifications</span> | |||||
| </a> | |||||
| </div> | |||||
| </div> | |||||
| {% comment %} <div class="searchbar-wrapper"> | {% comment %} <div class="searchbar-wrapper"> | ||||
| <div class="searchbar"> | <div class="searchbar"> | ||||
| <div class="input-group-prepend"><span class="input-group-text"><i | <div class="input-group-prepend"><span class="input-group-text"><i | ||||
| class="material-icons">search</i></span> | class="material-icons">search</i></span> | ||||
| </div> | </div> | ||||
| <input type="text" placeholder="Search tags and keywords" class="form-control"> | <input type="text" placeholder="Search tags and keywords" class="form-control"> | ||||
| </div> | </div> | ||||
| </div> {% endcomment %} | </div> {% endcomment %} | ||||
| <div> | |||||
| <button data-toggle="dropdown" class="btn btn-secondary btn-nav btn-profile"> | <button data-toggle="dropdown" class="btn btn-secondary btn-nav btn-profile"> | ||||
| {% if request.user.is_authenticated and request.user.profile.image_url %} | {% if request.user.is_authenticated and request.user.profile.image_url %} | ||||
| <div style="background-image:url('{{ request.user.profile.image_url }}');" class="profile"></div> | <div style="background-image:url('{{ request.user.profile.image_url }}');" class="profile"></div> | ||||
| {% else %} | {% else %} | ||||
| <div style="background-image:url('{% static 'common/images/blank-profile-pic.png' %}');" class="profile"> | <div style="background-image:url('{% static 'common/images/blank-profile-pic.png' %}');" class="profile"> | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| {% if request.user|has_group:"demo" %} | {% if request.user|has_group:"demo" %} | ||||
| <i class="profile-subscription-badge demo material-icons">favorite</i> | <i class="profile-subscription-badge demo material-icons">favorite</i> | ||||
| {% elif request.user|has_group:"subscriber" %} | {% elif request.user|has_group:"subscriber" %} | ||||
| <i class="profile-subscription-badge subscriber material-icons">done</i> | <i class="profile-subscription-badge subscriber material-icons">done</i> | ||||
| {% else %} | {% else %} | ||||
| <i class="profile-subscription-badge unsubscribed material-icons">priority_high</i> | <i class="profile-subscription-badge unsubscribed material-icons">priority_high</i> | ||||
| {% endif %} | {% endif %} | ||||
| </button> | </button> | ||||
| <div class="dropdown-menu dropdown-menu-right"> | <div class="dropdown-menu dropdown-menu-right"> | ||||
| <a href="/p/home/" class="dropdown-item"> | <a href="/p/home/" class="dropdown-item"> | ||||
| <i class="material-icons">home</i> | <i class="material-icons">home</i> | ||||
| <span>My Cloud</span> | <span>My Cloud</span> | ||||
| </a> | </a> | ||||
| <a href="{% url 'profile-activity' %}" class="dropdown-item"> | |||||
| <i class="material-icons">timeline</i> | |||||
| <span>My Activity</span> | |||||
| </a> | |||||
| <div class="dropdown-menu-nested"> | <div class="dropdown-menu-nested"> | ||||
| {% if request.user.is_authenticated %} | {% if request.user.is_authenticated %} | ||||
| {% if request.user|has_group:"demo" %} | {% if request.user|has_group:"demo" %} | ||||
| <a href="/settings/billing" class="dropdown-item text-blue"> | <a href="/settings/billing" class="dropdown-item text-blue"> | ||||
| <i class="material-icons">favorite</i> | <i class="material-icons">favorite</i> | ||||
| <span>Free Account</span> | <span>Free Account</span> | ||||
| </a> | </a> | ||||
| {% elif request.user|has_group:"subscriber" %} | {% elif request.user|has_group:"subscriber" %} | ||||
| <a href="/settings/billing" class="dropdown-item text-green"> | <a href="/settings/billing" class="dropdown-item text-green"> | ||||
| <i class="material-icons">done</i> | <i class="material-icons">done</i> | ||||
| <span>Subscription Active</span> | <span>Subscription Active</span> | ||||
| </a> | </a> | ||||
| {% else %} | {% else %} | ||||
| <a href="/settings/billing" class="dropdown-item text-red"> | <a href="/settings/billing" class="dropdown-item text-red"> | ||||
| <i class="material-icons">error</i> | <i class="material-icons">error</i> | ||||
| <span>Subscription Inactive</span> | <span>Subscription Inactive</span> | ||||
| </a> | </a> | ||||
| {% endif %} | {% endif %} | ||||
| {% endif %} | {% endif %} | ||||
| <a href="/settings/profile" class="dropdown-item"> | <a href="/settings/profile" class="dropdown-item"> | ||||
| <i class="material-icons">settings</i> | <i class="material-icons">settings</i> | ||||
| <span>Settings</span> | <span>Settings</span> | ||||
| </a> | </a> | ||||
| <a href="/settings/billing" class="dropdown-item"> | <a href="/settings/billing" class="dropdown-item"> | ||||
| <i class="material-icons">credit_card</i> | <i class="material-icons">credit_card</i> | ||||
| <span>Subscription</span> | <span>Subscription</span> | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| {% if user.is_superuser %} | {% if user.is_superuser %} | ||||
| <a href="/admin" class="dropdown-item"> | <a href="/admin" class="dropdown-item"> | ||||
| <i class="material-icons">security</i> | <i class="material-icons">security</i> | ||||
| <span>Admin</span> | <span>Admin</span> | ||||
| </a> | </a> | ||||
| {% endif %} | {% endif %} | ||||
| <a href="{% url 'oauth:logout' %}" class="dropdown-item"> | <a href="{% url 'oauth:logout' %}" class="dropdown-item"> | ||||
| <i class="material-icons">exit_to_app</i> | <i class="material-icons">exit_to_app</i> | ||||
| <span>Sign Out</span> | <span>Sign Out</span> | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| </div> | |||||
| </div> | </div> | ||||
| {% else %} | {% else %} | ||||
| <div class="navbar-login-wrapper"> | <div class="navbar-login-wrapper"> | ||||
| <a href="{% url 'search' %}" class="btn mr-2 btn-secondary btn-nav btn-icon search-button"> | <a href="{% url 'search' %}" class="btn mr-2 btn-secondary btn-nav btn-icon search-button"> | ||||
| <i class="material-icons">search</i> | <i class="material-icons">search</i> | ||||
| </a> | </a> | ||||
| <a href="{% url 'oauth:login' %}" class="btn btn-transparent btn-nav login-button">Login</a> | <a href="{% url 'oauth:login' %}" class="btn btn-transparent btn-nav login-button">Login</a> | ||||
| <a href="https://store.blender.org/product/membership/" target="_blank" class="btn btn-primary ">Join <span | <a href="https://store.blender.org/product/membership/" target="_blank" class="btn btn-primary ">Join | ||||
| class="d-none d-lg-inline-block">Blender Cloud</span></a> | <span class="d-none d-lg-inline-block">Blender Cloud</span></a> | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </nav> | </nav> | ||||
| ▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | <div class="nav-drawer-body"> | ||||
| <div class="col-6 p-0"> | <div class="col-6 p-0"> | ||||
| <a class="h3 drawer-nav-dropdown" href="/services">Services</a> | <a class="h3 drawer-nav-dropdown" href="/services">Services</a> | ||||
| </div> | </div> | ||||
| <div class="col-6 p-0"> | <div class="col-6 p-0"> | ||||
| <a class="h3 drawer-nav-dropdown" href="{% url 'search' %}">Search</a> | <a class="h3 drawer-nav-dropdown" href="{% url 'search' %}">Search</a> | ||||
| </div> | </div> | ||||
| <div class="col-6 p-0"> | |||||
| <a class="h3 drawer-nav-dropdown" href="{% url 'profile-notifications' %}">Notifications</a> | |||||
| </div> | |||||
| {% if not request.user.is_authenticated %} | {% if not request.user.is_authenticated %} | ||||
| <div class="col-6 p-0"> | <div class="col-6 p-0"> | ||||
| <a class="h3 drawer-nav-dropdown" href="{% url 'oauth:login' %}">Login</a> | <a class="h3 drawer-nav-dropdown" href="{% url 'oauth:login' %}">Login</a> | ||||
| </div> | </div> | ||||
| <div class="col-6 p-0"> | <div class="col-6 p-0"> | ||||
| <a class="h3 drawer-nav-dropdown text-primary" href="{% url 'oauth:login' %}">Join</a> | <a class="h3 drawer-nav-dropdown text-primary" href="{% url 'oauth:login' %}">Join</a> | ||||
| ▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | <script> | ||||
| function gtag() { | function gtag() { | ||||
| dataLayer.push(arguments); | dataLayer.push(arguments); | ||||
| } | } | ||||
| gtag('js', new Date()); | gtag('js', new Date()); | ||||
| gtag('config', '{{ settings_analytics_id }}'); | gtag('config', '{{ settings_analytics_id }}'); | ||||
| </script> | </script> | ||||
| <script> | |||||
| // Humanizes dates | |||||
| document.querySelectorAll('.date').forEach(i => { | |||||
| i.textContent = timeDifference(epochToDate(i.textContent)); | |||||
| }); | |||||
| </script> | |||||
| {% block scripts_footer %}{% endblock scripts_footer %} | {% block scripts_footer %}{% endblock scripts_footer %} | ||||
| </body> | </body> | ||||
| </html> | </html> | ||||