Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
a9817e6a
Verified
Commit
a9817e6a
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Add some documentation on the extended navbar
parent
54f7a90b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!789
Support (icon) tabs in top navbar
Pipeline
#42509
canceled
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/dev/04_materialize_templates.rst
+46
-0
46 additions, 0 deletions
docs/dev/04_materialize_templates.rst
with
46 additions
and
0 deletions
docs/dev/04_materialize_templates.rst
+
46
−
0
View file @
a9817e6a
...
...
@@ -29,6 +29,51 @@ To fully remove page or browser title, use these template tags::
{% block no_browser_title %}{% endblock %}
{% block no_page_title %}{% endblock %}
Extended navbar
---------------
The top navbar with the site title and the login status can be extended by an additional tab bar, for example.
To add normal Materialize tabs without icons, you can use a snippet like described in `Extended Navbar with Tabs`_:
.. code-block:: html+django
{% block nav_content %}
<ul class="tabs tabs-transparent">
<li class="tab"><a href="#test1">Test 1</a></li>
<li class="tab"><a class="active" href="#test2">Test 2</a></li>
<li class="tab disabled"><a href="#test3">Disabled Tab</a></li>
<li class="tab"><a href="#test4">Test 4</a></li>
</ul>
{% endblock %}
Furthermore, you can use tabs with integrated icons that are higher, but more compact in width:
.. code-block:: html+django
{% block nav_content %}
<ul class="tabs tabs-transparent tabs-icons tabs-fixed-width">
<li class="tab">
<a href="#test1">
<i class="material-icons">speaker_notes</i>
Test 1
</a>
</li>
<li class="tab">
<a href="#test2">
<i class="material-icons">people</i>
Test 2
</a>
</li>
</ul>
{% endblock %}
.. warning::
Don't define the ``nav_content`` block within the ``content`` block – that won't work.
Forms in templates
------------------
...
...
@@ -91,3 +136,4 @@ After you've loaded the template tag, you can simply generate the table like thi
.. _MaterializeCSS: https://materializecss.com/
.. _django-material: https://pypi.org/project/django-material/
.. _Extended Navbar with Tabs: https://materializecss.com/navbar.html#navbar-tabs
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment