|
1 | 1 | # umltheme |
2 | 2 |
|
3 | | -This repo contains doubleSlash CI styling information to include in plantUML drawings |
| 3 | +This repo contains doubleSlash CI styling information to include in plantUML drawings. |
4 | 4 | Use stylings by including the theme file at the top of your code. |
5 | 5 |
|
| 6 | +**Gen2 Theme Features:** |
| 7 | + |
| 8 | +- 🌙 **Light and Dark Mode Support** - Choose between light and dark themes |
| 9 | +- 🎨 **Improved Styling** - Enhanced colors and modern design |
| 10 | +- 📦 **Consolidated Architecture** - Simplified theme structure |
| 11 | +- 🔄 **Backward Compatibility** - Legacy themes still work via redirects |
| 12 | + |
6 | 13 | ## Changelog |
7 | 14 |
|
8 | 15 | The changelog is maintained in [CHANGELOG.md](./CHANGELOG.md). For the latest version, see [releases](https://github.com/doubleSlashde/umltheme/releases). |
9 | 16 |
|
10 | | -## Supported themes |
| 17 | +## Quick Start (Gen2 Themes) |
| 18 | + |
| 19 | +### Universal Theme (Recommended) |
| 20 | + |
| 21 | +For most diagram types, use the universal gen2 theme: |
| 22 | + |
| 23 | +``` txt |
| 24 | +!include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/doubleslash-gen2.puml |
| 25 | +``` |
| 26 | + |
| 27 | +### Light Mode Theme |
| 28 | + |
| 29 | +``` txt |
| 30 | +!include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/light.puml |
| 31 | +``` |
| 32 | + |
| 33 | +### Dark Mode Theme |
| 34 | + |
| 35 | +``` txt |
| 36 | +!include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/dark.puml |
| 37 | +``` |
| 38 | + |
| 39 | +## Specialized Gen2 Themes |
| 40 | + |
| 41 | +### For System Diagrams |
| 42 | + |
| 43 | +``` txt |
| 44 | +!include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/puml-theme-gen2-system.puml |
| 45 | +``` |
| 46 | + |
| 47 | +**System Diagram Levels:** |
| 48 | +The system theme supports multiple architectural levels using stereotypes: |
| 49 | + |
| 50 | +``` txt |
| 51 | +rectangle "Online Shop System" <<context>> { |
| 52 | + rectangle "Web Application" <<container>> { |
| 53 | + rectangle "Order Management" <<component>> { |
| 54 | + rectangle "Order Service" <<module>> { |
| 55 | + rectangle "OrderController.java" <<code>> |
| 56 | + } |
| 57 | + } |
| 58 | + } |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +**Available Levels:** |
| 63 | + |
| 64 | +- `<<context>>` - System context level (C4 Level 1) |
| 65 | +- `<<container>>` - Container level (C4 Level 2) |
| 66 | +- `<<component>>` - Component level (C4 Level 3) |
| 67 | +- `<<module>>` - Module level (C4 Level 4) |
| 68 | +- `<<code>>` - Code level (C4 Level 5) |
| 69 | +- `<<external>>` - External systems/services |
| 70 | + |
| 71 | +See [examples/gen2/systemmodel_with_levels.puml](examples/gen2/systemmodel_with_levels.puml) for a complete example. |
| 72 | + |
| 73 | +### For Gantt Diagrams |
| 74 | + |
| 75 | +``` txt |
| 76 | +@startgantt |
| 77 | +!include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/puml-theme-gen2-gantt.puml |
| 78 | +... |
| 79 | +``` |
| 80 | + |
| 81 | +## Legacy Theme Support (Deprecated) |
| 82 | + |
| 83 | +**Note:** Legacy themes are deprecated but still functional via redirects. Please migrate to gen2 themes above. |
| 84 | +<!-- markdownlint-disable MD033 --> |
| 85 | +<details> |
| 86 | +<summary>Click to view legacy includes (deprecated)</summary> |
11 | 87 |
|
12 | 88 | ### Include for use case diagram |
13 | 89 |
|
@@ -55,12 +131,64 @@ The changelog is maintained in [CHANGELOG.md](./CHANGELOG.md). For the latest ve |
55 | 131 | ... |
56 | 132 | ``` |
57 | 133 |
|
| 134 | +</details> |
| 135 | + |
58 | 136 | ## Support for the following diagrams |
59 | 137 |
|
60 | | -1. Use Cases (see [examples/usecase.puml](examples/usecase.puml)): diagram to support documentation of PEOPLE and PROCESS. |
61 | | -2. Activity (see [examples/activity_model.puml](examples/activity_model.puml)): diagram to illustrate activities in a PROCESS. It can be used as an alternative to BPMN diagrams. |
62 | | -3. System model (see [examples/systemmodel.puml](examples/systemmodel.puml)): diagram for a functional SYSTEM view. Represents the first two layers of a C4 model (System context and Containers) |
63 | | -4. Data model (see [examples/datamodel.puml](examples/datamodel.puml)): illustrates a DATA model with or without system specific data types. Main purpose of this model is to have a ubiquitous language for software product deveopment to avoid misunderstandings between users and developers. |
64 | | -5. Class model (see [examples/class_model.puml](/examples/class_model.puml)): The class model forms the core of the module design. The classes can be used to represent both level 3 and level 4 in the C4 model. The methods of the classes are the basis of the messages in the sequence model. |
65 | | -6. Sequence model (see [examples/systemmodel.puml](examples/systemmodel.puml) ): The seqence model shows the interactions of the modules from the class model. |
66 | | -7. Mind maps (see [examples/mindmap.puml](examples/mindmap.puml)): The mind map visualizes ideas and concepts in a tree-like structure. |
| 138 | +1. **Use Cases** (see [examples/gen2/usecase.puml](examples/gen2/usecase.puml)): diagram to support documentation of PEOPLE and PROCESS. |
| 139 | +2. **Activity** (see [examples/gen2/activity_model.puml](examples/gen2/activity_model.puml)): diagram to illustrate activities in a PROCESS. It can be used as an alternative to BPMN diagrams. |
| 140 | +3. **System model** (see [examples/gen2/systemmodel.puml](examples/gen2/systemmodel.puml)): diagram for a functional SYSTEM view. Represents the first two layers of a C4 model (System context and Containers) |
| 141 | +4. **Data model** (see [examples/gen2/datamodel.puml](examples/gen2/datamodel.puml)): illustrates a DATA model with or without system specific data types. Main purpose of this model is to have a ubiquitous language for software product development to avoid misunderstandings between users and developers. |
| 142 | +5. **Class model** (see [examples/gen2/class_model.puml](examples/gen2/class_model.puml)): The class model forms the core of the module design. The classes can be used to represent both level 3 and level 4 in the C4 model. The methods of the classes are the basis of the messages in the sequence model. |
| 143 | +6. **Sequence model** (see [examples/gen2/sequence.puml](examples/gen2/sequence.puml)): The sequence model shows the interactions of the modules from the class model. |
| 144 | +7. **Mind maps** (see [examples/gen2/mindmap.puml](examples/gen2/mindmap.puml)): The mind map visualizes ideas and concepts in a tree-like structure. |
| 145 | +8. **Gantt charts** (see [examples/gen2/gantt.puml](examples/gen2/gantt.puml)): Project timeline and task management visualization. |
| 146 | +9. **State diagrams** (see [examples/gen2/state.puml](examples/gen2/state.puml)): State machine and workflow visualization. |
| 147 | +10. **Deployment diagrams** (see [examples/gen2/deployment.puml](examples/gen2/deployment.puml)): Infrastructure and deployment architecture visualization. |
| 148 | + |
| 149 | +## Migration from Legacy to Gen2 |
| 150 | + |
| 151 | +To migrate from legacy themes to gen2: |
| 152 | + |
| 153 | +1. **Replace** old include statements with the universal gen2 theme: |
| 154 | + |
| 155 | + ```txt |
| 156 | + // Old (deprecated) |
| 157 | + !include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/puml-theme-doubleslash-[type].puml |
| 158 | + |
| 159 | + // New (gen2) |
| 160 | + !include https://raw.githubusercontent.com/doubleSlashde/umltheme/main/doubleslash/doubleslash-gen2.puml |
| 161 | + ``` |
| 162 | + |
| 163 | +2. **Choose** your preferred color scheme: |
| 164 | + - Use `doubleslash/light.puml` for light mode |
| 165 | + - Use `doubleslash/dark.puml` for dark mode |
| 166 | + - Use `doubleslash/doubleslash-gen2.puml` for universal theme |
| 167 | + |
| 168 | +3. **Update** examples to reference the gen2 directory if needed |
| 169 | + |
| 170 | +## Usage in MkDocs Integration |
| 171 | + |
| 172 | +To integrate the doubleSlash themes with MkDocs, install [mkdocs_puml](https://github.com/MikhailKravets/mkdocs_puml) and add the following configuration to your `mkdocs.yml`: |
| 173 | + |
| 174 | +```yaml |
| 175 | +plugins: |
| 176 | + - search |
| 177 | + - plantuml: |
| 178 | + puml_url: https://www.plantuml.com/plantuml/ |
| 179 | + theme: |
| 180 | + url: https://raw.githubusercontent.com/doubleSlashde/umltheme/main/ |
| 181 | + light: doubleslash/light |
| 182 | + dark: doubleslash/dark |
| 183 | +``` |
| 184 | +
|
| 185 | +This configuration: |
| 186 | +
|
| 187 | +- Uses the official PlantUML server for rendering |
| 188 | +- Automatically applies the light theme for light mode |
| 189 | +- Automatically applies the dark theme for dark mode |
| 190 | +- Switches themes based on your MkDocs theme's color scheme |
| 191 | +
|
| 192 | +## Contributing |
| 193 | +
|
| 194 | +Please feel free to contribute improvements, bug fixes, or new diagram type support. Make sure to update both legacy and gen2 themes for backward compatibility. |
0 commit comments