Skip to content

Commit

Permalink
feat(logo): add project logo
Browse files Browse the repository at this point in the history
  • Loading branch information
VovanR committed Jul 3, 2021
1 parent 6653ba0 commit 92a2596
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# hour-to-chinese-zodiac

<img align="right" width="120" height="120"
src="./logo.svg" alt="Hour to Chinese zodiac logo">

[![Commitizen friendly][commitizen-image]][commitizen-url]
[![XO code style][codestyle-image]][codestyle-url]

Expand Down
Binary file added example/favicon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<title>hour-to-chinese-zodiac</title>
<meta name="description" content="Convert hour to chinese zodiac name: 8 → 'dragon'">


<link rel="icon" href="favicon.ico" />
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="manifest" href="site.webmanifest" />

<link rel="stylesheet" href="style.css">
</head>
<body class="converter">
Expand Down
33 changes: 33 additions & 0 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Convert hour to chinese zodiac name
*
* @param {number|string} hour
* @return {string} chinese zodiac name
*
* @example
* hourToChineseZodiac(8);
* //=> 'dragon'
*/
function hourToChineseZodiac(hour) {
if ((!hour && hour !== 0) || hour > 24) {
return '';
}

/* eslint-disable indent, no-multi-spaces, unicorn/no-nested-ternary */
return hour > 22 ? 'rat' :
hour > 20 ? 'pig' :
hour > 18 ? 'dog' :
hour > 16 ? 'rooster' :
hour > 14 ? 'monkey' :
hour > 12 ? 'goat' :
hour > 10 ? 'horse' :
hour > 8 ? 'snake' :
hour > 6 ? 'dragon' :
hour > 4 ? 'rabbit' :
hour > 2 ? 'tiger' :
hour > 0 ? 'ox' :
'rat';
/* eslint-enable indent, no-multi-spaces, unicorn/no-nested-ternary */
}

module.exports = hourToChineseZodiac;
16 changes: 16 additions & 0 deletions example/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/logo192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/logo512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions example/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
25 changes: 25 additions & 0 deletions example/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Hour to Chinese zodiac",
"short_name": "Hour to Chinese zodiac",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
16 changes: 16 additions & 0 deletions logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 92a2596

Please sign in to comment.