Commit 4a39cf53 authored by Felix Edelmann's avatar Felix Edelmann

Initial commit: Move existing code from fxedel/fdroid-org, closes #3

parent 91070584
.sass-cache
_site
_data/latest-apps.json
node_modules/*
*.sublime-project
*.sublime-workspace
*.log
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/jekyll
image: ruby:2.3
test:
stage: test
script:
- apt-get update
- apt-get install -y curl
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
- apt-get install -y nodejs
- npm install
- nodejs build.js
- gem install jekyll
- jekyll build -d test
artifacts:
paths:
- test
except:
- master
pages:
stage: deploy
script:
- apt-get update
- apt-get install -y curl
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
- apt-get install -y nodejs
- npm install
- nodejs build.js
- gem install jekyll
- jekyll build -d public
artifacts:
paths:
- public
only:
- master
\ No newline at end of file
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
title: F-Droid
description: >
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "/fdroid-org" # the subpath of your site, e.g. /blog
url: "http://f-droid.org" # the base hostname & protocol for your site
include: ["_pages", "_apps"]
\ No newline at end of file
- title : Browse
url : https://browse.f-droid.org/
external : true
- title : Contribute
url : /contribute/
- title : News
url : /news/
- title : Wiki
url : /wiki/
- title : Manual
url : /manual/
- title : About
url : /about/
This diff is collapsed.
<footer class="site-footer">
<div class="wrapper">
<div class="site-description">
<p>{{ site.description }}</p>
</div>
</div>
</footer>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>
<header class="site-header">
<a class="site-title" href="{{ site.baseurl }}/">
{% include fdroid-logo.svg %}
<h1>{{ site.title }}</h1>
</a>
<nav class="site-nav">
{% for nav-item in site.data.navigation %}
{% if nav-item.title %}
{% if nav-item.external %}
<a class="page-link" href="{{ nav-item.url }}">{{ nav-item.title }}</a>
{% else %}
{% if page.permalink == nav-item.url %}
<span class="page-link current">{{ nav-item.title }}</span>
{% else %}
<a class="page-link" href="{{ nav-item.url | prepend: site.baseurl }}">{{ nav-item.title }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</nav>
</header>
\ No newline at end of file
### Donate
F-Droid is powered by your donations.
[PayPal]
[Flattr]
[bitcoin]
[bank]
\ No newline at end of file
<h3>Latest Apps</h3>
{% for app in site.data.latest-apps %}
<a class="latest-app" href="https://browse.f-droid.org/apps/{{app.id}}">
<img class="app-icon" src="https://f-droid.org/repo/icons/{{ app.icon }}" />
<div class="app-info">
<h4 class="app-name">
{{ app.name }}
</h4>
<div class="app-desc">
<span class="app-summary">{{ app.summary }}</span><span class="app-license">{{ app.license }}</span>
</div>
</div>
</a>
{% endfor %}
\ No newline at end of file
<h3>News</h3>
<ul class="post-list">
{% for post in site.posts %}
<li>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
</li>
{% endfor %}
</ul>
\ No newline at end of file
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
<div class="site-wrapper">
{% include header.html %}
<div class="main-content">
<div class="article-area">
{{ content }}
</div>
<div class="sidebar">
<div class="sidebar-widget">
{% capture donate %}{% include sidebar-donate.md %}{% endcapture %}
{{ donate | markdownify }}
</div>
<div class="sidebar-widget">
{% include sidebar-latest-apps.html %}
</div>
<div class="sidebar-widget">
{% include sidebar-news.html %}
</div>
</div>
</div>
{% include footer.html %}
</div>
</body>
</html>
---
layout: default
---
<article class="page">
<header class="post-header">
<h2 class="post-title">{{ page.title }}</h2>
</header>
<div class="post-content">
{{ content }}
</div>
</article>
---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h2 class="post-title" itemprop="name headline">{{ page.title }}</h2>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</article>
---
layout: page
title: About
permalink: /about/
---
About ...
\ No newline at end of file
---
layout: page
title: Browse
permalink: /browse/
---
{% for app in site.pages %}
{% if app.package-name %}
<a class="app-header app-link" href="{{ app.url | prepend: site.baseurl }}">
<img class="app-icon" src="https://f-droid.org/repo/icons/{{app.package-name}}.{{app.current-version-code}}.png" />
<div class="app-title">
<h3 class="app-name">
{{ app.title }}
</h3>
<div class="app-summary">
{{ app.summary }}
</div>
</div>
</a>
{% endif %}
{% endfor %}
\ No newline at end of file
---
layout: page
title: Contribute
permalink: /contribute/
---
The project is entirely developed and maintained by volunteers. You can help in the following ways:
### Report Problems
If you experience problems with the site or client software, you can report them in the issue tracker (see below), or discuss them in the [Forum](https://f-droid.org/forums) or on IRC (#fdroid on freenode).
For reporting issues, choose an appropriate tracker from the following:
* [F-Droid client app](https://gitlab.com/fdroid/fdroidclient/issues)
* [Server and build tools](https://gitlab.com/fdroid/fdroidserver/issues)
* [Official F-Droid repository metadata](https://gitlab.com/fdroid/fdroiddata/issues)
### Submit Applications
If you see an application missing from the repository (after reading the [inclusion policy](http://f-droid.org/wiki/page/Inclusion_Policy)), please feel free to submit it via the dedicated [Submission Queue](http://f-droid.org/forums/forum/submission-queue/) section of the forum. If you have the technical skills required, you can also put together the relevant metadata and submit that via the git repository, which will drastically speed up the inclusion of the application.
[The manual]({{ "/manual/" | prepend: site.baseurl }}) should help with this.
### Translate
The client application is available in many languages, but if yours is not included, or if it needs updating or improving, please create an account and use the translation system to make your changes.
There’s also a dedicated forum section for translation discussions.
### Help with Development
There are three git repositories hosted at Gitlab – one for the Android client application, one for the server tools for running a repository and building/installing applications locally, and one for the associated metadata files for applications in the main F-Droid repository. The easiest way to contribute to development is to make clones of these projects and submit merge requests. If you are making large changes, it would be good to discuss them on IRC or in the forum first, to ensure they fit with the direction of the project, and do not clash with or duplicate work already in development.
For working with the server project, it’s a good idea to read the manual.
---
layout: page
title: News
permalink: /news/
---
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h3>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h3>
</li>
{% endfor %}
</ul>
\ No newline at end of file
---
layout: post
title: "Welcome to Jekyll!"
date: 2016-11-14 21:40:22 +0100
categories: jekyll update
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
[jekyll-docs]: http://jekyllrb.com/docs/home
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/
# h1
## h2
### h3
#### h4
##### h5
###### h6
\ No newline at end of file
body {
margin: 0;
font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
color: $text-color;
}
h1, h2, h3, h4, h5, h6 {
margin: 0 0 $spacing-unit/2;
}
// set h1, h2, ... font sizes by scaling base font size
$heading-sizes: 3.0, 2.0, 1.5, 1.25, 1.0, 1.0;
@mixin heading-size($heading) {
font-size: nth($heading-sizes, $heading) * $base-font-size;
}
h1 { @include heading-size(1); color: $text-color-light; font-weight: $bold-font-weight; }
h2 { @include heading-size(2); color: $text-color-light; font-weight: $bold-font-weight; }
h3 { @include heading-size(3); color: $text-color; font-weight: $base-font-weight; }
h4 { @include heading-size(4); color: $text-color; font-weight: $base-font-weight; }
h5 { @include heading-size(5); color: $text-color; font-weight: $bold-font-weight; }
h6 { @include heading-size(6); color: $text-color; font-weight: $bold-font-weight; font-style: italic }
a {
color: $primary-color;
transition: opacity .2s;
text-decoration: none;
&:visited {
color: darken($primary-color, 15%);
}
&:hover {
opacity: .65;
text-decoration: underline;
}
&:active {
opacity: .5;
}
}
@mixin button-dark($background-color) {
line-height: $spacing-unit*1.5;
padding: 0 $spacing-unit/2;
background-color: $background-color;
color: #fff;
font-weight: $bold-font-weight;
font-size: $small-font-size;
text-transform: uppercase;
text-decoration: none;
transition: background-color .2s;
&:hover {
opacity: 1;
background-color: lighten($background-color, 10%);
}
&:active {
opacity: 1;
background-color: lighten($background-color, 20%);
}
}
%shadow {
box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
position: relative;
}
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
\ No newline at end of file
body {
background: $global-background;
}
.site-wrapper {
max-width: $content-width + $spacing-unit;
margin: 0 auto;
padding: 0 $spacing-unit/2;
}
/**
* Header
*/
.site-header {
background: $content-background;
z-index: 1;
@extend %shadow;
}
.site-title {
display: flex;
align-items: center;
text-decoration: none;
svg {
margin: $spacing-unit;
width: $spacing-unit * 3;
height: $spacing-unit * 3;
@include media-query($tablet) {
margin: $spacing-unit * 2 / 3;
width: $spacing-unit * 2;
height: $spacing-unit * 2;
}
@include media-query($phone) {
margin: $spacing-unit / 2;
width: $spacing-unit * 1.5;
height: $spacing-unit * 1.5;
}
}
h1 {
margin: 0;
@include media-query($tablet) {
@include heading-size(2);
}
@include media-query($phone) {
@include heading-size(3);
}
}
}
.site-nav {
display: flex;
flex-wrap: wrap;
background: $primary-color;
.page-link {
@include button-dark($primary-color);
&.current {
pointer-events: none;
border-bottom: 6px solid rgba(255, 255, 255, .4);
}
}
}
/**
* Content
*/
.main-content {
background: $content-background;
padding: $spacing-unit / 2;
padding-top: $spacing-unit;
display: flex;
@extend %shadow;
.article-area, .sidebar {
flex-basis: 0;
}
.article-area {
flex-grow: 5;
}
.sidebar {
flex-grow: 2;
padding-left: $spacing-unit;
}
@include media-query($tablet) {
flex-direction: column;
.sidebar {
padding-left: 0;
}
}
}
.sidebar-widget {
margin-bottom: $spacing-unit;
&:not(:last-of-type) {
padding-bottom: $spacing-unit;
border-bottom: 1px solid #ccc;
}
}
/**
* Latest Apps
*/
.latest-app {
display: flex;
align-items: top;
color: $text-color;
margin-bottom: $spacing-unit / 3;
.app-icon {
width: 48px;
height: 48px;
margin-top: $spacing-unit / 4;
margin-right: $spacing-unit / 2;
}
.app-name {
margin: 0;
}
.app-summary {
margin-right: 1em;
}
.app-license {
color: $text-color-light;
font-style: italic;
}
}
/**
* Footer
*/
.site-description {
font-size: $small-font-size;
}
\ No newline at end of file
const fs = require("fs");
const xml = require("node-xml");
// download xml data
require('https').get('https://f-droid.org/repo/index.xml', (res) => {
let data = '';
let time1 = (new Date()).getTime();
let time2;
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
const apps = [];
let currentApp;
let property;
// get apps by parsing the xml
new xml.SaxParser(function(cb) {
cb.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {
switch (elem) {
case "application":
currentApp = attrs[0][1];
apps.push({});
break;
case "id":
property = "id";
break;
case "added":
property = "added";
break;
case "name":
property = "name";
break;
case "summary":
property = "summary";
break;
case "license":
property = "license";
break;
case "icon":
property = "icon";
break;
}
});
cb.onCharacters(function(chars) {
if (property !== undefined) {
apps[apps.length - 1][property] = chars;
}
property = undefined;
});
}).parseString(data);
// sort by added descending
apps.sort(function(a, b) {
return parseInt(b.added.replace(/-/g, '')) - parseInt(a.added.replace(/-/g, ''));
});
// save latest 10 apps into json file
const latestApps = [];
for (let i = 0; i < 10 && i < apps.length; i++) {
let app = apps[i];
latestApps[i] = {
id: app.id,
name: app.name,
summary: app.summary,
license: app.license,
icon: app.icon
};
}
fs.writeFile('_data/latest-apps.json', JSON.stringify(latestApps));
});
});
\ No newline at end of file
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
@import url('https://fonts.googleapis.com/css?family=Roboto');
$base-font-family: Roboto, Arial, sans-serif;
$base-font-size: 16px;
$small-font-size: 0.875 * $base-font-size;
$base-line-height: 1.5;
$base-font-weight: 400;
$bold-font-weight: 600;
$spacing-unit: 32px;
$global-background: #e5e5e5;
$content-background: #fff;
$text-color: lighten(#000, 13%);
$text-color-light: lighten(#000, 46%);
$primary-color: #1976d2;
$content-width: 1000px;
$phone: 500px;
$tablet: 750px;
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
@import
"base",
"layout"
;
\ No newline at end of file
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
<item>