diff --git a/globals.php b/globals.php index 9be8703..14d28eb 100644 --- a/globals.php +++ b/globals.php @@ -39,29 +39,57 @@ function get_page_header( $script_str .= ''; } + $home_link = get_icon_link( + 'index.php', + 'Home', + 'home', + 'homelink' + ); + $new_poll_link = get_icon_link( + 'new_poll.php', + 'New Poll', + 'plus', + 'newpolllink' + ); + return ''.$title.'' . $script_str . '
' - . '
' - . file_get_contents(__DIR__.'/icons/home.svg') - . 'Home
' - . '
' - . file_get_contents(__DIR__.'/icons/plus.svg') - . 'New Poll
' + . $home_link + . $new_poll_link . $greeting . '
' . $logout_link . '
'; } +function get_icon_link(string $href, string $label, string $icon, string $class) +{ + return '' + . '
' + . file_get_contents(__DIR__.'/icons/'.$icon.'.svg') + . ''.$label.'
'; +} + function get_page_footer() { $version = json_decode(file_get_contents(__DIR__ . '/composer.json'), true)['version']; + $repo_link = get_icon_link( + 'https://phlaym.net/git/phlaym/Dragonpolls', + 'Source Code', + 'src', + 'sourcecode' + ); + $issues_link = get_icon_link( + 'https://github.com/hutattedonmyarm/Dragonpolls/issues', + 'Issues', + 'issues', + 'issues' + ); return '
'; } diff --git a/icons/issues.svg b/icons/issues.svg new file mode 100644 index 0000000..5be7d53 --- /dev/null +++ b/icons/issues.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/styles/style.css b/styles/style.css index 0964a98..c832191 100644 --- a/styles/style.css +++ b/styles/style.css @@ -27,6 +27,10 @@ a svg { stroke-width: 0.5em; } +a svg .filled { + fill: var(--main-accent-color); +} + body { background: var(--main-bg-color); color: var(--main-fg-color);