From 1873ada9fffc6c10d4a294769c950ceb9b12b168 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Mon, 10 Jan 2011 15:25:08 -0800 Subject: [PATCH] Improving gallery CSS by using different sizes for icons and screenshots. --HG-- branch : 1.x --- .../Styles/orchard-packaging-admin.css | 45 ++++++++++++---- .../Views/Gallery/Modules.cshtml | 27 +++------- .../Views/Gallery/Themes.cshtml | 52 +++++++++++-------- 3 files changed, 72 insertions(+), 52 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Styles/orchard-packaging-admin.css b/src/Orchard.Web/Modules/Orchard.Packaging/Styles/orchard-packaging-admin.css index 6101abb10..ffcf95666 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Styles/orchard-packaging-admin.css +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Styles/orchard-packaging-admin.css @@ -5,18 +5,45 @@ padding: 1.2em 0.4em 0.5em } .contentItems .properties { - float:left; + float: left; + clear: both; } .contentItems .pageStatus { - margin:.8em 0; - color:#666; + margin: .8em 0; + color: #666; } -.thumbnail { +.iconThumbnail { + padding-left: 70px; +} +.screenshotThumbnail { + padding-left: 191px; +} +.column { float: left; - padding: 1.2em 1.2em 0.5em 0em; - width: 10%; + position: relative; +} +.extensionThumbnail { + margin-left: -100%; + padding-top: 20px; +} +.iconThumbnail .extensionThumbnail { + width: 70px; + right: 70px; + height: 50px; +} +.screenshotThumbnail .extensionThumbnail { + width: 191px; + right: 191px; + height: 128px; } .extensionDetails { - float: left; - width: 85%; -} \ No newline at end of file + width: 100%; +} +.iconThumbnail .thumbnail { + width: 50px; + height: 50px; +} +.screenshotThumbnail .thumbnail { + width: 171px; + height: 128px; +} diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Modules.cshtml b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Modules.cshtml index 0b7a99566..bde5072f9 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Modules.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Modules.cshtml @@ -28,30 +28,15 @@ iconUrl = Href("../../Content/Images/ModuleDefaultIcon.png"); } } - -
-
-

@item.Title - @T("Version: {0}", item.Version)

+
+
+

@item.Title - @T("Version: {0}", item.Version)

@(item.Description == null ? T("(No description").Text : item.Description)

  • @T("Last Updated: {0}", DateTime.Now.ToLocalTime())
  •  | @T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())
  •  | @T("Rating: {0}", item.Rating)
  •  | @T("Ratings Count: {0}", item.RatingsCount)
  •  | @T("Website: ") @if (!string.IsNullOrEmpty(item.ProjectUrl)) { @item.ProjectUrl } else { @T("Unknown").ToString() }
+
- - -
-

@(item.Description == null ? T("(No description").Text : item.Description)

-
    -
  • @T("Last Updated: {0}", DateTime.Now.ToLocalTime())
  • -
  •  | @T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())
  • -
  •  | @T("Rating: {0}", item.Rating)
  • -
  •  | @T("Ratings Count: {0}", item.RatingsCount)
  • -
  •  | @T("Website: ") - @if(!string.IsNullOrEmpty(item.ProjectUrl)) { @item.ProjectUrl } - else { @T("Unknown").ToString() } -
  • -
+
+ module
} diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml index a29171c47..adb408d63 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Gallery/Themes.cshtml @@ -19,42 +19,50 @@ } @if (Model.Extensions.Count() > 0) { -
    +
      @foreach (var item in Model.Extensions) {
    • @{ + string extensionClass = "iconThumbnail"; string iconUrl = @item.IconUrl; if (!string.IsNullOrWhiteSpace(@item.FirstScreenshot)) { iconUrl = Href(@item.FirstScreenshot); + extensionClass = "screenshotThumbnail"; } else if (string.IsNullOrWhiteSpace(iconUrl)) { iconUrl = Href("../../Content/Images/imagePlaceholder.png"); + extensionClass = "screenshotThumbnail"; } } - -
      -
      -

      @item.Title - @T("Version: {0}", item.Version)

      +
      +
      +
      +

      @item.Title - @T("Version: {0}", item.Version)

      +
      + + + +
      +

      @(item.Description == null ? T("(No description").Text : item.Description)

      +
        +
      • @T("Last Updated: {0}", DateTime.Now.ToLocalTime())
      • +
      •  | @T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())
      • +
      •  | @T("Rating: {0}", item.Rating)
      • +
      •  | @T("Ratings Count: {0}", item.RatingsCount)
      • +
      •  | @T("Website: ") + @if(!string.IsNullOrEmpty(item.ProjectUrl)) { @item.ProjectUrl } + else { @T("Unknown").ToString() } +
      • +
      +
      - - -
      -

      @(item.Description == null ? T("(No description").Text : item.Description)

      -
        -
      • @T("Last Updated: {0}", DateTime.Now.ToLocalTime())
      • -
      •  | @T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())
      • -
      •  | @T("Rating: {0}", item.Rating)
      • -
      •  | @T("Ratings Count: {0}", item.RatingsCount)
      • -
      •  | @T("Website: ") - @if(!string.IsNullOrEmpty(item.ProjectUrl)) { @item.ProjectUrl } - else { @T("Unknown").ToString() } -
      • -
      +
      + theme
    • }