Skip to content

Commit

Permalink
add footer and dmca notice
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Sep 17, 2024
1 parent c21a01a commit bf8ff67
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assets/src/js/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import themeSelector from "../lib/themeSelector";

function onLoad() {
themeSelector(document.querySelector('[data-toggle-theme]'));
document.body.style.display = 'block';
document.body.style.display = 'flex';
hideProgress();
bindAsync({
async fetch(f, url, fetchParams) {
Expand Down
4 changes: 4 additions & 0 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"github.com/webtor-io/web-ui-v2/services/web/donate"
"github.com/webtor-io/web-ui-v2/services/web/ext"
"github.com/webtor-io/web-ui-v2/services/web/legal"
"github.com/webtor-io/web-ui-v2/services/web/tests"
"net/http"

Expand Down Expand Up @@ -161,6 +162,9 @@ func serve(c *cli.Context) error {
// Setting ApiClaimsHandler
sapi.RegisterHandler(r)

// Setting Legal
legal.RegisterHandler(r, tm)

// Setting ResourceHandler
wr.RegisterHandler(r, tm, sapi, jobs)

Expand Down
5 changes: 5 additions & 0 deletions services/web/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os"
"reflect"
"strings"
"time"

"github.com/gin-gonic/gin"
"github.com/urfave/cli"
Expand Down Expand Up @@ -168,3 +169,7 @@ func NewAssetHashes(path string) *AssetHashes {
path: path,
}
}

func (s *Helper) Now() time.Time {
return time.Now()
}
27 changes: 27 additions & 0 deletions services/web/legal/handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package legal

import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/webtor-io/web-ui-v2/services/template"
)

type Handler struct {
tb template.Builder
}

func RegisterHandler(r *gin.Engine, tm *template.Manager) {
h := &Handler{
tb: tm.MustRegisterViews("legal/**/*").WithLayout("main"),
}

r.GET("/legal/*template", h.get)
}

type Data struct {
}

func (s *Handler) get(c *gin.Context) {
s.tb.Build("legal"+c.Param("template")).HTML(http.StatusOK, c, &Data{})
}
41 changes: 35 additions & 6 deletions templates/layouts/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,50 @@
{{- end }}
{{- template "head_extra" . }}
</head>
<body>
<body class="flex flex-col min-h-screen">
<script>document.body.style.display = 'none';</script>
<progress id="progress" class="progress fixed progress-accent h-1"></progress>
<header class="pb-3">
<nav async-get="/" async-layout="{{`{{ template "nav" . }}`}}">{{ template "nav" . }}</nav>
</header>
<div id="wrapper" class="flex flex-col w-full px-4 sm:px-8 items-center">
<div id="wrapper" class="flex flex-col w-full px-4 sm:px-8 items-center mb-5 sm:mb-10">
<div class="min-w-80 w-full max-w-3xl">
<main id="main" async-layout="{{`{{ template "main" . }}`}}">
{{ template "main" . }}
</main>
<footer>


</footer>
</div>
</div>
<div class="flex flex-col w-full px-4 sm:px-8 items-center bg-base-200 mt-auto">
<div class="min-w-80 w-full max-w-3xl">
<div>
<footer class="footer text-base-content p-5 mt-5">
<nav>
<h6 class="footer-title">Tools</h6>
<a class="link link-hover" href="/torrent-to-ddl" async-target="main">Torrent → DDL</a>
<a class="link link-hover" href="/magnet-to-ddl" async-target="main">Magnet → DDL</a>
<a class="link link-hover" href="/magnet-to-torrent" async-target="main">Magnet → Torrent</a>
</nav>
<nav>
<h6 class="footer-title">Resources</h6>
<a class="link link-hover" href="https://blog.webtor.io/en/post/" target="_blank">Blog</a>
<a class="link link-hover" href="https://github.com/webtor-io/" target="_blank">GitHub</a>
<a class="link link-hover" href="https://www.reddit.com/r/webtor/" target="_blank">Reddit</a>
<a class="link link-hover" href="https://github.com/webtor-io/player-sdk-js" target="_blank">SDK</a>
<a class="link link-hover" href="https://rapidapi.com/paveltatarsky-Dx4aX7s_XBt/api/webtor/">RapidAPI</a>
</nav>
<nav>
<h6 class="footer-title">Feedback</h6>
<a class="link link-hover" href="/support" async-target="main">Support</a>
</nav>
<nav>
<h6 class="footer-title">Legal</h6>
<a class="link link-hover" href="/legal/dmca" async-target="main">DMCA</a>
</nav>
</footer>
<footer class="px-5 py-4 border-t footer bg-base-200 text-base-content border-base-300">
<aside><p>Copyright © {{ now.UTC.Year }} Webtor.io</p></aside>
</footer>
</div>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{{ else if and (not $Args.File) (eq .Type "directory") }}
<li class="text-accent py-1 hover:text-accent-focus"><a href="/{{ $Resource.ID }}?pwd={{ .PathStr }}" async-target="main">{{ .Name }}</a></li>
{{ else if and ($Item) (eq .PathStr $Item.PathStr) }}
<li class="py-1 text-accent-focus"># {{ .Name }}</li>
<li class="py-1 text-accent-focus">> {{ .Name }}</li>
{{ else }}
<li class="text-accent py-1 hover:text-accent-focus"><a href="/{{ $Resource.ID }}?pwd={{ $List.ListItem.PathStr }}&file={{ .PathStr }}{{ if not (eq $Args.Page 1) }}&page={{ $Args.Page }}{{ end }}" async-target="main">{{ .Name }}</a></li>
{{ end }}
Expand Down
16 changes: 16 additions & 0 deletions templates/views/legal/dmca.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ define "main" }}
<h2 class="text-2xl font-bold text-accent">DMCA</h2>
<p class="py-3 text-justify"><strong>Webtor.io</strong> respects the intellectual property of others. <strong>Webtor.io</strong> takes matters of Intellectual Property very seriously and is committed to meeting the needs of content owners while helping them manage publication of their content online.</p>
<p class="py-3 text-justify">It should be noted that <strong>Webtor.io</strong> is a simple search engine of videos available at a wide variety websites.
If you believe that your copyrighted work has been copied in a way that constitutes copyright infringement and is accessible on this site, you may notify our copyright agent, as set forth in the Digital Millennium Copyright Act of 1998 (DMCA). For your complaint to be valid under the DMCA, you must provide the following information when providing notice of the claimed copyright infringement:</p>
<p class="py-3 text-justify">A physical or electronic signature of a person authorized to act on behalf of the copyright owner Identification of the copyrighted work claimed to have been infringed
Identification of the material that is claimed to be infringing or to be the subject of the infringing activity and that is to be removed
Information reasonably sufficient to permit the service provider to contact the complaining party, such as an address, telephone number, and, if available, an electronic mail address
A statement that the complaining party "in good faith believes that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or law"
A statement that the "information in the notification is accurate", and "under penalty of perjury, the complaining party is authorized to act on behalf of the owner of an exclusive right that is allegedly infringed"
The above information must be submitted as a written, faxed or emailed notification to the following Designated Agent:</p>
<p class="py-3 text-justify">Attn: DMCA Office</p>
<p class="py-3 text-justify">Contact Us : <a href="/support" class="link" async-target="main">{{ domain }}/support</a></p>
<p class="py-3 text-justify font-bold">WE CAUTION YOU THAT UNDER FEDERAL LAW, IF YOU KNOWINGLY MISREPRESENT THAT ONLINE MATERIAL IS INFRINGING, YOU MAY BE SUBJECT TO HEAVY CIVIL PENALTIES. THESE INCLUDE MONETARY DAMAGES, COURT COSTS, AND ATTORNEYS FEES INCURRED BY US, BY ANY COPYRIGHT OWNER, OR BY ANY COPYRIGHT OWNER'S LICENSEE THAT IS INJURED AS A RESULT OF OUR RELYING UPON YOUR MISREPRESENTATION. YOU MAY ALSO BE SUBJECT TO CRIMINAL PROSECUTION FOR PERJURY.</p>
<p class="py-3 text-justify">This information should not be construed as legal advice, for further details on the information required for valid DMCA notifications, see 17 U.S.C. 512(c)(3).</p>
{{ end }}

0 comments on commit bf8ff67

Please sign in to comment.