[log][html] pure css

This commit is contained in:
Hylke Bons 2011-03-17 15:16:33 +00:00
parent aa58da1fe2
commit 7dc64c49c7
3 changed files with 67 additions and 60 deletions

View file

@ -104,12 +104,12 @@ namespace SparkleShare {
process.StartInfo.Arguments = args.Request.Uri.Replace (" ", "\\ "); // Escape space-characters
process.Start ();
// FIXME: Use the right event, waiting for newer webkit bindings
UpdateEventLog ();
}
// FIXME: webview should stay on the same page
};
ScrolledWindow.AddWithViewport (WebView);
@ -181,8 +181,8 @@ namespace SparkleShare {
HTML = SparkleShare.Controller.GetHTMLLog (System.IO.Path.GetFileName (LocalPath));
HTML = HTML.Replace ("<!-- $body-font-size -->", (Style.FontDescription.Size / 1024 + 0.5) + "pt");
HTML = HTML.Replace ("<!-- $day-entry-header-font-size -->", (Style.FontDescription.Size / 1024 + 0.6) + "pt");
HTML = HTML.Replace ("<!-- $body-font-size -->", (double) (Style.FontDescription.Size / 1024 + 3) + "px");
HTML = HTML.Replace ("<!-- $day-entry-header-font-size -->", (Style.FontDescription.Size / 1024 + 3) + "px");
HTML = HTML.Replace ("<!-- $a-color -->", "#0085cf");
HTML = HTML.Replace ("<!-- $a-hover-color -->", "#009ff8");
HTML = HTML.Replace ("<!-- $body-font-family -->", "\"" + Style.FontDescription.Family + "\"");
@ -203,8 +203,6 @@ namespace SparkleShare {
Application.Invoke (delegate {
WebView.LoadString (HTML, null, null, "file://");
if (Spinner.Active) {
LayoutVertical.Remove (Spinner);
@ -227,6 +225,8 @@ namespace SparkleShare {
LayoutVertical.PackStart (ScrolledWindow, true, true, 0);
LayoutVertical.ReorderChild (ScrolledWindow, 0);
WebView.LoadString (HTML, null, null, "file://");
LayoutVertical.ShowAll ();
});

View file

@ -2,20 +2,18 @@
<div class='event-entry-content'>
<table>
<tr>
<td>
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->")'></div>
</div>
</td>
<td width='100%'>
<b><!-- $event-user-name --></b><br>
<!-- $event-entry-content -->
</td>
<td class='event-time'><!-- $event-time --></td>
</tr>
</table>
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->");'></div>
</div>
<div class='event-info'>
<b><!-- $event-user-name --></b>
<!-- $event-entry-content -->
</div>
<div class='event-time'><!-- $event-time --></div>
<div style='clear: both'></div>
</div>

View file

@ -23,37 +23,18 @@
}
.day-entry-header {
font-size: <!-- $day-entry-header-font-size -->;
color: #babdb6;
text-align: center;
margin-left: auto;
margin-right: auto;
width: 90%;
text-shadow: 0 1px 0 rgba(255, 255, 255, 1.0);
font-size: <!-- $day-entry-header-font-size -->;
color: #babdb6;
text-align: center;
width: 90%;
text-shadow: 0 1px 0 rgba(255, 255, 255, 1.0);
margin-bottom: 9px;
}
.day-entry-content {
padding: 9px;
}
dl {
padding: 0;
margin: 0;
padding-bottom: 15px;
}
dt {
padding-bottom: 9px;
padding-top: 9px;
}
dd {
width: 100px;
padding-left: 0;
margin-left: 12px;
text-overflow: ellipsis;
}
a {
color: <!-- $a-color -->;
text-decoration: none;
@ -63,22 +44,54 @@
color: <!-- $a-hover-color -->;
}
td {
vertical-align: top;
.event-time {
font-size: 80%;
color: <!-- $secondary-font-color -->;
float: right;
}
.event-time, dt {
font-size: 80%;
color: <!-- $secondary-font-color -->;
.event-entry-content {
display: block;
width: 400px;
background-color: #fff;
margin-left: auto;
margin-right: auto;
margin-bottom: 9px;
padding: 18px;
-webkit-border-radius: 6px;
border: #ddd 1px solid;
}
dl {
padding: 0;
margin: 0;
padding-bottom: 15px;
}
dt {
padding-bottom: 12px;
padding-top: 12px;
font-size: 80%;
color: <!-- $secondary-font-color -->;
}
dd {
width: 300px;
overflow: hidden;
padding-left: 0;
margin-left: 12px;
text-overflow: ellipsis;
padding-bottom: 9px;
}
.no-buddy-icon {
float: left;
margin-right: 12px;
width: 36px;
height: 36px;
background-image: url('<!-- $no-buddy-icon-background-image -->');
background-repeat: no-repeat;
background-position: center;
background-position: top center;
}
.buddy-icon {
@ -86,19 +99,15 @@
height: 36px;
}
.event-entry-content {
background-color: #fff;
margin: 12px;
padding: 12px;
-webkit-border-radius: 6px;
border: #ddd 1px solid;
.event-info {
float: left;
}
</style>
</head>
<body onDragStart='return false'>
<body onDragStart='return false;'>
<!-- $event-log-content -->
</body>