diff options
author | Romain d'Alverny <rdalverny@mandriva.org> | 2006-02-23 13:38:15 +0000 |
---|---|---|
committer | Romain d'Alverny <rdalverny@mandriva.org> | 2006-02-23 13:38:15 +0000 |
commit | f04259272a7d15b2b8904320345a93bbc7f8148a (patch) | |
tree | fe68158bf3c024bf04b2581a3d6a796c923f86a4 | |
parent | 078269ff55381829c886361c3adcd981fc249e48 (diff) | |
download | indexhtml-f04259272a7d15b2b8904320345a93bbc7f8148a.tar indexhtml-f04259272a7d15b2b8904320345a93bbc7f8148a.tar.gz indexhtml-f04259272a7d15b2b8904320345a93bbc7f8148a.tar.bz2 indexhtml-f04259272a7d15b2b8904320345a93bbc7f8148a.tar.xz indexhtml-f04259272a7d15b2b8904320345a93bbc7f8148a.zip |
Fixed system info (release, product, language) settings in index.html
-rw-r--r-- | HTML/index.html | 57 | ||||
-rw-r--r-- | HTML/script.js | 6 | ||||
-rw-r--r-- | indexhtml.spec | 30 |
3 files changed, 54 insertions, 39 deletions
diff --git a/HTML/index.html b/HTML/index.html index 396e8cc..0f772c2 100644 --- a/HTML/index.html +++ b/HTML/index.html @@ -1,31 +1,32 @@ <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <meta http-equiv="Content-Script-Type" content="text/javascript" /> - <meta http-equiv="Content-Style-Type" content="text/css" /> - <meta http-equiv="Pragma" content="no-cache" /> - <meta http-equiv="Expires" content="0" /> - <meta http-equiv="Cache-Control" content="no-cache" /> - <meta name="mdv:release" content="XXXXX" /> - <meta name="mdv:pack" content="" /> - <title>Mandriva Linux</title> - <link rel="stylesheet" type="text/css" media="screen, projection" href="file:///usr/share/mdk/indexhtml/screen.css" /> - <link rel="stylesheet" type="text/css" media="print, handheld" href="file:///usr/share/mdk/indexhtml/print.css" /> - <script type="text/javascript" src="file:///usr/share/mdk/indexhtml/script.js"></script> - </head> - <body onload="try{run();}catch(e){}"> - <div id="page"> - <h1><a href="http://www.mandriva.com/"><span>Mandriva</span></a></h1> - <ul> - <li id="mandriva_com"><a href="http://www.mandriva.com/"><span>mandriva.com</span></a></li> - <li id="club"><a href="http://club.mandriva.com/"><span>club.mandriva.com</span></a></li> - <li id="store"><a href="http://store.mandriva.com/"><span>store.mandriva.com</span></a></li> - <li id="online"><a href="http://online.mandriva.com/"><span>online.mandriva.com</span></a></li> - <li id="support"><a href="http://support.mandriva.com/"><span>support.mandriva.com</span></a></li> - </ul> - </div> - </body> -</html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="#LANG" xml:lang="#LANG"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Script-Type" content="text/javascript" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta http-equiv="Pragma" content="no-cache" /> + <meta http-equiv="Expires" content="0" /> + <meta http-equiv="Cache-Control" content="no-cache" /> + <meta name="mdv:release" content="#MDV_RELEASE" /> + <meta name="mdv:product" content="#MDV_PRODUCT" /> + <meta name="mdv:pack" content="#MDV_PACK" /> + <title>Mandriva Linux</title> + <link rel="stylesheet" type="text/css" media="screen, projection" href="file:///usr/share/mdk/indexhtml/screen.css" /> + <link rel="stylesheet" type="text/css" media="print, handheld" href="file:///usr/share/mdk/indexhtml/print.css" /> + <script type="text/javascript" src="file:///usr/share/mdk/indexhtml/script.js"></script> + </head> + <body onload="try{run();}catch(e){}"> + <div id="page"> + <h1><a href="http://www.mandriva.com/"><span>Mandriva</span></a></h1> + <ul> + <li id="mandriva_com"><a href="http://www.mandriva.com/"><span>mandriva.com</span></a></li> + <li id="club"><a href="http://club.mandriva.com/"><span>club.mandriva.com</span></a></li> + <li id="store"><a href="http://store.mandriva.com/"><span>store.mandriva.com</span></a></li> + <li id="online"><a href="http://online.mandriva.com/"><span>online.mandriva.com</span></a></li> + <li id="support"><a href="http://support.mandriva.com/"><span>support.mandriva.com</span></a></li> + </ul> + </div> + </body> +</html>
\ No newline at end of file diff --git a/HTML/script.js b/HTML/script.js index 2247169..71e40e6 100644 --- a/HTML/script.js +++ b/HTML/script.js @@ -13,6 +13,7 @@ function actOnline() { // #1 var release = ''; var pack = ''; + var product = ''; var lang = ''; try { var t = document.getElementsByTagName('meta'); @@ -21,6 +22,8 @@ function actOnline() { release = t.item(i).getAttribute('content'); } else if( t.item(i).getAttribute('name') == 'mdv:pack' ) { pack = t.item(i).getAttribute('content'); + } else if( t.item(i).getAttribute('name') == 'mdv:product' ) { + product = t.item(i).getAttribute('content'); } } lang = parent.window.document.documentElement.attributes.getNamedItem('lang').value; @@ -30,8 +33,9 @@ function actOnline() { // #2 var args = ''; - if( release !== '' ) { args = 'r='+release.trim().encodeURI(); } + if( release !== '' ) { args = 'r='+release.trim().encodeURI(); } if( pack !== '' ) { if( args !== '' ) { args += '&'; } args += 'p='+pack.trim().encodeURI(); } + if( product !== '' ) { if( args !== '' ) { args += '&'; } args += 'p='+product.trim().encodeURI(); } if( lang !== '' ) { if( args !== '' ) { args += '&'; } args += 'l='+lang.trim(); } if( args !== '' ) { remoteweb += '?' + args; } diff --git a/indexhtml.spec b/indexhtml.spec index 59e742a..32f731b 100644 --- a/indexhtml.spec +++ b/indexhtml.spec @@ -1,17 +1,20 @@ +%define version 2006.0 +%define name indexhtml +%define release 3mdk + Summary: Mandriva Linux html welcome page -Name: indexhtml -Version: 2006.0 -Release: 2mdk -URL: http://www.mandrivalinux.com/ -Requires: wget -Source: indexhtml-%version.tar.bz2 +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://start.mandriva.com/ +Requires: wget, gawk +Source: %{name}-%{version}.tar.bz2 Group: System/Base License: GPL -BuildRoot: %_tmppath/%name-%version-%release-root +BuildRoot: %_tmppath/%{name}-%{version}-%{release}-root BuildArch: noarch - %description Mandriva Linux index.html welcome page displayed by web browsers when they are launched; and first mail displayed on mail clients @@ -23,7 +26,6 @@ after installation. %build - %install rm -fr %buildroot/ @@ -67,7 +69,11 @@ rm -fr %buildroot %post cat %_datadir/mdk/indexhtml/index.html | \ - sed "s/XXXXX/`cat /etc/release`/" > %_datadir/doc/HTML/index.html + sed "s/#MDV_RELEASE/`cat /etc/release`/" | \ + sed "s/#MDV_PRODUCT/`cat /etc/sysconfig/system |grep META_CLASS |gawk -F= '{print $2}'`/" | \ + sed "s/#MDV_PACK//" | \ + sed "s/#LANG/`locale |grep LANG|gawk -F= '{print $2}'|sed 's/_/-/'`/g" \ + > %_datadir/doc/HTML/index.html %files %defattr(-,root,root,-) @@ -76,6 +82,10 @@ cat %_datadir/mdk/indexhtml/index.html | \ #/etc/sysconfig/network-scripts/ifup.d/indexhtml %changelog +* Thu Feb 23 2006 Romain d'Alverny <rdalverny@mandriva.com> 2006.0-3mdk +- improved html, javascript and spec file %post instructions; system + language and product are now set at install + * Wed Sep 14 2005 Frederic Lepied <flepied@mandriva.com> 2006.0-2mdk - updated translations |