Config The Image URL Solution
During the project, in order to make a unified management for the image URL , at present we make use of the LESSCSS method, set the image URL as independent variable, then all images use the image URL variable, it’s convenient for future maintenance. To make sure the LESS CSS work normal, we need to make some configuration for web.config , please refer to the http://www.dotlesscss.org/, the steps as follows:
Configure web.config
1. Download the latest dotless package
You can find the latest source & downloads for dotless at GitHub, extract file ,then you can get file named “dotless.Core.dll”
2. Include our reference to your web project
Add the dotless.Core.dll file to our references file
3. Add a new HttpHandler to your Web.Config
Let’s make the dotless processor handle our .LESS files.Add this entry to the HttpHandlers section of your Web.Config:
<add name="LessCssHttpHandler" verb="*" path="*.LESS" preCondition="integratedMode" type="dotless.Core.LessCssHttpHandler,dotless.Core"/>
4. Add a few configuration sections (optional)
First add our config handler in the "configSections" node of your web.config
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />
Now you can configure caching and minifying of the Css output
<dotless minifyCss="true" cache="true" />
Note: when we work on the project , we need to use <dotless minifyCss="false" cache="false" /> on our web.config, because when we make some change for any file, we need to see the change at once without cache. of course, when project finish and release , we need to use <dotless minifyCss="true" cache="true" />
5. Get started
Reference your LESS files the same way as you would any other CSS file, just ensure that you use the .LESS extention.
Modify the image URL for project
- Take our project file as example, Find the image url less file named
truck\WebCenter\CommonModule\UI\CSS\imgurlConfig.less, you will see the image url variables on the top of page
@base-url-secure: "https://secure.officescape.com/shared/images";
@base-url-web: "/WebCenter/CommonModule/UI/images/";
You only need to modify the image url value of variables named @base-url-secure and @base-url-web when you want to change all images url address on project.
Config The Image URL Solution的更多相关文章
- 修改Git远程地址 git config remote.origin.url "https://..."
仓库管理: 添加或指定远程仓库地址 git remote set-url origin "https://..." git config remote.origin.url &qu ...
- Spring MVC 的 Java Config ( 非 XML ) 配置方式
索引: 开源Spring解决方案--lm.solution 参看代码 GitHub: solution/pom.xml web/pom.xml web.xml WebInitializer.java ...
- ASP.NET 自定义URL重写 分类: ASP.NET 2014-10-31 16:05 175人阅读 评论(0) 收藏
一.功能说明: 可以解决类似 http://****/news 情形,Url路径支持正则匹配. 二.操作步骤: 1.增加URL重写模块: using System; using System.IO; ...
- ASP.NET 自定义URL重写 分类: ASP.NET 2014-10-31 16:05 174人阅读 评论(0) 收藏
一.功能说明: 可以解决类似 http://****/news 情形,Url路径支持正则匹配. 二.操作步骤: 1.增加URL重写模块: using System; using System.IO; ...
- thinkphp隐藏中url的index.php
在本地进行测试 1.修改apache配置文件将如下代码#去掉 #LoadModule rewrite_module modules/mod_rewrite.so 在index.php 目录下新建文 ...
- git config(转载)
From:http://www.g2w.me/2013/10/cache-github-credential-for-https-repository/ http://openwares.net/li ...
- URL重写案例
实现url重写的基本方法: 将下载的URLRewriter.dll,放到你的web程序的bin下 然后在web.config里配置如下: <?xml version="1.0&quo ...
- 对 Sea.js 进行配置(一) seajs.config
可以对 Sea.js 进行配置,让模块编写.开发调试更方便. seajs.config seajs.config(options) 用来进行配置的方法. seajs.config({ // 别名配置 ...
- 使用自定义 URL 实现控制器之间的跳转-b
一个app往往有很多界面,而界面之间的跳转也就是对应控制器的跳转,控制器的跳转一般有两种情况 push 或者 modal,push 和 modal 的默认效果是系统提供的 文章配图 1. 概述 系统提 ...
随机推荐
- C语言 百炼成钢9
//题目25:求1+2!+3!+...+20!的和 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib ...
- Redis做消息队列文章两篇
介绍:http://www.cnblogs.com/lhfcws/p/3732535.html 具体做法:http://shift-alt-ctrl.iteye.com/blog/1867454 另外 ...
- Oracle11G 卸载步骤
(之前因为不知道偶电脑是因为安装了oracle后,才导致的长达两周的开机速度要足足10分钟,以前只有一分钟不到!可以想象oracle的服务启动的强大,知道后,偶果断立即卸载掉!) 一.在oracle1 ...
- 基于Flot可放缩的折线图
Flot初步 Flot是一个免费开源的图标插件,可以用它开发出功能强大的图表系统.下面着重讲解在Asp.net中如何使用这个插件做出功能强大的图表应用. 关于Flot,可以在这里查看现有的例子(或者是 ...
- HTML5 全屏特性
全屏功能是浏览器很早就支持的一项功能了,可以让你页面中的video, image ,div 等等子元素实现全屏浏览,从而带来更好的视觉体验,来看看怎么使用吧.先来看看有哪些API和事件支持. API ...
- 小白学习mysql之存储过程的优劣分析以及接入控制
存储过程的优劣 存储过程是一组实现特定功能的SQL语句集合,存储过程一经编译便存储在了服务器上,可以通过调用存储过程的名字以及传入相应的参数来使用存储过程.要高层次的掌握存储过程,不能觉得依葫芦画瓢, ...
- 从实用主义深入理解c++虚函数
记得几个月前看过C++虚函数的问题,当时其实就看懂了,最近笔试中遇到了虚函数竟然不太确定,所以还是理解的不深刻,所以想通过这篇文章来巩固下. 装逼一刻: 最近,本人思想发生了巨大的转变,在大学的时候由 ...
- VC6.0中MFC界面换肤简例
利用VC中的MFC进行界面设计时,发现界面上的各控件无法简易地进行调整,比如字体大小.颜色.格式等. 为了改变外观,小小地美化一下,今天决定动手一试. 网上提供的库和方法不计其数,我选择了SkinMa ...
- Aspose.Cells 读取受保护的Excel
最近遇到一个需求,要能够读取受密码保护的Excel内容,之前都是直接读取Excel中的数据,不需要做任何其他的处理. 当Excel双击的时候,需要输入密码,在使用Aspose.Cells 组件读取 ...
- 喝咖啡写脚本,顺便再加一点点CSS语法糖 1.选择环境
经过对前端开发的初步了解,大体上发现了以下几点,前端开发需要使用脚本语言,主要是JavaScript,需要Html,需要CSS,这些东西相信很多人已经很熟了.但是仅仅只是学习一点简单的JS,配合Htm ...