Class: AdminSkin::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/part/admin/skin.rb

Instance Method Summary collapse

Instance Method Details

#cssObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/part/admin/skin.rb', line 28

def css
  %~
  <style>
    label {
      font-weight: bold;
      display: block;
    }

    img {
      border: none;
    }

    input {
      border: 1px solid #ccc;
      font-size: 12px;
      background: #fff;
      padding: 2px;
    }

    textarea {
      border: 1px solid #ccc;
      background: #fff;
      padding: 2px;
    }

    input:hover, textarea:hover {
      border: 1px solid #999;
    }

    input:focus, textarea:focus {
      border: 1px solid #f00;
    }

    input.button {
      color: #fff;
      background: #999;
      border: 1px solid #999;
      font-weight: bold;  
    }

    input.button:hover {
      background: #f00;
      border: 1px solid #f00;
    }

    select {
      border: 1px solid #ccc;
    }

    a:hover {
      color: #f00;
    }
    
    /* --- forms --- */

    form dl {
      width: 100%;
      margin: 0px;
    }

    form dt {
      display: block;
      margin: 0px;
      margin-right: 10px;
      padding-bottom: 10px;
      font-weight: bold;
    }

    form dd {
      display: block;  
      margin: 0px;
      padding-bottom: 10px;
    }

    /* --- tables ---*/
    
    table.data {
      border-collapse: collapse;
    }

    .data th {
      border-bottom: 1px solid #ccc;
      background: #eee;
      font-weight: bold;
      text-align: left;
      padding: 5px;
    }

    .data td {
      border-bottom: 1px solid #ccc;
      padding: 5px;
    }

    /* --- pager --- */
          
    .pager {
      margin-top: 40px; margin-bottom: 50px;
      border-top: 1px solid #ccc;
      background-color: #f0f0f0;
    }

    .pager .first {
      float: left;  
      padding: 5px;
    }

    .pager .previous {
      float: left;
      padding: 5px;
      margin-left: 5px;
    }

    .pager .next {
      float: right;  
      padding: 5px;
      margin-right: 5px;
    }

    .pager .last {
      float: right;
      padding: 5px;
    }

    .pager ul {
      float: left;
      margin: 0px;
      padding: 0px;
    }

    .pager li {
      float: left;
      display: inline;
      padding: 5px;
      padding-left: 10px;
      padding-right: 10px;
      background: none;
    }

    .pager li.active {
      background-color: #ffa;
    }

    .noitems {
      padding: 5px;
      text-align: center;
    }      
  </style>
  ~    
end


178
179
180
181
182
183
# File 'lib/part/admin/skin.rb', line 178

def footer
  %~
  <br /><br />
  Powered by <strong><a href="http://www.nitroproject.org" target="_blank">Nitro</a></strong>.
  ~
end

#headObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/part/admin/skin.rb', line 5

def head
  %~
  <head>
    <title>\#{sitepath}</title>
    <meta name="generator" content="nitro" />
    <meta name="title" content="\#{sitepath}" /> 
    <meta name="description" content="Nitro Administration" />
    <meta name="category" content="portal" />
    <meta name="robots" content="index, nofollow" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--
    <link rel="stylesheet" href="/style.css" type="text/css" />    
    <link rel="alternate" type="application/rss+xml" title="Recent changes" href="\#{context.host_url}/feed" />
    <script type="text/javascript" src="/js/dojo.js">
      dojo.require('dojo.io.cookie');
    </script>
    <script type="text/javascript" src="/js/rounded_corners_lite.inc.js">//</script>
-->   
    #{css}
  </head>
  ~
end

#renderObject



185
186
187
188
189
190
191
192
193
194
195
# File 'lib/part/admin/skin.rb', line 185

def render
  %~
  <html>
    #{head}
    <body>
      #{content}
      #{footer}
    </body>
  </html>
  ~
end