Conditional-Comments für IE reaktiviert
authorKai Moritz <km@juplo.de>
Sun, 14 Sep 2014 21:31:03 +0000 (23:31 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 19 Jan 2016 16:45:42 +0000 (17:45 +0100)
pom.xml
src/main/resources/spring/mvc.xml
src/main/webapp/less/ie8.less [new file with mode: 0644]
src/main/webapp/thymeleaf/templates/layout.html

diff --git a/pom.xml b/pom.xml
index ad1f8f6..1e84957 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,7 @@
     <springframework.version>4.0.6.RELEASE</springframework.version>
     <thymeleaf.version>2.1.3.RELEASE</thymeleaf.version>
     <thymeleaf-layout-dialect.version>1.2.5</thymeleaf-layout-dialect.version>
+    <thymeleaf-extras-conditionalcomments.version>2.1.1.RELEASE</thymeleaf-extras-conditionalcomments.version>
 
   </properties>
 
       <version>${thymeleaf-layout-dialect.version}</version>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.thymeleaf.extras</groupId>
+      <artifactId>thymeleaf-extras-conditionalcomments</artifactId>
+      <version>${thymeleaf-extras-conditionalcomments.version}</version>
+      <scope>runtime</scope>
+    </dependency>
 
     <!-- Servlet -->
     <dependency>
index 4bf0a0a..50f4fc7 100644 (file)
@@ -61,6 +61,7 @@
     <property name="additionalDialects">
       <util:set>
         <bean class="nz.net.ultraq.thymeleaf.LayoutDialect"/>
+        <bean class="org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect"/>
       </util:set>
     </property>
   </bean>
diff --git a/src/main/webapp/less/ie8.less b/src/main/webapp/less/ie8.less
new file mode 100644 (file)
index 0000000..e69de29
index 72b89d6..881957d 100644 (file)
       @import '[[@{/css/print.css}]]' print;
     </style>
     <script src="../../js/prettify.js" th:src="@{/js/prettify.js}"></script>
+    <!--[if lt IE 9]>
+      <script src="../../js/html5shiv.js" th:src="@{/js/html5shiv.js}"></script>
+    <![endif]-->
+    <!--[if IE 8]>
+      <link rel="stylesheet" type="text/css" href="../../less/ie8.less" th:href="@{/css/ie8.css}"/>
+    <![endif]-->
     <script src="../../js/less-1.7.0.min.js" th:remove="all"></script>
   </head>
   <body id="top" class="menu" th:class="${contentclass}?:'menu'" onload="prettyPrint()">