micro-sidebar 1.0.2__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. micro_sidebar-1.1.0/LICENSE +21 -0
  2. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/PKG-INFO +39 -36
  3. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/README.md +35 -30
  4. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/micro_sidebar.egg-info/PKG-INFO +40 -37
  5. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/micro_sidebar.egg-info/SOURCES.txt +4 -3
  6. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/pyproject.toml +9 -3
  7. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/setup.py +2 -2
  8. micro_sidebar-1.0.2/sidebar/templates/sidebar/content.html → micro_sidebar-1.1.0/sidebar/templates/sidebar/main.html +7 -5
  9. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/MANIFEST.in +0 -0
  10. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/micro_sidebar.egg-info/dependency_links.txt +0 -0
  11. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/micro_sidebar.egg-info/requires.txt +0 -0
  12. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/micro_sidebar.egg-info/top_level.txt +0 -0
  13. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/setup.cfg +0 -0
  14. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/sidebar/__init__.py +0 -0
  15. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/sidebar/apps.py +0 -0
  16. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/sidebar/migrations/__init__.py +0 -0
  17. /micro_sidebar-1.0.2/sidebar/static/sidebar/style.css → /micro_sidebar-1.1.0/sidebar/static/sidebar/sidebar.css +0 -0
  18. {micro_sidebar-1.0.2/sidebar/static/sidebar/js → micro_sidebar-1.1.0/sidebar/static/sidebar}/sidebar.js +0 -0
  19. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/sidebar/urls.py +0 -0
  20. {micro_sidebar-1.0.2 → micro_sidebar-1.1.0}/sidebar/views.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 DeBeski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: micro_sidebar
3
- Version: 1.0.2
4
- Summary: A reusable Django sidebar for Web Apps
3
+ Version: 1.1.0
4
+ Summary: A Reusable RTL Django Sidebar App
5
5
  Home-page: https://github.com/debeski/micro-sidebar
6
6
  Author: DeBeski
7
7
  Author-email: DeBeski <debeski1@gmail.com>
@@ -21,14 +21,14 @@ Classifier: License :: OSI Approved :: MIT License
21
21
  Classifier: Operating System :: OS Independent
22
22
  Requires-Python: >=3.9
23
23
  Description-Content-Type: text/markdown
24
+ License-File: LICENSE
24
25
  Requires-Dist: Django>=5.1
25
- Dynamic: author
26
- Dynamic: home-page
27
- Dynamic: requires-python
28
26
 
29
- # Micro Sidebar
27
+ # Micro Sidebar - A Reusable RTL Django Sidebar App
30
28
 
31
- A reusable RTL Django sidebar app for Web Apps.
29
+ [![PyPI version](https://badge.fury.io/py/micro-sidebar.svg)](https://pypi.org/project/micro-sidebar/)
30
+
31
+ **RTL** lightweight, reusable django app that provides a dynamic sidebar for your django projects.
32
32
 
33
33
  ## Requirements
34
34
 
@@ -37,9 +37,11 @@ A reusable RTL Django sidebar app for Web Apps.
37
37
 
38
38
  ## Installation
39
39
 
40
- 1. **Install the package:**
40
+ 1. **Install:**
41
41
  ```bash
42
42
  pip install micro-sidebar
43
+ # OR
44
+ pip install git+https://github.com/debeski/micro-sidebar.git
43
45
  ```
44
46
 
45
47
  2. **Add to `INSTALLED_APPS`:**
@@ -64,35 +66,35 @@ A reusable RTL Django sidebar app for Web Apps.
64
66
  ]
65
67
  ```
66
68
 
67
- 4. **Add to your Base Template:**
68
- In your `base.html` (or equivalent), include the sidebar. It is designed to sit to the right of your main content.
69
-
70
- Example structure using Flexbox:
71
- ```html
72
- <body>
73
- <div class="d-flex">
74
- <!-- Sidebar -->
75
- {% include "sidebar/content.html" %}
76
-
77
- <!-- Main Content -->
78
- <div class="flex-grow-1">
79
- {% block content %}{% endblock %}
80
- </div>
81
- </div>
82
-
83
- <!-- Bootstrap JS (Required) -->
84
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
85
- </body>
86
- ```
87
-
88
69
  ## Customization
89
70
 
90
- ### Overriding Content
91
- The sidebar comes with a default template. To customize the links and content, create a file named `content.html` inside `templates/sidebar/` in your project's `templates` directory.
92
-
93
- **Path:** `your_project/templates/sidebar/content.html`
94
-
95
- The default sidebar logic expects specific classes like `.list-group-item` and `.accordion-item` for the collapsible features to work correctly with the provided JS.
71
+ ### Override Default Menu
72
+ The sidebar uses a block-based template system. To define your own menu items:
73
+
74
+ 1. Create a new template (e.g., `templates/sidebar_menu.html`).
75
+ 2. Extend `sidebar/main.html`.
76
+ 3. Override the `{% block items %}`.
77
+
78
+ **Example `sidebar_menu.html`:**
79
+ ```html
80
+ {% extends "sidebar/main.html" %}
81
+
82
+ {% block items %}
83
+ <a href="{% url 'home' %}" class="list-group-item list-group-item-action">
84
+ <i class="bi bi-house me-2" style="font-size: 24px;"></i>
85
+ <span>Home</span>
86
+ </a>
87
+ <a href="{% url 'settings' %}" class="list-group-item list-group-item-action">
88
+ <i class="bi bi-gear me-2" style="font-size: 24px;"></i>
89
+ <span>Settings</span>
90
+ </a>
91
+ {% endblock %}
92
+ ```
93
+
94
+ Then, include your custom template in `base.html`:
95
+ ```html
96
+ {% include "sidebar_menu.html" %}
97
+ ```
96
98
 
97
99
  ### Positioning
98
100
  The sidebar is sticky by default. If your app has a top navigation bar (titlebar), the sidebar will automatically adjust its position below it on small screens. If no titlebar is detected, it will stick to the top of the viewport.
@@ -109,3 +111,4 @@ While it may theoretically work in LTR environments if standard Bootstrap files
109
111
  | **v1.0.0** | Initial Release. |
110
112
  | **v1.0.1** | Fixed titlebar positioning bug causing overlap/gaps. |
111
113
  | **v1.0.2** | Improved documentation clarity and added usage instructions. |
114
+ | **v1.1.0** | Renamed `content.html` to `main.html` for clarity. Refactored to use `{% block items %}` for easier extension. |
@@ -1,6 +1,8 @@
1
- # Micro Sidebar
1
+ # Micro Sidebar - A Reusable RTL Django Sidebar App
2
2
 
3
- A reusable RTL Django sidebar app for Web Apps.
3
+ [![PyPI version](https://badge.fury.io/py/micro-sidebar.svg)](https://pypi.org/project/micro-sidebar/)
4
+
5
+ **RTL** lightweight, reusable django app that provides a dynamic sidebar for your django projects.
4
6
 
5
7
  ## Requirements
6
8
 
@@ -9,9 +11,11 @@ A reusable RTL Django sidebar app for Web Apps.
9
11
 
10
12
  ## Installation
11
13
 
12
- 1. **Install the package:**
14
+ 1. **Install:**
13
15
  ```bash
14
16
  pip install micro-sidebar
17
+ # OR
18
+ pip install git+https://github.com/debeski/micro-sidebar.git
15
19
  ```
16
20
 
17
21
  2. **Add to `INSTALLED_APPS`:**
@@ -36,35 +40,35 @@ A reusable RTL Django sidebar app for Web Apps.
36
40
  ]
37
41
  ```
38
42
 
39
- 4. **Add to your Base Template:**
40
- In your `base.html` (or equivalent), include the sidebar. It is designed to sit to the right of your main content.
41
-
42
- Example structure using Flexbox:
43
- ```html
44
- <body>
45
- <div class="d-flex">
46
- <!-- Sidebar -->
47
- {% include "sidebar/content.html" %}
48
-
49
- <!-- Main Content -->
50
- <div class="flex-grow-1">
51
- {% block content %}{% endblock %}
52
- </div>
53
- </div>
54
-
55
- <!-- Bootstrap JS (Required) -->
56
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
57
- </body>
58
- ```
59
-
60
43
  ## Customization
61
44
 
62
- ### Overriding Content
63
- The sidebar comes with a default template. To customize the links and content, create a file named `content.html` inside `templates/sidebar/` in your project's `templates` directory.
64
-
65
- **Path:** `your_project/templates/sidebar/content.html`
66
-
67
- The default sidebar logic expects specific classes like `.list-group-item` and `.accordion-item` for the collapsible features to work correctly with the provided JS.
45
+ ### Override Default Menu
46
+ The sidebar uses a block-based template system. To define your own menu items:
47
+
48
+ 1. Create a new template (e.g., `templates/sidebar_menu.html`).
49
+ 2. Extend `sidebar/main.html`.
50
+ 3. Override the `{% block items %}`.
51
+
52
+ **Example `sidebar_menu.html`:**
53
+ ```html
54
+ {% extends "sidebar/main.html" %}
55
+
56
+ {% block items %}
57
+ <a href="{% url 'home' %}" class="list-group-item list-group-item-action">
58
+ <i class="bi bi-house me-2" style="font-size: 24px;"></i>
59
+ <span>Home</span>
60
+ </a>
61
+ <a href="{% url 'settings' %}" class="list-group-item list-group-item-action">
62
+ <i class="bi bi-gear me-2" style="font-size: 24px;"></i>
63
+ <span>Settings</span>
64
+ </a>
65
+ {% endblock %}
66
+ ```
67
+
68
+ Then, include your custom template in `base.html`:
69
+ ```html
70
+ {% include "sidebar_menu.html" %}
71
+ ```
68
72
 
69
73
  ### Positioning
70
74
  The sidebar is sticky by default. If your app has a top navigation bar (titlebar), the sidebar will automatically adjust its position below it on small screens. If no titlebar is detected, it will stick to the top of the viewport.
@@ -81,3 +85,4 @@ While it may theoretically work in LTR environments if standard Bootstrap files
81
85
  | **v1.0.0** | Initial Release. |
82
86
  | **v1.0.1** | Fixed titlebar positioning bug causing overlap/gaps. |
83
87
  | **v1.0.2** | Improved documentation clarity and added usage instructions. |
88
+ | **v1.1.0** | Renamed `content.html` to `main.html` for clarity. Refactored to use `{% block items %}` for easier extension. |
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
2
- Name: micro_sidebar
3
- Version: 1.0.2
4
- Summary: A reusable Django sidebar for Web Apps
1
+ Metadata-Version: 2.1
2
+ Name: micro-sidebar
3
+ Version: 1.1.0
4
+ Summary: A Reusable RTL Django Sidebar App
5
5
  Home-page: https://github.com/debeski/micro-sidebar
6
6
  Author: DeBeski
7
7
  Author-email: DeBeski <debeski1@gmail.com>
@@ -21,14 +21,14 @@ Classifier: License :: OSI Approved :: MIT License
21
21
  Classifier: Operating System :: OS Independent
22
22
  Requires-Python: >=3.9
23
23
  Description-Content-Type: text/markdown
24
+ License-File: LICENSE
24
25
  Requires-Dist: Django>=5.1
25
- Dynamic: author
26
- Dynamic: home-page
27
- Dynamic: requires-python
28
26
 
29
- # Micro Sidebar
27
+ # Micro Sidebar - A Reusable RTL Django Sidebar App
30
28
 
31
- A reusable RTL Django sidebar app for Web Apps.
29
+ [![PyPI version](https://badge.fury.io/py/micro-sidebar.svg)](https://pypi.org/project/micro-sidebar/)
30
+
31
+ **RTL** lightweight, reusable django app that provides a dynamic sidebar for your django projects.
32
32
 
33
33
  ## Requirements
34
34
 
@@ -37,9 +37,11 @@ A reusable RTL Django sidebar app for Web Apps.
37
37
 
38
38
  ## Installation
39
39
 
40
- 1. **Install the package:**
40
+ 1. **Install:**
41
41
  ```bash
42
42
  pip install micro-sidebar
43
+ # OR
44
+ pip install git+https://github.com/debeski/micro-sidebar.git
43
45
  ```
44
46
 
45
47
  2. **Add to `INSTALLED_APPS`:**
@@ -64,35 +66,35 @@ A reusable RTL Django sidebar app for Web Apps.
64
66
  ]
65
67
  ```
66
68
 
67
- 4. **Add to your Base Template:**
68
- In your `base.html` (or equivalent), include the sidebar. It is designed to sit to the right of your main content.
69
-
70
- Example structure using Flexbox:
71
- ```html
72
- <body>
73
- <div class="d-flex">
74
- <!-- Sidebar -->
75
- {% include "sidebar/content.html" %}
76
-
77
- <!-- Main Content -->
78
- <div class="flex-grow-1">
79
- {% block content %}{% endblock %}
80
- </div>
81
- </div>
82
-
83
- <!-- Bootstrap JS (Required) -->
84
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
85
- </body>
86
- ```
87
-
88
69
  ## Customization
89
70
 
90
- ### Overriding Content
91
- The sidebar comes with a default template. To customize the links and content, create a file named `content.html` inside `templates/sidebar/` in your project's `templates` directory.
92
-
93
- **Path:** `your_project/templates/sidebar/content.html`
94
-
95
- The default sidebar logic expects specific classes like `.list-group-item` and `.accordion-item` for the collapsible features to work correctly with the provided JS.
71
+ ### Override Default Menu
72
+ The sidebar uses a block-based template system. To define your own menu items:
73
+
74
+ 1. Create a new template (e.g., `templates/sidebar_menu.html`).
75
+ 2. Extend `sidebar/main.html`.
76
+ 3. Override the `{% block items %}`.
77
+
78
+ **Example `sidebar_menu.html`:**
79
+ ```html
80
+ {% extends "sidebar/main.html" %}
81
+
82
+ {% block items %}
83
+ <a href="{% url 'home' %}" class="list-group-item list-group-item-action">
84
+ <i class="bi bi-house me-2" style="font-size: 24px;"></i>
85
+ <span>Home</span>
86
+ </a>
87
+ <a href="{% url 'settings' %}" class="list-group-item list-group-item-action">
88
+ <i class="bi bi-gear me-2" style="font-size: 24px;"></i>
89
+ <span>Settings</span>
90
+ </a>
91
+ {% endblock %}
92
+ ```
93
+
94
+ Then, include your custom template in `base.html`:
95
+ ```html
96
+ {% include "sidebar_menu.html" %}
97
+ ```
96
98
 
97
99
  ### Positioning
98
100
  The sidebar is sticky by default. If your app has a top navigation bar (titlebar), the sidebar will automatically adjust its position below it on small screens. If no titlebar is detected, it will stick to the top of the viewport.
@@ -109,3 +111,4 @@ While it may theoretically work in LTR environments if standard Bootstrap files
109
111
  | **v1.0.0** | Initial Release. |
110
112
  | **v1.0.1** | Fixed titlebar positioning bug causing overlap/gaps. |
111
113
  | **v1.0.2** | Improved documentation clarity and added usage instructions. |
114
+ | **v1.1.0** | Renamed `content.html` to `main.html` for clarity. Refactored to use `{% block items %}` for easier extension. |
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  MANIFEST.in
2
3
  README.md
3
4
  pyproject.toml
@@ -12,6 +13,6 @@ sidebar/apps.py
12
13
  sidebar/urls.py
13
14
  sidebar/views.py
14
15
  sidebar/migrations/__init__.py
15
- sidebar/static/sidebar/style.css
16
- sidebar/static/sidebar/js/sidebar.js
17
- sidebar/templates/sidebar/content.html
16
+ sidebar/static/sidebar/sidebar.css
17
+ sidebar/static/sidebar/sidebar.js
18
+ sidebar/templates/sidebar/main.html
@@ -1,11 +1,14 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61.0"]
2
+ requires = [
3
+ "setuptools<69",
4
+ "wheel<0.41"
5
+ ]
3
6
  build-backend = "setuptools.build_meta"
4
7
 
5
8
  [project]
6
9
  name = "micro_sidebar"
7
- version = "1.0.2"
8
- description = "A reusable Django sidebar for Web Apps"
10
+ version = "1.1.0"
11
+ description = "A Reusable RTL Django Sidebar App"
9
12
  readme = "README.md"
10
13
  requires-python = ">=3.9"
11
14
  license = {text = "MIT"}
@@ -36,3 +39,6 @@ Homepage = "https://github.com/debeski/micro-sidebar"
36
39
  [tool.setuptools.packages.find]
37
40
  where = ["."]
38
41
  include = ["sidebar*"]
42
+
43
+ [tool.setuptools]
44
+ include-package-data = true
@@ -2,10 +2,10 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="micro_sidebar",
5
- version="1.0.2",
5
+ version="1.1.0",
6
6
  author="DeBeski",
7
7
  author_email="debeski1@gmail.com",
8
- description="A reusable Django sidebar for Web Apps",
8
+ description="A Reusable RTL Django Sidebar App",
9
9
  long_description=open('README.md').read() if open('README.md') else '',
10
10
  long_description_content_type="text/markdown",
11
11
  url="https://github.com/debeski/micro-sidebar",
@@ -1,6 +1,6 @@
1
1
  {% load static %}
2
- <link rel="stylesheet" href="{% static 'sidebar/style.css' %}">
3
- <script src="{% static 'sidebar/js/sidebar.js' %}" nonce="{{ request.csp_nonce }}" defer></script>
2
+ <link rel="stylesheet" href="{% static 'sidebar/sidebar.css' %}">
3
+ <script src="{% static 'sidebar/sidebar.js' %}" nonce="{{ request.csp_nonce }}" defer></script>
4
4
  <!-- Ghost Sidebar for small screens layout stability -->
5
5
  <div class="sidebar-ghost"></div>
6
6
 
@@ -10,15 +10,16 @@
10
10
  data-toggle-url="{% url 'toggle_sidebar' %}"
11
11
  data-session-collapsed="{{ request.session.sidebarCollapsed|yesno:'true,false' }}">
12
12
  <div class="list-group flex-shrink-0">
13
+ {% block items %}
13
14
 
14
15
  <!-- DEFAULT CONTENT / INSTRUCTIONS -->
15
16
  <div class="p-3 text-center text-muted">
16
17
  <i class="bi bi-info-circle mb-2" style="font-size: 24px;"></i>
17
18
  <p class="small">
18
19
  <strong>Default Sidebar</strong><br>
19
- To customize this menu, create a file at:<br>
20
- <code>templates/sidebar/content.html</code><br>
21
- in your Django project.
20
+ To customize this menu, create a template extending:<br>
21
+ <code>sidebar/main.html</code><br>
22
+ and override the <code>items</code> block.
22
23
  </p>
23
24
  </div>
24
25
 
@@ -27,5 +28,6 @@
27
28
  <span>Example Home</span>
28
29
  </a>
29
30
 
31
+ {% endblock %}
30
32
  </div>
31
33
  </div>
File without changes
File without changes