diff --git a/Scripts/CentOS-Web/Stylesheet/ads.css b/Scripts/CentOS-Web/Stylesheet/ads.css new file mode 100644 index 0000000..609d367 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/ads.css @@ -0,0 +1,43 @@ +/* + * Webenv -> Advertisements + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +/* Google advertisement (468x60px) +--------------------------------------------------------------------*/ + +div#page-header .ads-google { + float: right; + margin: 5px; + } + +/* Sponsors advertisement (728x90px) +--------------------------------------------------------------------*/ +div#page-header .ads-release { + border: none; + background: #FFF; + } + +div#page-header .ads-google img, +div#page-header .ads-release img { + border: none; + } diff --git a/Scripts/CentOS-Web/Stylesheet/base.css b/Scripts/CentOS-Web/Stylesheet/base.css new file mode 100755 index 0000000..01d5efc --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/base.css @@ -0,0 +1,81 @@ +/* + * Webenv -> Main Blocks + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-header { + background: #204C8D url("https://projects.centos.org/centos-web-pub/Images/h1-bg.png") 0 0 repeat; + min-height: 46px; + } + +div#page-footer { + background: #204C8D url("https://projects.centos.org/centos-web-pub/Images/h1-bg.png") 0 0 repeat; + padding: 10px; + } + +div#page-footer div.top img { + border:none; + float:right; + } + +div#page-header div.links div.user, +div#page-header div.links div.trail, +div#page-footer div.credits { + font-size: small; + color: #FFF; + } + +div#page-footer div.credits a { + color: #FFF; + font-style: italic; + } + +div#wrap { + padding: 0 10px 0 10px; + background-color: #FFF; + min-width: 728px; + } + +div#page-body { + clear: both; + background-color: #F8F8F8; + } + +div#page-body div#content { + padding: 30px; + padding-top: 10px; + background-color: #FFF; + } + +div#content div.trail { + margin-bottom: 1em; + } + +/* Logo +--------------------------------------------------------------------*/ + +div#page-header div#logo img { + border: none; + float: left; + margin-left: 10px; + } + diff --git a/Scripts/CentOS-Web/Stylesheet/forms.css b/Scripts/CentOS-Web/Stylesheet/forms.css new file mode 100755 index 0000000..2222d9e --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/forms.css @@ -0,0 +1,166 @@ +/* + * Webenv -> Forms + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-body div.row1 { + clear: both; + background: #F8F8F8; + padding: 10px; + } + +div#page-body div.row2 { + clear: both; + background: #FFFFFF; + padding: 10px; + } + +div#page-body div.row3 { + clear: both; + border-top: 1px solid #CCC; + padding: 10px; + margin-top: 10px; + } + +div#page-body fieldset div.row1 span.descrip, +div#page-body fieldset div.row2 span.descrip { + float: left; + } + +div#page-body fieldset div.field { + display: block; + margin-left: 30%; + } + +div#page-body fieldset div.field div.column { + float: left; + margin-right: 1em; + padding-right: 1em; + border-right: 1px dotted #AAA; + } + +div#page-body fieldset div.row3 div.descrip { + display: block; + font-size: small; + color: #AAA; + font-style: italic; + width: 70% + } + +div#page-body fieldset span.submit { + float: right; + } + +/* */ + +div#page-body div.actions { + margin-top: 10px; + border-bottom: 1px solid #AAA; + padding-bottom: 10px; + + } + +div#page-body div.actions span { + display: inline; + margin: 0; + padding-right: 10px; + border-right: 1px dotted #AAA; + color: #AAA; + } + +div#page-body div.actions span.last { + border-right: none; + padding-left: 10px; + } + +/* */ + +div#page-body div.pagination { + font-size: small; + padding: 10px; + border-top: 1px #AAA solid; + margin-bottom: 2em; + } + +div#page-body div.pagination span.left { + float: left; + } + +div#page-body div.pagination span.left a:before { + content: "«"; + padding-right: 3px; + } + +div#page-body div.pagination span.right a:after { + content: "»"; + padding-left: 3px; + } + +div#page-body div.pagination span.right { + float: right; + } + +/* */ + +div#page-body div.records-list { + display: block; + } + +div#page-body div.records-list ul { + margin: 0; + padding: 0; + list-style: none; + } + +div#page-body div.records-list ul li { + padding: 0.5em; + } + +div#page-body div.records-list ul li.row1 { + background: #F8F8F8; + } + +div#page-body div.records-list ul li span.col0 { + display: block; + float:left; + text-align: center; + padding-right: 0.5em; + margin-right: 0.5em; + border-right: 1px solid #FFF; + } + +div#page-body div.records-list ul li span.col1 { + width: 250px; + display: block; + float:left; + } + +div#page-body div.records-list ul li span.col2 { + border-left: 1px solid #FFF; + padding-left: 0.5em; + } + +div#page-body div.records-list ul li.title { + font-weight: bold; + background: #eee; + border-bottom: 1px #AAA solid; + } diff --git a/Scripts/CentOS-Web/Stylesheet/headings.css b/Scripts/CentOS-Web/Stylesheet/headings.css new file mode 100755 index 0000000..af087a9 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/headings.css @@ -0,0 +1,49 @@ +/* + * Webenv -> Headings + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +h1.title { + line-height: 1.9em; + color: #072B61; + } + +h2.title { + color: #072B61; + line-height: 1em; + padding-top: 1.5em; + color: #072B61; + } + +h3.title, +h4.title, +h5.title, +h6.title { + padding-top: 1em; + line-height: 1em; + color: #072B61; + } + +.subtitle, +.author { + line-height: 1.5em; + } diff --git a/Scripts/CentOS-Web/Stylesheet/layout-2cols.css b/Scripts/CentOS-Web/Stylesheet/layout-2cols.css new file mode 100755 index 0000000..9180344 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/layout-2cols.css @@ -0,0 +1,35 @@ +/* + * Webenv -> Layout (Two columns). + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-body div#content { + margin-right: 180px; + border-right: 3px #EEE solid; + } + +div#page-body div#links { + float:right; + width: 180px; + font-size: small; + border-left: 3px #EEE solid; + } diff --git a/Scripts/CentOS-Web/Stylesheet/links.css b/Scripts/CentOS-Web/Stylesheet/links.css new file mode 100755 index 0000000..6e14945 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/links.css @@ -0,0 +1,117 @@ +/* + * Webenv -> Links + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +/* Broken or nonexistent links +--------------------------------------------------------------------*/ + +div#page-body a.nonexistent, +div#page-body a.nonexistent:hover { color: gray; } + +/* Special decoration for some links' classes +--------------------------------------------------------------------*/ + +div#page-body a.www:before { + white-space:nowrap; + content: url(https://projects.centos.org/centos-web-pub/Images/a-www.png); + margin: 0 0.2em; + } + +div#page-body a.http:before { + white-space:nowrap; + content: url(https://projects.centos.org/centos-web-pub/Images/a-www.png); + margin: 0 0.2em; + } + +div#page-body a.https:before { + white-space:nowrap; + content: url(https://projects.centos.org/centos-web-pub/Images/a-www.png); + margin: 0 0.2em; + } + +div#page-body a.mailto:before { + white-space:nowrap; + content: url(https://projects.centos.org/centos-web-pub/Images/a-mail.png); + margin: 0 0.2em; + } + +div#page-body a.attachment:before { + white-space:nowrap; + content: url(https://projects.centos.org/centos-web-pub/Images/a-attach.png); + margin: 0 0.2em; + } + +/* */ + +div#page-header div.links { + margin-right: 10px; + margin-top: 10px; + } + +div#page-header div.links div.user, +div#page-header div.links div.trail { + display: block; + text-align: right; + color: #fff; + } + +div#page-body div#content div.trail a { + font-size: small; + } + +div#page-header div.links div.user a, +div#page-header div.links div.trail a { + color: #FFF; + } + +div#page-header div.links div.user span { + border-right: 1px dotted #FFF; + padding-right: 10px; + padding-left: 10px; + } + +div#page-header div.links div.user span, +div#page-header div.links div.trail span { + display: inline; + } + +div#page-header div.links div.user span.last, +div#page-header div.links div.trail span.last { + border-right: none; + padding-right: 0; + } + +div#page-header div.links div.user span.last a, +div#page-header div.links div.trail span.last a { + margin-right: 0; + } + +div#page-header div.links div.trail span:after, +div#page-body div#content div.trail span:after { + content: "»"; + } + +div#page-header div.links div.trail span.last:after, +div#page-body div#content div.trail span.last:after { + content: none; + } diff --git a/Scripts/CentOS-Web/Stylesheet/lists.css b/Scripts/CentOS-Web/Stylesheet/lists.css new file mode 100755 index 0000000..36b90b4 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/lists.css @@ -0,0 +1,76 @@ +/* + * Webenv -> Lists + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-body ul { + list-style: url("https://projects.centos.org/centos-web-pub/Images/ul.png") disc; + } + +div#page-body ul, +div#page-body ol { + margin-left: 2.5em; + } + +div#page-body ul ol, +div#page-body ol ul, +div#page-body dl ul, +div#page-body dl ol { + margin-left: 1.5em; + } + +div#page-body div#links ul { + padding: 0.5em 0.5em 1em 1em; + margin: 0; + list-style: none; + border-top: 1px #EEE solid; + } + +div#page-body div#links ul.first { + border-top: none; + } + +div#page-body div#links ul li { + padding: 2px; + } + +/* Table of content (toc) +--------------------------------------------------------------------*/ + +div#page-body div.toc { + font-size: small; + text-align:left; + margin-bottom: 2em; + } + +div#page-body div.toc p { + font-weight: bold; + margin: 0.5em 0 0.5em 0; + } + +div#page-body div#content div.toc dl { + margin: 0; + } + +div#page-body div#content div.toc dl dl { + margin-left: 2.5em; + } diff --git a/Scripts/CentOS-Web/Stylesheet/pagelines.css b/Scripts/CentOS-Web/Stylesheet/pagelines.css new file mode 100755 index 0000000..1d70927 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/pagelines.css @@ -0,0 +1,35 @@ +/* + * Webenv -> Pagelines + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div.page-line { + clear: both; + margin: 0; + padding: 0; + background-color: transparent; + } + +div.page-line.white { + height: 4px; + background-color: #FFF; + } diff --git a/Scripts/CentOS-Web/Stylesheet/paragraphs.css b/Scripts/CentOS-Web/Stylesheet/paragraphs.css new file mode 100755 index 0000000..1574dff --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/paragraphs.css @@ -0,0 +1,27 @@ +/* + * Webenv -> Paragraphs + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#content p { + text-align:justify; + } diff --git a/Scripts/CentOS-Web/Stylesheet/quotation.css b/Scripts/CentOS-Web/Stylesheet/quotation.css new file mode 100755 index 0000000..883da05 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/quotation.css @@ -0,0 +1,107 @@ +/* + * Webenv -> Quotation + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-body blockquote { + margin-left: 0; + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-gray.png"); + padding: 0.5em 1.5em 0 1em; + } + +div#page-body blockquote h2 { + line-height: 0; + margin: 1em 0 1em 0; + } + +div#page-body blockquote pre { + border: none; + background-color: #333; + color: #FFFFFF; + } + +div#page-body blockquote.icon img { + margin: 0.5em 0 0 0; + float: left; + } + +div#page-body blockquote.icon pre, +div#page-body blockquote.icon h2, +div#page-body blockquote.icon p, +div#page-body blockquote.icon table { + margin-left: 60px; + } + +div#page-body blockquote.icon ul, +div#page-body blockquote.icon ol, +div#page-body blockquote.icon dl { + margin-left: 110px; + } + +div#page-body blockquote.icon ul dl, +div#page-body blockquote.icon ul ol, +div#page-body blockquote.icon ul ul, +div#page-body blockquote.icon ol dl, +div#page-body blockquote.icon ol ol, +div#page-body blockquote.icon ol ul, +div#page-body blockquote.icon dl dl, +div#page-body blockquote.icon dl ol, +div#page-body blockquote.icon dl ul { + margin-left: 2.5em; + } + +div#page-body blockquote.message { + border: none; + border-top: 4px solid; + border-bottom: 4px solid; + border-color: #CFCFCF; + } + +div#page-body blockquote.blue { + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-blue.png"); + border-color: #D2E0F6; + background-color: #ECF4FF; + } + +div#page-body blockquote.orange { + border-color: #F6E7D2; + background-color: #FFF8EC; + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-orange.png"); + } + +div#page-body blockquote.violet { + border-color: #F6D2F6; + background-color: #FFECFF; + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-violet.png"); + } + +div#page-body blockquote.red { + border-color: #E0B7B7; + background-color: #FFECEC; + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-red.png"); + } + +div#page-body blockquote.green { + border-color: #D6F6D2; + background-color: #EEFFEC; + background-image: url("https://projects.centos.org/centos-web-pub/Images/msg-bg-green.png"); + } diff --git a/Scripts/CentOS-Web/Stylesheet/reset.css b/Scripts/CentOS-Web/Stylesheet/reset.css new file mode 100755 index 0000000..40c64d5 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/reset.css @@ -0,0 +1,340 @@ +/* + * Webenv (reset) -- This file resets the browser's default visual + * style and sets The CentOS Web Environment visual style as default + * visual style. This file sets default values to tags like `html', + * `body', as well as those controlling links, tables, paragrphs, + * headings, lists, forms and quotation. + * + * The CentOS Web Environment (Webenv) is specially conceived to + * achieve one unique visual style and easy navegation through all + * different web applications The CentOS Project uses to show its + * existence in the World Wide Web medium. + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ------------------------------------------------------------------- + * $Id$ + * ------------------------------------------------------------------- + */ + + +/* Reset browsers default margins and paddings +-----------------------------------------------*/ + +* { + margin: 0; + padding: 0; + } + +/* Define html +-----------------------------------------------*/ + +html { + background-color: #FFF; + background-image: url("https://projects.centos.org/centos-web-pub/Images/html-bg.png"); + } + +/* Define body +-----------------------------------------------*/ + +body { + font-family: "DejaVu Sans", "Liberation Sans", sans-serif; + font-size: 0.85em; + line-height: 1.25em; + /* margin: 0; /* <- full screen */ + /* margin: 0 1% 0 1%; /* <- with 1% of left and right margin */ + /* margin: 0 2% 0 2%; /* <- with 2% of left and right margin */ + margin: 0 3% 0 3%; /* <- with 3% of left and right margin */ + /* margin: 0 10% 0 10%; /* <- with 10% of left and right margin */ + color: #333; + } + +/* Links +-----------------------------------------------*/ + +a:link { text-decoration: none; color: #0044B3; } +a:hover { text-decoration: underline; color: green; } +a:active { text-decoration: underline; color: green; } +a:visited { text-decoration: none; color: #0044B3; } +a:visited:hover { text-decoration: underline; color: green; } + +.title a:link, +.title a:active, +.title a:hover, +.title a:visited, +.title a:visited:hover { + color: #072B61; + text-decoration: none; + } + +/* Headings +-----------------------------------------------*/ + +h1 { + font-size: 1.8em; + } + +h2 { + font-size: 1.4em; + } + +h3 { + font-size: 1.25em; + } + +h4 { + font-size: 1.2em; + } + +h5 { + font-size: 1.1em; + } + +h6 { + font-size: 1em; + } + +/* Paragraphs +-----------------------------------------------*/ + +p { + margin: 1em 0 1em 0; + line-height: 1.5em; + } + +/* Images +-----------------------------------------------*/ + +img { + border: none; + } + +/* Quotations +-----------------------------------------------*/ + +blockquote { + background: #fafafa; + border-color: #eeeeee; + border-width: 1px; + border-style: solid; + border-left-width: 4px; + margin-left: 1.5em; + padding: 0.5em; + margin-top: 1em; + margin-bottom: 1.3em; + } + +q:before { + content: " “"; + } + +q:after { + content: "” "; + } + +q q:before { + content: " ‘"; + } + +q q:after { + content: "’ "; + } + +address { + margin-left: 1.5em; + } + +/* Preformatted Texts +-----------------------------------------------*/ + +pre { + font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; + padding: 0.5em 1em 0.5em 1em; + margin: 1em 0 1em 0; + white-space: pre; + border-width: 1px; + border-style: solid; + border-color: #E5E5E5; + border-left-width: 4px; + background: #FFFAE9; + overflow: auto; + } + +/* Phrase Elements +-----------------------------------------------*/ + +tt, +samp, +kbd, +code { + font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; + } + +/* Page Lines +-----------------------------------------------*/ + +hr { + clear: both; + height: 1px ! important; + border: none; + background-color: #DADADA; + } + +/* Lists +-----------------------------------------------*/ + +ul, +ol, +dl { + margin: 1.5em 0 1.5em 2.5em; + } + +ul { + list-style: disc; + } + +ol { + list-style-image: none !important; + } + +ul li, +ol li { + line-height: 1.5em; + } + +ul ul, +ul ol, +ol ul, +ol ol { + margin-top: 0.3em; + margin-bottom: 0.3em; + } + +ul li p, +ol li p { + margin-bottom: 0.3em; + } + +dl dd { + margin-left: 2.5em; + } + +dl ol, +dl ul { + margin-left: 3.5em; + } + +/* Tables +-----------------------------------------------*/ + +table { + border-collapse: collapse; + } + +table caption { + font-style: italic; + text-align: center; + } + +table tr th { + font-weight: bold; + } + +table tr td, +table tr th { + border: 1pt; + border-style: solid; + border-color: #CCC; + padding-top: 0.25em; + padding-right: 0.5em; + padding-bottom: 0.25em; + padding-left: 0.5em; + vertical-align: top; + } + +table tr td p, +table tr td pre { + margin: 0; + padding: 0; + } + +/* Forms +-----------------------------------------------*/ + +form { + display: inline; + } + +input[type="submit"], +input[type="button"] { + padding: 1px; + display: inline; + text-decoration: none; + } + +input[type="text"], +input[type="password"], +textarea { + display: inline; + padding: 2px; + } + +select { + display: inline; + padding: 1px; + } + +form p { + display: inline; + margin-left: 5px; + margin-right: 5px; + } + +/* Select +---------------------------------------- */ + +select option { + padding-left: 3px; + padding-right: 3px; + } + +select optgroup { + font-style: normal; + font-weight: bold; + padding-left: 3px; + } + +select optgroup option { + margin-left: 1em; + } + +input[type="radio"], +input[type="checkbox"] { + vertical-align: middle; + } + +fieldset { + margin: 1em 0 1em 0; + padding: 1em; + padding-bottom: 5px; + border: 1px solid #AAA; + } + +fieldset legend { + font-weight: bold; + color: #AAA; + } diff --git a/Scripts/CentOS-Web/Stylesheet/tabs.css b/Scripts/CentOS-Web/Stylesheet/tabs.css new file mode 100755 index 0000000..4fd45d7 --- /dev/null +++ b/Scripts/CentOS-Web/Stylesheet/tabs.css @@ -0,0 +1,83 @@ +/* + * Webenv -> Tabs (Style 2: Two Rounded Borders) + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +div#page-header div.tabs1 { + margin-left: 10px; + margin-right: 10px; + } + +div#page-header div.links div.tabs1 { + margin-top: 15px; + } + +div#page-header div.tabs1 a { + color: #FFF; + float: left; + font-weight: bold; + margin-right: 3px; + padding: 0px 8px 0 0px; + text-decoration: none; + } + +div#page-header div.tabs1 span.current a, +div#page-header div.tabs1 span.current a:hover, +div#page-header div.tabs1 span.current a span, +div#page-header div.tabs1 span.current a:hover span { + color: #204A87; + text-decoration: none; + } + +div#page-header div.tabs1 a span, +div#page-footer div.tabs1 a span { + float: left; + padding: 5px 0px 3px 8px; + } + +/* */ + +div#page-header div.tabs1 a { + background: none; + } + +div#page-header div.tabs1 a span { + background: none; + } + +div#page-header div.tabs1 span.current a, +div#page-header div.tabs1 span.current a:hover { + background: url("https://projects.centos.org/centos-web-pub/Images/tabs3-bg.png") 100% -50px no-repeat; + } + +div#page-header div.tabs1 span.current a span, +div#page-header div.tabs1 span.current a:hover span { + background: url("https://projects.centos.org/centos-web-pub/Images/tabs4-bg.png") 0 -50px no-repeat; + } + +div#page-header div.tabs1 span:hover a { + background: url("https://projects.centos.org/centos-web-pub/Images/tabs3-bg.png") 100% 0 no-repeat; + } + +div#page-header div.tabs1 span:hover a span { + background: url("https://projects.centos.org/centos-web-pub/Images/tabs4-bg.png") 0 0; + } diff --git a/Scripts/CentOS-Web/Xhtml/__init__.py b/Scripts/CentOS-Web/Xhtml/__init__.py new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/Scripts/CentOS-Web/Xhtml/__init__.py diff --git a/Scripts/CentOS-Web/Xhtml/output.py b/Scripts/CentOS-Web/Xhtml/output.py new file mode 100755 index 0000000..3cb2f05 --- /dev/null +++ b/Scripts/CentOS-Web/Xhtml/output.py @@ -0,0 +1,455 @@ +#!/usr/bin/python +# +# Xhtml -- This module encapsulates XHTML construction needed by The +# CentOS Web application. +# +# Copyright (C) 2009, 2010, 2011 The CentOS Project +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +import os +import cgi +import cgitb; cgitb.enable() + +qs = cgi.parse_qs(os.environ['QUERY_STRING']) +copyright = '2009-2011 The CentOS Project. All rights reserved.' +language = 'en' + +def tag(name, attributes, indentation=[8,1], content="", has_child=0): + """Returns XHTML tag definition. + + Arguments: + + name: The XHTML tag's name. Notice that this function doesn't + verify nor validate the XHTML tags you provide. It is up to + you write them correctly considering the XHTML standard + definition. + + attributes: The XHTML tag's attribute. Notice that this function + doesn't verify the attributes assignation to tags. You need to + know what attributes are considered valid to the tag you are + creating in order to build a well-formed XHTML document. Such + verification can be achived inside firefox browser through the + `firebug' plugin. + + indentation: The XHTML tag's indentation (Optional). This argument + is a list of two numerical values. The first value in the list + represents the amount of horizontal spaces between the + beginning of line and the opening tag. The second value in + the list represents the amount of vertical spaces (new lines) + between tags. + + content: The XHTML tag's content (Optional). This argument + provides the information the tag encloses. When this argument + is empty, tag is rendered without content. + + has_child: The XHTML tag has a child? (Optional). This argument is + specifies whether a tag has another tag inside (1) or not (0). + When a tag has not a child tag, indentation is applied between + the tag content and the closing tag provoking an unecessary + spaces to be shown. Such kind of problems are prevented by + setting this option to `0'. On the other hand, when a tag has + a child tag inside, using the value `1' will keep the closing + tag indentation aligned with the opening one. + + This function encapsulates the construction of XHTML tags. Use + this function wherever you need to create XHTML tags. It helps to + standardize tag constructions and their final output and, this + way, produce consistent XHTML documents. + + """ + if indentation[0] > 0: + h_indent = ' '*indentation[0] + else: + h_indent = '' + + if indentation[1] > 0: + v_indent = "\n"*indentation[1] + else: + v_indent = '' + + output = v_indent + h_indent + '<' + str(name) + if len(attributes) > 0: + for k, v in attributes.iteritems(): + output = output + ' ' + str(k) + '="' + str(v) + '"' + if content == '': + output = output + ' />' + else: + output = output + '>' + output = output + str(content) + if has_child == 1: + output = output + h_indent + '' + else: + output = output + '' + output = output + v_indent + + return output + + +def page_preamble(): + """Define XHTML preamble. + + Use this section to set the content-type required by CGI + definition, the document type and the head section required by + XHTML standard. + + """ + output = '' + "\n" + output = output + '' + "\n" + + return output + + +def page_logo(): + """Print XHTML code of page logo. + + The page logo is displayed on the top-left corner of the page. We + use this area to show The CentOS Logo, the main visual + representation of The CentOS Project. In order to print the page + logo correctly, the image related must be 78 pixels of height. + """ + attrs = [] + attrs.append({'id': 'logo'}) + attrs.append({'title': 'Community Enterprise Operating System', 'href': '/centos-web/'}) + attrs.append({'src': '/centos-web-pub/Images/centos-logo.png', 'alt': 'CentOS'}) + + return tag('div', attrs[0], [8,1], tag('a', attrs[1], [12,1], tag('img', attrs[2], [0,0], '', 0), 0), 1) + + +def page_ads_google(): + """Returns Google advertisement (468x60 pixels). + + """ + output = """ +
+ Google Advertisement + + +
+ +

+ """ + + return output + + +def page_navibar_top(): + """Return The CentOS Project top-level navigation links. + + Use this section to list the web applications you want to be + always visible no matter where you are inside the CentOS web + henvironment. Example of web applications are `Home', `Wiki', + `Lists', `Forums', `Planet', etc. + + """ + names = [] + attrs = [] + + names.append('Home') + attrs.append({'accesskey': '1', 'title': 'The CentOS Project (Alt+Shift+1)', 'href': '/centos-web/'}) + names.append('Wiki') + attrs.append({'accesskey': '2', 'title': 'The CentOS Wiki (Alt+Shift+2)', 'href': '/centos-web/?app=wiki'}) + names.append('Lists') + attrs.append({'accesskey': '3', 'title': 'The CentOS Lists (Alt+Shift+3)', 'href': '/centos-web/?app=lists'}) + names.append('Forums') + attrs.append({'accesskey': '4', 'title': 'The CentOS Forums (Alt+Shift+4)', 'href': '/centos-web/?app=forums'}) + names.append('Projects') + attrs.append({'accesskey': '5', 'title': 'The CentOS Projects (Alt+Shift+5)', 'href': '/centos-web/?app=projects'}) + names.append('Bugs') + attrs.append({'accesskey': '6', 'title': 'The CentOS Bugs (Alt+Shift+6)', 'href': '/centos-web/?app=bugs'}) + names.append('Planet') + attrs.append({'accesskey': '7', 'title': 'The CentOS Planet (Alt+Shift+7)', 'href': '/centos-web/?app=planet'}) + names.append('Downloads') + attrs.append({'accesskey': '8', 'title': 'The CentOS Downloads (Alt+Shift+8)', 'href': '/centos-web/?app=downloads'}) + names.append('Sponsors') + attrs.append({'accesskey': '9', 'title': 'The CentOS Downloads (Alt+Shift+9)', 'href': '/centos-web/?app=sponsors'}) + + if 'app' in qs: + focus = qs['app'][0] + else: + focus = names[0] + + output = page_navibar_tabs(names, attrs, focus) + output = output + tag('div', {'class': 'page-line white'}, [8,1], tag('hr', {'style': 'display:none;'}, [0,0], '', 0), 0) + + return output + + +def page_navibar_tabs(names, attrs, focus="Home"): + """Returns the XHTML code of navigation tabs. + + Argumuents: + + names: List of tab names. + + attrs: List of dictionaries for each tab name inside the `names' + list. Dictionaries inside attrs argument contain the XHTML + link attributes (e.g., accesskey, title, and href) used by tab + names so they can be linkable once rendered. + + focus: Name of the tab marked as current. When no value is passed + to this argument the `Home' value is used as default value. + + """ + links = '' + + for i in names: + content = tag('span', '', [0,0], str(i)) + content = tag('a', attrs[names.index(i)], [16,1], content) + if str(i).lower() == focus.lower(): + content = tag('span', {'class': 'current'}, [12,1], content, 1) + else: + content = tag('span', '', [12,1], content, 1) + links = links + content + + output = tag('div', {'class': 'tabs1'}, [8,1], links, 1) + + return output + + +def page_ads_release(): + """Return XHTML code of last-release advertisement. + + The release advertisment is a 728x90 pixels image graphically + designed to promote the last releases of The CentOS Distribution. + This image is located on the header space, between the top-level + links and application specific links. This image changes each time + a new release is published from The CentOS Project. + + The place where the release advertisement is displayed on the web + is an area of high visual impact, so images appearing therein + should be carefully designed in consequence with it. Likewise, + the frequency and priority of images in the rotation must be + controlled and somehow syncronized with the releasing process of + The CentOS Distribution. + + Previous to consider the release advertisement as such, it was + reserved for sponsor advertisements. Nevertheless, sponsor + advertisements were moved to a page for its own through a link in + the top-level navegation bar. + + """ + attrs = [] + attrs.append({'class': 'ads-release'}) + attrs.append({'title': 'Release Advertisement', 'href': ''}) + attrs.append({'src': '/centos-web-pub/Images/ads-sample-728x90.png', 'alt': 'Release Advertisement'}) + output = tag('div', attrs[0], [8,1], tag('a', attrs[1], [12,1], tag('img', attrs[2], [0,0], '', 0), 0), 1) + + return output + + +def page_userlinks(): + """Return XHTML code of user's links. + + """ + links = '' + names = [] + attrs = [] + + names.append('Lost your password?') + attrs.append({'href': '/centos-web/?p=lostpwd'}) + names.append('Register') + attrs.append({'href': '/centos-web/?p=register'}) + names.append('Login') + attrs.append({'href': '/centos-web/?p=login'}) + + for i in names: + content = tag('a', attrs[names.index(i)], [20,1], str(i), 0) + if str(i) == names[len(names) -1]: + content = tag('span', {'class': 'last'}, [16,1], content, 1) + else: + content = tag('span', '', [16,1], content, 1) + links = links + content + + content = tag('div', {'class': 'user'}, [12,1], links, 1) + output = tag('div', {'class': 'links'}, [8,1], content, 1) + + return output + + +def page_navibar_app(): + """Returns navigation bar with application links. + + """ + names = [] + attrs = [] + + names.append('Erratas') + attrs.append({'accesskey': 'e', 'title': 'The CentOS News (Alt+Shift+E)', 'href': '/centos-web/?p=erratas'}) + names.append('Docs') + attrs.append({'accesskey': 'd', 'title': 'The CentOS Documentation (Alt+Shift+D)', 'href': '/centos-web/?p=docs'}) + names.append('Articles') + attrs.append({'accesskey': 'a', 'title': 'The CentOS Articles (Alt+Shift+A)', 'href': '/centos-web/?p=articles'}) + names.append('Events') + attrs.append({'accesskey': 'v', 'title': 'The CentOS Events (Alt+Shift+V)', 'href': '/centos-web/?p=events'}) + + if 'p' in qs: + focus = qs['p'][0] + else: + focus = names[0] + + output = page_userlinks() + output = output + page_navibar_tabs(names, attrs, focus) + output = output + tag('div', {'class': 'page-line white'}, [4,1], tag('hr', {'style': 'display:none;'}, [0,0], '', 0), 0) + + return output + + +def page_header(): + """Returns XHTML code of page header.""" + + content = page_logo() + content = content + page_ads_google() + content = content + page_navibar_top() + if not 'app' in qs: + content = content + page_ads_release() + content = content + page_navibar_app() + + return tag('div', {'id': 'page-header'}, [4,1], content, 1) + + +def page_body_breadcrumbs(): + """Application specific links for breadcrumbs sutff. + + Use this section if your application supports breadcrumbs. + + """ + links = '' + names = [] + attrs = [] + + names.append('Pagination') + attrs.append({'href': ''}) + names.append('Lists') + attrs.append({'href': ''}) + names.append('Headings') + attrs.append({'href': ''}) + names.append('Links') + attrs.append({'href': ''}) + + for i in names: + if names.index(i) == len(names) - 1: + content = tag('span', {'class':'last'}, [16,1], tag('a', attrs[names.index(i)], [20, 1], i), 1) + else: + content = tag('span', '', [16,1], tag('a', attrs[names.index(i)], [20, 1], i, 0), 1) + links = links + content + + return tag('div', {'class': 'trail'}, [12,1], links, 1) + + +def page_body(): + """Start page body definitions. + """ + content = page_body_breadcrumbs() + + content = content + tag('h1', {'class': 'title'}, [12,1], 'My first CGI script') + content = content + tag('p', '', [12,1], 'This is the first paragraph.') + + content = content + tag('div', {'class': 'page-line'}, [8,1], tag('hr', {'style': 'display:none;'}, [0,0])) + content = tag('div', {'id':'content'}, [8,1], content, 1) + + output = tag('div', {'id':'page-body'}, [4,1], content, 1) + + return output + + +def page_footer(): + """Returns XHTML code of page's footer. + """ + attrs = [] + attrs.append({'title': 'Top', 'href': '#top'}) + attrs.append({'src': '/centos-web-pub/Images/top.png', 'alt': 'Top'}) + attrs.append({'href': 'http://creativecommons.org/licenses/by-sa/3.0/'}) + + license = tag('a', attrs[2], [0,0], 'Creative Commons Attribution-Share Alike 3.0 Unported License.') + + credits = tag('div', {'class': 'copyright'}, [12,1], 'Copyright © ' + str(copyright)) + credits = credits + tag('div', {'class': 'license'}, [12,1], 'This website is licensed under a ' + str(license)) + + content = tag('img', attrs[1], [0,0]) + content = tag('a', attrs[0], [12,1], content) + content = tag('div', {'class': 'top'}, [8,1], content, 1) + content = content + tag('div', {'class': 'credits'}, [8,1], credits, 1) + + output = tag('div', {'class': 'page-line'}, [4,1], tag('hr', {'style': 'display:none;'}, [0,0])) + output = output + tag('div', {'id': 'page-footer'}, [4,1], content, 1) + + return output + + +def page_wrap(title, keywords, description): + """Returns the XHTML code that wraps the whole page. + """ + attrs = [] + + attrs.append({'xmlns': 'http://www.w3.org/1999/xhtml', 'dir': 'ltr', 'lang': str(language), 'xml:lang': str(language)}) + + content = tag('meta http-equiv="content-type" content="text/html; charset=UTF-8"', '', [4,1]) + content = content + tag('meta http-equiv="content-style-type" content="text/css"', '', [4,0]) + content = content + tag('meta http-equiv="content-language" content="' + str(language) + '"', '', [4,1]) + content = content + tag('meta name="keywords" content="' + str(keywords) + '"', '', [4,0]) + content = content + tag('meta name="description" content="' + str(description) + '"', '', [4,1]) + content = content + tag('meta name="copyright" content="Copyright © ' + str(copyright) + '"', '', [4,0]) + content = content + tag('title', '', [4,1], str(title)) + content = content + tag('link href="/centos-web-pub/stylesheet.css" rel="stylesheet" type="text/css" media="screen projection"', '', [4,1]) + head = tag('head', '', [0,1], content) + + top = tag('a', {'name':'top'}, [0,1], '') + + content = page_header() + content = content + page_body() + content = content + page_footer() + wrap = tag('div', {'id': 'wrap'}, [0,1], content) + + body = tag('body', '', [0,1], top + wrap) + + output = page_preamble() + output = output + tag('html', attrs[0], [0,1], head + body) + + return output + + +def page(): + """The Xhtml code of a complete page.""" + + title = 'The CentOS Project' + keywords = 'centos, project, community, enterprise, operating system' + if 'app' in qs: + title = title + ' :: ' + str(qs['app'][0]).capitalize() + description = title + + print 'Content-type: text/html' + "\n" + print page_wrap(title, keywords, description) diff --git a/Scripts/CentOS-Web/centos-web.cgi b/Scripts/CentOS-Web/centos-web.cgi new file mode 100755 index 0000000..f2a94fe --- /dev/null +++ b/Scripts/CentOS-Web/centos-web.cgi @@ -0,0 +1,8 @@ +#!/usr/bin/python + +from Xhtml import output + +def main(): + output.page() + +if __name__ == '__main__': main() diff --git a/Scripts/CentOS-Web/stylesheet.css b/Scripts/CentOS-Web/stylesheet.css new file mode 100755 index 0000000..981ce35 --- /dev/null +++ b/Scripts/CentOS-Web/stylesheet.css @@ -0,0 +1,43 @@ +/* + * Webenv + * + * Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG + * + * This CSS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This CSS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * ---------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------- + */ + +/* Reset browser's default definitions. +--------------------------------------------------------------------*/ +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/reset.css"); + +/* Customize default definitions. +--------------------------------------------------------------------*/ +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/base.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/headings.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/paragraphs.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/links.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/pagelines.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/lists.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/quotation.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/forms.css"); +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/ads.css"); + +/* Miscellaneous definitions. +--------------------------------------------------------------------*/ +@import url("https://projects.centos.org/centos-web-pub/Stylesheet/tabs.css");