Browse Source

NEW Mise à jour de la navigation et style LESS

julien.legrand 8 years ago
parent
commit
c6b9f8ebf7

+ 2 - 2
CD67.FicheCollege.MVC/App_Start/BundleConfig.cs

@@ -25,8 +25,8 @@ namespace CD67.FicheCollege.MVC
                       "~/Content/bootstrap.min.css",
                       "~/Content/font-awesome.css",
                       "~/Content/jquery.validate.css",
-                      "~/Content/cd67-model.css",
-                      "~/Content/cd67-custom.css"));
+                      "~/Content/cd67-model.less",
+                      "~/Content/cd67-custom.less"));
 
             // Jquery-ui
             bundles.Add(new ScriptBundle("~/bundles/jquery-ui").Include(

+ 6 - 2
CD67.FicheCollege.MVC/CD67.FicheCollege.MVC.csproj

@@ -45,6 +45,10 @@
       <HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
       <Private>True</Private>
     </Reference>
+    <Reference Include="dotless.Core, Version=1.5.2.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34, processorArchitecture=MSIL">
+      <HintPath>..\packages\dotless.1.5.2\lib\dotless.Core.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
       <Private>True</Private>
@@ -174,8 +178,6 @@
     <Content Include="Content\bootstrap-theme.min.css" />
     <Content Include="Content\bootstrap.css" />
     <Content Include="Content\bootstrap.min.css" />
-    <Content Include="Content\cd67-custom.css" />
-    <Content Include="Content\cd67-model.css" />
     <Content Include="Content\colorbox\colorbox.css" />
     <Content Include="Content\colorbox\images\border.png" />
     <Content Include="Content\colorbox\images\controls.png" />
@@ -245,6 +247,8 @@
     <Content Include="Scripts\cd67-AutoComplete.js" />
     <Content Include="Scripts\cd67-colorbox.js" />
     <Content Include="Scripts\cd67-Menu.js" />
+    <Content Include="Content\cd67-custom.less" />
+    <Content Include="Content\cd67-model.less" />
     <None Include="Scripts\jquery-3.2.1.intellisense.js" />
     <Content Include="Scripts\cd67-picker.js" />
     <Content Include="Scripts\colorbox\i18n\jquery.colorbox-ar.js" />

+ 32 - 2
CD67.FicheCollege.MVC/Content/cd67-custom.css → CD67.FicheCollege.MVC/Content/cd67-custom.less

@@ -1,6 +1,36 @@
-/* Breadcrumb et mise en avant */
+@focus-color : cadetblue;
+
+/* Breadcrumb et mise en avant */
 .color1 {
-    color: #DA1251;
+    color: @focus-color;
+}
+
+.menu_principal a, .menu_principal div {
+    background-color: @focus-color;
+}
+
+.submenu a{
+    background-color: #fff;
+    color: @focus-color;
+}
+
+.menu-button{
+    background: @focus-color;
+    border-color: @focus-color;
+}
+
+.input-group-addon{
+    background-color: @focus-color;
+    border-color: @focus-color;
+}
+
+.menu_principal a:hover, .menu_principal div:hover {
+    background-color: darken(@focus-color, 25%);
+}
+
+legend {
+    height: 40px !important;
+    border-color: @focus-color;
 }
 
 #breadcrumbs-one a {

+ 69 - 97
CD67.FicheCollege.MVC/Content/cd67-model.css → CD67.FicheCollege.MVC/Content/cd67-model.less

@@ -86,33 +86,36 @@ label[for=recherche]{
     margin: 0;
     padding: 110px 40px 40px;
     background-color: #fff; 
-}
-.menu_principal li{
-    list-style: none;
-}
-.menu_principal a, .menu_principal div{
-    background-color: #DA1251;
-    color:#fff;
-    -webkit-transition: all 0.3s ease 0s;
-    -moz-transition: all 0.3s ease 0s;
-    -o-transition: all 0.3s ease 0s;
-    -ms-transition: all 0.3s ease 0s;
-    transition: all 0.3s ease 0s;
-    font-size: 24px;
-    line-height: 24px;
-    border-bottom: 1px solid #fff;
-    display: block;
-    
-}
-.submenu a{
-    padding:15px 47px;
+
+    li{
+        list-style: none;
+    }
+
+    a, div{
+        color:#fff;
+        -webkit-transition: all 0.3s ease 0s;
+        -moz-transition: all 0.3s ease 0s;
+        -o-transition: all 0.3s ease 0s;
+        -ms-transition: all 0.3s ease 0s;
+        transition: all 0.3s ease 0s;
+        font-size: 24px;
+        line-height: 24px;
+        border-bottom: 1px solid #fff;
+        display: block;
+    }
+
+    a:hover, div:hover{
+        background-color: #237C4E;
+        cursor:pointer;
+        color:white;
+    }
 }
 
 .submenu a{
+    padding:15px 47px;
     background-color: #fff;
-    color:#DA1251
-
 }
+
 .submenu li:first-child{
     font-weight:bolder;
 }
@@ -121,14 +124,7 @@ label[for=recherche]{
    margin-left:30px;
 }
 
-.menu_principal a:hover, .menu_principal div:hover{
-    background-color: #237C4E;
-    cursor:pointer;
-    color:white;
-}
-
 .menu-button{
-    background: #DA1251;
     border: medium none;
     color: transparent;
     height: 50px;
@@ -203,7 +199,6 @@ label[for=recherche]{
     transform: rotate3d(0, 0, 1, -45deg);
 }
 
-
 .navbar-login-session {
     padding: 10px;
     padding-bottom: 0px;
@@ -230,8 +225,6 @@ label[for=recherche]{
     margin-top: -1px;
 }
 
-
-
 .navigation {
     transition: width 0.3s ease;
 }
@@ -281,28 +274,26 @@ label[for=recherche]{
     margin-top: -12px;
 }
 
-
 h1 {
     margin-right: 0;
     margin-top: 5px;
     font-size: 30px;
     padding-bottom: 5px;
-    border-bottom: solid 1px #DA1251;
 }
 
-.navbar-inner ul li {
-    float: left;
-    display: block;
+.navbar-inner{
+    ul li {
+        float: left;
+        display: block;
+    }
 }
 
 #topbar {
     text-align: center;
-    
 }
 
 #titre {
     display: inline-block;
-
 }
 
 .row {
@@ -317,14 +308,24 @@ h1 {
     list-style: none;
     margin-top: 9px;
     white-space:nowrap;
-}
 
-    
+    li a {
+        display: block;
+        text-decoration: none;
+    }     
 
-.sidebar-nav li a {
-    display: block;
-    text-decoration: none;
-          
+    > .sidebar-brand {
+        height: 65px;
+        font-size: 18px;
+        line-height: 60px;
+    }
+    > .sidebar-brand a {
+        color: #999999;
+    }
+     > .sidebar-brand a:hover {
+        color: #fff;
+        background: none;
+    }
 }
 
 .active_tab {
@@ -346,9 +347,6 @@ h1 {
     padding-top: 34px;
 }
 
-
-
-
 .brand{
     padding-left:70px;
     padding-bottom : 8px;
@@ -359,26 +357,6 @@ h1 {
     padding-top:24px
 }
 
-/*p {
-    text-align: center;
-    margin-top: 20px;
-}*/
-
-.sidebar-nav > .sidebar-brand {
-    height: 65px;
-    font-size: 18px;
-    line-height: 60px;
-}
-
-.sidebar-nav > .sidebar-brand a {
-    color: #999999;
-}
-
-.sidebar-nav > .sidebar-brand a:hover {
-    color: #fff;
-    background: none;
-}
-
 .no-margin {
     margin: 0;
 }
@@ -406,9 +384,6 @@ h1 {
     width: auto;
 }
 
-
-
-
 #page-content-wrapper {
     padding: 10px;
     position: relative;
@@ -450,28 +425,31 @@ ul {
     overflow: hidden;
     width: 100%;
     margin-bottom: 15px;
-}
 
-#breadcrumbs-one li {
-    float: left;
-}
+    li {
+        float: left;
+    }
 
-#breadcrumbs-one a {
-    padding: .7em 0.5em .7em 0.5em;
-    float: left;
-    color: #444;
-    position: relative;
-}
+    a {
+        padding: .7em 0.5em .7em 0.5em;
+        float: left;
+        color: #444;
+        position: relative;
+    }
 
-#breadcrumbs-one li:first-child a {
-    padding-left: 1em;
-    border-radius: 5px 0 0 5px;
-}
- 
-#breadcrumbs-one a::before {
-    border-left-color: #eeeeee;
-    right: -1.1em;
-    z-index: 1;
+    li:first-child a {
+        border-radius: 5px 0 0 5px;
+        padding: .7em 0.5em .7em 1em;
+        float: left;
+        color: #444;
+        position: relative;
+    }
+
+    a::before {
+        border-left-color: #eeeeee;
+        right: -1.1em;
+        z-index: 1;
+    }
 }
 
 .link:hover  {
@@ -590,12 +568,6 @@ ul {
     margin : 0;
 }
 
-
-.input-group-addon{
-    background-color: #DA1251;
-    border-color:#DA1251;
-}
-
 .input-group{
     padding : 0px 10px;
-}
+}

+ 8 - 1
CD67.FicheCollege.MVC/Mvc.sitemap

@@ -5,6 +5,14 @@
             enableLocalization="true">
 
   <mvcSiteMapNode title="Accueil" controller="Home" action="Index">
+    <mvcSiteMapNode title="Collèges" controller="Colleges" action="Index">
+      <mvcSiteMapNode title="Ajout d'un nouveau collège" controller="Colleges" action="Create" />
+      <mvcSiteMapNode title="Détail d'un collège" controller="Colleges" action="Details" preservedRouteParameters="id" >
+        <mvcSiteMapNode title="Edition d'un collège" controller="Colleges" action="Edit" preservedRouteParameters="id" />
+        <mvcSiteMapNode title="Suppression d'un collège" controller="Colleges" action="Delete" preservedRouteParameters="id" />
+      </mvcSiteMapNode>
+    </mvcSiteMapNode>
+
     <mvcSiteMapNode title="Administration" controller="Admin" action="Index">
       <mvcSiteMapNode title="Types de collège" controller="TypeCollege" action="Index">
         <mvcSiteMapNode title="Création d'un type de collège" controller="TypeCollege" action="Create" />
@@ -19,5 +27,4 @@
       </mvcSiteMapNode>
     </mvcSiteMapNode>
   </mvcSiteMapNode>
-
 </mvcSiteMap>

+ 19 - 6
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -83,12 +83,25 @@
         <sidebar class="no-print navbar-collapse collapse hidden" >
             <ul class="sidebar-nav nav-stacked menu_principal">
                 <li>
-                    <div  class="active menu-1">
-                        <span class="fa fa-headphones title">Accueil</span>
-                    </div>
-                    <ul class="submenu hidden">
-                        <li><a href="@Url.Action("Index", "Admin", new { })"><span>Administration</span></a></li>
-                    </ul>
+                    <a href="@Url.Action("Index", "home", new { })">
+                        <div class="active menu-1">
+                            <span class="fa fa-home title">Accueil</span>
+                        </div>
+                    </a>
+                </li>
+                <li>
+                    <a href="@Url.Action("Index", "Colleges", new { })">
+                        <div class="active menu-1">
+                            <span class="fa fa-building title">Collèges</span>
+                        </div>
+                    </a>
+                </li>
+                <li>
+                    <a href="@Url.Action("Index", "Admin", new { })">
+                        <div class="active menu-1">
+                            <span class="fa fa-cog title">Administration</span>
+                        </div>
+                    </a>
                 </li>
             </ul>
         </sidebar>

+ 9 - 2
CD67.FicheCollege.MVC/Web.config

@@ -6,8 +6,10 @@
 <configuration>
   <configSections>
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-  </configSections>
+    
+  
+  <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" />
+  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
   <connectionStrings>
     <add name="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=T-MSSQL-02\SQLSTD2K14;initial catalog=FicheCollege;persist security info=True;user id=FicheCollege_admin;password=bk9JFwqSwYw7mEPiOhnu;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
@@ -51,6 +53,9 @@
         <add namespace="System.Web.WebPages" />
       </namespaces>
     </pages>
+    <httpHandlers>
+      <add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" />
+    </httpHandlers>
   </system.web>
   <system.webServer>
     <staticContent>
@@ -62,6 +67,7 @@
       <remove name="OPTIONSVerbHandler" />
       <remove name="TRACEVerbHandler" />
       <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
+      <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" />
     </handlers>
   </system.webServer>
   <entityFramework>
@@ -113,4 +119,5 @@
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
+  <dotless minifyCss="false" cache="true" web="false" strictMath="false" />
 </configuration>

+ 1 - 0
CD67.FicheCollege.MVC/packages.config

@@ -3,6 +3,7 @@
   <package id="Antlr" version="3.5.0.2" targetFramework="net451" />
   <package id="bootstrap" version="3.3.7" targetFramework="net451" />
   <package id="colorbox" version="1.4.29" targetFramework="net461" />
+  <package id="dotless" version="1.5.2" targetFramework="net461" />
   <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
   <package id="FontAwesome" version="4.7.0" targetFramework="net451" />
   <package id="Freyd.SolrTools" version="1.6.14" targetFramework="net461" />