Advertisement
asanchez75

htc

Jul 7th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.62 KB | None | 0 0
  1. http://css3pie.com/documentation/known-issues/#z-index
  2. http://dev.w3.org/csswg/css3-images/#linear-gradients
  3. ==================================================================
  4.  
  5. In WHM: Service Configuration >> Apache Configuration >> Include Editor
  6.  
  7.  
  8. ###----------------------------------------------------###
  9. ###-> BEGIN WHM POST-VIRTUAL INCLUDES <-###
  10. ###----------------------------------------------------###
  11.  
  12. # ---
  13. # Help IE users for better experience
  14. # ---
  15.  
  16. ## Use ChromeFrame
  17. <IfModule mod_setenvif.c>
  18. <IfModule mod_headers.c>
  19. BrowserMatch MSIE ie
  20. Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  21. </IfModule>
  22. </IfModule>
  23.  
  24. ## Set proxy notify for changes, choose from 2 flavors!
  25. <IfModule mod_headers.c>
  26. #Header append Vary User-Agent
  27. Header append Vary User-Agent env=!dont-vary
  28. </IfModule>
  29.  
  30. # ---
  31. # Cross-domain AJAX requests
  32. # ---
  33.  
  34. ## Serve cross-domain ajax requests, disabled
  35. #<IfModule mod_headers.c>
  36. # Header set Access-Control-Allow-Origin "*"
  37. #</IfModule>
  38.  
  39. # ---
  40. # Webfont access
  41. # ---
  42.  
  43. ## Allow access from all domains for webfonts
  44. ## Or only whitelist a domain(s) "*.domain.com"
  45.  
  46. <FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
  47. <IfModule mod_headers.c>
  48. Header set Access-Control-Allow-Origin "*"
  49. </IfModule>
  50. </FilesMatch>
  51.  
  52. # ---
  53. # Proper MIME type for all files (default) ok to leave?
  54. # ---
  55.  
  56. ## audio
  57. AddType audio/ogg oga ogg
  58.  
  59. ## video
  60. AddType video/ogg ogv
  61. AddType video/mp4 mp4
  62. AddType video/webm webm
  63.  
  64. ## Proper svg serving. Required for svg webfonts on iPad
  65. AddType image/svg+xml svg svgz
  66. AddEncoding gzip svgz
  67.  
  68. ## webfonts
  69. AddType application/vnd.ms-fontobject eot
  70. AddType font/truetype ttf
  71. AddType font/opentype otf
  72. AddType application/x-font-woff woff
  73.  
  74. ## Assorted types
  75. AddType image/x-icon ico
  76. AddType image/webp webp
  77. AddType text/cache-manifest appcache manifest
  78. AddType text/x-component htc
  79. AddType application/x-chrome-extension crx
  80. AddType application/x-xpinstall xpi
  81. AddType application/octet-stream safariextz
  82.  
  83. # ---
  84. # Allow concatenation from within specific js and css files (combo)
  85. # ---
  86.  
  87. ## Ex: Inside of script.combined.js you could have
  88. ## <!--#include file="libs/jquery-1.5.0.min.js" -->
  89. ## <!--#include file="plugins/jquery.idletimer.js" -->
  90. ## and they would be included into this single file
  91.  
  92. # <FilesMatch "\.combined\.(js|css)$">
  93. # Options +Includes
  94. # SetOutputFilter INCLUDES
  95. # </FilesMatch>
  96.  
  97. # ---
  98. # Mod Deflate gzip compression
  99. # ---
  100.  
  101. <IfModule mod_deflate.c>
  102. SetOutputFilter DEFLATE
  103. DeflateCompressionLevel 9
  104.  
  105. <IfModule mod_setenvif.c>
  106. ## Netscape 4.x has some problems…
  107. BrowserMatch ^Mozilla/4 gzip-only-text/html
  108.  
  109. ## Netscape 4.06-4.08 have some more problems
  110. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  111.  
  112. ## MSIE masquerades as Netscape, but it is fine
  113. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  114.  
  115. ## NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  116. ## the above regex won’t work. You can use the following
  117. ## workaround to get the desired effect:
  118.  
  119. #BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
  120.  
  121. ## Don’t compress already-compressed files
  122. SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
  123. SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
  124. SetEnvIfNoCase Request_URI .(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
  125. SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary
  126.  
  127. <IfModule mod_headers.c>
  128. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
  129. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  130. </IfModule>
  131.  
  132. ## End SetEnvIf
  133. </IfModule>
  134.  
  135. ## html, txt, css, js, json, xml, htc:
  136. <IfModule filter_module>
  137. FilterDeclare COMPRESS
  138. FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  139. FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  140. FilterChain COMPRESS
  141. FilterProtocol COMPRESS change=yes;byteranges=no
  142. </IfModule>
  143.  
  144. ## Legacy versions of Apache
  145. <IfModule !mod_filter.c>
  146. AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  147. AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
  148. AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  149. </IfModule>
  150.  
  151. ## webfonts and svg graphics
  152. <FilesMatch "\.(ttf|otf|eot|svg)$" >
  153. SetOutputFilter DEFLATE
  154. </FilesMatch>
  155.  
  156. ## End Mod Deflate
  157. </IfModule>
  158.  
  159. # ---
  160. # Expires headers, better browser cache control
  161. # ---
  162.  
  163. <IfModule mod_expires.c>
  164. ExpiresActive on
  165.  
  166. ## Default file expires
  167. ExpiresDefault "access plus 1 month"
  168.  
  169. ## cache.appcache needs re-requests in FF 3.6
  170. ExpiresByType text/cache-manifest "access plus 0 seconds"
  171.  
  172. ## your document html
  173. ExpiresByType text/html "access plus 0 seconds"
  174.  
  175. ## data
  176. ExpiresByType text/xml "access plus 0 seconds"
  177. ExpiresByType application/xml "access plus 0 seconds"
  178. ExpiresByType application/json "access plus 0 seconds"
  179.  
  180. ## rss feed
  181. ExpiresByType application/rss+xml "access plus 1 hour"
  182.  
  183. ## favicon (cannot be renamed)
  184. ExpiresByType image/x-icon "access plus 1 week"
  185.  
  186. ## media: images, video, audio
  187. ExpiresByType image/gif "access plus 1 month"
  188. ExpiresByType image/png "access plus 1 month"
  189. ExpiresByType image/jpg "access plus 1 month"
  190. ExpiresByType image/jpeg "access plus 1 month"
  191. ExpiresByType video/ogg "access plus 1 month"
  192. ExpiresByType audio/ogg "access plus 1 month"
  193. ExpiresByType video/mp4 "access plus 1 month"
  194. ExpiresByType video/webm "access plus 1 month"
  195.  
  196. ## htc files (css3pie)
  197. ExpiresByType text/x-component "access plus 1 month"
  198.  
  199. ## webfonts
  200. ExpiresByType font/truetype "access plus 1 month"
  201. ExpiresByType font/opentype "access plus 1 month"
  202. ExpiresByType application/x-font-woff "access plus 1 month"
  203. ExpiresByType image/svg+xml "access plus 1 month"
  204. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  205.  
  206. ## css and javascript
  207. ExpiresByType text/css "access plus 1 week"
  208. ExpiresByType application/javascript "access plus 1 week"
  209. ExpiresByType text/javascript "access plus 1 week"
  210.  
  211. <IfModule mod_headers.c>
  212. Header append Cache-Control "public"
  213. </IfModule>
  214.  
  215. </IfModule>
  216.  
  217. # ---
  218. # ETag removal (default)
  219. # ---
  220.  
  221. ## Active by Default
  222. ## Since using far-future expires, no need ETags for static content
  223. #FileETag None
  224.  
  225. # ---
  226. # Stop screen flicker in IE on CSS rollovers
  227. # ---
  228.  
  229. ## The following directives stop screen flicker in IE on CSS rollovers
  230. ## in combination with the "ExpiresByType" rules for images, see above
  231. BrowserMatch "MSIE" brokenvary=1
  232. BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
  233. BrowserMatch "Opera" !brokenvary
  234. SetEnvIf brokenvary 1 force-no-vary
  235.  
  236. # ---
  237. # Cookie setting from iframes
  238. # ---
  239.  
  240. ## Allow cookies to be set from iframes (for IE only)
  241. ## If needed, uncomment and specify a path or regex in the Location directive
  242. <IfModule mod_headers.c>
  243. <Location />
  244. Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
  245. </Location>
  246. </IfModule>
  247.  
  248. # ---
  249. # Start rewrite engine (default)
  250. # ---
  251.  
  252. ## Active by Default
  253. ## Make sure rewrite engine is on, needed for the following rules
  254. #<IfModule mod_rewrite.c>
  255. # RewriteEngine On
  256. #</IfModule>
  257.  
  258. # ---
  259. # Suppress or force the "www." at the beginning of URLs
  260. # ---
  261.  
  262. ## The same content should never be available under two different URLs
  263. ## Remember: Shorter URLs are sexier, rewrite "www.domain.com -> domain.com"
  264. <IfModule mod_rewrite.c>
  265. RewriteCond %{HTTPS} !=on
  266. RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  267. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  268. </IfModule>
  269.  
  270. # ---
  271. # Add/remove trailing slash to (non-file) URLs
  272. # ---
  273.  
  274. ## Google treats URLs with and without trailing slashes separately
  275. ## Forcing a trailing slash is usually preferred
  276. ## Rewrite "domain.com/foo -> domain.com/foo/"
  277. <IfModule mod_rewrite.c>
  278. RewriteCond %{REQUEST_FILENAME} !-f
  279. RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
  280. RewriteRule ^(.*)$ /$1/ [R=301,L]
  281. </IfModule>
  282.  
  283. # ---
  284. # Built-in filename-based cache busting
  285. # ---
  286.  
  287. ## Enable filename version revving, ex: /css/style.20110203.css to /css/style.css
  288. <IfModule mod_rewrite.c>
  289. RewriteCond %{REQUEST_FILENAME} !-f
  290. RewriteCond %{REQUEST_FILENAME} !-d
  291. RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  292. </IfModule>
  293.  
  294. # ---
  295. # Prevent SSL cert warnings
  296. # ---
  297.  
  298. ## Rewrite secure requests properly to prevent browser SSL cert warnings
  299. <IfModule mod_rewrite.c>
  300. RewriteCond %{SERVER_PORT} !^443
  301. RewriteRule (.*) https://example-domain-please-change-me.com/$1 [R=301,L]
  302. </IfModule>
  303.  
  304. # ---
  305. # Prevent 404 errors for non-existing redirected folders (default)
  306. # ---
  307.  
  308. ## Active by Default
  309. #Options -MultiViews
  310.  
  311. # ---
  312. # Custom 404 page (default)
  313. # ---
  314.  
  315. ## Active by Default
  316. ## You can add custom pages to handle 500 or 403
  317. #ErrorDocument 404 /404.html
  318.  
  319. # ---
  320. # UTF-8 encoding
  321. # ---
  322.  
  323. ## Use utf-8 encoding for anything served text/plain or text/html
  324. AddDefaultCharset utf-8
  325.  
  326. ## Force utf-8 for a number of file formats
  327. AddCharset utf-8 .html .css .js .xml .json .rss
  328.  
  329. # ---
  330. # More Security
  331. # ---
  332.  
  333. ## Active by Default
  334. #ServerTokens Prod
  335.  
  336. ## "-Indexes" will have Apache block users from browsing folders without a default document
  337. # Active by Default
  338. #Options -Indexes
  339.  
  340. ## Block access to "hidden" directories that begin with a period, ie Subversion or Git
  341. <IfModule mod_rewrite.c>
  342. RewriteRule "(^|/)\." - [F]
  343. </IfModule>
  344.  
  345. ###-------------------------------------------------###
  346. ###-> END WHM POST-VIRTUAL INCLUDES <-###
  347. ###-------------------------------------------------###
  348.  
  349.  
  350.  
  351.  
  352. taken from
  353.  
  354. http://forums.cpanel.net/f5/htaccess-global-242511.html
  355.  
  356. =========================================================
  357.  
  358.  
  359. #block-views-secciones-destacadas-block h2.block-title {
  360. display: block;
  361. color: #fff;
  362. background-color: #818181;
  363. margin-bottom: 0px;
  364. height: 30px;
  365. padding-top: 15px;
  366. padding-left: 20px;
  367. border-top: solid 2px #ccc;
  368. border-right: solid 2px #ccc;
  369. border-left: solid 2px #ccc;
  370. border-bottom: none;
  371. text-shadow: 1px 1px 0 #454545;
  372. -webkit-border-radius: 10px 10px 0 0;
  373. -moz-border-radius: 10px 10px 0 0;
  374. border-radius: 10px 10px 0 0;
  375. letter-spacing: 0.02em;
  376. background: #818181;
  377. behavior: url(/PIE.htc);
  378. }
  379.  
  380. =================================
  381.  
  382. http://css3pie.com/
  383.  
  384. y el archivo PIE.htc
  385.  
  386. va en la raiz de la carpeta que contiene la instalacion de Drupal
  387.  
  388.  
  389. ==================================================
  390.  
  391. Pain-free CSS3 with Sass and CSSPie
  392.  
  393. So, you have a great design for a site. Lots of rounded corners, soft shadows, and beautiful gradients. “This’ll be fun!”, you think.
  394.  
  395. Enter IE.
  396.  
  397. “Oh, crap”, you think.
  398.  
  399. Modern web design in IE is a pain in the rear. Fortunately, we have modern tools that make it a not-pain.
  400.  
  401. SASS (Syntactically Awesome Stylesheets) is a macro language for CSS. It lets you express CSS as nested rules, and gives you mix-ins, functionality extensions, variables, partials, and a whole lot more.
  402. CSSPie is a set of behaviors for Internet Explorer that gives you CSS3 visual styles without really slow Javascript hacks like CurvyCorners.
  403.  
  404. When combined, the two are a shot of liquid awesome injected directly into your brain.
  405.  
  406. I’ve settled on a fairly standard setup for my projects. I have:
  407.  
  408. My application.sass file.
  409. My _mixins.sass partial.
  410. My PIE.htc behavior file.
  411.  
  412. Macros is very straightforward:
  413.  
  414. @mixin pie
  415. behavior: url(/behaviors/PIE.htc)
  416. .pie
  417. +pie
  418.  
  419. @mixin shadows($color: #aaa, $x: 1px, $y: 2px, $spread: 2px)
  420. @extend .pie
  421. -moz-box-shadow: $color $x $y $spread
  422. -webkit-box-shadow: $color $x $y $spread
  423. box-shadow: $color $x $y $spread
  424.  
  425. @mixin inset-shadows($color: #aaa, $x: 1px, $y: 1px, $spread: 1px)
  426. @extend .pie
  427. -moz-box-shadow: inset $x $y $spread $color
  428. -webkit-box-shadow: inset $x $y $spread $color
  429. box-shadow: inset $x $y $spread $color
  430.  
  431. @mixin corners($tl: 5px, $tr: nil, $br: nil, $bl: nil)
  432. @extend .pie
  433. @if $tr == nil
  434. $tr: $tl
  435. @if $br == nil
  436. $br: $tl
  437. @if $bl == nil
  438. $bl: $tl
  439. -moz-border-radius: $tl $tr $br $bl
  440. -webkit-border-top-left-radius: $tl
  441. -webkit-border-bottom-left-radius: $bl
  442. -webkit-border-top-right-radius: $tr
  443. -webkit-border-bottom-right-radius: $br
  444. border-radius: $tl $tr $br $bl
  445.  
  446. @mixin vertical-gradient($start: #000, $end: #ccc)
  447. @extend .pie
  448. background: $end
  449. background: -webkit-gradient( linear, left top, left bottom, color-stop(0, $start), color-stop(1, $end) )
  450. background: -moz-linear-gradient(center top, $start 0%, $end 100%)
  451. -pie-background: linear-gradient(90deg, $start, $end)
  452.  
  453. What’s going on here? We’re defining several mix-ins for Sass:
  454.  
  455. +shadows([color, [x, [y, [spread]]]])
  456.  
  457. +inset-shadows([color, [x, [y, [spread]]]])
  458.  
  459. +corners(size)
  460.  
  461. +corners(topleft, topright, bottomright, bottomleft)
  462.  
  463. +vertical-gradient(start, end)
  464.  
  465. Now, in your CSS, you can just do the following:
  466.  
  467. body
  468. font:
  469. family: Arial
  470. size: 10pt
  471.  
  472. .box
  473. +corners
  474. +shadows(#ccc)
  475. +vertical-gradient(#eee, #fff)
  476.  
  477. h3
  478. color: #444
  479.  
  480. .dark-box
  481. +corners(20px)
  482. +shadows(#888, 4px, 4px, 4px)
  483. +vertical-gradient(#444, #000)
  484. color: #fff
  485. h3
  486. color: #fff
  487.  
  488. .box, .dark-box
  489. padding: 1em
  490. margin-bottom: 1em
  491.  
  492. This expands to:
  493.  
  494. .pie, .box, .dark-box {
  495. behavior: url(/projects/PIE.htc);
  496. }
  497.  
  498. body {
  499. font-family: Arial;
  500. font-size: 10pt;
  501. }
  502.  
  503. .box {
  504. -moz-border-radius: 5px 5px 5px 5px;
  505. -webkit-border-top-left-radius: 5px;
  506. -webkit-border-bottom-left-radius: 5px;
  507. -webkit-border-top-right-radius: 5px;
  508. -webkit-border-bottom-right-radius: 5px;
  509. border-radius: 5px 5px 5px 5px;
  510. -moz-box-shadow: #cccccc 1px 2px 2px;
  511. -webkit-box-shadow: #cccccc 1px 2px 2px;
  512. box-shadow: #cccccc 1px 2px 2px;
  513. background: white;
  514. background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eeeeee), color-stop(1, white));
  515. background: -moz-linear-gradient(center top, #eeeeee 0%, white 100%);
  516. -pie-background: linear-gradient(270deg, #eeeeee, white);
  517. }
  518. .box h3 {
  519. color: #444444;
  520. }
  521.  
  522. .dark-box {
  523. -moz-border-radius: 20px 20px 20px 20px;
  524. -webkit-border-top-left-radius: 20px;
  525. -webkit-border-bottom-left-radius: 20px;
  526. -webkit-border-top-right-radius: 20px;
  527. -webkit-border-bottom-right-radius: 20px;
  528. border-radius: 20px 20px 20px 20px;
  529. -moz-box-shadow: #888888 4px 4px 4px;
  530. -webkit-box-shadow: #888888 4px 4px 4px;
  531. box-shadow: #888888 4px 4px 4px;
  532. background: black;
  533. background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444444), color-stop(1, black));
  534. background: -moz-linear-gradient(center top, #444444 0%, black 100%);
  535. -pie-background: linear-gradient(270deg, #444444, black);
  536. color: white;
  537. }
  538. .dark-box h3 {
  539. color: white;
  540. }
  541.  
  542. .box, .dark-box {
  543. padding: 1em;
  544. margin-bottom: 1em;
  545. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement