Skip to content

Commit

Permalink
Merge pull request #25 from sdeleuze/efficient-webjars
Browse files Browse the repository at this point in the history
Use WebJars versioned URLs
  • Loading branch information
arey authored Apr 6, 2023
2 parents f1aea15 + 3527861 commit ae1519c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins {
kotlin("plugin.spring") version kotlinVersion
}

// WebJars versions are also referenced in src/main/resources/templates/fragments/layout.html for resource URLs
val boostrapVersion = "5.1.3"
val fontAwesomeVersion = "4.7.0"

Expand Down Expand Up @@ -51,7 +52,6 @@ dependencies {
implementation("javax.cache:cache-api")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.webjars:webjars-locator-core")
implementation("org.webjars.npm:bootstrap:$boostrapVersion")
implementation("org.webjars.npm:font-awesome:$fontAwesomeVersion")

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/fragments/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

<link th:href="@{/webjars/font-awesome/css/font-awesome.min.css}" rel="stylesheet">
<link th:href="@{/webjars/font-awesome/4.7.0/css/font-awesome.min.css}" rel="stylesheet">
<link rel="stylesheet" th:href="@{/resources/css/petclinic.css}" />

</head>
Expand Down Expand Up @@ -87,7 +87,7 @@
</div>
</div>

<script th:src="@{/webjars/bootstrap/dist/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/webjars/bootstrap/5.1.3/dist/js/bootstrap.bundle.min.js}"></script>

</body>

Expand Down

0 comments on commit ae1519c

Please sign in to comment.