diff --git a/index.html b/index.html index 81f1a4d1dd..0bb3b7c133 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,7 @@ +

Evennia

-

The Python MU* Development Library

+

The Python MU* Development Library

+
+

Latest events

+
+
+ Fetching events ... +
+
+
+ +

@@ -62,7 +73,6 @@ and a few extra thing to experience and try out. Use it to get a taste for what's possible. You can also ask questions in our support channel directly from inside the demo!

-

Evennia aims to take care of all the gritty networking, database-handling -and minutae that all online games need. The idea is to allow you, the game -developer, to concentrate solely on designing the game systems. We try to get -out of your way as much as possible.

+and other boring details that all MU*s games need. The idea is to allow you, +the game developer, to concentrate solely on designing the game systems. We try +to get out of your way as much as possible.

Evennia is game-agnostic. So we have no opinions on what style of play or genre of game you should make. We don't prescribe any skills, classes, races or @@ -146,7 +156,7 @@ emotes ... all the base things you expect.

  • Tutorial-world with examples
  • Easy storage of custom data on all game objects
  • Search, creation, and a large number of coding utilities
  • -
  • The contrib/ folder with optional full systems and shorter snippets
  • +
  • A contrib/ folder with optional full systems and shorter snippets
  • Dice @@ -201,12 +211,17 @@ want you can also leverage the full power of Django's mature ORM.

    href="docs/latest/index.html">Documentation
    or why not come join the Evennia Community. Welcome!

    -

    + - + diff --git a/javascripts/newsfeed.js b/javascripts/newsfeed.js new file mode 100644 index 0000000000..30bc7b67b1 --- /dev/null +++ b/javascripts/newsfeed.js @@ -0,0 +1,73 @@ +// Get data from github + +function httpGetAsync(theUrl, callback) +{ + var xmlHttp = new XMLHttpRequest(); + xmlHttp.onreadystatechange = function() { + if (xmlHttp.readyState == 4 && xmlHttp.status == 200) + callback(xmlHttp.responseText); + } + xmlHttp.open("GET", theUrl, true); // true for asynchronous + xmlHttp.send(null); +} + +function on_github_response(response) { + console.log("read latest events from github!"); + var eventList = JSON.parse(response); + + // console.log(eventList); + + // Which events to exclude + var excludes = ["WatchEvent", "GollumEvent", "IssueCommentEvent", + "ForkEvent", "PullRequestReviewCommentEvent"]; + + // loop over events, filtering out excluded ones + const resultList = eventList + .filter(item => !(excludes.includes(item.type))) + .map(envt => { + var output = ""; + if (envt.type === "IssueCommentEvent") { + output = ( + " " + + envt.actor.display_login + " commented on issue #" + + envt.payload.issue.number + "" + ); + } else if(envt.type === "IssuesEvent") { + output = ( + "" + + "Issue " + + envt.payload.action + ": " + + envt.payload.issue.title.slice(0, 20) + ".." + "" + ); + } else if(envt.type == "PushEvent") { + output = ( + "" + + "Commit by " + envt.payload.commits[0].author.name + ": " + + envt.payload.commits[0].message.slice(0, 20) + ".." + "" + ); + } else if(envt.type == "PullRequestEvent") { + output = ( + "" + + "PR #" + envt.payload.number + " " + envt.payload.action + + " by " + envt.actor.display_login + + "" + ) + } + return "
  • " + output + "
  • "; + }); + + var strList = ""; + if (resultList.length) { + strList = ""; + } + + // Add news to div + var newsDiv = document.getElementById("latest-events"); + newsDiv.innerHTML = ""; // clear the Fetching feed message + newsDiv.insertAdjacentHTML('afterend', strList); +} + +// Get public events +function fetchGithubData() { + httpGetAsync("https://api.github.com/orgs/evennia/events?per_page=40", on_github_response); +}; diff --git a/stylesheets/styles.css b/stylesheets/styles.css index 6a347fbb7f..b08f0a9692 100644 --- a/stylesheets/styles.css +++ b/stylesheets/styles.css @@ -91,6 +91,10 @@ a small { font-size: 12px; } +small { + font-size: 12px; +} + em { font-style: italic; } @@ -286,47 +290,39 @@ header ul { header li { list-style-type: none; - width:132px; - height:15px; margin-bottom: 12px; - line-height: 1em; - padding: 6px 6px 6px 7px; - background: #AF0011; - /*! background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%); */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); - background: -webkit-linear-gradient(top, #FFFFF 0%,#820011 100%); - background: -o-linear-gradient(top, #AF0011 0%,#820011 100%); - background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%); - background: linear-gradient(top, #AF0011 0%,#820011 100%); - - border-radius:4px; - border:1px solid #0D0D0D; -} - -header li:hover { - background: #C3001D; - background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); - /*! background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%); */ - background: -o-linear-gradient(top, #C3001D 0%,#950119 100%); - background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%); - background: linear-gradient(top, #C3001D 0%,#950119 100%); } a.buttons { + display: table-cell; + width:132px; + height:15px; + line-height: 1em; + padding: 6px 6px 6px 7px; + + border-radius:4px; + border:1px solid #0D0D0D; + -webkit-font-smoothing: antialiased; /*! background: url(../images/arrow-down.png) no-repeat; */ font-weight: normal; /*! text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0; */ - padding: 2px 2px 2px 22px; + padding: 1px 2px 2px 21px; height: 30px; - color: #474747; + text-decoration: none; + background-color: #efeeec; + vertical-align: middle; + } +a.buttons:hover { + background-color: #fff +} a.github { background: url(../images/octocat-small.png) no-repeat 1px; + background-color: #efeeec; } @@ -348,10 +344,9 @@ section { footer { width:160px; - float:left; - position:fixed; - bottom:10px; - padding-left: 50px; + float:right; + position: static; + margin-top: 70px; } /* Screenshot page */ @@ -397,6 +392,20 @@ footer { top: 5px; } +/* News feed */ + +.news-event { + margin-bottom: 7px; + font-size: 12px; + border-left: solid 1px; + padding-left: 8px; + line-height: 1.3em; +} + +.events-fetch { + font-style: italic; +} + /* Media alternatives */ @@ -408,20 +417,20 @@ footer { margin:0; } - header, section, footer { - float:none; + header, section { position:static; width:auto; height:auto; margin:0px } - footer { - border-top: 1px solid #ccc; - margin:0 84px 0 50px; - padding:0px; - height:auto; - } + header { + float: none; + } + + footer { + margin-top: 40px; + } section { padding:20px 84px 20px 50px; @@ -439,14 +448,20 @@ footer { position: absolute; top: 20px; right: 20px; + z- } .img, .img.screenshot { max-width: 720px; } -} + .newsfeed { + position: absolute; + top: 103px; + right: 200px; + } +} @media print, screen and (max-width: 720px) { @@ -455,6 +470,7 @@ footer { } header { + float: none; padding:-10px 20px 0 20px; } @@ -462,9 +478,6 @@ footer { padding:10px -1px 10px 20px; } - footer { - margin: 0 0 0 30px; - } header ul, header p.view { position:static; @@ -484,6 +497,10 @@ footer { max-width: 480px; } + .newsfeed { + display: none; + } + } @media print, screen and (max-width: 480px) { @@ -499,18 +516,15 @@ footer { right: 20px; } - footer { - margin: 0 0 0 20px; - } - - footer a{ - display:block; - } .img, .img.screenshot { max-width: 400px; } + .header-text { + display: none; + } + } @media print, screen and (max-width: 400px) {