Commit 45a28f05 authored by Pietro Albini's avatar Pietro Albini

Merge branch 'download' into develop

parents 09aec50b e485a662
Pipeline #71 passed with stage
in 0 seconds
recursive-include uitwww/templates *
recursive-include uitwww/static *
include uitwww/navbar.json
recursive-include uitwww/data *
assets/images/wallpapers/ubuntu.jpg

27.6 KB | W: | H:

assets/images/wallpapers/ubuntu.jpg

34.4 KB | W: | H:

assets/images/wallpapers/ubuntu.jpg
assets/images/wallpapers/ubuntu.jpg
assets/images/wallpapers/ubuntu.jpg
assets/images/wallpapers/ubuntu.jpg
  • 2-up
  • Swipe
  • Onion skin
div.page div.row.background-wallpaper {
color: #fff;
border-top: 0;
.box {
background: rgba(255, 255, 255, 0.5);
}
background: url("images/wallpapers/dotted.png") no-repeat 130% 10%;
@media all and (max-width: 60rem) {
background: transparent;
}
&.ubuntu, &.desktop, &.kubuntu, &.lubuntu, &.xubuntu, &.ubuntu-mate,
&.ubuntu-budgie, &.ubuntustudio {
color: #fff;
& + div.row {
border-top: 0;
& + div.row {
border-top: 0;
}
a {
color: rgba(255, 255, 255, 0.5);
}
a.btn {
color: #fff;
}
.box {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2) inset;
background: rgba(0, 0, 0, 0.25);
border: 0;
}
}
.box {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2) inset;
background-color: rgba(0, 0, 0, 0.25);
border: 0;
&.ubuntu, &.desktop {
background: url("images/wallpapers/ubuntu.jpg") 100% 0%;
}
&.kubuntu {
background: url("images/wallpapers/kubuntu.jpg") 100% 50%;
}
&.xubuntu {
background:
linear-gradient(rgba(100, 100, 100, 0.3), rgba(100, 100, 100, 0.3)),
url("images/wallpapers/xubuntu.jpg") 100% 50%;
}
&.lubuntu {
background: url("images/wallpapers/lubuntu.jpg") 100% 50%;
}
&.ubuntu-mate {
background:
linear-gradient(rgba(85, 85, 85, 0.3), rgba(85, 85, 85, 0.3)),
url("images/wallpapers/ubuntu-mate.jpg") 100% 50%;
}
&.ubuntu {
background: url("images/wallpapers/ubuntu.jpg") 100% 70%;
&.ubuntu-budgie {
background:
linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
url("images/wallpapers/ubuntu-budgie.jpg") 100% 50%;
}
&.ubuntustudio {
background: url("images/wallpapers/ubuntustudio.jpg") 100% 50%;
.box {
background: rgba(100, 100, 100, 0.25);
}
}
}
div.page div.row.download-index-distro {
@media all and (min-width: 60rem) {
div.col.col-center {
text-align: right;
}
}
@media all and (max-width: 60rem) {
text-align: center;
div.col {
margin-top: 1em;
&:first-child {
margin-top: 0;
}
}
}
}
div.download-form {
padding: 0.5em 1.5em;
div.download-form-group {
margin: 1em 0;
}
div.download-form-buttons {
margin: 1em 0;
.btn {
display: block;
text-align: center;
width: 100%;
}
}
}
......
......@@ -34,6 +34,10 @@ setuptools.setup(
"flask",
"click",
"gunicorn",
"requests",
"itsdangerous",
"toml",
"pyyaml",
],
packages = [
......
......@@ -21,6 +21,8 @@ import flask
from . import pages
from . import cache
from . import utils
from . import download
from . import navbar
def create_app(data_path):
......@@ -43,8 +45,17 @@ def create_app(data_path):
app.config["CACHE_PATH"] = os.path.join(data_path, "cache")
cache.install_cache(app)
app.download = download.Downloads(data_path)
app.register_blueprint(
app.download.prepare_blueprint(app),
url_prefix="/download",
)
app.register_blueprint(pages.prepare_blueprint(app))
pages.prepare_navbar(app)
nav = navbar.Navbar()
nav.add_generator("download-distros", app.download.generate_navbar)
nav.install(app)
@app.errorhandler(404)
def not_found(error):
......@@ -78,3 +89,7 @@ def init_data_directory(data_path):
with open(secret_key_path, "w") as f:
f.write("%s\n" % utils.random_key(64))
os.chmod(secret_key_path, 0o400)
# Initialize the download files
download_inst = download.Downloads(data_path)
download_inst.store_cache_file()
......@@ -50,7 +50,7 @@ def run(data, gunicorn_config, port, public, workers, debug):
# In debug mode, run the flask builtin webserver
if debug:
extra_files = [
os.path.join(src_directory, "navbar.json"),
os.path.join(src_directory, "data/navbar.yml"),
]
app.run(debug=True, port=port, host=host, extra_files=extra_files)
......
......@@ -68,7 +68,7 @@ def after_request(response):
# Do dome filtering
if status != 200 or method != "GET":
return result
return response
if url.endswith("/"):
url += "index.html"
......
# Configurazione delle release disponibili
# Quando viene rilasciata una release o una point release è solamente
# necessario aggiornare questa sezione.
[releases.latest]
version = "18.04"
codename = "bionic"
lts = true
[releases.lts]
version = "16.04.4"
codename = "xenial"
lts = true
# Distribuzioni disponibili per il download
# Tutte le pagine in /download sono generate automaticamente da questa lista.
#
# name: Il nome della distro
# description: Una breve descrizione della distro
# lts-support-years: Il numero di anni per cui la LTS è supportata
# lts-only: Se impostato a `true`, solo le LTS verranno offerte
# releases: Una lista di release da offrire -- viene filtrata da lts-only
# archs: Una tabella di architettura e sorgente delle ISO
#
# Se è necessario sovrascrivere la sorgente delle ISO per una singola coppia
# release-architettura, è possibile aggiungere la chiave:
#
# source-override-RELEASE-ARCH = "SOURCE"
[distros.desktop]
name = "Ubuntu"
description = "L'originale, con GNOME"
lts-support-years = 5
lts-only = false
releases = ["latest", "lts"]
archs = { amd64 = "releases-ubuntu" }
[distros.server]
name = "Ubuntu Server"
description = "Tutta la potenza di Ubuntu nel tuo server"
lts-support-years = 5
lts-only = false
releases = ["lts", "latest"] # Invertiti intenzionalmente
# La live di 18.04 LTS su releases.u.c usa un installer che non supporta una
# valanga di sistemi, quindi faccio scaricare l'alternate
source-override-latest-amd64 = "cdimages-ubuntu"
# amd64 è su releases.u.c, mentre arm64 e ppc64el sono su cdimages.u.c
[distros.server.archs]
amd64 = "releases-ubuntu"
arm64 = "cdimages-ubuntu"
ppc64el = "cdimages-ubuntu"
[distros.kubuntu]
name = "Kubuntu"
description = "L'esperienza Ubuntu con desktop KDE"
lts-support-years = 3
lts-only = false
releases = ["latest", "lts"]
archs = { amd64 = "cdimages-derivatives", i386 = "cdimages-derivatives" }
[distros.xubuntu]
name = "Xubuntu"
description = "La derivata di Ubuntu leggera ma personalizzabile, con desktop XFCE"
lts-support-years = 3
lts-only = false
releases = ["latest", "lts"]
archs = { amd64 = "cdimages-derivatives", i386 = "cdimages-derivatives" }
[distros.lubuntu]
name = "Lubuntu"
description = "La derivata più leggera, con LXDE"
lts-support-years = 3
lts-only = false
releases = ["latest", "lts"]
archs = { amd64 = "cdimages-derivatives", i386 = "cdimages-derivatives" }
[distros.ubuntu-mate]
name = "Ubuntu MATE"
description = "Ubuntu si unisce a MATE"
lts-support-years = 3
lts-only = false
releases = ["latest", "lts"]
archs = { amd64 = "cdimages-derivatives", i386 = "cdimages-derivatives" }
[distros.ubuntu-budgie]
name = "Ubuntu Budgie"
description = "La potenza di Ubuntu e la leggerezza di Budgie"
lts-support-years = 3
lts-only = false
releases = ["latest"]
archs = { amd64 = "cdimages-derivatives", i386 = "cdimages-derivatives" }
[distros.ubuntustudio]
name = "Ubuntu Studio"
description = "Ubuntu con tutti i programmi per lavorare con audio, video e immagini"
lts-support-years = 3
lts-only = true
releases = ["latest", "lts"]
archs = { amd64 = "cdimages-studio", i386 = "cdimages-studio" }
# Nomi delle architetture
# Vengono usati per scegliere l'architettura da scaricare
[archs]
amd64 = "64bit"
i386 = "32bit (computer più datati)"
arm64 = "ARM 64bit"
ppc64el = "POWER"
# Tabella delle sorgenti delle ISO
# Le distro possono scegliere da quale sorgente prendere ogni architettura
[sources.releases-ubuntu]
http = "{mirror:ubuntu}/{codename}/ubuntu-{version}-{distro}-{arch}.iso"
torrent = "{mirror:ubuntu}/{codename}/ubuntu-{version}-{distro}-{arch}.iso.torrent"
[sources.cdimages-ubuntu]
http = "http://cdimages.ubuntu.com/releases/{codename}/release/ubuntu-{version}-{distro}-{arch}.iso"
torrent = "http://cdimages.ubuntu.com/releases/{codename}/release/ubuntu-{version}-{distro}-{arch}.iso.torrent"
[sources.cdimages-derivatives]
http = "http://cdimages.ubuntu.com/{distro}/releases/{codename}/release/{distro}-{version}-desktop-{arch}.iso"
torrent = "http://cdimages.ubuntu.com/{distro}/releases/{codename}/release/{distro}-{version}-desktop-{arch}.iso.torrent"
[sources.cdimages-studio]
http = "http://cdimages.ubuntu.com/{distro}/releases/{codename}/release/{distro}-{version}-dvd-{arch}.iso"
torrent = "http://cdimages.ubuntu.com/{distro}/releases/{codename}/release/{distro}-{version}-dvd-{arch}.iso.torrent"
# Configurazione dei mirror
# I mirror vengono caricati da Launchpad in automatico
[mirrors]
country = "IT"
for = ["ubuntu"]
- name: Download
endpoint: download.index
# Evidenzia anche la pagina di ringraziamento sotto questo menu
also-match:
download.thanks: null
# Le sottopagine sono generate automaticamente dalla lista di distro
generate-subs: download-distros
- name: Scopri Ubuntu
endpoint: pages.scopri-ubuntu_index
- name: Supporto
endpoint: pages.supporto
subs:
- name: Documentazione
external: https://wiki.ubuntu-it.org
- name: Forum
external: https://forum.ubuntu-it.org
- name: Domande e risposte
external: https://chat.ubuntu-it.org
- name: Chat
external: https://chat.ubuntu-it.org
- name: Comunità
endpoint: pages.comunita_index
- name: Eventi
endpoint: pages.eventi_index
- name: Contribuisci
endpoint: pages.contribuisci_index
- name: Progetto
endpoint: pages.progetto_index
- name: Contatti
endpoint: pages.contatti_index
This diff is collapsed.
# Source code of the Ubuntu-it website
# Copyright (C) 2016 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import requests
BASE = "https://api.launchpad.net/devel"
def fetch_paginated(initial):
"""Fetch paginated data"""
next_url = initial
while True:
data = requests.get(next_url).json()
for entry in data["entries"]:
yield entry
if "next_collection_link" not in data:
break
next_url = data["next_collection_link"]
def get_cdimage_mirrors(distro, country):
"""Get a list of cdimage mirrors"""
result = []
for mirror in fetch_paginated("%s/%s/cdimage_mirrors" % (BASE, distro)):
# Ensure we get only CD Image mirrors
if mirror["content"] != "CD Image":
continue
# Only get Official mirrors, please
if mirror["status"] != "Official":
continue
# Only get mirrors of the specific country
if not mirror["country_link"].endswith("/+countries/%s" % country):
continue
if mirror["http_base_url"] is None:
continue
url = mirror["http_base_url"]
if url.endswith("/"):
url = url[:-1]
result.append(url)
return result
[
{
"name": "Download",
"endpoint": "pages.download_index",
"subs": []
},
{
"name": "Scopri Ubuntu",
"endpoint": "pages.scopri-ubuntu_index",
"subs": []
},
{
"name": "Supporto",
"endpoint": "pages.supporto",
"subs": [
{
"name": "Documentazione",
"external": "http://wiki.ubuntu-it.org"
},
{
"name": "Forum",
"external": "http://forum.ubuntu-it.org"
},
{
"name": "Domande e risposte",
"external": "http://chiedi.ubuntu-it.org"
},
{
"name": "Chat",
"external": "http://chat.ubuntu-it.org"
}
]
},
{
"name": "Comunità",
"endpoint": "pages.comunita_index",
"subs": []
},
{
"name": "Eventi",
"endpoint": "pages.eventi_index",
"subs": []
},
{
"name": "Contribuisci",
"endpoint": "pages.contribuisci_index",
"subs": []
},
{
"name": "Progetto",
"endpoint": "pages.progetto_index",
"subs": []
},
{
"name": "Contatti",
"endpoint": "pages.contatti_index",
"subs": []
}
]
# Source code of the Ubuntu-it website
# Copyright (C) 2018 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import flask
import json
import pkg_resources
import yaml
class Navbar:
def __init__(self):
self.navbars = []
self.match = {}
self.generators = {}
def add_generator(self, name, generator):
"""Add a subpages generator"""
self.generators[name] = generator
def current_navbars(self):
"""Get the list of current navbars"""
if flask.request.endpoint is not None:
matcher = (flask.request.endpoint, tuple(flask.request.view_args.items()))
if matcher in self.match:
return self._return_navbars(self.match[matcher])
elif flask.request.endpoint in self.match:
return self._return_navbars(self.match[flask.request.endpoint])
return self._return_navbars([(0, -1)])
def _return_navbars(self, navbars):
"""Return a list of navbars"""
result = []
for bar_id, active_id in navbars:
bar = []
for i, item in enumerate(self.navbars[bar_id]):
bar.append((item[0], item[1](), i == active_id))
result.append(bar)
return result
def install(self, app):
"""Install this navbar on the app"""
raw = pkg_resources.resource_string("uitwww", "data/navbar.yml")
config = yaml.load(raw.decode("utf-8"))
self._prepare_navbar_cache(config, [])
# Add the _navbars variable to the templates
@app.context_processor
def inject_navbar():
return {
"_navbars": self.current_navbars(),
}
def _prepare_navbar_cache(self, bar, parents):
"""Add the bar to the cache"""
bar_id = len(self.navbars)
self.navbars.append([])
for item in bar:
item.setdefault("endpoint-args", None)
# Load the list of subs dynamically if requested
if "generate-subs" in item:
item["subs"] = self.generators[item["generate-subs"]]()
# Add hte item to the navbar
item_id = len(self.navbars[bar_id])
self.navbars[bar_id].append((item["name"], self._url_of(item)))
# Load sub-navbars recursively
sub_id = None
if "subs" in item:
sub_id = self._prepare_navbar_cache(item["subs"], parents + [(bar_id, item_id)])
if "endpoint" in item:
# Generate the list of navbars to show for this match
# If this item has childs the childs are shown
navbars = parents + [(bar_id, item_id)]
if sub_id is not None:
navbars.append((sub_id, -1))
# Add a match for each endpoint pointing to the list of navbars
match = {item["endpoint"]: item["endpoint-args"]}
if "also-match" in item:
match.update(item["also-match"])
for endpoint, args in match.items():
if args is None:
self.match[endpoint] = navbars
else:
self.match[(endpoint, tuple(args.items()))] = navbars
return bar_id
def _url_of(self, item):
"""Lazily the URL of an item"""
if "external" in item:
return lambda: item["external"]
# This function return lambdas because flask.url_for is only available
# during requests
if item["endpoint-args"] is not None:
return lambda: flask.url_for(item["endpoint"], **item["endpoint-args"])
else:
return lambda: flask.url_for(item["endpoint"])
......@@ -87,65 +87,3 @@ def prepare_blueprint(app):
return flask.render_template(_tmpl)
return bp
def prepare_navbar(app):
"""Prepare the context processor which will provide navbar informations"""
# This will load the navbar.json file, and parse it as json
navbar_raw = pkg_resources.resource_string("uitwww", "navbar.json")
navbar = json.loads(navbar_raw.decode("utf-8"))
def calculate_menu(current, recursive=True, _final=True):
# This will process only a level of the result
active = False
active_i = None
# Make all items non-active by default
for item in current:
item["active"] = False
for i, item in enumerate(current):
active = False
# An item should be considered active if either is the current
# one, or one of its childs is active
endpoint = flask.request.endpoint
if "endpoint" in item and item["endpoint"] == endpoint:
active = True
elif "subs" in item and recursive:
active = calculate_menu(item["subs"], _final=False) is not None
# Break the loop if this item is active
if active:
item["active"] = True
active_i = i
break
if active or _final:
return current, active_i
# else None is returned
@app.context_processor
def add_menu():
result = []
result_active = []
# Get all the possible navbar levels
next_to_calculate = navbar
while True:
calculated, next_i = calculate_menu(next_to_calculate)
result.append(calculated)
if next_i is not None:
result_active.append(calculated[next_i])
if next_i is not None and "subs" in calculated[next_i]:
next_to_calculate = calculated[next_i]["subs"]
else:
break
# Force something in the second navbar
if len(result) == 1:
result.append(result[0][0]["subs"])
return {"_navbar": result, "_navbar_active": result_active}
{# Source code of the Ubuntu-it website
# Copyright (C) 2015 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block title %}Download{% endblock %}
{% block content %}
<div class="page">
<div class="row">
<div class="col text-center">
<h1>Scarica Ubuntu</h1>
<p class="intro">Entra subito nel mondo Ubuntu. Scaricalo ora!</p>
</div>
</div>
</div>
<div class="page">
{% for name, data in distros.items() %}
<div class="row download-index-distro background-wallpaper {{ name }}">
<div class="col">
<h2>{{ data["name"] }}</h2>
<p>{{ data["description"] }}</p>
</div>
<div class="col col-center col-quarter">
<a class="btn" href="{{ url_for("download.landing", distro = name) }}">
Scaricala ora
</a>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
{# Source code of the Ubuntu-it website
# Copyright (C) 2016 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block title %}Scarica {{ distro["name"] }}{% endblock %}
{% block content %}
<div class="page">
{% for release in distro["releases"] %}
<div class="row {% if loop.index == 1 %}background-wallpaper {{ distro_name }}{% endif %}">
<div class="col">
<h2>
{{ distro["name"] }}
{{ releases[release]["version"] }}
{% if releases[release]["lts"] %}LTS{% endif %}
</h2>
{% if release == "latest" %}
<p>
{{ distro["name"] }} {{ releases[release]["version"] }} {% if releases[release]["lts"] %}LTS{% endif %}
è l'ultimo rilascio di {{ distro["name"] }}, con
tutte le ultime novità ed aggiornamenti.
Il periodo di supporto, con aggiornamenti di sicurezza,
è di
{% if releases[release]["lts"] -%}
{{ distro["lts-support-years"] }} anni
{%- else -%}
9 mesi
{%- endif -%}.
</p>
{% elif release == "lts" %}
<p>
{{ distro["name"] }} {{ releases[release]["version"] }} {% if releases[release]["lts"] %}LTS{% endif %}
è il rilascio stabile di {{ distro["name"] }},
con aggiornamenti di sicurezza garantiti per {{ distro["lts-support-years"] }} anni.
{% endif %}
</div>
<div class="col">
<div class="box download-form">
<form action="{{ url_for(".redirect") }}" method="post">
<input type="hidden" name="distro" value="{{ distro_name }}">
<input type="hidden" name="release" value="{{ release }}">
{% if distro["archs"]|length > 1 %}
<div class="download-form-group">
{% for arch in distro["archs"].keys() %}
<div>
<input id="arch-{{ release }}-{{ arch }}" type="radio" name="arch" value="{{ arch }}" {% if loop.index == 1 %}checked{% endif %}>
<label for="arch-{{ release }}-{{ arch }}">
Architettura {{ archs[arch] }}
</label>
</div>
{% endfor %}
</div>
{% else %}
<input type="hidden" name="arch" value="{{ distro["archs"].keys()|first }}">
{% endif %}
<div class="download-form-group">
<input id="torrent-{{ release }}" type="checkbox" name="torrent" value="1">
<label for="torrent-{{ release }}">
Scarica tramite torrent
</label>
</div>
<div class="download-form-buttons">
<button class="btn" type="submit">Download</button>
</div>
</form>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="page">
<div class="row">
<div class="col">
<h3>Requisiti di sistema</h3>
<p>
Se non sei sicuro che il tuo computer possa reggere
{{ distro["name"] }} ti consigliamo di controllare di
requisiti di sistema minimi. Nel caso disponessi di un
vecchio computer, puoi sempre provare una derivata più leggera!
</p>
<a class="btn" href="https://wiki.ubuntu-it.org/Installazione/RequisitiDiSistema">
Leggi i requisiti
</a>
</div>
<div class="col">
<h3>La comunità</h3>
<p>
{{ distro["name"] }} è creato e supportato da
volontari che dedicano il loro tempo a sviluppare un
sistema operativo migliore. Cosa aspetti a contribuire ed
aiutarci a realizzare qualcosa di innovativo? È facile!
</p>
<a class="btn" href="{{ url_for("pages.contribuisci_index") }}">
Inizia subito a contribuire
</a>
</div>
</div>
</div>
{% endblock %}
{# Source code of the Ubuntu-it website
# Copyright (C) 2016 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block title %}Grazie per aver scaricato {{ name }}{% endblock %}
{% block extra_header %}
<meta http-equiv="refresh" content="0; url={{ url }}">
{% endblock %}
{% block content %}
<div class="page">
<div class="row background-wallpaper {{ theme }}">
<div class="col text-center">
<h2>Grazie per aver scaricato {{ name }}!</h2>
<p>
Se il download non comincia entro pochi secondi <a href="{{ url }}">
clicca qui</a>.
</p>
</div>
</div>
</div>
<div class="page">
<div class="row">
<div class="col">
<h3>Come installare Ubuntu?</h3>
<p>
È la prima volta che installi Ubuntu o non ti ricordi tutti
i passaggi? Non ti preoccupare! Ubuntu-it dispone di una
vasta documentazione con tutti i dettagli necessari!
</p>
<a class="btn" href="https://wiki.ubuntu-it.org/Installazione">
Guida all'installazione
</a>
</div>
<div class="col">
<h3>Ottieni supporto</h3>
<p>
Problemi durante l'installazione? La comunità di Ubuntu-it
offre diversi strumenti di supporto, per aiutarti nel
miglior modo possibile.
</p>
<a class="btn" href="{{ url_for("pages.supporto") }}">
Strumenti di supporto
</a>
</div>
</div>
<div class="row">
<div class="col">
<h3>Controlla l'impronta</h3>
<p>
Se vuoi verificare l'integrità e la provenienza del file
scaricato, puoi controllare se l'impronta MD5 è la stessa
mostrata qui a destra.
</p>
<a class="btn" href="https://wiki.ubuntu-it.org/Installazione/MD5Sum">
Come controllare l'impronta
</a>
</div>
<div class="col col-center">
<pre>{{ md5 }}</pre>
</div>
</div>
</div>
{% endblock %}
......@@ -28,6 +28,8 @@
<link rel="stylesheet" href="https://static.ubuntu-it.org/fonts/ubuntu/include.min.css">
<link rel="stylesheet" href="https://static.ubuntu-it.org/themes/italy/theme.min.css">
<link rel="stylesheet" href="{{ url_for("static", filename="website.css") }}" />
{% block extra_header %}{% endblock %}
</head>
<body {% block extra_body %}{% endblock %}>
......@@ -54,37 +56,32 @@
<li><a href="https://planet.ubuntu-it.org">Planet</a></li>
</ul>
<ul class="right">
<li><a href="https://telegram.me/ubuntuit">Telegram</a></li>
<li><a href="https://www.youtube.com/ubuntuitpromozione">YouTube</a></li>
<li><a href="https://plus.google.com/+ubuntuit">Google+</a></li>
<li<a href="https://twitter.com/ubuntuit">Twitter</a></li>
<li><a href="https://www.facebook.com/ubuntu.it">Facebook</a></li>
<li><a href="https://twitter.com/ubuntuit">Twitter</a></li>
<li><a href="https://plus.google.com/+ubuntuit">Google+</a></li>
<li><a href="https://www.youtube.com/ubuntuitpromozione">YouTube</a></li>
<li><a href="https://telegram.me/ubuntuit">Telegram</a></li>
</ul>
</div>
</nav>
<nav class="main-navbar">
<div class="container">
<ul>
<li class="site-name"><a href="{{ url_for("pages.index") }}">ubuntu-it</a></li>
{% for item in _navbar[0] %}
{{ nav_item(item) }}
{% endfor %}
</ul>
</div>
</nav>
{% for navbar in _navbars %}
<nav {%- if loop.index == 1 %} class="main-navbar"{% endif %}>
<div class="container">
<ul>
{% if loop.index == 1 %}
<li class="site-name"><a href="{{ url_for("pages.index") }}">ubuntu-it</a></li>
{% endif -%}
{% if _navbar[1] %}
<nav>
<div class="container">
<ul>
{% for item in _navbar[1] %}
{{ nav_item(item) }}
{% endfor %}
</ul>
</div>
</nav>
{% endif %}
{%- for name, url, active in navbar %}
<li>
<a {%- if active %} class="active"{% endif %} href="{{ url }}">{{ name }}</a>
</li>
{% endfor %}
</ul>
</div>
</nav>
{% endfor %}
<div class="container">
{% block content %}{% endblock %}
......
......@@ -14,15 +14,3 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% macro nav_item(item) %}
<li>
{% if "external" in item %}
<a href="{{ item.external }}">{{ item.name }}</a>
{% elif item.active %}
<a href="{{ url_for(item.endpoint) }}" class="active">{{ item.name }}</a>
{% else %}
<a href="{{ url_for(item.endpoint) }}">{{ item.name }}</a>
{% endif %}
</li>
{% endmacro %}
{% extends "layout.html" %}
{% block title %}Desktop e server{% endblock %}
{% block content %}
<div class="row row-hero">
<div class="twelve-col last-col">
<p>
Questa pagina non è ancora stata creata.<br>
Se sei un membro del gruppo e vuoi lavorarci su, assegnati a te stesso
l'issue su GitLab e inizia subito!
</p>
<p>
Se non sei un membro ma desideri contribuire, cosa aspetti?
<a href="http://wiki.ubuntu-it.org/GruppoWeb/Contribuire">Scopri come aiutarci</a>!
<p><b>Il Gruppo Web di ubuntu-it</b></p>
</div>
</div>
{% endblock %}
{# Source code of the Ubuntu-it website
# Copyright (C) 2015 Pietro Albini <pietroalbini@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block title %}Download{% endblock %}
{% block content %}
<div class="page">
<div class="row">
<div class="col">
<h1>Scarica Ubuntu</h1>
<p class="intro">Entra subito nel mondo Ubuntu. Scaricalo ora!</p>
<p>
<a class="btn" href="{{ url_for("pages.download_desktop") }}">Desktop e portatili</a>
<a class="btn" href="#">Server</a>
<a class="btn" href="#">Prova una derivata</a>
</p>
</div>
<div class="col col-quarter col-center">
<img class="pictogram" src="https://static.ubuntu-it.org/pictograms/download.svg">
</div>
</div>
<div class="row background-wallpaper ubuntu">
<div class="col">
<h3>Necessiti di supporto?</h3>
<p>
Se hai difficoltà ad installare Ubuntu, oppure si sono verificati
problemi durante e dopo l'installazione, non preoccuparti!<br />
La comunità italiana di Ubuntu offre molteplici strumenti di supporto,
per aiutarti nel miglior modo possibile.
</p>
<a class="btn btn-inverse" href="{{ url_for("pages.supporto") }}">Ottieni supporto</a>
</div>
<div class="col">
<div class="box">
<h3 class="muted-heading">Hai difficoltà a scaricare Ubuntu?</h3>
<p>
In caso non riuscissi a scaricare Ubuntu, la comunità italiana è
disponibile ad inviarti un DVD direttamente a casa tua! Basta chiedere.
</p>
<div class="align-center">
<a class="btn" href="#">Richiedi un DVD</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<h3>Requisiti di sistema</h3>
<p>
Se non sei sicuro che il tuo computer possa reggere Ubuntu ti
consigliamo di controllare di requisiti di sistema minimi.<br />
Ed in caso disponessi di un vecchio computer, puoi sempre
provare una derivata più leggera!
</p>
<a class="btn" href="https://wiki.ubuntu-it.org/Installazione/RequisitiDiSistema">
Leggi i requisiti
</a>
</div>
<div class="col">
<h3>La comunità</h3>
<p>
Ubuntu è creato e supportato da volontari che dedicano il loro
tempo a sviluppare un sistema operativo migliore.<br />
Cosa aspetti a contribuire ed aiutarci a realizzare qualcosa di innovativo? È facile!
</p>
<a class="btn" href="#">Inizia subito a contribuire</a>
</div>
</div>
</div>
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment