Skip to content

Commit

Permalink
some bits
Browse files Browse the repository at this point in the history
  • Loading branch information
ihptru committed Feb 4, 2014
1 parent e377a94 commit 2ddc41b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 130 deletions.
1 change: 1 addition & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ curl
* Modify "OPENRA_PATH" to specify a directory with compiled OpenRA files (with slash at the end) (make sure it's always the latest release)
* Modify "RSYNC_MAP_PATH" to specify a directory where 'good' maps will be dumped by website trigger for dedicated servers usage
* Modify GITHUB related settings (user, repository and API token): used to post an issue with info about OpenRA crash report
* Modify "ADMIN_EMAIL" to specify an email address of a person who is responsible for fixing map uploading issues
* Edit DB related configuration

```
Expand Down
13 changes: 13 additions & 0 deletions openraData/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,16 @@ def GetRevisions(self, mapid, seek_next=False):
self.GetRevisions(self.revisions[-1], True)
return
self.GetRevisions(mapObject.pre_rev)

def GetLatest(self, mapid):
mapObject = Maps.objects.get(id=mapid)
if mapObject.next_rev == 0:
return mapObject.id
return self.GetLatest(mapObject.next_rev)

def DeleteMap(self, mapid):
pass

def NotifyOnFail(self, message, tempname):
# send an email to admin attaching map file which is already saved in temp location
pass
138 changes: 8 additions & 130 deletions openraData/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ body {
}

.no-svg body {
background-image: url("/static/images/bg-fallback.png");
background-image: url("/static/images/bg-fallback.png");
}

h1 {
font-size: 220%;
font-family: Cambria, Georgia, Times New Roman, Serif;
font-size: 220%;
font-family: Cambria, Georgia, Times New Roman, Serif;
}

h2, h3 {
Expand All @@ -28,7 +28,7 @@ h2, h3 {
}

h3 {
font-size: 125%;
font-size: 125%;
}

hr {
Expand Down Expand Up @@ -129,7 +129,6 @@ table tr td {
height: 66px;
border-bottom: solid 3px #74c2e7;
background: none repeat scroll 0% 0% rgba(32, 44, 69, 0.4);
/*background-color: #234c76;*/
}

#header h1 {
Expand Down Expand Up @@ -208,7 +207,7 @@ table tr td {
}

#nav li li:hover {
border: none;
border: none;
}

.submenu-top {
Expand Down Expand Up @@ -317,7 +316,7 @@ table tr td {
}

#screenshot IMG.last-active {
z-index:9;
z-index:9;
}

#ghbanner img {
Expand All @@ -341,7 +340,6 @@ table tr td {
background: #74c2e7;
background: rgba(32, 44, 69, 0.4);
margin-right: 50px;
/* box-shadow: 0px 0px 20px #000; */
}

#qsearch {
Expand All @@ -358,7 +356,7 @@ table tr td {
}

#quick-search input:focus {
outline : none;
outline : none;
}

.btn {
Expand All @@ -373,17 +371,11 @@ table tr td {
z-index: 99;
}

/* Comment position hacks */
#disqus_thread {
padding-top: 20px;
}

div.noscript {
text-align: center;
padding-bottom: 10px;
}

/* Games page */
table {
margin:0 auto;
width:90%;
Expand All @@ -396,118 +388,4 @@ td, th, tr {

#paging td:hover {
background: rgba(32, 44, 69, 0.4);
}

#serverlist {
text-align:center;
}

#serverlist .gameSubline {
font-size:10px;
}

#serverlist .gameWaiting {
color: #0A0;
}

#serverlist .gamePlaying {
color: #F80;
}

#serverlist .greyout {
color: #999;
}

#serverlist .greyout .gameWaiting {
color: #050;
}

#serverlist .greyout .gamePlaying {
color: #740;
}

/* Downloads page */
.downloadplatform {
list-style-type:none;
padding:0;
margin:0 auto;
width:90%;
text-align:center;
}

.downloadplatform li {
display:inline;
margin:2px;
}

.downloadplatform a {
padding:4px;
display:inline-block;
border: solid 3px #272d2c;
background-color: #272d2c;
text-decoration:none;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-khtml-border-radius: 10px;
}

.downloadplatform a img {
vertical-align: middle;
border: 0;
}

.downloadplatform a:hover {
background-color: #888;
border-color: #888;
}

.downloadplatform a.active {
border: solid 3px #74c2e7;
background-color: #272d2c;
}

.downloadplatform a.active:hover {
background-color: #888;
}

.downloadlinks {
list-style-type:none;
padding:0;
margin:0 auto;
width:90%;
text-align:center;
}

.downloadlinks li {
display:inline;
padding:15px;
}

.downloadlinks a {
font-family: 12px/1.4 Helvetica,arial,freesans,clean,sans-serif;
background: url("/static/images/download.svg") no-repeat;
background-position: 15px 15px;
padding:10px 15px 10px 60px;
display:inline-block;
border: solid 3px #182547;
background-color: #272d2c;
text-decoration:none;
text-align:center;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-khtml-border-radius: 10px;
}

.no-svg .downloadlinks a {
background-image: url("/static/images/download-fallback.png");
}

.downloadlinks a:hover {
background-color: #888;
}

.downloadblurb {
min-height: 50px;
}
}
5 changes: 5 additions & 0 deletions openraData/triggers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from django.conf import settings
from django.contrib.auth.models import User
from openraData.models import Maps

# Map Triggers

def recalculate_hashes():
Expand All @@ -9,6 +13,7 @@ def map_upgrade():
pass

def filterMapsRsync():
# sync + syncall
# this function syncs rsync directory with fresh list of maps, triggered by uploading a new map
pass

Expand Down
3 changes: 3 additions & 0 deletions systemTool/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@
GITHUB_API_TOKEN = ''
GITHUB_USER = ''
GITHUB_REPO = ''

# Email address of a person who is responsible for fixing map uploading issues
ADMIN_EMAIL = ''

0 comments on commit 2ddc41b

Please sign in to comment.