plantuml-stdlib / Azure-PlantUML

PlantUML sprites, macros, and other includes for Azure services
MIT License
460 stars 153 forks source link

Add support for PlantUML themes #41

Open travisnielsen opened 2 years ago

travisnielsen commented 2 years ago

I'd like to propose adding PlantUML theme support for a future release. I believe this can be done without any breaking changes by adding a themes directory to the dist folder and referencing it as follows:

@startuml theme-DefaultMonospacedFontName

!define AzurePuml https://raw.githubusercontent.com/travisnielsen/Azure-PlantUML/themesupport/dist

' IMPORT THEME HERE 👇🏽
!includeurl AzurePuml/themes/blueprint.puml

!includeurl AzurePuml/Analytics/AzureEventHub.puml
!includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml
!includeurl AzurePuml/Databases/AzureCosmosDb.puml

left to right direction

agent "Device Simulator" as devices

AzureEventHub(fareDataEventHub, "Fare Data", "PK: Medallion HackLicense VendorId; 3 TUs", "testing 1234")
note right: this is a note
AzureEventHub(tripDataEventHub, "Trip Data", "PK: Medallion HackLicense VendorId; 3 TUs")
AzureStreamAnalyticsJob(streamAnalytics, "Stream Processing", "6 SUs")
AzureCosmosDb(outputCosmosDb, "Output Database", "1,000 RUs")

devices --> fareDataEventHub : "test arrow"
devices --> tripDataEventHub
fareDataEventHub --> streamAnalytics
tripDataEventHub --> streamAnalytics
streamAnalytics --> outputCosmosDb

@enduml

I have a proof-of-concept branch here: https://github.com/travisnielsen/Azure-PlantUML/tree/themesupport

Examples:

Blueprint image

crt-green image

reddress-darkblue image

cerulean image

Potherca commented 2 years ago

I am all for it!