Skip to content

Commit 33ef463

Browse files
authored
Merge pull request #179 from sumocoders/base-no-sidebar
Add base_no_sidebar.html.twig base template
2 parents 8cc76f7 + 754107e commit 33ef463

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

assets/scss/_imports.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@import 'base/images';
44
@import 'base/theme-transitions';
55
@import 'base/type';
6+
@import 'base/no-sidebar';
67

78
// Components
89
@import 'components/alerts';

assets/scss/base/_no-sidebar.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.main-wrapper-no-sidebar {
2+
padding-left: 0;
3+
4+
#content-wrapper {
5+
margin-top: 0;
6+
}
7+
8+
.breadcrumb-mobile {
9+
padding-left: $spacer;
10+
}
11+
12+
.main-header {
13+
padding-left: 0;
14+
15+
.navbar-brand {
16+
width: auto;
17+
}
18+
}
19+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{% block head %}
2+
{% include '@SumoCodersFrameworkCore/head.html.twig' with {title: block('title') is defined ? block('title') : page_title} %}
3+
{% endblock %}
4+
5+
<body class="body-base" data-theme-path="{{ asset('styles/style-dark.scss') }}">
6+
{% block start_body %}
7+
{% endblock %}
8+
<div id="main-wrapper" class="main-wrapper main-wrapper-no-sidebar">
9+
<div id="content-wrapper">
10+
<div class="main-header d-flex flex-column flex-lg-row">
11+
<a href="/" rel="home" class="navbar-brand d-block d-md-inline-flex justify-content-md-center">
12+
{% block logo_image %}
13+
<img class="img-responsive{% if theme() != 'theme-dark' %} d-none{% endif %}" data-navbar-logo-dark src="{{ asset('images/logo-application-dark.svg') }}" alt="{{ fallbacks.get('site_title') }}">
14+
<img class="img-responsive{% if theme() == 'theme-dark' %} d-none{% endif %}" data-navbar-logo src="{{ asset('images/logo-application.svg') }}" alt="{{ fallbacks.get('site_title') }}">
15+
{% endblock %}
16+
</a>
17+
<div class="d-md-none breadcrumb-mobile">
18+
<nav aria-label="breadcrumb" class="my-2">
19+
{{ block('breadcrumb', '@SumoCodersFrameworkCore/Breadcrumb/breadcrumb.html.twig') }}
20+
</nav>
21+
</div>
22+
<div class="sub-nav d-flex">
23+
<div class="header-title d-flex flex-row justify-content-between w-100 align-items-center">
24+
{% block header_title %}
25+
{% endblock %}
26+
<div class="d-md-none">
27+
{% if block('header_navigation') is defined and block('header_navigation') is not empty %}
28+
<button type="button" class="navbar-toggler h-100 collapse-actions-toggle" data-bs-toggle="collapse" data-bs-target="#action-buttons-collapse" aria-expanded="false" aria-controls="action-buttons-collapse">
29+
<i class="fas fa-ellipsis-v"></i>
30+
</button>
31+
{% endif %}
32+
</div>
33+
</div>
34+
<div class="d-none d-md-block ms-auto">
35+
{% include '@SumoCodersFrameworkCore/usermenu.html.twig' with {'mobile': false} %}
36+
</div>
37+
</div>
38+
{% if block('header_navigation') is defined and block('header_navigation') is not empty %}
39+
<div class="collapse collapse-actions" id="action-buttons-collapse">
40+
<div class="action-buttons action-buttons-mobile">
41+
{{ block('header_navigation') }}
42+
</div>
43+
</div>
44+
{% endif %}
45+
</div>
46+
47+
<section id="main" role="main">
48+
<div class="header-subbar">
49+
{{ include('@SumoCodersFrameworkCore/notifications.html.twig') }}
50+
<div class="header-title-bar d-none d-md-flex justify-content-md-between align-items-md-center flex-column flex-md-row flex-wrap">
51+
<nav aria-label="breadcrumb" class="my-2">
52+
{{ block('breadcrumb', '@SumoCodersFrameworkCore/Breadcrumb/breadcrumb.html.twig') }}
53+
</nav>
54+
<div class="ms-md-auto">
55+
{% if block('header_navigation') is defined and block('header_navigation') is not empty %}
56+
<div class="d-flex gap-2 align-items-center">
57+
{{ block('header_navigation') }}
58+
</div>
59+
{% endif %}
60+
</div>
61+
</div>
62+
</div>
63+
<div class="container-fluid">
64+
<div class="main-content">
65+
{% block main %}
66+
67+
{% endblock %}
68+
</div>
69+
</div>
70+
</section>
71+
</div>
72+
<footer class="footer">
73+
{% block footer %}
74+
<a href="#main-wrapper" class="back-to-top d-none" data-controller="scroll-to-top" data-action="scroll@window->scroll-to-top#scroll"><i class="fas fa-chevron-up me-3"></i> {{ 'core.interface.backToTop'|trans|ucfirst }}</a>
75+
{% endblock %}
76+
</footer>
77+
</div>
78+
79+
{{ include('@SumoCodersFrameworkCore/dialogs.html.twig') }}
80+
</body>
81+
</html>

0 commit comments

Comments
 (0)