Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
anchor-theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tetras-libre
anchor-theme
Commits
fe6b88fe
Unverified
Commit
fe6b88fe
authored
8 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
simpler social networks
parent
4718b9dd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
footer.php
+1
-17
1 addition, 17 deletions
footer.php
functions.php
+22
-12
22 additions, 12 deletions
functions.php
img/mastodon.png
+0
-0
0 additions, 0 deletions
img/mastodon.png
with
23 additions
and
29 deletions
footer.php
+
1
−
17
View file @
fe6b88fe
...
@@ -6,23 +6,7 @@
...
@@ -6,23 +6,7 @@
<?php
echo
html_meta
(
'legal_informations'
);
?>
<?php
echo
html_meta
(
'legal_informations'
);
?>
</div>
</div>
<div
class=
"half-right"
>
<div
class=
"half-right"
>
<ul
class=
"navigation"
>
<?php
social_list
(
"class=navigation"
)
?>
<?php
if
(
site_meta
(
'mail'
,
''
))
:
?>
<li><a
href=
"
<?php
echo
social_url
(
'mail'
);
?>
"
>
<?php
echo
social_logo
(
'mail'
)
.
' '
.
site_meta
(
'mail'
,
''
);
?>
</a></li>
<?php
endif
;
?>
<?php
if
(
site_meta
(
'github'
,
''
))
:
?>
<li><a
href=
"
<?php
echo
social_url
(
'github'
);
?>
"
>
<?php
echo
social_logo
(
'github'
)
.
' '
.
site_meta
(
'github'
,
''
);
?>
</a></li>
<?php
endif
;
?>
<?php
if
(
site_meta
(
'framasphere'
,
''
))
:
?>
<li><a
href=
"
<?php
echo
social_url
(
'framasphere'
);
?>
"
>
<?php
echo
social_logo
(
'framasphere'
)
.
' '
.
site_meta
(
'framasphere'
,
''
);
?>
</a></li>
<?php
endif
;
?>
<?php
if
(
site_meta
(
'facebook'
,
''
))
:
?>
<li><a
href=
"
<?php
echo
social_url
(
'facebook'
);
?>
"
>
<?php
echo
social_logo
(
'facebook'
)
.
' '
.
site_meta
(
'facebook'
,
''
);
?>
</a></li>
<?php
endif
;
?>
<?php
if
(
site_meta
(
'twitter'
,
''
))
:
?>
<li><a
href=
"
<?php
echo
social_url
(
'twitter'
);
?>
"
>
<?php
echo
social_logo
(
'twitter'
)
.
' '
.
site_meta
(
'twitter'
,
''
);
?>
</a></li>
<?php
endif
;
?>
</ul>
</div>
</div>
<div
class=
"half-right"
>
<div
class=
"half-right"
>
<ul
class=
"navigation"
>
<ul
class=
"navigation"
>
...
...
This diff is collapsed.
Click to expand it.
functions.php
+
22
−
12
View file @
fe6b88fe
...
@@ -64,25 +64,35 @@ function html_meta($key) {
...
@@ -64,25 +64,35 @@ function html_meta($key) {
echo
$output
;
echo
$output
;
}
}
function
social_url
(
$network
)
{
function
social_logo
(
$network
)
{
$img
=
theme_url
(
"img/
$network
.png"
);
return
"<img height=
\"
20
\"
width=
\"
20
\"
src=
\"
$img
\"
alt=
\"
$network
/
\"
/>"
;
}
function
social_account
(
$network
)
{
if
(
$network
==
"framasphere"
){
return
site_meta
(
$network
.
'_id'
,
''
);
}
return
site_meta
(
$network
,
''
);
}
function
social_list
(
$properties
)
{
$NETWORKS_URLS
=
array
(
$NETWORKS_URLS
=
array
(
'mail'
=>
'mailto:'
,
'github'
=>
'https://github.com/'
,
'github'
=>
'https://github.com/'
,
'framasphere'
=>
'https://framasphere.org/people/'
,
'framasphere'
=>
'https://framasphere.org/people/'
,
'mastodon'
=>
'https://framapiaf.org/'
,
'facebook'
=>
'https://facebook.com/'
,
'facebook'
=>
'https://facebook.com/'
,
'twitter'
=>
'https://twitter.com/'
,
'twitter'
=>
'https://twitter.com/'
,
'mail'
=>
'mailto:'
,
);
);
if
(
$network
==
"framasphere"
){
echo
"<ul "
.
$properties
.
">"
;
$account
=
site_meta
(
$network
.
'_id'
,
''
);
foreach
(
$NETWORKS_URLS
as
$network
=>
$network_url
){
}
else
{
if
(
site_meta
(
$network
,
''
)){
$account
=
site_meta
(
$network
,
''
);
echo
'<li><a href="'
.
$network_url
.
social_account
(
$network
)
.
'">'
.
social_logo
(
$network
)
.
' '
.
site_meta
(
$network
,
''
)
.
'</a></li>'
;
}
}
return
$NETWORKS_URLS
[
$network
]
.
$account
;
}
}
echo
"</ul>"
;
function
social_logo
(
$network
)
{
$img
=
theme_url
(
"img/
$network
.png"
);
return
"<img height=
\"
20
\"
width=
\"
20
\"
src=
\"
$img
\"
alt=
\"
$network
/
\"
/>"
;
}
}
function
total_articles
()
{
function
total_articles
()
{
...
...
This diff is collapsed.
Click to expand it.
img/mastodon.png
0 → 100644
+
0
−
0
View file @
fe6b88fe
20.2 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment