Merge branch 'develop'

Remove submodules and set Bruno free
This commit is contained in:
Andy Tudhope 2019-03-31 11:45:24 +02:00
commit 0837e9143a
No known key found for this signature in database
GPG Key ID: 02A3DFA93BF26AD2
15 changed files with 256 additions and 56 deletions

6
.gitmodules vendored
View File

@ -1,6 +0,0 @@
[submodule "themes/navy/layout/partial/shared-partials"]
path = themes/navy/layout/partial/shared-partials
url = https://github.com/status-im/status.im-partials
[submodule "themes/navy/source/js/shared-js"]
path = themes/navy/source/js/shared-js
url = git@github.com:status-im/status-im-js.git

12
Jenkinsfile vendored
View File

@ -16,16 +16,6 @@ pipeline {
}
stages {
stage('Git Prep') {
steps {
sh "git config user.name ${env.GIT_USER}"
sh "git config user.email ${env.GIT_MAIL}"
/* necessary to have access to the theme partials */
sshagent(credentials: ['status-im-auto-ssh']) {
sh 'git submodule update --init --recursive'
}
}
}
stage('Install Deps') {
steps {
@ -54,7 +44,7 @@ pipeline {
steps { script {
sshagent(credentials: ['jenkins-ssh']) {
sh '''
scp -o StrictHostKeyChecking=no -r public/. \
rsync -e 'ssh -o StrictHostKeyChecking=no' -r --delete public/. \
jenkins@node-01.do-ams3.proxy.misc.statusim.net:/var/www/dev-nimbus/
'''
}

View File

@ -38,8 +38,8 @@ var config = {
src: {
scss: './themes/navy/source/scss/*.scss',
js: [
'./themes/navy/source/js/shared-js/js/utils.js',
'./themes/navy/source/js/shared-js/js/popups.js',
'./themes/navy/source/js/utils.js',
'./themes/navy/source/js/popups.js',
'./themes/navy/source/js/main.js',
]
},

View File

@ -26,7 +26,8 @@
"hexo-renderer-stylus": "^0.3.1",
"hexo-server": "^0.2.0",
"lodash": "^4.5.1",
"lunr": "^2.1.2"
"lunr": "^2.1.2",
"moment": "^2.24.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
@ -50,4 +51,4 @@
"vinyl-source-stream": "^2.0.0",
"watchify": "^3.11.0"
}
}
}

View File

@ -7,7 +7,7 @@
{{ partial('partial/header') }}
{% endif %}
{{ body }}
{{ partial('partial/shared-partials/partials/footer') }}
{{ partial('partial/footer') }}
</div>
{{ partial('partial/after_footer') }}
</body>

View File

@ -0,0 +1,60 @@
<div class="popup-wrap popup-wrap--community">
<div class="popup popup--community">
<a class="popup__button popup__button--close"></a>
<h3 class="popup__title">Community</h3>
<div class="popup__inner">
<div class="cards cards--three cards--three--even cards--community cards--community--light">
<div class="card">
<a href="https://get.status.im/chat/public/status" class="card-inner">
<div class="community-icon community-icon--join"></div>
<h4>Join the chat in Status</h4>
<p class="secondary-text">Whisper sweet, encrypted nothings on a distributed network that no-one owns.</p>
</a>
</div>
<div class="card">
<a href="https://discuss.status.im/" class="card-inner">
<div class="community-icon community-icon--discussion"></div>
<h4>Join the Discussion</h4>
<p class="secondary-text">Join longer discussions, work in progress, and our research here.</p>
</a>
</div>
<div class="card">
<a href="https://github.com/status-im/" class="card-inner">
<div class="community-icon community-icon--contrubute"></div>
<h4>Contribute to our Repos</h4>
<p class="secondary-text">Help us #buidl the future by getting involved in the most active code base in Ethereum.</p>
</a>
</div>
</div>
<h5>Find Out More</h5>
<div class="cards cards-community-more cards--three cards--three--even">
<div class="card">
<div class="card-inner">
<div class="card-content">
<div class="latest-posts latest-news"></div>
</div>
<div class="card-community-more__link"><a href="https://our.status.im/" class="link-arrow">Learn more</a></div>
</div>
</div>
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Life at Status</h4>
<p class="secondary-text">What's it like to live the decentralized lifestyle? Find out here.</p>
</div>
<div class="card-community-more__link"><a href="https://status.im/contribute/" class="link-arrow">Learn more</a></div>
</div>
</div>
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Follow us on Twitter</h4>
<p class="secondary-text">Join the conversation on our social channels to learn more.</p>
</div>
<div class="card-community-more__link"><a href="https://twitter.com/ethstatus/" class="link-arrow">Learn more</a></div>
</div>
</div>
</div>
</div>
</div>
<div class="popup-overlay"></div>

View File

@ -0,0 +1,9 @@
<ul class="main-nav">
<li class="item--to-show"><a href="https://status.im/get" class="">App</a></li>
<li class="item--to-show"> <a href="https://our.status.im/">Blog</a> </li>
<li class="item--to-show"> <a href="https://status.im/docs">Docs</a></li>
<li class="item--dropdown item--dropdown-projects"> <a href="#" class="">Projects</a></li>
<li><a href="https://status.im/contribute">Contribute</a></li>
<li class="item--dropdown"><a href="#" class="item--dropdown-community">Community</a></li>
<li class="item--more"><a href="#" class="item--more">More</a></li>
</ul>

View File

@ -1,7 +1,7 @@
<div class="header">
<div class="header-left">
<a class="logo" href={{url_for_lang('/')}}></a>
{{ partial('partial/shared-partials/partials/header-nav') }}
{{ partial('partial/header-nav') }}
</div>
<div class="header-right">
<a href="http://get.status.im/chat/public/status-nimbus" class="button button--secondary" style="margin-right: 8px">Nimbus Status Chat</a>
@ -31,13 +31,13 @@
</div>
<header class="dropdown">
<nav>
{{ partial('partial/shared-partials/partials/header-nav') }}
{{ partial('partial/header-nav') }}
</nav>
</header>
</div>
<div class="popup-overlay"></div>
</div>
{{ partial('partial/shared-partials/partials/community-popup') }}
{{ partial('partial/community-popup') }}
{{ partial('partial/shared-partials/partials/projects-popup') }}
{{ partial('partial/projects-popup') }}

View File

@ -0,0 +1,62 @@
<div class="popup-wrap popup-wrap--projects">
<div class="popup popup--projects">
<a class="popup__button popup__button--close"></a>
<h3 class="popup__title">Projects</h3>
<div class="popup__inner">
<h5>Help us #buidl</h5>
<div class="cards cards-community-more cards--three cards--three--even">
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Embark</h4>
<p class="secondary-text">Embark is a simple and easy to use development framework that enables you to build and deploy your own decentralized applications smoothly.</p>
</div>
<div class="card-community-more__link"><a href="https://embark.status.im/" class="link-arrow">Learn more</a></div>
</div>
</div>
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Nimbus</h4>
<p class="secondary-text">A research project and light client for Ethereum 2.0 designed to perform well on embedded systems and resource-restricted hardware.</p>
</div>
<div class="card-community-more__link"><a href="https://nimbus.status.im" class="link-arrow">Learn more</a></div>
</div>
</div>
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Keycard</h4>
<p class="secondary-text">A hardware wallet in the form of a card with a safe, contactless transaction experience</p>
</div>
<div class="card-community-more__link"><a href="https://hardwallet.status.im/" class="link-arrow">Learn more</a></div>
</div>
</div>
</div>
<div class="separator"></div>
<h5>Enable Everyone</h5>
<div class="cards cards-community-more cards--three cards--three--even">
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Incubate</h4>
<p class="secondary-text">Incubate supports open source, early stage startups with funding, technical mentorship, legal and regulatory compliance and much more.</p>
</div>
<div class="card-community-more__link"><a href="https://incubate.status.im/" class="link-arrow">Learn more</a></div>
</div>
</div>
<div class="card">
<div class="card-inner">
<div class="card-content">
<h4>Statusphere</h4>
<p class="secondary-text">Get involved in our community today, no matter who you are.</p>
</div>
<div class="card-community-more__link"><a href="https://status.im/statusphere/" class="link-arrow">Learn more</a></div>
</div>
</div>
</div>
</div>
</div>
<div class="popup-overlay"></div>
</div>

View File

@ -0,0 +1,23 @@
<div class="search">
<input type="text" name="userSearch" id="userSearch" placeholder="Search...">
<script src="/js/jquery-3.3.1.min.js"></script>
<script src="/js/jquery.marcopolo.min.js" type="text/javascript"></script>
<script type="text/javascript" defer>
$('#userSearch').marcoPolo({
url: 'https://search.status.im/' + window.location.host + '/_search?size=5&_source=title,url&',
minChars: 3,
formatItem: function (data, $item) {
return data.title || data.url;
},
formatData: function (data) {
return data.hits.hits.map(function(obj) {
return obj._source;
});
},
onSelect: function (data, $item) {
window.location = data.url;
}
});
</script>
</div>
<div class="clear"></div>

@ -1 +0,0 @@
Subproject commit 1aac6836d674dbd9006775345a947cf7a8783752

View File

@ -1,3 +1,15 @@
/* global $ */
const moment = require('moment');
function formatDate(date) {
const day = moment().date(date.get('date')).format('DD');
const month = moment().month(date.get('month')).format('MMM');
const hour = moment().hour(date.get('hour')).format('HH');
const minute = moment().minute(date.get('minute')).format('mm');
return `${day} ${month} at ${hour}:${minute}`;
}
$(document).ready(function () {
// Fixes Parallax effect and div to popup overlapping with the main menu options
@ -28,43 +40,31 @@ $(document).ready(function () {
return str.split(/\s+/).slice(0,25).join(" ");
}
var months = {'01':'Jan', '02':'Feb', '03':'Mar', '04':'Apr', '05':'May', '06':'Jun', '07':'Jul', '08':'Aug', '09':'Sep', '10':'Oct', '11':'Nov', '12':'Dec'};
url = 'https://our.status.im/ghost/api/v0.1/posts/?order=published_at%20desc&limit=2&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba';
let url_news = 'https://our.status.im/ghost/api/v0.1/posts/?order=published_at%20desc&limit=2&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba';
$.ajax({
type: "get",
url: url,
success: function (response) {
type: 'get',
url: url_news,
success: function(response) {
response.posts = response.posts.reverse();
$.each(response.posts, function (index, val) {
var excerpt = '';
if(val.custom_excerpt != null) {
excerpt = val.custom_excerpt;
}else{
excerpt = getWords(val.plaintext);
}
var newDate = new Date(val.published_at);
var minutes = newDate.getMinutes();
minutes = minutes + "";
if(minutes.length == 1){
minutes = '0' + minutes;
}
$('.latest-posts').prepend(' \
<div class="post"> \
<time>'+ newDate.getDate() + ' ' + months[(newDate.getMonth()+1)] + ' at ' + newDate.getHours() + ':' + minutes + '</time> \
<h4><a href="https://our.status.im/'+ val.slug +'">'+ val.title +'</a></h3> \
</div> \
');
$.each(response.posts, function(index, val) {
const date = moment(val.published_at);
$('.latest-news').prepend(
`<div class="post">
<time>${formatDate(date)}</time>
<h4><a href="https://our.status.im/${val.slug}">${val.title}</a></h4>
</div>`
);
});
}
});
});
/* Popups */
var addClassToElement = require('./shared-js/js/utils').addClassToElement;
var removeClassFromElement = require('./shared-js/js/utils').removeClassFromElement;
var addClassToElement = require('./utils').addClassToElement;
var removeClassFromElement = require('./utils').removeClassFromElement;
/* Code highlighting */

View File

@ -0,0 +1,43 @@
var addClassToElement = require('./utils').addClassToElement;
var removeClassFromElement = require('./utils').removeClassFromElement;
/* Popups */
let community = document.querySelectorAll(".item--dropdown-community")[0]
let projects = document.querySelectorAll(".item--dropdown-projects")[0]
let popups = document.querySelectorAll(".popup-wrap")
let overlays = document.querySelectorAll(".popup-overlay")
let closeButtons = document.querySelectorAll(".popup__button--close")
let activePopup = null;
let activeOverlay = null;
community.addEventListener('click', function(event){
showPopup(popups[0])
event.preventDefault()
})
projects.addEventListener('click', function(event){
showPopup(popups[1])
event.preventDefault()
})
closeButtons.forEach((button) => {
button.addEventListener('click', closeActivePopup)
})
overlays.forEach((overlay) => {
overlay.addEventListener('click', closeActivePopup)
})
function showPopup(whichPopup) {
activePopup = whichPopup
addClassToElement(whichPopup, "popup--shown");
}
function closeActivePopup() {
removeClassFromElement(activePopup, "popup--shown");
activePopup = null;
}

@ -1 +0,0 @@
Subproject commit 24185e51517464988a80e3223417a4b3183c7954

View File

@ -0,0 +1,20 @@
/*--- Utils ---*/
function addClassToElement(element, className) {
(element.classList) ? element.classList.add(className) : element.className += ' ' + className
return element
}
function removeClassFromElement(element, className) {
if(element.classList) {
element.classList.remove(className)
} else {
element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ')
}
return element
}
exports.addClassToElement = addClassToElement
exports.removeClassFromElement = removeClassFromElement