Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE.org Applications Subsite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Websites
KDE.org Applications Subsite
Commits
7ace4ceb
Commit
7ace4ceb
authored
Jul 14, 2020
by
Carl Schwan
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hreflang and fix some urls
parent
c0ad3441
Pipeline
#27113
passed with stage
in 3 minutes and 47 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
6 deletions
+41
-6
src/Controller/MainController.php
src/Controller/MainController.php
+6
-2
templates/base.html.twig
templates/base.html.twig
+3
-0
templates/main/application.html.twig
templates/main/application.html.twig
+8
-1
templates/main/applicationDevelopment.html.twig
templates/main/applicationDevelopment.html.twig
+8
-1
templates/main/category.html.twig
templates/main/category.html.twig
+8
-1
templates/main/index.html.twig
templates/main/index.html.twig
+8
-1
No files found.
src/Controller/MainController.php
View file @
7ace4ceb
...
...
@@ -65,7 +65,8 @@ class MainController extends AbstractController
if
(
$categoryObject
)
{
return
$this
->
render
(
'main/category.html.twig'
,
[
'category'
=>
$categoryObject
,
'locale'
=>
$_locale
'locale'
=>
$_locale
,
'translations'
=>
$this
->
getParameter
(
'app.translations'
),
]);
}
$applicationObj
=
AppData
::
fromBinary
(
$category
);
...
...
@@ -76,6 +77,7 @@ class MainController extends AbstractController
'_locale'
=>
$_locale
,
'category'
=>
strtolower
(
$applicationObj
->
getPrimaryCategory
()),
'application'
=>
$applicationObj
->
getId
(),
'translations'
=>
$this
->
getParameter
(
'app.translations'
),
]);
}
...
...
@@ -105,7 +107,8 @@ class MainController extends AbstractController
return
$this
->
render
(
'main/application.html.twig'
,
[
'application'
=>
$applicationObj
,
'category'
=>
$category
,
'locale'
=>
$_locale
'locale'
=>
$_locale
,
'translations'
=>
$this
->
getParameter
(
'app.translations'
),
]);
}
...
...
@@ -129,6 +132,7 @@ class MainController extends AbstractController
'application'
=>
$application
,
'category'
=>
$category
,
'locale'
=>
$_locale
,
'translations'
=>
$this
->
getParameter
(
'app.translations'
),
]);
}
}
templates/base.html.twig
View file @
7ace4ceb
...
...
@@ -49,6 +49,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{%
endfor
%}
{%
endblock
%}
<link
href=
"https://cdn.kde.org/breeze-icons/icons.css"
rel=
"stylesheet"
/>
{%
block
hreflang
%}
{%
endblock
%}
</head>
<body>
<header
id=
"KGlobalHeader"
class=
"header clearfix"
>
...
...
templates/main/application.html.twig
View file @
7ace4ceb
...
...
@@ -11,7 +11,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{%
block
title
%}{{
name
}}{%
endblock
%}
{%
block
description
%}{{
application.summary
|
l10n
(
locale
)
}}{%
endblock
%}
{%
block
image
%}{%
if
application.screenshots
|
length
>
0
%}{{
application.screenshots
[
0
]
.
sourceImage
}}{%
else
%}
https://kde.org/products/apps.png
{%
endif
%}{%
endblock
%}
{%
block
canonical
%}{{
app.request.getSchemeAndHttpHost
~
"/applications"
~
path
(
'app_main_application_intl'
,
{
'_locale'
:
locale
,
'category'
:
category
,
'application'
:
application.id
}
)
}}{%
endblock
%}
{%
block
canonical
%}
https://kde.org
{{
path
(
'app_main_application_intl'
,
{
'_locale'
:
locale
,
'category'
:
category
,
'application'
:
application.id
}
)
}}{%
endblock
%}
{%
block
hreflang
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_application_intl'
,
{
'_locale'
:
'en'
,
'category'
:
category
|
lower
,
'application'
:
application.id
}
)
}}
"
hreflang=
"en"
/>
{%
for
translation
in
translations
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_application_intl'
,
{
'_locale'
:
translation
,
'category'
:
category
,
'application'
:
application.id
}
)
}}
"
hreflang=
"
{{
translation
}}
"
/>
{%
endfor
%}
{%
endblock
%}
{%
block
body
%}
<main
itemscope
itemtype=
"http://schema.org/SoftwareApplication"
>
...
...
templates/main/applicationDevelopment.html.twig
View file @
7ace4ceb
...
...
@@ -11,7 +11,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{%
block
title
%}{{
name
}}
- Developmnt information
{%
endblock
%}
{%
block
description
%}{{
application.summary
|
l10n
(
locale
)
}}{%
endblock
%}
{%
block
image
%}{%
if
application.screenshots
|
length
>
0
%}{{
application.screenshots
[
0
]
.
sourceImage
}}{%
else
%}
https://kde.org/products/apps.png
{%
endif
%}{%
endblock
%}
{%
block
canonical
%}{{
app.request.getSchemeAndHttpHost
~
"/applications"
~
path
(
'app_main_application_dev_intl'
,
{
'_locale'
:
locale
,
'category'
:
category
,
'application'
:
application.id
}
)
}}{%
endblock
%}
{%
block
canonical
%}
https://kde.org
{{
path
(
'app_main_application_dev_intl'
,
{
'_locale'
:
locale
,
'category'
:
category
,
'application'
:
application.id
}
)
}}{%
endblock
%}
{%
block
hreflang
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_application_dev_intl'
,
{
'_locale'
:
"en"
,
'category'
:
category
|
lower
,
'application'
:
application.id
}
)
}}
"
hreflang=
"en"
/>
{%
for
translation
in
translations
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_application_dev_intl'
,
{
'_locale'
:
translation
,
'category'
:
category
|
lower
,
'application'
:
application.id
}
)
}}
"
hreflang=
"
{{
translation
}}
"
/>
{%
endfor
%}
{%
endblock
%}
{%
block
body
%}
<main>
...
...
templates/main/category.html.twig
View file @
7ace4ceb
...
...
@@ -9,9 +9,16 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{%
block
title
%}{{
category.name
}}{%
endblock
%}
{%
block
description
%}{%
endblock
%}
{%
block
image
%}
https://kde.org/products/apps.png
{%
endblock
%}
{%
block
canonical
%}
{{
app.request.getSchemeAndHttpHost
~
"/applications"
~
path
(
'app_main_category_intl'
,
{
'_locale'
:
locale
,
'category'
:
category.name
|
lower
}
)
}}{%
endblock
%}
{%
block
canonical
%}
https://kde.org
{{
path
(
'app_main_category_intl'
,
{
'_locale'
:
locale
,
'category'
:
category.name
|
lower
}
)
}}{%
endblock
%}
{%
block
imageSize
%}
summary
{%
endblock
%}
{%
block
hreflang
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_category_intl'
,
{
'_locale'
:
"en"
,
'category'
:
category.name
|
lower
}
)
}}
"
hreflang=
"en"
/>
{%
for
translation
in
translations
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_category_intl'
,
{
'_locale'
:
translation
,
'category'
:
category.name
|
lower
}
)
}}
"
hreflang=
"
{{
translation
}}
"
/>
{%
endfor
%}
{%
endblock
%}
{%
block
body
%}
<main
class=
"container"
>
<h1><a
href=
"
{{
path
(
'app_main_index'
,
{
'_locale'
:
locale
}
)
}}
"
>
...
...
templates/main/index.html.twig
View file @
7ace4ceb
...
...
@@ -9,9 +9,16 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{%
block
title
%}{%
trans
%}
KDE's Applications
{%
endtrans
%}{%
endblock
%}
{%
block
description
%}{%
trans
%}
KDE is a community of friendly people who create over 200 apps which run on any Linux desktop, and often other platforms too. Here is the complete list.
{%
endtrans
%}{%
endblock
%}
{%
block
image
%}
https://kde.org/products/apps.png
{%
endblock
%}
{%
block
canonical
%}
{{
app.request.getSchemeAndHttpHost
}}
/applications/
{%
endblock
%}
{%
block
canonical
%}
https://kde.org
{{
path
(
'app_main_index'
,
{
'_locale'
:
locale
}
)
}}
{%
endblock
%}
{%
block
imageSize
%}
summary
{%
endblock
%}
{%
block
hreflang
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_index'
,
{
'_locale'
:
"en"
}
)
}}
"
hreflang=
"en"
/>
{%
for
translation
in
translations
%}
<link
rel=
"alternate"
href=
"https://kde.org
{{
path
(
'app_main_index'
,
{
'_locale'
:
translation
}
)
}}
"
hreflang=
"
{{
translation
}}
"
/>
{%
endfor
%}
{%
endblock
%}
{%
block
body
%}
<main
class=
"container"
>
<h1>
{{
block
(
'title'
)
}}
</h1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment