Browse the code

 

Differences between 599 and 600 on /.
Number of edited files: 8 (0 added, 0 deleted and 8 modified)
Revision 600

About 6 months and 30 days ago.

* Added two top buttons to add projects/groups
* Changed the way content is shown: pretty reordarable CSS list (no <table/>)
Added file(s) Deleted file(s) Modified file(s)

 

Old New Code
173
173

                                        
174
174
              <li><a href="users/briefcase">'.i18n('Briefcase').'</a></li>
175
175
              <li><a href="users/register/'.$nickname.'">'.i18n('Edit profile').'</a></li>
176
 
              <li><a href="projects/add">'.i18n('Add a project').'</a></li>
177
 
              <li><a href="teams/create">'.i18n('Create a group').'</a></li>
178
176
              <li><a href="users/logout">'.i18n('Log out').'</a></li>
179
177

                                        
180
178

                                        
181
179

                                        

 

Old New Code
26
26
        if ($this->page[1] == 'project' && isset($this->page[2]))
27
27
            $this->in_array = array('projects-bugs' => i18n('Bugs'),
28
28
                                    'projects-doc' => i18n('Documentation'),
29
 
                    	                'projects-forum' => i18n('Forum'),
 
29
                                    'projects-forum' => i18n('Forum'),
30
30
                                    'projects-news' => i18n('News'));
31
31
        else
32
32
            $this->in_array = array('projects' => i18n('Projects'),
45
45
    function getPageContent()
46
46
    {
47
47
        echo '
48
 
        <form action="search/" method="get">
 
48
        <form action="search/" method="get" class="search">
49
49

                                        
50
50
          <div class="input">';
51
51

                                        
64
64
                     id="inputsearch" placeholder="'.i18n('Search').'" />
65
65
          </div>
66
66

                                        
67
 
        </form>';
 
67
        </form>
 
68

                                    
 
69
        <ul id="buttons">
 
70
          <li><a href="projects/add">'.i18n('Add a project').'</a></li>
 
71
          <li><a href="teams/create">'.i18n('Create a group').'</a></li>
 
72
        </ul>';
68
73
    }
69
74
}
70
75
?>
71
76

                                        

 

Old New Code
10
10
<div class="prettylist_box">
11
11
<h2><?=$subtitle;?></h2>
12
12

                                        
13
 
<div class="prettylist_order">
14
 
  <div class="criteria <? if ($orderby == 'name'): ?>current<? endif; ?>">
15
 
    <a href="index/default<?=$link;?>name:asc"><img src="public/images/icons/sort-asc.png" alt="sort" /></a>
16
 
    <a href="index/default<?=$link;?>name:desc"><img src="public/images/icons/sort-desc.png" alt="sort" /></a>
17
 
    <?=i18n('Project name');?>
18
 
  </div>
 
13
<ul class="prettylist_order">
 
14
  <li><a href="index/default<?=$link;?>" class="<? if ($orderby == 'popularity'): ?>current<? endif; ?>"><?=i18n('Trending');?></a></li>
 
15
  <li><a href="index/default<?=$link;?>downloads:desc" class="<? if ($orderby == 'downloads'): ?>current<? endif; ?>"><?=i18n('Most downloaded');?></a></li>
 
16
  <li><a href="index/default<?=$link;?>date:desc" class="<? if ($orderby == 'date'): ?>current<? endif; ?>"><?=i18n('Most recent');?></a></li>
 
17
  <li><a href="index/default<?=$link;?>name:asc" class="<? if ($orderby == 'name'): ?>current<? endif; ?>"><?=i18n('Project name');?></a></li>
 
18
</ul>
19
19

                                        
20
 
  <div class="criteria <? if ($orderby == 'downloads'): ?>current<? endif; ?>">
21
 
    <a href="index/default<?=$link;?>downloads:asc"><img src="public/images/icons/sort-asc.png" alt="sort" /></a>
22
 
    <a href="index/default<?=$link;?>downloads:desc"><img src="public/images/icons/sort-desc.png" alt="sort" /></a>
23
 
    <?=i18n('Downloads');?>
24
 
  </div>
25
 

                                    
26
 
  <div class="criteria <? if ($orderby == 'date'): ?>current<? endif; ?>">
27
 
    <a href="index/default<?=$link;?>date:asc"><img src="public/images/icons/sort-asc.png" alt="sort" /></a>
28
 
    <a href="index/default<?=$link;?>date:desc"><img src="public/images/icons/sort-desc.png" alt="sort" /></a>
29
 
    <?=i18n('Registered');?>
30
 
  </div>
31
 
</div>
32
 

                                    
 
20
<ul class="prettylist_content">
33
21
<? if ($nb_prj > 0): ?>
34
22
<? foreach ($projects as $project): ?>
35
 
  <div class="prettylist_browsing">
 
23
  <li class="prettylist_browsing">
36
24
    <span class="date"><?=$project['date'];?></span>
37
25
    <span class="download"><?=$project['downloads'];?></span>
38
26

                                        
42
30

                                        
43
31
    <span class="text_minus category">
44
32
      <?=$project['categories'];?></span>
45
 
  </div>
 
33
  </li&gt;
46
34
<? endforeach; ?>
47
35
<? else: ?>
48
 
<em><?=$noproject;?></em>
 
36
<li><em><?=$noproject;?></em></li>
49
37
<? endif; ?>
 
38
</ul>
50
39
</div>
51
40

                                        
52
41
<p class="spacer">&nbsp;</p>
53
42

                                        

 

Old New Code
257
257
            // Select
258
258
            if (!empty($this->checkone) && in_array($this->checkone,
259
259
                array('name:asc', 'name:desc', 'date:asc', 'date:desc',
260
 
                      'downloads:asc')))
 
260
                      'downloads:asc', 'popularity:asc', 'downloads:desc')))
261
261
                $order = $this->checkone;
262
262
            elseif (!empty($this->checkone) && mb_ereg("^[0-9]+$", $this->checkone))
263
263
                $page = $this->checkone;
264
264

                                        
265
265
            if (!isset($order))
266
 
                $order = 'downloads:desc';
 
266
                $order = 'popularity:desc';
267
267

                                        
268
268
            if (!isset($page) && !empty($this->checktwo) &&
269
269
                mb_ereg("^[0-9]+$", $this->checktwo))
270
270

                                        

 

Old New Code
8
8
    <?=$feed;?></div>
9
9

                                        
10
10
  <div class="prettylist_box">
11
 
    <h2><?=i18n('Latest 20 pastes');?></h2>
 
11
    <h2><?=i18n('Last 20 snippets posted');?></h2>
12
12

                                        
13
 
    <div class="prettylist_order">
14
 
      <div class="criteria current">
15
 
        <?=i18n('Date posted');?>
16
 
      </div>
17
 
    </div>
 
13
    <ul class="prettylist_order">
 
14
      <li class="criteria current">
 
15
        <a href="paste" class="current"><?=i18n('Most recent');?></a>
 
16
      </li>
 
17
    </ul>
18
18

                                        
 
19
    <ul class="prettylist_content">
19
20
    <? for($i=0; $i<sizeof($list); $i++): ?>
20
21
    <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
21
 
      <div class="prettylist_browsing">
 
22
      <li class="prettylist_browsing">
22
23
        <h3><a href="<?=$list[$i]['link'];?>"><?=$list[$i]['title'];?></a></h3>
23
24
        <span><?=$list[$i]['lang'];?></span>
24
25
        <span><?=i18n('Snippet by %(nick)s.', array('nick' => $list[$i]['nick']));?></span>
25
 
      </div>
 
26
      </li&gt;
26
27
    <? endfor; ?>
 
28
    </ul>
27
29

                                        
28
30
  </div>
29
31
<? endif; ?>
30
32

                                        

 

Old New Code
7
7
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
8
    <link href="{tpl:cssdir}screen.css" rel="stylesheet" type="text/css" media="all" />
9
9
    <link href="{tpl:cssdir}print.css" rel="stylesheet" type="text/css" media="print" />
10
 
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
10
    <meta name="viewport" content="width=1200px; initial-scale=0.30;&quot; />
11
11
    <link href="{tpl:cssdir}mobile.css" rel="stylesheet" type="text/css" media="(max-width: 640px)" />
12
12
    <link href="{tpl:logosimages}ct_cube.ico" rel="shortcut icon" />
13
13
  </head>
14
14

                                        

 

Old New Code
31
31
}
32
32

                                        
33
33
a:link, a:visited {
34
 
  color: {color_600};
 
34
  color: {color_800};
35
35
  background: transparent;
36
36
  text-decoration: none;
37
37
  outline: none;
 
38
  transition: all linear 0.3s;
38
39
}
39
40

                                        
40
41
a:hover {
192
193
  padding-top: 7px;
193
194
}
194
195

                                        
 
196
@media (max-width: 640px) {
 
197
  #header_page form, #header_page ul#buttons {
 
198
    display: none;
 
199
  }
 
200
}
 
201

                                    
 
202

                                    
195
203
/* HEADER SEARCH BAR */
196
204
#header_page form {
197
205
  float: right;
223
231
  color: {color_900};
224
232
}
225
233

                                        
 
234
#header_page ul#buttons {
 
235
  float: right;
 
236
  list-style-type: none;
 
237
  list-style-image: none;
 
238
}
 
239

                                    
 
240
#header_page #buttons li {
 
241
  float: left;
 
242
  margin-top: 8px;
 
243
}
 
244

                                    
 
245
#header_page #buttons li a {
 
246
  display: block;
 
247
  line-height: 29px;
 
248
  border: 1px {color_100} solid;
 
249
  background-color: {color_100};
 
250
  color: {color_500};
 
251
  padding: 0px 10px 0px 10px;
 
252
  margin-right: 10px;
 
253
  transition: background 0.5s;
 
254
  transition: border 0.1s;
 
255
  border-radius: 4px;
 
256
}
 
257

                                    
 
258
#header_page #buttons li a:hover {
 
259
  text-decoration: none;
 
260
  color: {color_50};
 
261
  background-color: {color_500};
 
262
  border: 1px {color_500} solid;
 
263
}
 
264

                                    
 
265

                                    
226
266
/* HEADER MENU */
227
267
#header_menu {
228
268
  margin-left: 12%;
229
269

                                        

 

Old New Code
103
103
}
104
104

                                        
105
105
#page .text_title {
106
 
  color: #505050;
 
106
  color: {color_900};
107
107
  font-weight: bold;
108
108
}
109
109

                                        
110
110
#page .text_special {
111
 
  color: #ff0000;
 
111
  color: {color_500};
112
112
  font-weight: bold;
113
113
}
114
114

                                        
115
115
#page .border_top {
116
 
  border-top: 1px #dedede solid;
 
116
  border-top: 1px {color_300} solid;
117
117
}
118
118

                                        
119
119
#page .border_bottom {
120
 
  border-bottom: 1px #dedede solid;
 
120
  border-bottom: 1px {color_300} solid;
121
121
}
122
122

                                        
123
123
#page .border_left {
124
 
  border-left: 1px #dedede solid;
 
124
  border-left: 1px {color_300} solid;
125
125
}
126
126

                                        
127
127
#page .border_right {
128
 
  border-right: 1px #dedede solid;
 
128
  border-right: 1px {color_300} solid;
129
129
}
130
130

                                        
131
131
#page .background_title {
132
 
  background-color: #f4f4f4;
 
132
  background-color: {color_200};
133
133
}
134
134

                                        
135
135
#page .background_important {
136
 
  background-color: #f0f0f0;
 
136
  background-color: {color_300};
137
137
}
138
138

                                        
139
139
#page .background_normal {
140
 
  background-color: #ffecec;
 
140
  background-color: {color_100};
141
141
}
142
142

                                        
143
143
#page .background_diff_add {
144
 
  background-color: #BBFFBB;
 
144
  background-color: {color_500};
145
145
}
146
146

                                        
147
147
#page .background_diff_del {
148
 
  background-color: #FFBBBB;
 
148
  background-color: {color_600};
149
149
}
150
150

                                        
151
151

                                        
189
189
  border-top: 1px {color_400} solid;
190
190
  border-left: 1px {color_400} solid;
191
191
  border-right: 1px {color_400} solid;
192
 
  border-bottom: 1px #fff solid;
 
192
  border-bottom: 1px {color_50} solid;
193
193
  border-top-left-radius: 5px;
194
194
  border-top-right-radius: 5px;
195
195
  color: {color_500};
440
440

                                        
441
441

                                        
442
442
/* FEEDS ATOM/RSS */
443
 
#page div.feed, #page a.button, #page div.button {
444
 
  color: {color_300};
 
443
/*#page div.feed, #page a.button, #page div.button {*/
 
444
#page div.feed {
 
445
  color: {color_600};
445
446
  background-image: url('../../../public/images/icons/feed.png');
446
447
  background-repeat: no-repeat;
447
 
  background-position: top left;
448
 
  padding-left: 20px;
 
448
  background-position: 5% 50%;
 
449
  background-color: {color_100};
 
450
  border-radius: 10px;
 
451
  padding: 10px 10px 10px 35px;
449
452
  font-size: 0.9em;
 
453
  display: inline-block;
450
454
}
451
455

                                        
452
 
#page div.feed a {
453
 
  color: {color_400};
454
 
}
455
456

                                        
456
457

                                        
457
458
/* PRETTY TABLE-LIKE LIST */
458
459
div.prettylist_box {
459
460
  margin-top: 20px;
460
 
  width: 98%;
 
461
  width: 100%;
461
462
  margin-left: auto;
462
463
  margin-right: auto;
463
464
}
468
469
  }
469
470
}
470
471

                                        
471
 
div.prettylist_box div.prettylist_order {
472
 
  text-align: right;
473
 
  margin-top: 0px;
474
 
  margin-bottom: 15px;
 
472
div.prettylist_box h2 {
 
473
  overflow: hidden;
 
474
  white-space: nowrap;
 
475
  width: 50%;
475
476
}
476
477

                                        
477
 
div.prettylist_box div.prettylist_order div.criteria {
478
 
  display: inline;
479
 
  margin-left: 10px;
480
 
  font-size: 0.9em;
481
 
  padding: 5px;
 
478
ul.prettylist_order {
 
479
  list-style-type: none;
 
480
  list-style-image: none;
 
481
  margin-top: -30px;/*-2.50em*/
 
482
  float: right;
482
483
}
483
484

                                        
484
 
@media (max-width: 640px) {
485
 
  div.prettylist_box div.prettylist_order div.criteria {
486
 
    display: none;
487
 
  }
 
485
ul.prettylist_order li {
 
486
  float: left;
488
487
}
489
488

                                        
490
 
div.prettylist_box div.prettylist_order div.current {
491
 
  background-color: {color_50};
492
 
  border-radius: 5px;
 
489
ul.prettylist_order li a {
 
490
  font-size: 0.99em;
 
491
  padding: 0px 20px 10px 20px;
493
492
}
494
493

                                        
495
 
div.prettylist_browsing {
496
 
  display: block;
497
 
  border-bottom: 1px solid {color_50};
498
 
  padding: 5px;
 
494
ul.prettylist_order li a:hover {
 
495
  text-decoration: none;
 
496
  color: {color_900};
499
497
}
500
498

                                        
501
 
div.prettylist_browsing img {
 
499
ul.prettylist_order li a.current {
 
500
  border-bottom: 2px {color_500} solid;
 
501
  color: {color_500};
 
502
  font-weight: bold;
 
503
}
 
504

                                    
 
505
ul.prettylist_order li a.current:hover {
 
506
  color: {color_500};
 
507
}
 
508

                                    
 
509
ul.prettylist_content {
 
510
  border-top: 1px {color_300} solid;
 
511
  clear: both;
 
512
  padding-top: 10px;
 
513
  list-style-type: none;
 
514
  list-style-image: none;
 
515
}
 
516

                                    
 
517
li.prettylist_browsing {
 
518
  border-bottom: 1px solid {color_200};
 
519
  padding: 10px;
 
520
}
 
521

                                    
 
522
li.prettylist_browsing img {
502
523
  float: left;
503
524
  width: 40px;
504
525
  height: 40px;
506
527
}
507
528

                                        
508
529
@media (max-width: 640px) {
509
 
  div.prettylist_browsing img {
 
530
  li.prettylist_browsing img {
510
531
    /*margin-top: 5px;*/
511
532
  }
512
533
}
513
534

                                        
514
 
#page div.prettylist_browsing h3 {
515
 
  font-size: 1.2em;
 
535
div.prettylist_browsing h3 a {
 
536
  font-size: 0.90em;
 
537
  color: {color_800};
516
538
}
517
539

                                        
518
 
div.prettylist_browsing span.desc {
519
 
  color: {color_400};
 
540
li.prettylist_browsing span.desc {
 
541
  color: {color_900};
520
542
}
521
543

                                        
522
544
@media (max-width: 640px) {
523
 
  div.prettylist_browsing span.desc {
 
545
  li.prettylist_browsing span.desc {
524
546
    display: none;
525
547
  }
526
548
}
527
549

                                        
528
 
div.prettylist_browsing span.category {
 
550
li.prettylist_browsing span.category {
529
551
  float: right;
530
552
  padding-right: 2px;
531
553
  line-height: 14.5px;
532
554
}
533
555

                                        
534
556
@media (max-width: 640px) {
535
 
  div.prettylist_browsing span.category {
 
557
  li.prettylist_browsing span.category {
536
558
    float: none;
537
559
    display: block;
538
560
  }
539
561
}
540
562

                                        
541
 
div.prettylist_browsing span.date, div.prettylist_browsing span.download {
 
563
li.prettylist_browsing span.date, li.prettylist_browsing span.download {
542
564
  background-repeat: no-repeat;
543
565
  background-position: left center;
544
566
  padding-left: 20px;
547
569
}
548
570

                                        
549
571
@media (max-width: 640px) {
550
 
  div.prettylist_browsing span.date, div.prettylist_browsing span.download {
 
572
  li.prettylist_browsing span.date, li.prettylist_browsing span.download {
551
573
    margin-top: 0;
552
574
  }
553
575
}
554
576

                                        
555
 
div.prettylist_browsing span.download {
 
577
li.prettylist_browsing span.download {
556
578
  font-weight: bold;
557
579
  background-image: url('../../../public/images/icons/project-download.png');
558
580
}
559
581

                                        
560
 
div.prettylist_browsing span.date {
 
582
li.prettylist_browsing span.date {
561
583
  background-image: url('../../../public/images/icons/project-timeline.png');
562
584
}
563
585

                                        
564
586

                                        
565
587
/* PAGINATION STYLING */
566
588
div.pagination_box {
567
 
  width: 75%;
 
589
  width: 80%;
568
590
  margin-left: auto;
569
591
  margin-right: auto;
570
 
  margin-top: 10px;
 
592
  margin-top: 20px;
571
593
  text-align: center;
572
594
}
573
595

                                        
576
598
}
577
599

                                        
578
600
div.pagination_box div.pagination_list strong, div.pagination_box div.pagination_list a {
579
 
  border-left: 1px solid {color_100};
580
 
  border-top: 1px solid {color_100};
581
 
  border-bottom: 1px solid {color_100};
 
601
  border-left: 1px solid {color_200};
 
602
  border-top: 1px solid {color_200};
 
603
  border-bottom: 1px solid {color_200};
 
604
  background-color: {color_100};
582
605
  padding: 15px 10px 15px 10px;
583
606
  margin: 0px;
 
607
  transition: all linear 0.3s;
584
608
}
585
609

                                        
586
610
div.pagination_box div.pagination_list a.nolink {
588
612
}
589
613

                                        
590
614
div.pagination_box div.pagination_list a.nolink:hover {
591
 
  background-color: #fff;
 
615
  background-color: {color_50};
592
616
  text-decoration: none;
593
617
  cursor: default;
594
618
}
599
623

                                        
600
624
div.pagination_box div.pagination_list a:last-child {
601
625
  border-radius: 0 5px 5px 0;
602
 
  border-right: 1px solid {color_100};
 
626
  border-right: 1px solid {color_200};
603
627
}
604
628

                                        
605
629
div.pagination_box div.pagination_list a:hover {
794
818

                                        
795
819

                                        
796
820

                                        
797
 
/* suite de STYLES */
 
821
/* suite de STYLES
798
822

                                        
799
823
#page ul.no {
800
824
  list-style-type: none;
877
901

                                        
878
902

                                        
879
903

                                        
880
 
#page ol li {
881
 
  margin-top: 5px;
882
 
  margin-left: 25px;
883
 
}
884
904

                                        
885
 
#page ul li {
886
 
  list-style-image: url('images/li.png');
887
 
  margin-left: 25px;
888
 
  margin-top: 5px;
889
 
}
890
905

                                        
891
 
#page ul.nostyle li {
892
 
  list-style-image: none;
893
 
  list-style-type: none;
894
 
  margin: 0px;
895
 
}
896
 

                                    
897
906
#page div.code {
898
907
  margin-left: 5px;
899
908
  margin-top: 10px;
1704
1713

                                        
1705
1714

                                        
1706
1715

                                        
 
1716
#page ol li {
 
1717
  margin-top: 5px;
 
1718
  margin-left: 25px;
 
1719
}
1707
1720

                                        
 
1721
#page ul li {
 
1722
  list-style-image: url('images/li.png');
 
1723
  margin-top: 5px;
 
1724
}
1708
1725

                                        
 
1726
#page ul.nostyle li {
 
1727
  list-style-image: none;
 
1728
  list-style-type: none;
 
1729
  margin: 0px;
 
1730
}
 
1731
*/
1709
1732

                                        
1710
1733

                                        
1711
1734

                                        
1720
1743

                                        
1721
1744

                                        
1722
1745

                                        
 
1746

                                    
 
1747

                                    
 
1748

                                    
 
1749

                                    
1723
1750