new HTML style



The attached patch implements a new default stylesheet for the plain
HTML export.

cheers
 
-- 
Jakub Steiner <jimmac novell com>
Novell, Inc.
Index: icons/Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/icons/Makefile.am,v
retrieving revision 1.12
diff -u -p -u -r1.12 Makefile.am
--- icons/Makefile.am	17 Jun 2005 15:48:01 -0000	1.12
+++ icons/Makefile.am	25 Jul 2005 12:54:29 -0000
@@ -18,6 +18,7 @@ noinst_DATA =					\
 	f-spot-stock_near.png			\
 	f-spot-stock_far.png			\
 	f-spot-question-mark.png		\
+	f-spot-simple.css			\
 	f-spot-simple-white.css
 
 pixmapdir = $(datadir)/pixmaps
Index: icons/f-spot-simple.css
===================================================================
RCS file: icons/f-spot-simple.css
diff -N icons/f-spot-simple.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ icons/f-spot-simple.css	25 Jul 2005 12:54:29 -0000
@@ -0,0 +1,176 @@
+/* 
+
+Default F-Spot HTML Gallery Stylesheet 
+Jakub 'jimmac' Steiner <jimmac novell com>
+
+*/
+
+body { 
+  font-family: luxi sans, trebuchet ms, sans-serif;
+  color: #888;
+  margin: 12px;
+	background-color: #3c3c3c;
+}
+
+.header {
+/*	position: relative; */
+	width: 100%;
+	margin-bottom: 20px;
+	padding: 0px;
+  border-bottom: 1px dotted #888;
+  font-size: 12px;
+}
+
+#title { 
+  color: #bbb;
+  font-weight: bold;
+  margin: 0;
+  padding: 0;
+  margin-left: 3px;
+	font-size: large;
+	letter-spacing: .5em;
+}
+
+div.navi {
+	float: right;
+	text-align: right;
+	margin-top: 3px;
+}
+
+div.navilabel {
+	padding: 3px 10px 0px 0px;
+}
+
+div.navi div {
+	float: left;
+	margin: 2px;
+}
+
+/* image pages navigation */
+div.navi a {
+	display: block;
+	width: 80px;
+	height: 17px;
+	-moz-border-radius: 3px;
+	border: 1px solid #444;
+	text-align: center;
+	padding-top: 3px;
+}
+
+div#index a {
+	background: transparent url("index.png") top left no-repeat;
+}
+
+div#prev a {
+	background: transparent url("prev.png") top left no-repeat;
+}
+
+div#next a {
+	background: transparent url("next.png") top left no-repeat;
+}
+
+div#index a:hover, div#prev a:hover, div#next a:hover {
+	text-decoration: none;
+  background-color: #c49200;
+	color: #333;
+}
+
+/* index page navigation */
+div.navi div.navipage a, div.navi div.navipage-current a {
+	display: block;
+	width: 20px;
+	height: 17px;
+	-moz-border-radius: 3px;
+	border: 1px solid #444;
+	text-align: center;
+	padding-top: 3px;
+}
+
+.navipage a:hover, .navipage-current a:hover {
+  text-decoration: none;
+  background-color: #c49200;
+	color: #333;
+}
+
+.navipage-current a {
+	background-color: #666;
+}
+
+a { 
+  text-decoration: none;
+  color: #c49200;
+}
+
+a:hover { 
+  text-decoration: underline;
+  color: #da1;
+}
+
+div.container1 {
+	width: 630px;
+	margin: auto;
+}
+
+div.photo {
+  text-align: center;
+  vertical-align: middle;
+  margin-top: 5%;
+}
+
+div.thumbs  {
+	clear: both;
+  padding: 6px;
+  text-align: center;
+}
+
+div.thumbs a {
+	margin: 6px;
+	display: block;
+	float: left;
+	width: 140px;
+	height: 140px;
+  border: 1px solid #727272;
+	background-color: #282828;
+	-moz-border-radius: 5px;
+}
+
+div.thumbs img { 
+  padding: 4px;
+  margin: 24px 3px;
+	border: 0px;
+}
+
+div#gallery_description {
+	clear: both;
+	padding: 10px 12px 0px 12px;
+}
+
+div.photo img { 
+  padding: 16px;
+  border: 1px solid #555;
+	-moz-border-radius: 7px;
+	background-color: #333;
+	margin: 20px;
+}
+
+div.thumbs a:hover {
+	background-color: #222;
+  border: 2px solid #c49200;
+	margin: 5px;
+}
+
+div.photo div { 
+  text-align: center;
+  margin-top: 6px;
+  font-size: 18px;
+  font-family: Luxi Serif, Georgia, Helvetica;
+//  font-style: italic;
+}
+
+div.footer { 
+	clear: both;
+	padding: 20px 10px 0px 10px;
+  font-size: 10px;
+	width: 640px;
+	margin: auto;
+ }
Index: src/FolderExport.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/FolderExport.cs,v
retrieving revision 1.11
diff -u -p -u -r1.11 FolderExport.cs
--- src/FolderExport.cs	21 Jul 2005 15:16:00 -0000	1.11
+++ src/FolderExport.cs	25 Jul 2005 12:54:30 -0000
@@ -95,7 +95,7 @@ namespace FSpot {
 			thumb_scrolledwindow.Add (view);
 			HandleSizeActive (null, null);
 			name_entry.Text = gallery_name;
-			uri_entry.Text = System.IO.Path.Combine (FSpot.Global.HomeDirectory, "public_html");
+			uri_entry.Text = System.IO.Path.Combine (FSpot.Global.HomeDirectory, "Desktop");
 			if (!System.IO.Directory.Exists (uri_entry.Text))
 				uri_entry.Text = FSpot.Global.HomeDirectory;
 
@@ -533,7 +533,8 @@ namespace FSpot {
 	{
 		int current;
 		int perpage = 16;
-		string stylesheet = "f-spot-simple-white.css";
+		//string stylesheet = "f-spot-simple-white.css";
+		string stylesheet = "f-spot-simple.css";
 		
 		public HtmlGallery (IPhotoCollection selection, string path, string name) : base (selection, path, name) 
 		{ 
@@ -618,20 +619,27 @@ namespace FSpot {
 			//writer.Indent = 4;
 			
 			//writer.Write ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
+			writer.WriteLine ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>");
 			writer.RenderBeginTag ("html");
 			
 			WriteHeader (writer);
 			
 			writer.RenderBeginTag ("body");
 
-			writer.AddAttribute ("class", "navi");
+			writer.AddAttribute ("class", "container1");
+			writer.RenderBeginTag ("div");
+
+			writer.AddAttribute ("class", "header");
 			writer.RenderBeginTag ("div");
 
 			writer.AddAttribute ("id", "title");
 			writer.RenderBeginTag ("div");
-			writer.Write (description);
+			writer.Write (gallery_name);
 			writer.RenderEndTag ();
 
+			writer.AddAttribute ("class", "navi");
+			writer.RenderBeginTag ("div");
+
 			if (i > 0)
 				WritePageNav (writer, "prev", PhotoIndexPath (i - 1), Mono.Posix.Catalog.GetString("Prev"));
 
@@ -640,7 +648,9 @@ namespace FSpot {
 			if (i < collection.Count -1)
 				WritePageNav (writer, "next", PhotoIndexPath (i + 1), Mono.Posix.Catalog.GetString("Next"));
 
-			writer.RenderEndTag ();
+			writer.RenderEndTag (); //navi
+			
+			writer.RenderEndTag (); //header
 			
 			writer.AddAttribute ("class", "photo");
 			writer.RenderBeginTag ("div");
@@ -649,15 +659,19 @@ namespace FSpot {
 			writer.RenderBeginTag ("a");
 			
 			writer.AddAttribute ("src", PhotoWebPath (i));
+			writer.AddAttribute ("alt", "#");
 			writer.RenderBeginTag ("img");
 			writer.RenderEndTag ();
 			writer.RenderEndTag (); // a
 			
+			writer.AddAttribute ("id", "description");
 			writer.RenderBeginTag ("div");
 			writer.Write (collection [i].Description);
 			writer.RenderEndTag ();
 
 			writer.RenderEndTag ();
+			
+			writer.RenderEndTag (); //container1
 
 			WriteFooter (writer);
 			
@@ -678,7 +692,7 @@ namespace FSpot {
 		
 		static string IndexTitle (int page)
 		{
-			return String.Format ("{0}", page);
+			return String.Format ("{0}", page + 1);
 		}
 
 		public void WriteHeader (System.Web.UI.HtmlTextWriter writer)
@@ -719,22 +733,30 @@ namespace FSpot {
 			//writer.Indent = 4;
 
 			//writer.Write ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
+			writer.WriteLine ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>");
 			writer.RenderBeginTag ("html");
 			WriteHeader (writer);
 			
 			writer.RenderBeginTag ("body");
 
-			writer.AddAttribute ("class", "navi");
+			writer.AddAttribute ("class", "container1");
+			writer.RenderBeginTag ("div");
+
+			writer.AddAttribute ("class", "header");
 			writer.RenderBeginTag ("div");
 
 			writer.AddAttribute ("id", "title");
 			writer.RenderBeginTag ("div");
-			writer.Write (description);
-			writer.RenderEndTag ();
+			writer.Write (gallery_name);
+			writer.RenderEndTag (); //title div
 			
+			writer.AddAttribute ("class", "navi");
 			writer.RenderBeginTag ("div");
-			writer.Write (Mono.Posix.Catalog.GetString ("Pages:"));
-			writer.RenderEndTag ();
+
+			writer.AddAttribute ("class", "navilabel");
+			writer.RenderBeginTag ("div");
+			writer.Write (Mono.Posix.Catalog.GetString ("Page:"));
+			writer.RenderEndTag (); //pages div
 			
 			int i;
 			for (i = 0; i < PageCount; i++) {
@@ -744,11 +766,12 @@ namespace FSpot {
 				writer.AddAttribute ("href", IndexPath (i));
 				writer.RenderBeginTag ("a");
 				writer.Write (IndexTitle (i));
-				writer.RenderEndTag ();
+				writer.RenderEndTag (); //a
 				
-				writer.RenderEndTag ();
+				writer.RenderEndTag (); //navipage
 			}
-			writer.RenderEndTag ();
+			writer.RenderEndTag (); //navi
+			writer.RenderEndTag (); //header
 			
 			writer.AddAttribute ("class", "thumbs");
 			writer.RenderBeginTag ("div");
@@ -760,12 +783,22 @@ namespace FSpot {
 				writer.RenderBeginTag ("a");
 				
 				writer.AddAttribute  ("src", PhotoThumbPath (i));
+				writer.AddAttribute  ("alt", "#");
 				writer.RenderBeginTag ("img");
 				writer.RenderEndTag ();
 				
-				writer.RenderEndTag ();
+				writer.RenderEndTag (); //a
 			}
 			
+			writer.RenderEndTag (); //thumbs
+			
+			writer.AddAttribute ("id", "gallery_description");
+			writer.RenderBeginTag ("div");
+			writer.Write (description);
+			writer.RenderEndTag (); //description
+
+			writer.RenderEndTag (); //container1
+
 			WriteFooter (writer);
 			
 			writer.RenderEndTag (); //body
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/src/Makefile.am,v
retrieving revision 1.34
diff -u -p -u -r1.34 Makefile.am
--- src/Makefile.am	2 Jul 2005 06:52:16 -0000	1.34
+++ src/Makefile.am	25 Jul 2005 12:54:31 -0000
@@ -196,6 +196,7 @@ RESOURCES =										\
 	-resource:$(top_srcdir)/icons/f-spot-stock_far.png,f-spot-stock_far.png		\
 	-resource:$(top_srcdir)/icons/f-spot-fullscreen.png,f-spot-fullscreen.png	\
 	-resource:$(top_srcdir)/icons/f-spot-simple-white.css,f-spot-simple-white.css	\
+	-resource:$(top_srcdir)/icons/f-spot-simple.css,f-spot-simple.css	\
 	-resource:$(srcdir)/f-spot.glade,f-spot.glade
 
 fspotlibdir = $(libdir)/f-spot


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]