From c3ff742bd51206dcc34ee90918459708648fb366 Mon Sep 17 00:00:00 2001 From: Karl0ss Date: Tue, 25 Oct 2022 15:52:08 +0100 Subject: [PATCH] pug templates --- public/style.css | 151 +++++++++++++++++++++++++++++++++++++++++++ views/addshow.pug | 17 +++++ views/index.pug | 18 ++++++ views/layout.pug | 13 ++++ views/logs.pug | 11 ++++ views/removeshow.pug | 15 +++++ views/shows.pug | 19 ++++++ 7 files changed, 244 insertions(+) create mode 100644 public/style.css create mode 100644 views/addshow.pug create mode 100644 views/index.pug create mode 100644 views/layout.pug create mode 100644 views/logs.pug create mode 100644 views/removeshow.pug create mode 100644 views/shows.pug diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000..7cf070f --- /dev/null +++ b/public/style.css @@ -0,0 +1,151 @@ +@import url("https://fonts.googleapis.com/css?family=Raleway:800|Merriweather+Sans|Share+Tech+Mono"); + +:root { + --ui-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06), + 0 4px 5px 0 rgba(0, 0, 0, 0.06), 0 1px 10px 0 rgba(0, 0, 0, 0.08); + fill: rgba(0, 0, 0, 0.54); + --ui-shadow-border: 1px solid rgba(0, 0, 0, 0.14); +} + +* { + box-sizing: border-box; +} + +html, +body, +#root { + height: 100%; + width: 100%; +} + +body { + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(255, 255, 255, 0); +} + +h1, +h2, +h3 { + font-family: "Raleway", sans-serif; + text-transform: uppercase; + + padding: 0; + margin: 0; + + color: #2a3747; +} + +h1 { + font-size: 40px; +} + +a { + color: inherit; + text-decoration: none; + cursor: pointer; + user-select: none; +} + +#root { + display: flex; + flex-direction: column; +} + +.View { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + + height: 100%; + width: 100%; + + padding: 20px; + + background-size: cover; + + font-family: "Merriweather Sans", sans-serif; +} + +.Banner { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + width: 100%; + + border-radius: 5px; + + overflow: hidden; + background: white; + padding: 15px; + + font-family: "Share Tech Mono", monospace; + + border-bottom: var(--ui-shadow-border); + box-shadow: var(--ui-shadow); +} + +.Message { + background: white; + padding: 30px; + border-bottom: var(--ui-shadow-border); + box-shadow: var(--ui-shadow); +} + +.Message > .Title { + padding-bottom: 20px; +} + +.Message > .Details { + display: flex; + flex-direction: column; + line-height: 1.5em; +} + +.NavButtons { + display: flex; + width: 100%; + justify-content: space-around; + align-items: center; + padding: 0 20px; +} + +.NavButton { + display: flex; + justify-content: center; + align-items: center; + + height: 55px; + width: 150px; + + background: #fa4141; + + border-radius: 30px; + + font-size: 16px; + font-weight: bold; + color: white; + + text-transform: capitalize; + + border-bottom: var(--ui-shadow-border); + box-shadow: var(--ui-shadow); +} + +th { + text-align: left; + +} + +td { border-left: 1px solid #000; + border-right: 1px solid #000; +} \ No newline at end of file diff --git a/views/addshow.pug b/views/addshow.pug new file mode 100644 index 0000000..3bf8c4c --- /dev/null +++ b/views/addshow.pug @@ -0,0 +1,17 @@ +extends layout + +block layout-content + div.View + h1.Banner Add Show + div.Message + form(action="/addNewShow" method="POST") + p Show Name: + input(type="text" name="showName" placeholder="Enter the show to track ") + p Quality: + select(name="quality") + option(value='720') #{'720p'} + option(value='1080') #{'1080p'} + input(type="submit", value="Add Show") + div.NavButtons + a(href="/") + div.NavButton Home \ No newline at end of file diff --git a/views/index.pug b/views/index.pug new file mode 100644 index 0000000..12317a5 --- /dev/null +++ b/views/index.pug @@ -0,0 +1,18 @@ +extends layout + +block layout-content + div.View + h1.Banner JDRssDownloader #{version} + body + div.Message + h3 Number of Tracked Shows + h1 #{showListLength} + div.NavButtons + a(href="/shows") + div.NavButton Show List + a(href="/shows/add") + div.NavButton Add New Show + a(href="/shows/remove") + div.NavButton Remove Show + a(href="/logs") + div.NavButton Logs \ No newline at end of file diff --git a/views/layout.pug b/views/layout.pug new file mode 100644 index 0000000..508cfc0 --- /dev/null +++ b/views/layout.pug @@ -0,0 +1,13 @@ +block variables +doctype html +html + head + meta(charset="utf-8") + link(rel="shortcut icon", href="/favicon.ico") + meta(name="viewport", content="width=device-width, initial-scale=1, shrink-to-fit=no") + meta(name="theme-color", content="#000000") + title #{title} | JDRssDownloader + link(rel="stylesheet" href="/style.css") + body + div#root + block layout-content \ No newline at end of file diff --git a/views/logs.pug b/views/logs.pug new file mode 100644 index 0000000..4b6b7d9 --- /dev/null +++ b/views/logs.pug @@ -0,0 +1,11 @@ +extends layout + +block layout-content + div.View + h1.Banner Log File + div.body + each val in logFile + li= val + div.NavButtons + a(href="/") + div.NavButton Home \ No newline at end of file diff --git a/views/removeshow.pug b/views/removeshow.pug new file mode 100644 index 0000000..644cafe --- /dev/null +++ b/views/removeshow.pug @@ -0,0 +1,15 @@ +extends layout + +block layout-content + div.View + h1.Banner Remove Show + div.Message + form(action="/removeShow" method="POST") + p Show Name: + select(name="showName") + each show in showList + option(value=show.Name) #{show.Name} + input(type="submit", value="Remove Show") + div.NavButtons + a(href="/") + div.NavButton Home \ No newline at end of file diff --git a/views/shows.pug b/views/shows.pug new file mode 100644 index 0000000..a4cb3e7 --- /dev/null +++ b/views/shows.pug @@ -0,0 +1,19 @@ +extends layout + +block layout-content + div.View + h1.Banner Show List + div.Message + table + thead + tr + th Show Name + th Quality + tbody + each val, key in showList + tr + td= val.Name + td= val.Quality + div.NavButtons + a(href="/") + div.NavButton Home \ No newline at end of file