Popular New Releases in Sitemap
laravel-sitemap
6.1.0
next-sitemap
sitemap.js
7.1.1
laravel-sitemap
v8.0.1
django-robots
5.0 - including django 4 support
Popular Libraries in Sitemap
by spatie php
1573 MIT
Create and generate sitemaps with ease
by iamvishnusankar typescript
1439 MIT
Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages.
by ekalinin typescript
1363 MIT
Sitemap-generating framework for node.js
by Laravelium php
1284 NOASSERTION
Laravelium Sitemap generator for Laravel.
by jekyll ruby
786 MIT
Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site
by samdark php
471 BSD-3-Clause
Sitemap and sitemap index builder
by IlusionDev typescript
436 MIT
Generate sitemap.xml from nextjs pages
by jazzband python
360 BSD-3-Clause
A Django app for managing robots.txt files following the robots exclusion protocol
by tackk php
330 MIT
A PHP sitemap generation tool.
Trending New libraries in Sitemap
by iamvishnusankar typescript
1439 MIT
Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages.
by ifiokjr typescript
191 MIT
Gatsby Plugin Next SEO is a plug in that makes managing your SEO easier in Gatsby projects.
by SergeyMyssak typescript
51
Generate dynamic sitemap.xml for Next.js projects (support dynamic routes and localization)!
by cdeleeuwe javascript
48
Automatically submit your sitemap after production build
by edg-l rust
16 MIT
A rust library to generate sitemaps.
by MarcGuiselin javascript
15 MIT
Redirect Cortana and Bing
by hbish go
15 MIT
A blazing fast CLI application that processes sitemaps in golang.
by jalenchuh python
14 MIT
🚀 自动提取 sitemap 中的链接,并利用 API 进行推送,提升网站收录速度。
by EngincanV csharp
14 MIT
This package helps you to add meta-tags, sitemap.xml and robots.txt into your project easily.
Top Authors in Sitemap
1
3 Libraries
7
2
3 Libraries
220
3
2 Libraries
5
4
2 Libraries
34
5
2 Libraries
24
6
2 Libraries
1427
7
2 Libraries
15
8
2 Libraries
100
9
2 Libraries
38
10
2 Libraries
38
1
3 Libraries
7
2
3 Libraries
220
3
2 Libraries
5
4
2 Libraries
34
5
2 Libraries
24
6
2 Libraries
1427
7
2 Libraries
15
8
2 Libraries
100
9
2 Libraries
38
10
2 Libraries
38
Trending Kits in Sitemap
No Trending Kits are available at this moment for Sitemap
Trending Discussions on Sitemap
How to parse a sitemap index that has compressed links
Golang reads html tags (<>) from JSON string data as &lt and &gt which causes rendering issues in the browser
Php Dynamic Sitemap After 50K Url
Unable to parse any XML input. Error on line 5: The reference to entity "utm_medium"
.htaccess Open main page if file or folder doesn't exist, but keep URL + URL Routing
How to res.sendFile() a file that is in a different directory for Express.js webapp?
How to benefit from tree-shaking and code-splitting while loading JSON in Nuxt?
How to set Home page and static files in same path
How do I make my fixed sidebar scroll up as the footer comes up
Nginx Php-fpm 7.3 Can't read PHP files from a particular folder
QUESTION
How to parse a sitemap index that has compressed links
Asked 2022-Apr-01 at 14:32I've made a program that reads the /robots.txt and the /sitemap.xml of a page and substracts the available sitemaps and stores them on the siteMapsUnsorted
list.
Once there I use crawler-commons library to analyze if the links are SiteMaps or SiteMapIndexes (cluster of SiteMaps).
When I use it on a normal siteMapIndex it works, the problem occurs in some cases where bigger sites have the list of SiteMapIndexes on a compressed format, e.g:
- Compressed sitemapIndex: http://tripadvisor-sitemaps.s3-website-us-east-1.amazonaws.com/2/es/sitemap_es_index.xml
- Normal sitemapIndex: https://www.infolibre.es/sitemap_index_382e2.xml
The code I'm using:
1SiteMapParser sitemapParser = new SiteMapParser();
2
3for (String sitemapURLStr : siteMapsUnsorted) {
4 AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap(new URL(sitemapURLStr));
5//AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap("xml", content , new URL(sitemapURLStr));
6
7 // Check if the elements inside the list are SiteMapIndexes or SiteMaps, if they are SiteMapINDEXES, we need to break them down into SiteMaps
8 if (siteMapCandidate instanceof SiteMapIndex){
9 SiteMapIndex siteMapIndex = (SiteMapIndex) siteMapCandidate;
10
11 for (AbstractSiteMap aSiteMap : siteMapIndex.getSitemaps()){
12 if (aSiteMap instanceof SiteMap){
13 String siteMapString = aSiteMap.getUrl().toString();
14 System.out.println(siteMapString);
15 siteMaps.add(siteMapString);
16 } else{
17 LOG.warn("ignoring site map index inside site map index: " + aSiteMap.getUrl());
18 }
19 }
20 }
21 // If the elements inside the list are individual SiteMaps we add them to the SiteMaps list
22 else {
23 siteMaps.add(siteMapCandidate.getUrl().toString());
24 }
25}
26
I've noticed that the method parseSitemap changes depending the parameters you pass to it, but after trying multiple times I couldnt find a way to handle the compressed elements.
My last alternative would be to program a method that downloads every .tar.gz, decompresses it, reads the decompressed list of links, store them and finally deletes the directory; but that would be extremelly slow and inefficient, so first I came here to see if anyone has a better idea/could help me with the parseSitemap().
Thanks to anyone helping in advance.
ANSWER
Answered 2022-Apr-01 at 14:32The reason this is failing is that Tripadvisor doesn't set the correct mime type on its sitemaps:
1SiteMapParser sitemapParser = new SiteMapParser();
2
3for (String sitemapURLStr : siteMapsUnsorted) {
4 AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap(new URL(sitemapURLStr));
5//AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap("xml", content , new URL(sitemapURLStr));
6
7 // Check if the elements inside the list are SiteMapIndexes or SiteMaps, if they are SiteMapINDEXES, we need to break them down into SiteMaps
8 if (siteMapCandidate instanceof SiteMapIndex){
9 SiteMapIndex siteMapIndex = (SiteMapIndex) siteMapCandidate;
10
11 for (AbstractSiteMap aSiteMap : siteMapIndex.getSitemaps()){
12 if (aSiteMap instanceof SiteMap){
13 String siteMapString = aSiteMap.getUrl().toString();
14 System.out.println(siteMapString);
15 siteMaps.add(siteMapString);
16 } else{
17 LOG.warn("ignoring site map index inside site map index: " + aSiteMap.getUrl());
18 }
19 }
20 }
21 // If the elements inside the list are individual SiteMaps we add them to the SiteMaps list
22 else {
23 siteMaps.add(siteMapCandidate.getUrl().toString());
24 }
25}
26$ curl --head https://www.tripadvisor.es/sitemap/2/es/sitemap-1662847-es-articles-1644753222.xml.gz
27...
28content-type: text/plain; charset=utf-8
29
and the library that are using only decodes with gzip when the content type is one of:
1SiteMapParser sitemapParser = new SiteMapParser();
2
3for (String sitemapURLStr : siteMapsUnsorted) {
4 AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap(new URL(sitemapURLStr));
5//AbstractSiteMap siteMapCandidate = sitemapParser.parseSiteMap("xml", content , new URL(sitemapURLStr));
6
7 // Check if the elements inside the list are SiteMapIndexes or SiteMaps, if they are SiteMapINDEXES, we need to break them down into SiteMaps
8 if (siteMapCandidate instanceof SiteMapIndex){
9 SiteMapIndex siteMapIndex = (SiteMapIndex) siteMapCandidate;
10
11 for (AbstractSiteMap aSiteMap : siteMapIndex.getSitemaps()){
12 if (aSiteMap instanceof SiteMap){
13 String siteMapString = aSiteMap.getUrl().toString();
14 System.out.println(siteMapString);
15 siteMaps.add(siteMapString);
16 } else{
17 LOG.warn("ignoring site map index inside site map index: " + aSiteMap.getUrl());
18 }
19 }
20 }
21 // If the elements inside the list are individual SiteMaps we add them to the SiteMaps list
22 else {
23 siteMaps.add(siteMapCandidate.getUrl().toString());
24 }
25}
26$ curl --head https://www.tripadvisor.es/sitemap/2/es/sitemap-1662847-es-articles-1644753222.xml.gz
27...
28content-type: text/plain; charset=utf-8
29private static String[] GZIP_MIMETYPES = new String[] {
30 "application/gzip",
31 "application/gzip-compressed",
32 "application/gzipped",
33 "application/x-gzip",
34 "application/x-gzip-compressed",
35 "application/x-gunzip",
36 "gzip/document"
37};
38
You could probably work around this by implementing better detection of gzip and xml (like the URL ends in .xml.gz
) and call the processGzippedXML
method directly after downloading the sitemap to a byte[]
.
QUESTION
Golang reads html tags (<>) from JSON string data as &lt and &gt which causes rendering issues in the browser
Asked 2022-Mar-19 at 18:45I have a basic web server that renders blog posts from a database of JSON posts wherein the main paragraphs are built from a JSON string array. I was trying to find a way to easily encode new lines or line breaks and found a lot of difficulty with how the encoding for these values changes from JSON to GoLang and finally to my HTML webpage. When I tried to encode my JSON with newlines I found I had to encode them using \\n
rather than just \n
in order for them to actually appear on my page. One problem however was they simply appeared as text and not line breaks.
I then tried to research ways to replace the \n
portions of the joined string array into <br>
tags, however I could not find any way to do this with go and moved to trying to do so in javascript. This did not work either despite me deferring the calling of my javascript in my link from my HTML. this is that javascript:
1var title = window.document.getElementById("title");
2var timestamp = window.document.getElementById("timestamp");
3var sitemap = window.document.getElementById("sitemap");
4var main = window.document.getElementById("main");
5var contact_form = window.document.getElementById("contact-form");
6var content_info = window.document.getElementById("content-info");
7
8var str = main.innerHTML;
9
10function replaceNewlines() {
11 // Replace the \n with <br>
12 str = str.replace(/(?:\r\n|\r|\n)/g, "<br>");
13
14 // Update the value of paragraph
15 main.innerHTML = str;
16}
17
Here is my HTML:
1var title = window.document.getElementById("title");
2var timestamp = window.document.getElementById("timestamp");
3var sitemap = window.document.getElementById("sitemap");
4var main = window.document.getElementById("main");
5var contact_form = window.document.getElementById("contact-form");
6var content_info = window.document.getElementById("content-info");
7
8var str = main.innerHTML;
9
10function replaceNewlines() {
11 // Replace the \n with <br>
12 str = str.replace(/(?:\r\n|\r|\n)/g, "<br>");
13
14 // Update the value of paragraph
15 main.innerHTML = str;
16}
17<!DOCTYPE html>
18<html lang="en">
19<head>
20 <meta charset="UTF-8">
21 <meta http-equiv="X-UA-Compatible" content="IE=edge">
22 <meta name="viewport" content="width=device-width, initial-scale=1.0">
23 <title>Dynamic JSON Events</title>
24 <link rel="stylesheet" href="/blogtemplate.css"></style>
25</head>
26<body>
27 <section id="title">
28 <h1 id="text-title">{{.Title}}</h1>
29 <time id="timestamp">
30 {{.Timestamp}}
31 </time>
32 </section>
33 <nav role="navigation" id="site-nav">
34 <ul id="sitemap">
35 </ul>
36 </nav>
37 <main role="main" id="main">
38 {{.ParsedMain}}
39 </main>
40 <footer role="contentinfo" id="footer">
41 <form id="contact-form" role="form">
42 <address>
43 Contact me by <a id="my-email" href="mailto:antonhibl11@gmail.com" class="my-email">e-mail</a>
44 </address>
45 </form>
46 </footer>
47<script defer src="/blogtemplate.js">
48</script>
49</body>
50</html>
51
I then finally turned to trying to hardcode <br>
tags into my json data to discover that this simply renders as < and > when it finally reaches the browser. I am getting pretty frustrated with this process of encoding constantly causing me issues in creating newlines and line breaks. How can I easily include newlines where I want in my JSON string data?
Here is my Go script if it helps:
1var title = window.document.getElementById("title");
2var timestamp = window.document.getElementById("timestamp");
3var sitemap = window.document.getElementById("sitemap");
4var main = window.document.getElementById("main");
5var contact_form = window.document.getElementById("contact-form");
6var content_info = window.document.getElementById("content-info");
7
8var str = main.innerHTML;
9
10function replaceNewlines() {
11 // Replace the \n with <br>
12 str = str.replace(/(?:\r\n|\r|\n)/g, "<br>");
13
14 // Update the value of paragraph
15 main.innerHTML = str;
16}
17<!DOCTYPE html>
18<html lang="en">
19<head>
20 <meta charset="UTF-8">
21 <meta http-equiv="X-UA-Compatible" content="IE=edge">
22 <meta name="viewport" content="width=device-width, initial-scale=1.0">
23 <title>Dynamic JSON Events</title>
24 <link rel="stylesheet" href="/blogtemplate.css"></style>
25</head>
26<body>
27 <section id="title">
28 <h1 id="text-title">{{.Title}}</h1>
29 <time id="timestamp">
30 {{.Timestamp}}
31 </time>
32 </section>
33 <nav role="navigation" id="site-nav">
34 <ul id="sitemap">
35 </ul>
36 </nav>
37 <main role="main" id="main">
38 {{.ParsedMain}}
39 </main>
40 <footer role="contentinfo" id="footer">
41 <form id="contact-form" role="form">
42 <address>
43 Contact me by <a id="my-email" href="mailto:antonhibl11@gmail.com" class="my-email">e-mail</a>
44 </address>
45 </form>
46 </footer>
47<script defer src="/blogtemplate.js">
48</script>
49</body>
50</html>
51package main
52
53import (
54 "encoding/json"
55 "html/template"
56 "log"
57 "net/http"
58 "os"
59 "regexp"
60 "strings"
61)
62
63type BlogPost struct {
64 Title string `json:"title"`
65 Timestamp string `json:"timestamp"`
66 Main []string `json:"main"`
67 ParsedMain string
68}
69
70// this did not seem to work when I tried to implement it below
71var re = regexp.MustCompile(`\r\n|[\r\n\v\f\x{0085}\x{2028}\x{2029}]`)
72func replaceRegexp(s string) string {
73 return re.ReplaceAllString(s, "<br>\n")
74}
75
76var blogTemplate = template.Must(template.ParseFiles("./assets/docs/blogtemplate.html"))
77
78func blogHandler(w http.ResponseWriter, r *http.Request) {
79 blogstr := r.URL.Path[len("/blog/"):] + ".json"
80
81 f, err := os.Open("db/" + blogstr)
82 if err != nil {
83 http.Error(w, err.Error(), http.StatusNotFound)
84 return
85 }
86 defer f.Close()
87
88 var post BlogPost
89 if err := json.NewDecoder(f).Decode(&post); err != nil {
90 http.Error(w, err.Error(), http.StatusInternalServerError)
91 return
92 }
93
94 post.ParsedMain = strings.Join(post.Main, "")
95
96 // post.ParsedMain = replaceRegexp(post.ParsedMain)
97
98 if err := blogTemplate.Execute(w, post); err != nil {
99 log.Println(err)
100 }
101}
102
103func teapotHandler(w http.ResponseWriter, r *http.Request) {
104 w.WriteHeader(http.StatusTeapot)
105 w.Write([]byte("<html><h1><a href='https://datatracker.ietf.org/doc/html/rfc2324/'>HTCPTP</h1><img src='https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftaooftea.com%2Fwp-content%2Fuploads%2F2015%2F12%2Fyixing-dark-brown-small.jpg&f=1&nofb=1' alt='Im a teapot'><html>"))
106}
107
108func faviconHandler(w http.ResponseWriter, r *http.Request) {
109 http.ServeFile(w, r, "./assets/art/favicon.ico")
110}
111
112func main() {
113 http.Handle("/", http.FileServer(http.Dir("/assets/docs")))
114 http.HandleFunc("/blog/", blogHandler)
115 http.HandleFunc("/favicon.ico", faviconHandler)
116 http.HandleFunc("/teapot", teapotHandler)
117 log.Fatal(http.ListenAndServe(":8080", nil))
118}
119
120
Here is an example of my JSON data:
1var title = window.document.getElementById("title");
2var timestamp = window.document.getElementById("timestamp");
3var sitemap = window.document.getElementById("sitemap");
4var main = window.document.getElementById("main");
5var contact_form = window.document.getElementById("contact-form");
6var content_info = window.document.getElementById("content-info");
7
8var str = main.innerHTML;
9
10function replaceNewlines() {
11 // Replace the \n with <br>
12 str = str.replace(/(?:\r\n|\r|\n)/g, "<br>");
13
14 // Update the value of paragraph
15 main.innerHTML = str;
16}
17<!DOCTYPE html>
18<html lang="en">
19<head>
20 <meta charset="UTF-8">
21 <meta http-equiv="X-UA-Compatible" content="IE=edge">
22 <meta name="viewport" content="width=device-width, initial-scale=1.0">
23 <title>Dynamic JSON Events</title>
24 <link rel="stylesheet" href="/blogtemplate.css"></style>
25</head>
26<body>
27 <section id="title">
28 <h1 id="text-title">{{.Title}}</h1>
29 <time id="timestamp">
30 {{.Timestamp}}
31 </time>
32 </section>
33 <nav role="navigation" id="site-nav">
34 <ul id="sitemap">
35 </ul>
36 </nav>
37 <main role="main" id="main">
38 {{.ParsedMain}}
39 </main>
40 <footer role="contentinfo" id="footer">
41 <form id="contact-form" role="form">
42 <address>
43 Contact me by <a id="my-email" href="mailto:antonhibl11@gmail.com" class="my-email">e-mail</a>
44 </address>
45 </form>
46 </footer>
47<script defer src="/blogtemplate.js">
48</script>
49</body>
50</html>
51package main
52
53import (
54 "encoding/json"
55 "html/template"
56 "log"
57 "net/http"
58 "os"
59 "regexp"
60 "strings"
61)
62
63type BlogPost struct {
64 Title string `json:"title"`
65 Timestamp string `json:"timestamp"`
66 Main []string `json:"main"`
67 ParsedMain string
68}
69
70// this did not seem to work when I tried to implement it below
71var re = regexp.MustCompile(`\r\n|[\r\n\v\f\x{0085}\x{2028}\x{2029}]`)
72func replaceRegexp(s string) string {
73 return re.ReplaceAllString(s, "<br>\n")
74}
75
76var blogTemplate = template.Must(template.ParseFiles("./assets/docs/blogtemplate.html"))
77
78func blogHandler(w http.ResponseWriter, r *http.Request) {
79 blogstr := r.URL.Path[len("/blog/"):] + ".json"
80
81 f, err := os.Open("db/" + blogstr)
82 if err != nil {
83 http.Error(w, err.Error(), http.StatusNotFound)
84 return
85 }
86 defer f.Close()
87
88 var post BlogPost
89 if err := json.NewDecoder(f).Decode(&post); err != nil {
90 http.Error(w, err.Error(), http.StatusInternalServerError)
91 return
92 }
93
94 post.ParsedMain = strings.Join(post.Main, "")
95
96 // post.ParsedMain = replaceRegexp(post.ParsedMain)
97
98 if err := blogTemplate.Execute(w, post); err != nil {
99 log.Println(err)
100 }
101}
102
103func teapotHandler(w http.ResponseWriter, r *http.Request) {
104 w.WriteHeader(http.StatusTeapot)
105 w.Write([]byte("<html><h1><a href='https://datatracker.ietf.org/doc/html/rfc2324/'>HTCPTP</h1><img src='https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftaooftea.com%2Fwp-content%2Fuploads%2F2015%2F12%2Fyixing-dark-brown-small.jpg&f=1&nofb=1' alt='Im a teapot'><html>"))
106}
107
108func faviconHandler(w http.ResponseWriter, r *http.Request) {
109 http.ServeFile(w, r, "./assets/art/favicon.ico")
110}
111
112func main() {
113 http.Handle("/", http.FileServer(http.Dir("/assets/docs")))
114 http.HandleFunc("/blog/", blogHandler)
115 http.HandleFunc("/favicon.ico", faviconHandler)
116 http.HandleFunc("/teapot", teapotHandler)
117 log.Fatal(http.ListenAndServe(":8080", nil))
118}
119
120{
121 "title" : "Finished My First Blog App",
122 "timestamp": "Friday, March 18th, 11:39 AM",
123 "main": [
124 "It took me awhile to tidy everything up but I finally finished creating my first ",
125 "blog app using Go along with JSON for my database. I plan on using this to document ",
126 "my own thoughts and experiences as a programmer and cybersecurity researcher; things ",
127 "like tutorials, thought-pieces, and journals on my own projects progress will be ",
128 "posted here. I look forward to getting more used to writing and sharing my own story, ",
129 "I think it will help me learn from doing and also hearing feedback from others.\\n\\n",
130 "I utilized a handler function to dynamically read from my JSON database and template ",
131 "data into my HTML template using the go html/template package as well as the encoding/json ",
132 "to handling reading those objects. Next I had to make sure my CSS and JavaScript assets ",
133 "would be served alongside this finished template in order for my styling to be output into ",
134 "the browser. For this I used a FileServer function which allowed for me to serve linked ",
135 "resources in my HTML boilerplate and have the server still locate blog resources dynamically. ",
136 "Going forward I am looking to add better styling, more JavaScript elements to the page, and ",
137 "more functionality to how my JSON data is encoded and parsed in order to create more complex ",
138 "looking pages and blog posts."
139 ]
140}
141
I am just trying to find a way to easily include spaces between paragraphs in the long array of strings in my JSON however I have failed in Go, my JS doesn't ever seem to affect my webpage(this is not the only problem I have had with this, it does not seem to want to affect any page elements for some reason), and I cannot seem to hardcode <br>
tags directly into my JSON as the browser interprets those as <br><br>
. Nothing I have tried has actually let me encode linebreaks, What can I do here?
ANSWER
Answered 2022-Mar-19 at 06:43You could try to loop over your array inside the template and generate a p tag for every element of the array. This way there is no need to edit your main array in go.
Template:
1var title = window.document.getElementById("title");
2var timestamp = window.document.getElementById("timestamp");
3var sitemap = window.document.getElementById("sitemap");
4var main = window.document.getElementById("main");
5var contact_form = window.document.getElementById("contact-form");
6var content_info = window.document.getElementById("content-info");
7
8var str = main.innerHTML;
9
10function replaceNewlines() {
11 // Replace the \n with <br>
12 str = str.replace(/(?:\r\n|\r|\n)/g, "<br>");
13
14 // Update the value of paragraph
15 main.innerHTML = str;
16}
17<!DOCTYPE html>
18<html lang="en">
19<head>
20 <meta charset="UTF-8">
21 <meta http-equiv="X-UA-Compatible" content="IE=edge">
22 <meta name="viewport" content="width=device-width, initial-scale=1.0">
23 <title>Dynamic JSON Events</title>
24 <link rel="stylesheet" href="/blogtemplate.css"></style>
25</head>
26<body>
27 <section id="title">
28 <h1 id="text-title">{{.Title}}</h1>
29 <time id="timestamp">
30 {{.Timestamp}}
31 </time>
32 </section>
33 <nav role="navigation" id="site-nav">
34 <ul id="sitemap">
35 </ul>
36 </nav>
37 <main role="main" id="main">
38 {{.ParsedMain}}
39 </main>
40 <footer role="contentinfo" id="footer">
41 <form id="contact-form" role="form">
42 <address>
43 Contact me by <a id="my-email" href="mailto:antonhibl11@gmail.com" class="my-email">e-mail</a>
44 </address>
45 </form>
46 </footer>
47<script defer src="/blogtemplate.js">
48</script>
49</body>
50</html>
51package main
52
53import (
54 "encoding/json"
55 "html/template"
56 "log"
57 "net/http"
58 "os"
59 "regexp"
60 "strings"
61)
62
63type BlogPost struct {
64 Title string `json:"title"`
65 Timestamp string `json:"timestamp"`
66 Main []string `json:"main"`
67 ParsedMain string
68}
69
70// this did not seem to work when I tried to implement it below
71var re = regexp.MustCompile(`\r\n|[\r\n\v\f\x{0085}\x{2028}\x{2029}]`)
72func replaceRegexp(s string) string {
73 return re.ReplaceAllString(s, "<br>\n")
74}
75
76var blogTemplate = template.Must(template.ParseFiles("./assets/docs/blogtemplate.html"))
77
78func blogHandler(w http.ResponseWriter, r *http.Request) {
79 blogstr := r.URL.Path[len("/blog/"):] + ".json"
80
81 f, err := os.Open("db/" + blogstr)
82 if err != nil {
83 http.Error(w, err.Error(), http.StatusNotFound)
84 return
85 }
86 defer f.Close()
87
88 var post BlogPost
89 if err := json.NewDecoder(f).Decode(&post); err != nil {
90 http.Error(w, err.Error(), http.StatusInternalServerError)
91 return
92 }
93
94 post.ParsedMain = strings.Join(post.Main, "")
95
96 // post.ParsedMain = replaceRegexp(post.ParsedMain)
97
98 if err := blogTemplate.Execute(w, post); err != nil {
99 log.Println(err)
100 }
101}
102
103func teapotHandler(w http.ResponseWriter, r *http.Request) {
104 w.WriteHeader(http.StatusTeapot)
105 w.Write([]byte("<html><h1><a href='https://datatracker.ietf.org/doc/html/rfc2324/'>HTCPTP</h1><img src='https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftaooftea.com%2Fwp-content%2Fuploads%2F2015%2F12%2Fyixing-dark-brown-small.jpg&f=1&nofb=1' alt='Im a teapot'><html>"))
106}
107
108func faviconHandler(w http.ResponseWriter, r *http.Request) {
109 http.ServeFile(w, r, "./assets/art/favicon.ico")
110}
111
112func main() {
113 http.Handle("/", http.FileServer(http.Dir("/assets/docs")))
114 http.HandleFunc("/blog/", blogHandler)
115 http.HandleFunc("/favicon.ico", faviconHandler)
116 http.HandleFunc("/teapot", teapotHandler)
117 log.Fatal(http.ListenAndServe(":8080", nil))
118}
119
120{
121 "title" : "Finished My First Blog App",
122 "timestamp": "Friday, March 18th, 11:39 AM",
123 "main": [
124 "It took me awhile to tidy everything up but I finally finished creating my first ",
125 "blog app using Go along with JSON for my database. I plan on using this to document ",
126 "my own thoughts and experiences as a programmer and cybersecurity researcher; things ",
127 "like tutorials, thought-pieces, and journals on my own projects progress will be ",
128 "posted here. I look forward to getting more used to writing and sharing my own story, ",
129 "I think it will help me learn from doing and also hearing feedback from others.\\n\\n",
130 "I utilized a handler function to dynamically read from my JSON database and template ",
131 "data into my HTML template using the go html/template package as well as the encoding/json ",
132 "to handling reading those objects. Next I had to make sure my CSS and JavaScript assets ",
133 "would be served alongside this finished template in order for my styling to be output into ",
134 "the browser. For this I used a FileServer function which allowed for me to serve linked ",
135 "resources in my HTML boilerplate and have the server still locate blog resources dynamically. ",
136 "Going forward I am looking to add better styling, more JavaScript elements to the page, and ",
137 "more functionality to how my JSON data is encoded and parsed in order to create more complex ",
138 "looking pages and blog posts."
139 ]
140}
141<!DOCTYPE html>
142<html lang="en">
143<head>
144 <meta charset="UTF-8">
145 <meta http-equiv="X-UA-Compatible" content="IE=edge">
146 <meta name="viewport" content="width=device-width, initial-scale=1.0">
147 <title>Dynamic JSON Events</title>
148 <link rel="stylesheet" href="/blogtemplate.css"></style>
149</head>
150<body>
151 <section id="title">
152 <h1 id="text-title">{{.Title}}</h1>
153 <time id="timestamp">
154 {{.Timestamp}}
155 </time>
156 </section>
157 <nav role="navigation" id="site-nav">
158 <ul id="sitemap">
159 </ul>
160 </nav>
161 <main role="main" id="main">
162 {{range $element := .Main}} <p>{{$element}}</p> {{end}}
163 </main>
164 <footer role="contentinfo" id="footer">
165 <form id="contact-form" role="form">
166 <address>
167 Contact me by <a id="my-email" href="mailto:antonhibl11@gmail.com" class="my-email">e-mail</a>
168 </address>
169 </form>
170 </footer>
171<script defer src="/blogtemplate.js">
172</script>
173</body>
174</html>
175
QUESTION
Php Dynamic Sitemap After 50K Url
Asked 2022-Mar-13 at 06:54Hello I Need some help with dynamic sitemap using PHP This is my code
1<?php
2header('Content-type: application/xml; charset="ISO-8859-1"', true);
3$dataAll1 = scandir('cache-data');
4unset($dataAll1[0]);
5unset($dataAll1[1]);
6unset($dataAll1[2]);
7$sitemap = '<?xml version="1.0" encoding="UTF-8"?>
8 <urlset xmlns="'.PROTOCOL.'://www.sitemaps.org/schemas/sitemap/0.9">';
9
10$sitemap .= '<url>
11 <loc>' . SITE_HOST . '</loc>
12 <priority>1.0</priority>
13 </url>';
14
15foreach($dataAll1 as $val){
16 $data = json_decode(file_get_contents('cache-data/'.$val),1);
17 if($val=='index.php'){
18 continue;
19 }
20 $sitemap .= '<url>
21 <loc>'.SITE_HOST . '/job-detail/' . $data['jk'].'jktk'.$data['tk'] . '-' . $service->slugify($data['title']).'</loc>
22 <priority>0.9</priority>
23 <changefreq>daily</changefreq>
24 </url>';
25}
26
27$sitemap.='</urlset>';
28echo $sitemap;
29
this code success build sitemap file but after 50K this code wont make new file sitemap, so how to make this code want make new file sitemap after 50K Url?
I really appreciate any help
ANSWER
Answered 2022-Mar-13 at 00:49You should start the array generated from the scandir with the 50001, but it would be better to split it into several scripts with a crontab, so you don't exhaust the server with excessive runtime; otherwise, increase the runtime of PHP scripts.
QUESTION
Unable to parse any XML input. Error on line 5: The reference to entity "utm_medium"
Asked 2022-Mar-11 at 20:58I am getting an XML parsing error:
Unable to parse any XML input. Error on line 5: The reference to entity
utm_medium
must end with the;
delimiter. You most likely forgot to escape&
into&
with the following, the error is with the xhtml:link
tag, URL, I tried changing &
to &
but it won't work.
1<?xml version="1.0" encoding="UTF-8"?>
2<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
3 <url>
4 <loc>https://www.com/financing/?utm_source=website&amp;utm_medium=banner&amp;utm_campaign=YBF&amp;utm_id=Yellow+Bar+Financing</loc>
5 <xhtml:link rel="alternate" hreflang="en" href="https://www..com/financing/?utm_source=website&utm_medium=banner&utm_campaign=YBF&utm_id=Yellow+Bar+Financing" />
6 <lastmod>20015-04-01</lastmod>
7 <changefreq>weekly</changefreq>
8 <priority>0.5</priority>
9 </url>
10</urlset>
11<xml>
12
ANSWER
Answered 2022-Mar-11 at 20:58There is another &utm_medium
on the next line that you missed, along with several other &
characters that similarly must be changed to &
.
Here's your XML with all &
properly replaced:
1<?xml version="1.0" encoding="UTF-8"?>
2<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
3 <url>
4 <loc>https://www.com/financing/?utm_source=website&amp;utm_medium=banner&amp;utm_campaign=YBF&amp;utm_id=Yellow+Bar+Financing</loc>
5 <xhtml:link rel="alternate" hreflang="en" href="https://www..com/financing/?utm_source=website&utm_medium=banner&utm_campaign=YBF&utm_id=Yellow+Bar+Financing" />
6 <lastmod>20015-04-01</lastmod>
7 <changefreq>weekly</changefreq>
8 <priority>0.5</priority>
9 </url>
10</urlset>
11<xml>
12<?xml version="1.0" encoding="UTF-8"?>
13<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
14 <url>
15 <loc>https://www.com/financing/?utm_source=website&amp;utm_medium=banner&amp;utm_campaign=YBF&amp;utm_id=Yellow+Bar+Financing</loc>
16 <xhtml:link rel="alternate" hreflang="en" href="https://www..com/financing/?utm_source=website&amp;utm_medium=banner&amp;utm_campaign=YBF&amp;utm_id=Yellow+Bar+Financing" />
17 <lastmod>20015-04-01</lastmod>
18 <changefreq>weekly</changefreq>
19 <priority>0.5</priority>
20 </url>
21</urlset>
22
The above XML is now well-formed.
Note that there is, at least in your posted XML, and extraneous <xml>
open tag at the end of your document.
QUESTION
.htaccess Open main page if file or folder doesn't exist, but keep URL + URL Routing
Asked 2022-Mar-11 at 01:39I read through a lot of similar topics, but didn't find the right answer, so please help me.
Let's say the user types in a non-existing sub directory to my webpage:
1www.example.com/subpage-1
2
What I want to achieve:
I want my mainpage (www.example.com
- actually with hidden index.html
) to open, but keep the URL unchanged with the non-existing subpage (www.example.com/subpage-1
).
The reason why I need it:
I have the website only with the main site (index.html
), and everything is controlled via JavaScript dynamically.
I want to introduce sub pages - but I want to use only my main index.html
site with JS to control it. (Just like a single page application.)
So when the user enters the URL
www.example.com/subpage-1
,
my main site opens, but since the URL is kept unchanged, the JS script can check the URL, see, that subpage-1
is requested, and generate the right content for it (if subpage-1
is supported, of course).
Also that could be a SEO-friendly solution, since I could provide Google a sitemap with the available subpages as well - however everything would be controlled via the same index.html
and JS.
How can I achieve it?
What I found so far:
1www.example.com/subpage-1
2RewriteCond %{REQUEST_FILENAME} !-d
3RewriteCond %{REQUEST_FILENAME} !-f
4RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
5
My problem with this is that it opens the main page every time, I can't find the query (?url=
) anywhere, so I can't use it.
Also a problem what I don't know how to handle:
Let's say the user enters
www.example.com/subpage-1
and it's working fine since my JS script handles "subpage-1".
But what if
1www.example.com/subpage-1
2RewriteCond %{REQUEST_FILENAME} !-d
3RewriteCond %{REQUEST_FILENAME} !-f
4RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
5www.example.com/non-existing-subpage
6
is entered? With the solution above it would open the main page again, but JS can't load any content for it. I still want 404 for all of the non existing subpages. How can I achieve it?
ANSWER
Answered 2022-Mar-11 at 01:391www.example.com/subpage-1
2RewriteCond %{REQUEST_FILENAME} !-d
3RewriteCond %{REQUEST_FILENAME} !-f
4RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
5www.example.com/non-existing-subpage
6RewriteCond %{REQUEST_FILENAME} !-d
7RewriteCond %{REQUEST_FILENAME} !-f
8RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
9
My problem with this that however it opens the main page every time, I can't find the query (?url=) anywhere, so I can't use it.
This is an internal rewrite on the server. Consequently, the url
URL parameter (present only on the internal rewrite) is only available to a server-side script, not client-side JavaScript. The browser/client only sees the response from the server - it is not aware of what file produced that response. However, client-side JavaScript can see what is present in the browser's address bar, which is accessible via the window.location
object.
So, you can instead simplify the RewriteRule
directive:
1www.example.com/subpage-1
2RewriteCond %{REQUEST_FILENAME} !-d
3RewriteCond %{REQUEST_FILENAME} !-f
4RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
5www.example.com/non-existing-subpage
6RewriteCond %{REQUEST_FILENAME} !-d
7RewriteCond %{REQUEST_FILENAME} !-f
8RewriteRule ^(.+)$ index.html?url=$1 [QSA,L]
9RewriteRule . index.html [L]
10
And in your JS you can read the requested URL-path from the window.location.pathname
property. For example, if you request example.com/foo
then the pathname
property contains /foo
(with a slash prefix) for you to act on accordingly in your script.
I still want 404 for all of the non existing subpages. How can I achieve it?
You can't if you are only using client-side JavaScript. A "404 Not Found" status is an HTTP response sent from the server.
The best you can do in client-side JS is to display what looks-like a "404 Not Found" message to the user and make sure you have a robots
meta tag that prevents indexing. But this is still served with a 200 OK HTTP status. Search engines (ie. Google) will likely see this as a soft-404 (ie. a page that looks like a 404, but is served with a 200 OK status).
If you want to serve a 404 HTTP response status then the server would need to be aware of which are valid/invalid URLs.
QUESTION
How to res.sendFile() a file that is in a different directory for Express.js webapp?
Asked 2022-Mar-01 at 08:04I have this inside controllers folder:
1//controler.js
2exports.serve_sitemap = (req, res) => {
3 res.sendFile("../../sitemap.xml");
4 // or
5 // res.send(__dirname + "./sitemap.xml")
6 // But neither of these work
7};
8
This exported function is imported in a file inside the routes
directory
1//controler.js
2exports.serve_sitemap = (req, res) => {
3 res.sendFile("../../sitemap.xml");
4 // or
5 // res.send(__dirname + "./sitemap.xml")
6 // But neither of these work
7};
8const { serve_sitemap } = require('../controllers/indexer')
9
10var router = require('express').Router()
11
12router.get("/sitemap", serve_sitemap)
13
14module.exports = router
15
Currently I am getting a 404 error when I try to get the sitmap at localhost:3000/sitemap
Before, I had the same thing in index.js which is the entry point.
1//controler.js
2exports.serve_sitemap = (req, res) => {
3 res.sendFile("../../sitemap.xml");
4 // or
5 // res.send(__dirname + "./sitemap.xml")
6 // But neither of these work
7};
8const { serve_sitemap } = require('../controllers/indexer')
9
10var router = require('express').Router()
11
12router.get("/sitemap", serve_sitemap)
13
14module.exports = router
15app.get("/sitemap", (req, res) => {
16 res.sendFile(__dirname + "/sitemap.xml");
17});
18
This was working perfectly, until I decided to restructure the project
- How can I refer to the sitemap.xml file that is located in the root directory from a file that is in a sub-directory when using res.send()?
- How can I get the absolute path to the root of the project directory, then I can append the file name to the path. This can solve the issse
I maybe missing something obvious. In that case, please help me out.
Any suggestion gratefully accepted. Thanks in advance
ANSWER
Answered 2022-Mar-01 at 08:04Why do you think that res.sendFile(__dirname + "./sitemap.xml")
would work?
First of all __dirname + "./sitemap.xml"
is not how paths should be concatenated you should use join
instead especially if your second path starts with ./
. And there is no file sitemap.xml
in the directory of the controller:
__dirname + "./sitemap.xml"
would result in something like /path/to/project/src/controller/./sitemap.xml
And why should "../../sitemap.xml"
work. If you only have "../../sitemap.xml"
it is relative to the working directory which is the one where (i guess) index.js is located. So "../../sitemap.xml"
will be resolved based on /path/to/project
, so /path/to/project/../../sitemap.xml
.
Due to that is either res.sendFile("./sitemap.xml")
(relative to index.js
) or res.sendFile(path.join(__dirname, "../../sitemap.xml"))
(relative to the controller).
QUESTION
How to benefit from tree-shaking and code-splitting while loading JSON in Nuxt?
Asked 2021-Dec-22 at 16:13I have a nuxt-app, where I have a lot of posts. I recently refactored the project and I won't generate
all posts anymore, as it is just taking too much time to do that.
Instead I have a page where I would fetch the matching post content via url query:
www.mypage.com/posts/?post=my-post-slug
Because the content is lying in static json files, for example in:
1/static/data/posts/my-post-slug.json
2/static/data/posts/my-post-slug_2.json
3/static/data/posts/my-post-slug_3.json
4/static/data/posts/my-post-slug_n.json
5
I read the post https://github.com/nuxt/nuxt.js/issues/123 about how to load json in the best way.
I decided to do something like this in the fetch() hook:
1/static/data/posts/my-post-slug.json
2/static/data/posts/my-post-slug_2.json
3/static/data/posts/my-post-slug_3.json
4/static/data/posts/my-post-slug_n.json
5// ... simplified code
6async fetch() {
7 let postSlug = this.$route.query.post
8
9 const post = this.$axios
10 .get(`/posts/posts.de.${postSlug}.json`)
11 .then((data) => {
12 return data?.data
13 })
14 .catch((error) => {
15 console.error('error: ', error)
16 const code = parseInt(error.response && error.response.status)
17 if (code === 404) {
18 this.$nuxt.error({ statusCode: 404, message: 'Post not found' })
19 }
20 })
21
22
23 this.activePost = post?.items?.[0] || false
24}
25
As already said, I do not generate the actual posts, but I generate all post urls in my sitemap.xml.
When running the generate in analyze mode I have now a huuuuge bundle size (app.js), and I can't understand why...
-> Check out the attached image. (Note: app.js
has a ridiculous size of 34MB!!!!😕)
- I don't understand why all my post jsons appear in the static and the dist part of the bundle???
- I don't understand at all why they appear in there. I want them to just lie in the static folder, but not be included in the app bundle.
(you can see that there are files like
events.bundle.de.json
included. I need those to fetch a list of all posts for example. I do that also within my fetch hook only.
I would be very happy if somebody could point out why those files are included (twice)!
ANSWER
Answered 2021-Dec-21 at 10:55Those files are not included "twice". You need them, so you do have them locally in your static
folder.
Meanwhile, you should probably put them inside of your src
directory if you don't want/need to have them exposed publicly and benefit from code-splitting thanks to Webpack as explained in the post you've linked (which is still valid even if it's a 2017 one!).
Here, since you're making an axios call and using target: 'static'
, it will bundle your whole thing to work even without JS and it does that ahead of time. So, in order to have all the possibilities, it includes all in the final bundle I think.
If you want to only load what is needed while not shipping a big static
directory, you should import them dynamically. You can use a dynamic import: load only the needed JSON by passing the actual postSlug
.
PS: style-wise, prefer using async/await
(.then
is deprecated) and maybe also $axios.$get
.
QUESTION
How to set Home page and static files in same path
Asked 2021-Dec-18 at 20:09if I run the URL http://localhost:8080/ I want to run the Index function and If I run http://localhost:8080/robot.txt it should show static folder files
1func main() {
2 http.HandleFunc("/", Index)
3 http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("static"))))
4 http.ListenAndServe(":8080", nil)
5}
6
7func Index(w http.ResponseWriter, r *http.Request) {
8 fmt.Fprintln(w, "Index")
9}
10
How to do this.
Currently, I'm getting this error
panic: http: multiple registrations for /
This is my directory structure
1func main() {
2 http.HandleFunc("/", Index)
3 http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("static"))))
4 http.ListenAndServe(":8080", nil)
5}
6
7func Index(w http.ResponseWriter, r *http.Request) {
8 fmt.Fprintln(w, "Index")
9}
10main.go
11static\
12 | robot.txt
13 | favicon.ico
14 | sitemap.xml
15
ANSWER
Answered 2021-Dec-18 at 20:09Delegate to the file server from the index handler:
1func main() {
2 http.HandleFunc("/", Index)
3 http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("static"))))
4 http.ListenAndServe(":8080", nil)
5}
6
7func Index(w http.ResponseWriter, r *http.Request) {
8 fmt.Fprintln(w, "Index")
9}
10main.go
11static\
12 | robot.txt
13 | favicon.ico
14 | sitemap.xml
15func main() {
16 http.HandleFunc("/", Index)
17 http.ListenAndServe(":8080", nil)
18}
19
20var fserve = http.StripPrefix("/", http.FileServer(http.Dir("static"))))
21
22func Index(w http.ResponseWriter, r *http.Request) {
23 if r.URL.Path != “/“ {
24 fserve.ServeHTTP(w, r)
25 return
26 }
27 fmt.Fprintln(w, "Index")
28}
29
QUESTION
How do I make my fixed sidebar scroll up as the footer comes up
Asked 2021-Dec-12 at 16:20My problem is that the sidebar shouldn't be fixed once the footer enters the viewport.
I have found dozens of questions regarding the fixed sidebar, but the answers I found here are not solving my problem.
I found something similar here but my problem is, I am not able to apply this solution as my HTML structure is different. I would also prefer it if your answers were in pure js and not jquery
1a {
2 text-decoration: none;
3 transition: all 0.3s;
4 color: black;
5 font-family: 'Montserrat', sans-serif;
6 cursor: pointer;
7}
8
9ul,
10ol {
11 list-style: none;
12 font-family: 'Montserrat', sans-serif;
13}
14
15.menu.container {
16 padding: 1vw;
17 font-family: 'Montserrat', sans-serif;
18}
19
20.menu ul li {
21 display: inline-block;
22 padding: 1vw;
23}
24
25.menu ul li a {
26 padding: 1vw;
27 font-size: 1.3vw;
28}
29
30.menu ul li a:hover {
31 border-bottom: .2em solid black;
32}
33
34.title.container {
35 width: 100%;
36 position: fixed;
37 top: 0;
38 display: flex;
39 justify-content: space-between;
40 align-items: center;
41 background-color: #fff;
42 /* border-top: 1px solid #cfab53; */
43 border-bottom: 1px solid #cfab53;
44 z-index: 2;
45 /* margin-top: 2vw; */
46 /* box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
47 -webkit-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
48 -moz-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58); */
49}
50
51.title .logo {
52 padding: 1vw;
53}
54
55.title .logo h1 {
56 font-family: 'GFS Didot', serif;
57 color: #cfab53;
58 font-size: 2.5vw;
59 cursor: pointer;
60}
61
62.title .logo h3 {
63 font-family: 'Dancing Script', cursive;
64 /* color: #a1919e; */
65 font-size: 1.3vw;
66 font-weight: 400;
67}
68
69.sidebar.container {
70 position: fixed;
71 bottom: 0;
72 left: 0;
73 top: 6.7vw;
74 width: 20%;
75 z-index: 1;
76 text-transform: uppercase;
77 /* overflow-y: scroll; */
78 padding: 1vw;
79}
80
81.sidebar .inner .categories * {
82 padding: .5vw;
83}
84
85.sidebar .inner .categories h5 {
86 font-size: 15px;
87 font-weight: 400;
88}
89
90.sidebar .inner .categories p {
91 font-size: 13px;
92 text-indent: 1vw;
93}
94
95.sidebar .inner .categories h5 a:hover,
96.sidebar .inner .categories p a:hover {
97 color: #cfab53;
98}
99
100.main.container {
101 /* right: 0;
102 bottom: 0;
103 left: 20%;
104 top: 0vw;
105 position: absolute; */
106 width: 100%;
107 padding: 1vw;
108 z-index: 0;
109 display: flex;
110 flex-direction: column;
111 align-items: flex-end;
112}
113
114.main .category {
115 padding-top: 6.7vw;
116 width: 80%;
117}
118
119.main .category h2 {
120 padding: 1vw;
121}
122
123.main .category hr {
124 border: none;
125 border-top: .1vw solid #cfab53;
126 width: 50%;
127 margin-left: 1vw;
128 margin-bottom: 1vw;
129}
130
131.main .category .products {
132 display: flex;
133 flex-wrap: wrap;
134}
135
136.main .category .products .card {
137 width: 30%;
138 margin: 1vw;
139 padding: 1vw;
140 /* border: 1px solid #cfab53; */
141 position: relative;
142 min-height: 28vw;
143}
144
145.main .category .products .card .prodimg img {
146 width: 100%;
147 position: absolute;
148 top: 0;
149 left: 0;
150 background-color: #cfab53;
151 min-height: 20vw;
152}
153
154.main .category .products .card .prodimg img.primary {
155 z-index: 1;
156}
157
158.main .category .products .card .prodimg:hover img.primary {
159 display: none;
160}
161
162.main .category .products .card .desc {
163 display: flex;
164 justify-content: space-between;
165 width: 100%;
166 position: absolute;
167 left: 0;
168 bottom: 2vw;
169}
170
171.main .category .products .card .desc h3 a:hover {
172 color: #cfab53;
173}
174
175.main .category .products .card .type {
176 display: flex;
177 width: 100%;
178 position: absolute;
179 left: 0;
180 bottom: 0;
181 align-items: center;
182}
183
184.main .category .products .card .type .border {
185 border-radius: 10000px;
186 border: 1px solid #bdbdbd;
187 padding: 2px;
188 margin-right: 5px;
189}
190
191.main .category .products .card .type .border .color {
192 border-radius: 10000px;
193 width: 13px;
194 height: 13px;
195 background-color: #cfab53;
196}
197
198.footer.container {
199 /* position: absolute;
200 bottom: 0;
201 left: 0;
202 right: 0; */
203 width: 100%;
204 border-top: 1px solid #cfab53;
205 background-color: white;
206}
207
208.footer .top {
209 display: flex;
210 padding: 1vw;
211 justify-content: space-between;
212 align-items: flex-start;
213}
214
215.footer .top .column {
216 width: 25%;
217 padding: 1vw;
218}
219
220.footer .top .column h1 {
221 font-size: 23px;
222 letter-spacing: -2px;
223 padding: .5vw;
224}
225
226.footer .top .column p {
227 letter-spacing: -1px;
228 font-size: 15px;
229}
230
231.footer .top .column a {
232 letter-spacing: -1px;
233 font-size: 15px;
234}
235
236.footer .top .column a:hover {
237 color: #cfab53;
238}
239
240.footer .logo {
241 padding: 1vw 2vw 0vw;
242}
243
244.footer .logo h1 {
245 font-family: 'GFS Didot', serif;
246 color: #cfab53;
247 font-size: 35px;
248 letter-spacing: normal;
249 cursor: pointer;
250}
251
252.footer .top .site h3 {
253 font-family: 'Dancing Script', cursive;
254 font-size: 30px;
255 font-weight: 400;
256}
257
258.footer .top .site p {
259 font-size: 15px;
260 padding: 1vw 0vw;
261 font-weight: 600;
262 letter-spacing: normal;
263}
264
265.footer .top .customer ul li {
266 padding: .3vw .5vw;
267}
268
269.footer .top .customer ul li a {
270 letter-spacing: -1px;
271 font-size: 15px;
272}
273
274.footer .top .contact p,
275.footer .top .contact a {
276 padding: .3vw .5vw;
277}
278
279.footer .top .contact .email {
280 display: flex;
281 flex-direction: column;
282}
283
284.footer .top .sign p {
285 padding: .5vw 0;
286}
287
288.footer .top .sign .input {
289 display: flex;
290 flex-wrap: nowrap;
291 align-items: center;
292 border: 1px solid #cfab53;
293 margin: 1vw 0vw;
294}
295
296.footer .top .sign .input .fa-envelope {
297 color: #cfab53;
298 padding: 0vw 0vw 0vw .5vw;
299 width: 10%;
300}
301
302.footer .top .sign .input input {
303 border: none;
304 padding: 0vw .5vw;
305 margin: 0vw 0vw 0vw 0vw;
306 width: 80%;
307}
308
309.footer .top .sign .input i.fa-chevron-right {
310 background-color: #cfab53;
311 color: white;
312 padding: 5px;
313 width: 10%;
314 text-align: center;
315 cursor: pointer;
316}
317
318.footer .top .sign .input i.fa-chevron-right:hover {
319 background-color: #bb9c4d;
320}
321
322.footer .bottom {
323 display: flex;
324 justify-content: flex-end;
325 align-items: center;
326}
327
328.footer .socials {
329 display: flex;
330 justify-content: flex-end;
331 align-items: center;
332}
333
334.footer .socials * {
335 padding: .5vw;
336 font-size: 12px;
337 letter-spacing: -1px;
338}
339
340.footer .socials a:hover {
341 color: #cfab53;
342}
343
344.footer .socials .icons i {
345 font-size: 18px;
346 font-weight: 700;
347}
348
349.footer .socials .icons i.fa-instagram:hover {
350 color: #bc2a8d;
351}
352
353.footer .socials .icons i.fa-pinterest:hover {
354 color: #bd081c;
355}
356
357.footer .socials .icons i.fa-twitter:hover {
358 color: #1DA1F2;
359}
1a {
2 text-decoration: none;
3 transition: all 0.3s;
4 color: black;
5 font-family: 'Montserrat', sans-serif;
6 cursor: pointer;
7}
8
9ul,
10ol {
11 list-style: none;
12 font-family: 'Montserrat', sans-serif;
13}
14
15.menu.container {
16 padding: 1vw;
17 font-family: 'Montserrat', sans-serif;
18}
19
20.menu ul li {
21 display: inline-block;
22 padding: 1vw;
23}
24
25.menu ul li a {
26 padding: 1vw;
27 font-size: 1.3vw;
28}
29
30.menu ul li a:hover {
31 border-bottom: .2em solid black;
32}
33
34.title.container {
35 width: 100%;
36 position: fixed;
37 top: 0;
38 display: flex;
39 justify-content: space-between;
40 align-items: center;
41 background-color: #fff;
42 /* border-top: 1px solid #cfab53; */
43 border-bottom: 1px solid #cfab53;
44 z-index: 2;
45 /* margin-top: 2vw; */
46 /* box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
47 -webkit-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
48 -moz-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58); */
49}
50
51.title .logo {
52 padding: 1vw;
53}
54
55.title .logo h1 {
56 font-family: 'GFS Didot', serif;
57 color: #cfab53;
58 font-size: 2.5vw;
59 cursor: pointer;
60}
61
62.title .logo h3 {
63 font-family: 'Dancing Script', cursive;
64 /* color: #a1919e; */
65 font-size: 1.3vw;
66 font-weight: 400;
67}
68
69.sidebar.container {
70 position: fixed;
71 bottom: 0;
72 left: 0;
73 top: 6.7vw;
74 width: 20%;
75 z-index: 1;
76 text-transform: uppercase;
77 /* overflow-y: scroll; */
78 padding: 1vw;
79}
80
81.sidebar .inner .categories * {
82 padding: .5vw;
83}
84
85.sidebar .inner .categories h5 {
86 font-size: 15px;
87 font-weight: 400;
88}
89
90.sidebar .inner .categories p {
91 font-size: 13px;
92 text-indent: 1vw;
93}
94
95.sidebar .inner .categories h5 a:hover,
96.sidebar .inner .categories p a:hover {
97 color: #cfab53;
98}
99
100.main.container {
101 /* right: 0;
102 bottom: 0;
103 left: 20%;
104 top: 0vw;
105 position: absolute; */
106 width: 100%;
107 padding: 1vw;
108 z-index: 0;
109 display: flex;
110 flex-direction: column;
111 align-items: flex-end;
112}
113
114.main .category {
115 padding-top: 6.7vw;
116 width: 80%;
117}
118
119.main .category h2 {
120 padding: 1vw;
121}
122
123.main .category hr {
124 border: none;
125 border-top: .1vw solid #cfab53;
126 width: 50%;
127 margin-left: 1vw;
128 margin-bottom: 1vw;
129}
130
131.main .category .products {
132 display: flex;
133 flex-wrap: wrap;
134}
135
136.main .category .products .card {
137 width: 30%;
138 margin: 1vw;
139 padding: 1vw;
140 /* border: 1px solid #cfab53; */
141 position: relative;
142 min-height: 28vw;
143}
144
145.main .category .products .card .prodimg img {
146 width: 100%;
147 position: absolute;
148 top: 0;
149 left: 0;
150 background-color: #cfab53;
151 min-height: 20vw;
152}
153
154.main .category .products .card .prodimg img.primary {
155 z-index: 1;
156}
157
158.main .category .products .card .prodimg:hover img.primary {
159 display: none;
160}
161
162.main .category .products .card .desc {
163 display: flex;
164 justify-content: space-between;
165 width: 100%;
166 position: absolute;
167 left: 0;
168 bottom: 2vw;
169}
170
171.main .category .products .card .desc h3 a:hover {
172 color: #cfab53;
173}
174
175.main .category .products .card .type {
176 display: flex;
177 width: 100%;
178 position: absolute;
179 left: 0;
180 bottom: 0;
181 align-items: center;
182}
183
184.main .category .products .card .type .border {
185 border-radius: 10000px;
186 border: 1px solid #bdbdbd;
187 padding: 2px;
188 margin-right: 5px;
189}
190
191.main .category .products .card .type .border .color {
192 border-radius: 10000px;
193 width: 13px;
194 height: 13px;
195 background-color: #cfab53;
196}
197
198.footer.container {
199 /* position: absolute;
200 bottom: 0;
201 left: 0;
202 right: 0; */
203 width: 100%;
204 border-top: 1px solid #cfab53;
205 background-color: white;
206}
207
208.footer .top {
209 display: flex;
210 padding: 1vw;
211 justify-content: space-between;
212 align-items: flex-start;
213}
214
215.footer .top .column {
216 width: 25%;
217 padding: 1vw;
218}
219
220.footer .top .column h1 {
221 font-size: 23px;
222 letter-spacing: -2px;
223 padding: .5vw;
224}
225
226.footer .top .column p {
227 letter-spacing: -1px;
228 font-size: 15px;
229}
230
231.footer .top .column a {
232 letter-spacing: -1px;
233 font-size: 15px;
234}
235
236.footer .top .column a:hover {
237 color: #cfab53;
238}
239
240.footer .logo {
241 padding: 1vw 2vw 0vw;
242}
243
244.footer .logo h1 {
245 font-family: 'GFS Didot', serif;
246 color: #cfab53;
247 font-size: 35px;
248 letter-spacing: normal;
249 cursor: pointer;
250}
251
252.footer .top .site h3 {
253 font-family: 'Dancing Script', cursive;
254 font-size: 30px;
255 font-weight: 400;
256}
257
258.footer .top .site p {
259 font-size: 15px;
260 padding: 1vw 0vw;
261 font-weight: 600;
262 letter-spacing: normal;
263}
264
265.footer .top .customer ul li {
266 padding: .3vw .5vw;
267}
268
269.footer .top .customer ul li a {
270 letter-spacing: -1px;
271 font-size: 15px;
272}
273
274.footer .top .contact p,
275.footer .top .contact a {
276 padding: .3vw .5vw;
277}
278
279.footer .top .contact .email {
280 display: flex;
281 flex-direction: column;
282}
283
284.footer .top .sign p {
285 padding: .5vw 0;
286}
287
288.footer .top .sign .input {
289 display: flex;
290 flex-wrap: nowrap;
291 align-items: center;
292 border: 1px solid #cfab53;
293 margin: 1vw 0vw;
294}
295
296.footer .top .sign .input .fa-envelope {
297 color: #cfab53;
298 padding: 0vw 0vw 0vw .5vw;
299 width: 10%;
300}
301
302.footer .top .sign .input input {
303 border: none;
304 padding: 0vw .5vw;
305 margin: 0vw 0vw 0vw 0vw;
306 width: 80%;
307}
308
309.footer .top .sign .input i.fa-chevron-right {
310 background-color: #cfab53;
311 color: white;
312 padding: 5px;
313 width: 10%;
314 text-align: center;
315 cursor: pointer;
316}
317
318.footer .top .sign .input i.fa-chevron-right:hover {
319 background-color: #bb9c4d;
320}
321
322.footer .bottom {
323 display: flex;
324 justify-content: flex-end;
325 align-items: center;
326}
327
328.footer .socials {
329 display: flex;
330 justify-content: flex-end;
331 align-items: center;
332}
333
334.footer .socials * {
335 padding: .5vw;
336 font-size: 12px;
337 letter-spacing: -1px;
338}
339
340.footer .socials a:hover {
341 color: #cfab53;
342}
343
344.footer .socials .icons i {
345 font-size: 18px;
346 font-weight: 700;
347}
348
349.footer .socials .icons i.fa-instagram:hover {
350 color: #bc2a8d;
351}
352
353.footer .socials .icons i.fa-pinterest:hover {
354 color: #bd081c;
355}
356
357.footer .socials .icons i.fa-twitter:hover {
358 color: #1DA1F2;
359}<div class="title container" id="menu">
360 <div class="logo container">
361 <h1>κοσμήματα</h1>
362 <h3>kosmimata jewelry</h3>
363 </div>
364 <div class="menu container">
365 <ul>
366 <li><a href="../pages/index.html">Home</a></li>
367 <li><a id="shop">Shop</a></li>
368 <li><a href="../pages/blog.html">Blog</a></li>
369 <li><a id="search"><i class="fas fa-search"></i></a></li>
370 <li><a id="cart"><i class="fas fa-shopping-cart"></i></a></li>
371 </ul>
372 </div>
373</div>
374<div class="sidebar container">
375 <div class="inner">
376 <div class="categories">
377 <h5><a href="./product-display-bracelets-and-anklets.html">Bracelets + Anklets</a></h5>
378 <p><a href="#bracelets">Bracelets</a></p>
379 <p><a href="#chain">Chain Bracelets</a></p>
380 <p><a href="#cuff">Cuffs And Bangles</a></p>
381 <p><a href="#zodaic">Zodiac Bracelets</a></p>
382 <p><a href="#mens">Men's Bracelets</a></p>
383 <p><a href="#anklets">Anklets</a></p>
384 </div>
385 <div class="categories">
386 <h5><a href="./product-display-wedding.html">Wedding</a></h5>
387 </div>
388 <div class="categories">
389 <h5><a href="./product-display-mens.html">Men's</a></h5>
390 </div>
391 </div>
392</div>
393
394<div class="main container">
395 <div id="bracelets" class="category container">
396 <h2>Bracelets</h2>
397 <hr>
398 <div class="products">
399 <div class="card">
400 <div class="prodimg">
401 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
402 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
403 </div>
404 <div class="desc">
405 <h3><a>Circle Bracelet</a></h3>
406 <p>$120.00</p>
407 </div>
408 <div class="type">
409 <div class="border">
410 <div class="color"></div>
411 </div>
412 <p>14k Yellow Gold</p>
413 </div>
414 </div>
415 <div class="card">
416 <div class="prodimg">
417 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
418 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
419 </div>
420 <div class="desc">
421 <h3><a>Circle Bracelet</a></h3>
422 <p>$120.00</p>
423 </div>
424 <div class="type">
425 <div class="border">
426 <div class="color"></div>
427 </div>
428 <p>14k Yellow Gold</p>
429 </div>
430 </div>
431 <div class="card">
432 <div class="prodimg">
433 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
434 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
435 </div>
436 <div class="desc">
437 <h3><a>Circle Bracelet</a></h3>
438 <p>$120.00</p>
439 </div>
440 <div class="type">
441 <div class="border">
442 <div class="color"></div>
443 </div>
444 <p>14k Yellow Gold</p>
445 </div>
446 </div>
447 <div class="card">
448 <div class="prodimg">
449 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
450 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
451 </div>
452 <div class="desc">
453 <h3><a>Circle Bracelet</a></h3>
454 <p>$120.00</p>
455 </div>
456 <div class="type">
457 <div class="border">
458 <div class="color"></div>
459 </div>
460 <p>14k Yellow Gold</p>
461 </div>
462 </div>
463 <div class="card">
464 <div class="prodimg">
465 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
466 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
467 </div>
468 <div class="desc">
469 <h3><a>Circle Bracelet</a></h3>
470 <p>$120.00</p>
471 </div>
472 <div class="type">
473 <div class="border">
474 <div class="color"></div>
475 </div>
476 <p>14k Yellow Gold</p>
477 </div>
478 </div>
479 </div>
480 </div>
481 <div id="chain" class="category container">
482 <h2>Chain Bracelets</h2>
483 <hr>
484 <div class="products">
485 <div class="card">
486 <div class="prodimg">
487 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
488 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
489 </div>
490 <div class="desc">
491 <h3><a>Circle Bracelet</a></h3>
492 <p>$120.00</p>
493 </div>
494 <div class="type">
495 <div class="border">
496 <div class="color"></div>
497 </div>
498 <p>14k Yellow Gold</p>
499 </div>
500 </div>
501 <div class="card">
502 <div class="prodimg">
503 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
504 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
505 </div>
506 <div class="desc">
507 <h3><a>Circle Bracelet</a></h3>
508 <p>$120.00</p>
509 </div>
510 <div class="type">
511 <div class="border">
512 <div class="color"></div>
513 </div>
514 <p>14k Yellow Gold</p>
515 </div>
516 </div>
517 <div class="card">
518 <div class="prodimg">
519 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
520 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
521 </div>
522 <div class="desc">
523 <h3><a>Circle Bracelet</a></h3>
524 <p>$120.00</p>
525 </div>
526 <div class="type">
527 <div class="border">
528 <div class="color"></div>
529 </div>
530 <p>14k Yellow Gold</p>
531 </div>
532 </div>
533 <div class="card">
534 <div class="prodimg">
535 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
536 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
537 </div>
538 <div class="desc">
539 <h3><a>Circle Bracelet</a></h3>
540 <p>$120.00</p>
541 </div>
542 <div class="type">
543 <div class="border">
544 <div class="color"></div>
545 </div>
546 <p>14k Yellow Gold</p>
547 </div>
548 </div>
549 <div class="card">
550 <div class="prodimg">
551 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
552 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
553 </div>
554 <div class="desc">
555 <h3><a>Circle Bracelet</a></h3>
556 <p>$120.00</p>
557 </div>
558 <div class="type">
559 <div class="border">
560 <div class="color"></div>
561 </div>
562 <p>14k Yellow Gold</p>
563 </div>
564 </div>
565 </div>
566 </div>
567 <div id="cuff" class="category container">
568 <h2>Cuffs And Bangles</h2>
569 <hr>
570 <div class="products">
571 <div class="card">
572 <div class="prodimg">
573 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
574 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
575 </div>
576 <div class="desc">
577 <h3><a>Circle Bracelet</a></h3>
578 <p>$120.00</p>
579 </div>
580 <div class="type">
581 <div class="border">
582 <div class="color"></div>
583 </div>
584 <p>14k Yellow Gold</p>
585 </div>
586 </div>
587 <div class="card">
588 <div class="prodimg">
589 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
590 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
591 </div>
592 <div class="desc">
593 <h3><a>Circle Bracelet</a></h3>
594 <p>$120.00</p>
595 </div>
596 <div class="type">
597 <div class="border">
598 <div class="color"></div>
599 </div>
600 <p>14k Yellow Gold</p>
601 </div>
602 </div>
603 <div class="card">
604 <div class="prodimg">
605 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
606 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
607 </div>
608 <div class="desc">
609 <h3><a>Circle Bracelet</a></h3>
610 <p>$120.00</p>
611 </div>
612 <div class="type">
613 <div class="border">
614 <div class="color"></div>
615 </div>
616 <p>14k Yellow Gold</p>
617 </div>
618 </div>
619 <div class="card">
620 <div class="prodimg">
621 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
622 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
623 </div>
624 <div class="desc">
625 <h3><a>Circle Bracelet</a></h3>
626 <p>$120.00</p>
627 </div>
628 <div class="type">
629 <div class="border">
630 <div class="color"></div>
631 </div>
632 <p>14k Yellow Gold</p>
633 </div>
634 </div>
635 <div class="card">
636 <div class="prodimg">
637 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
638 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
639 </div>
640 <div class="desc">
641 <h3><a>Circle Bracelet</a></h3>
642 <p>$120.00</p>
643 </div>
644 <div class="type">
645 <div class="border">
646 <div class="color"></div>
647 </div>
648 <p>14k Yellow Gold</p>
649 </div>
650 </div>
651 </div>
652 </div>
653
654</div>
655
656<div id="foot" class="footer container">
657 <div class="logo container">
658 <h1>κοσμήματα</h1>
659 </div>
660 <div class="top">
661 <div class="site column">
662 <h3>Kosmimata jewelry</h3>
663 <p>Accessorise yourself with the best there is</p>
664 </div>
665 <div class="customer column">
666 <h1>Customer Care</h1>
667 <ul>
668 <li><a href="./faq.html#shipping">Shipping & Returns</a></li>
669 <li><a href="./order-status.html">Order Status</a></li>
670 <li><a href="./faq.html#payment">Payment Methods</a></li>
671 <li><a href="./ring-sizer.html">Ring Sizer</a></li>
672 </ul>
673 </div>
674 <div class="contact column">
675 <div class="address">
676 <h1>Visit</h1>
677 <p>1985 Bel Meadow Drive,</p>
678 <p>Los Angeles, California</p>
679 <p>90017</p>
680 </div>
681 <div class="email">
682 <a href="mailto:info@kosmimata.com">info@kosmimata.com</a>
683 <a href="tel:+1 213-829-0743">213-829-0743</a>
684 </div>
685 </div>
686 <div class="sign column">
687 <p>Sign up to have insider info on new arrivals, early access and more.</p>
688 <div class="input">
689 <i class="far fa-envelope"></i>
690 <input type="email" placeholder="Your Email">
691 <i class="fas fa-chevron-right"></i>
692 </div>
693 </div>
694 </div>
695 <div class="bottom">
696 <div class="socials">
697 <a href="./terms&conditions.html">Terms and Conditions</a>
698 <a href="./privacy-policy.html">Privacy Policy</a>
699 <a href="./sitemap.html">Site Map</a>
700 <p>&copy;Kosmimata Inc.</p>
701 <div class="icons">
702 <a href=""><i class="fab fa-instagram"></i></a><a href=""><i class="fab fa-pinterest"></i></a><a href=""><i class="fab fa-twitter"></i></a>
703 </div>
704 </div>
705 </div>
706</div>
ANSWER
Answered 2021-Dec-07 at 15:43It looks like you are trying to have the sidebar follow the content until there's not enough space, then it locks in place. You could do this with JS, but it's far easier with CSS position:sticky;
Here's MDN's documentation
StickyThe element is positioned according to the normal flow of the document, and then offset relative to its nearest scrolling ancestor and containing block (nearest block-level ancestor), including table-related elements, based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements.
1a {
2 text-decoration: none;
3 transition: all 0.3s;
4 color: black;
5 font-family: 'Montserrat', sans-serif;
6 cursor: pointer;
7}
8
9ul,
10ol {
11 list-style: none;
12 font-family: 'Montserrat', sans-serif;
13}
14
15.menu.container {
16 padding: 1vw;
17 font-family: 'Montserrat', sans-serif;
18}
19
20.menu ul li {
21 display: inline-block;
22 padding: 1vw;
23}
24
25.menu ul li a {
26 padding: 1vw;
27 font-size: 1.3vw;
28}
29
30.menu ul li a:hover {
31 border-bottom: .2em solid black;
32}
33
34.title.container {
35 width: 100%;
36 position: fixed;
37 top: 0;
38 display: flex;
39 justify-content: space-between;
40 align-items: center;
41 background-color: #fff;
42 /* border-top: 1px solid #cfab53; */
43 border-bottom: 1px solid #cfab53;
44 z-index: 2;
45 /* margin-top: 2vw; */
46 /* box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
47 -webkit-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
48 -moz-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58); */
49}
50
51.title .logo {
52 padding: 1vw;
53}
54
55.title .logo h1 {
56 font-family: 'GFS Didot', serif;
57 color: #cfab53;
58 font-size: 2.5vw;
59 cursor: pointer;
60}
61
62.title .logo h3 {
63 font-family: 'Dancing Script', cursive;
64 /* color: #a1919e; */
65 font-size: 1.3vw;
66 font-weight: 400;
67}
68
69.sidebar.container {
70 position: fixed;
71 bottom: 0;
72 left: 0;
73 top: 6.7vw;
74 width: 20%;
75 z-index: 1;
76 text-transform: uppercase;
77 /* overflow-y: scroll; */
78 padding: 1vw;
79}
80
81.sidebar .inner .categories * {
82 padding: .5vw;
83}
84
85.sidebar .inner .categories h5 {
86 font-size: 15px;
87 font-weight: 400;
88}
89
90.sidebar .inner .categories p {
91 font-size: 13px;
92 text-indent: 1vw;
93}
94
95.sidebar .inner .categories h5 a:hover,
96.sidebar .inner .categories p a:hover {
97 color: #cfab53;
98}
99
100.main.container {
101 /* right: 0;
102 bottom: 0;
103 left: 20%;
104 top: 0vw;
105 position: absolute; */
106 width: 100%;
107 padding: 1vw;
108 z-index: 0;
109 display: flex;
110 flex-direction: column;
111 align-items: flex-end;
112}
113
114.main .category {
115 padding-top: 6.7vw;
116 width: 80%;
117}
118
119.main .category h2 {
120 padding: 1vw;
121}
122
123.main .category hr {
124 border: none;
125 border-top: .1vw solid #cfab53;
126 width: 50%;
127 margin-left: 1vw;
128 margin-bottom: 1vw;
129}
130
131.main .category .products {
132 display: flex;
133 flex-wrap: wrap;
134}
135
136.main .category .products .card {
137 width: 30%;
138 margin: 1vw;
139 padding: 1vw;
140 /* border: 1px solid #cfab53; */
141 position: relative;
142 min-height: 28vw;
143}
144
145.main .category .products .card .prodimg img {
146 width: 100%;
147 position: absolute;
148 top: 0;
149 left: 0;
150 background-color: #cfab53;
151 min-height: 20vw;
152}
153
154.main .category .products .card .prodimg img.primary {
155 z-index: 1;
156}
157
158.main .category .products .card .prodimg:hover img.primary {
159 display: none;
160}
161
162.main .category .products .card .desc {
163 display: flex;
164 justify-content: space-between;
165 width: 100%;
166 position: absolute;
167 left: 0;
168 bottom: 2vw;
169}
170
171.main .category .products .card .desc h3 a:hover {
172 color: #cfab53;
173}
174
175.main .category .products .card .type {
176 display: flex;
177 width: 100%;
178 position: absolute;
179 left: 0;
180 bottom: 0;
181 align-items: center;
182}
183
184.main .category .products .card .type .border {
185 border-radius: 10000px;
186 border: 1px solid #bdbdbd;
187 padding: 2px;
188 margin-right: 5px;
189}
190
191.main .category .products .card .type .border .color {
192 border-radius: 10000px;
193 width: 13px;
194 height: 13px;
195 background-color: #cfab53;
196}
197
198.footer.container {
199 /* position: absolute;
200 bottom: 0;
201 left: 0;
202 right: 0; */
203 width: 100%;
204 border-top: 1px solid #cfab53;
205 background-color: white;
206}
207
208.footer .top {
209 display: flex;
210 padding: 1vw;
211 justify-content: space-between;
212 align-items: flex-start;
213}
214
215.footer .top .column {
216 width: 25%;
217 padding: 1vw;
218}
219
220.footer .top .column h1 {
221 font-size: 23px;
222 letter-spacing: -2px;
223 padding: .5vw;
224}
225
226.footer .top .column p {
227 letter-spacing: -1px;
228 font-size: 15px;
229}
230
231.footer .top .column a {
232 letter-spacing: -1px;
233 font-size: 15px;
234}
235
236.footer .top .column a:hover {
237 color: #cfab53;
238}
239
240.footer .logo {
241 padding: 1vw 2vw 0vw;
242}
243
244.footer .logo h1 {
245 font-family: 'GFS Didot', serif;
246 color: #cfab53;
247 font-size: 35px;
248 letter-spacing: normal;
249 cursor: pointer;
250}
251
252.footer .top .site h3 {
253 font-family: 'Dancing Script', cursive;
254 font-size: 30px;
255 font-weight: 400;
256}
257
258.footer .top .site p {
259 font-size: 15px;
260 padding: 1vw 0vw;
261 font-weight: 600;
262 letter-spacing: normal;
263}
264
265.footer .top .customer ul li {
266 padding: .3vw .5vw;
267}
268
269.footer .top .customer ul li a {
270 letter-spacing: -1px;
271 font-size: 15px;
272}
273
274.footer .top .contact p,
275.footer .top .contact a {
276 padding: .3vw .5vw;
277}
278
279.footer .top .contact .email {
280 display: flex;
281 flex-direction: column;
282}
283
284.footer .top .sign p {
285 padding: .5vw 0;
286}
287
288.footer .top .sign .input {
289 display: flex;
290 flex-wrap: nowrap;
291 align-items: center;
292 border: 1px solid #cfab53;
293 margin: 1vw 0vw;
294}
295
296.footer .top .sign .input .fa-envelope {
297 color: #cfab53;
298 padding: 0vw 0vw 0vw .5vw;
299 width: 10%;
300}
301
302.footer .top .sign .input input {
303 border: none;
304 padding: 0vw .5vw;
305 margin: 0vw 0vw 0vw 0vw;
306 width: 80%;
307}
308
309.footer .top .sign .input i.fa-chevron-right {
310 background-color: #cfab53;
311 color: white;
312 padding: 5px;
313 width: 10%;
314 text-align: center;
315 cursor: pointer;
316}
317
318.footer .top .sign .input i.fa-chevron-right:hover {
319 background-color: #bb9c4d;
320}
321
322.footer .bottom {
323 display: flex;
324 justify-content: flex-end;
325 align-items: center;
326}
327
328.footer .socials {
329 display: flex;
330 justify-content: flex-end;
331 align-items: center;
332}
333
334.footer .socials * {
335 padding: .5vw;
336 font-size: 12px;
337 letter-spacing: -1px;
338}
339
340.footer .socials a:hover {
341 color: #cfab53;
342}
343
344.footer .socials .icons i {
345 font-size: 18px;
346 font-weight: 700;
347}
348
349.footer .socials .icons i.fa-instagram:hover {
350 color: #bc2a8d;
351}
352
353.footer .socials .icons i.fa-pinterest:hover {
354 color: #bd081c;
355}
356
357.footer .socials .icons i.fa-twitter:hover {
358 color: #1DA1F2;
359}<div class="title container" id="menu">
360 <div class="logo container">
361 <h1>κοσμήματα</h1>
362 <h3>kosmimata jewelry</h3>
363 </div>
364 <div class="menu container">
365 <ul>
366 <li><a href="../pages/index.html">Home</a></li>
367 <li><a id="shop">Shop</a></li>
368 <li><a href="../pages/blog.html">Blog</a></li>
369 <li><a id="search"><i class="fas fa-search"></i></a></li>
370 <li><a id="cart"><i class="fas fa-shopping-cart"></i></a></li>
371 </ul>
372 </div>
373</div>
374<div class="sidebar container">
375 <div class="inner">
376 <div class="categories">
377 <h5><a href="./product-display-bracelets-and-anklets.html">Bracelets + Anklets</a></h5>
378 <p><a href="#bracelets">Bracelets</a></p>
379 <p><a href="#chain">Chain Bracelets</a></p>
380 <p><a href="#cuff">Cuffs And Bangles</a></p>
381 <p><a href="#zodaic">Zodiac Bracelets</a></p>
382 <p><a href="#mens">Men's Bracelets</a></p>
383 <p><a href="#anklets">Anklets</a></p>
384 </div>
385 <div class="categories">
386 <h5><a href="./product-display-wedding.html">Wedding</a></h5>
387 </div>
388 <div class="categories">
389 <h5><a href="./product-display-mens.html">Men's</a></h5>
390 </div>
391 </div>
392</div>
393
394<div class="main container">
395 <div id="bracelets" class="category container">
396 <h2>Bracelets</h2>
397 <hr>
398 <div class="products">
399 <div class="card">
400 <div class="prodimg">
401 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
402 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
403 </div>
404 <div class="desc">
405 <h3><a>Circle Bracelet</a></h3>
406 <p>$120.00</p>
407 </div>
408 <div class="type">
409 <div class="border">
410 <div class="color"></div>
411 </div>
412 <p>14k Yellow Gold</p>
413 </div>
414 </div>
415 <div class="card">
416 <div class="prodimg">
417 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
418 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
419 </div>
420 <div class="desc">
421 <h3><a>Circle Bracelet</a></h3>
422 <p>$120.00</p>
423 </div>
424 <div class="type">
425 <div class="border">
426 <div class="color"></div>
427 </div>
428 <p>14k Yellow Gold</p>
429 </div>
430 </div>
431 <div class="card">
432 <div class="prodimg">
433 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
434 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
435 </div>
436 <div class="desc">
437 <h3><a>Circle Bracelet</a></h3>
438 <p>$120.00</p>
439 </div>
440 <div class="type">
441 <div class="border">
442 <div class="color"></div>
443 </div>
444 <p>14k Yellow Gold</p>
445 </div>
446 </div>
447 <div class="card">
448 <div class="prodimg">
449 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
450 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
451 </div>
452 <div class="desc">
453 <h3><a>Circle Bracelet</a></h3>
454 <p>$120.00</p>
455 </div>
456 <div class="type">
457 <div class="border">
458 <div class="color"></div>
459 </div>
460 <p>14k Yellow Gold</p>
461 </div>
462 </div>
463 <div class="card">
464 <div class="prodimg">
465 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
466 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
467 </div>
468 <div class="desc">
469 <h3><a>Circle Bracelet</a></h3>
470 <p>$120.00</p>
471 </div>
472 <div class="type">
473 <div class="border">
474 <div class="color"></div>
475 </div>
476 <p>14k Yellow Gold</p>
477 </div>
478 </div>
479 </div>
480 </div>
481 <div id="chain" class="category container">
482 <h2>Chain Bracelets</h2>
483 <hr>
484 <div class="products">
485 <div class="card">
486 <div class="prodimg">
487 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
488 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
489 </div>
490 <div class="desc">
491 <h3><a>Circle Bracelet</a></h3>
492 <p>$120.00</p>
493 </div>
494 <div class="type">
495 <div class="border">
496 <div class="color"></div>
497 </div>
498 <p>14k Yellow Gold</p>
499 </div>
500 </div>
501 <div class="card">
502 <div class="prodimg">
503 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
504 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
505 </div>
506 <div class="desc">
507 <h3><a>Circle Bracelet</a></h3>
508 <p>$120.00</p>
509 </div>
510 <div class="type">
511 <div class="border">
512 <div class="color"></div>
513 </div>
514 <p>14k Yellow Gold</p>
515 </div>
516 </div>
517 <div class="card">
518 <div class="prodimg">
519 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
520 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
521 </div>
522 <div class="desc">
523 <h3><a>Circle Bracelet</a></h3>
524 <p>$120.00</p>
525 </div>
526 <div class="type">
527 <div class="border">
528 <div class="color"></div>
529 </div>
530 <p>14k Yellow Gold</p>
531 </div>
532 </div>
533 <div class="card">
534 <div class="prodimg">
535 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
536 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
537 </div>
538 <div class="desc">
539 <h3><a>Circle Bracelet</a></h3>
540 <p>$120.00</p>
541 </div>
542 <div class="type">
543 <div class="border">
544 <div class="color"></div>
545 </div>
546 <p>14k Yellow Gold</p>
547 </div>
548 </div>
549 <div class="card">
550 <div class="prodimg">
551 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
552 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
553 </div>
554 <div class="desc">
555 <h3><a>Circle Bracelet</a></h3>
556 <p>$120.00</p>
557 </div>
558 <div class="type">
559 <div class="border">
560 <div class="color"></div>
561 </div>
562 <p>14k Yellow Gold</p>
563 </div>
564 </div>
565 </div>
566 </div>
567 <div id="cuff" class="category container">
568 <h2>Cuffs And Bangles</h2>
569 <hr>
570 <div class="products">
571 <div class="card">
572 <div class="prodimg">
573 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
574 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
575 </div>
576 <div class="desc">
577 <h3><a>Circle Bracelet</a></h3>
578 <p>$120.00</p>
579 </div>
580 <div class="type">
581 <div class="border">
582 <div class="color"></div>
583 </div>
584 <p>14k Yellow Gold</p>
585 </div>
586 </div>
587 <div class="card">
588 <div class="prodimg">
589 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
590 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
591 </div>
592 <div class="desc">
593 <h3><a>Circle Bracelet</a></h3>
594 <p>$120.00</p>
595 </div>
596 <div class="type">
597 <div class="border">
598 <div class="color"></div>
599 </div>
600 <p>14k Yellow Gold</p>
601 </div>
602 </div>
603 <div class="card">
604 <div class="prodimg">
605 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
606 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
607 </div>
608 <div class="desc">
609 <h3><a>Circle Bracelet</a></h3>
610 <p>$120.00</p>
611 </div>
612 <div class="type">
613 <div class="border">
614 <div class="color"></div>
615 </div>
616 <p>14k Yellow Gold</p>
617 </div>
618 </div>
619 <div class="card">
620 <div class="prodimg">
621 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
622 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
623 </div>
624 <div class="desc">
625 <h3><a>Circle Bracelet</a></h3>
626 <p>$120.00</p>
627 </div>
628 <div class="type">
629 <div class="border">
630 <div class="color"></div>
631 </div>
632 <p>14k Yellow Gold</p>
633 </div>
634 </div>
635 <div class="card">
636 <div class="prodimg">
637 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
638 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
639 </div>
640 <div class="desc">
641 <h3><a>Circle Bracelet</a></h3>
642 <p>$120.00</p>
643 </div>
644 <div class="type">
645 <div class="border">
646 <div class="color"></div>
647 </div>
648 <p>14k Yellow Gold</p>
649 </div>
650 </div>
651 </div>
652 </div>
653
654</div>
655
656<div id="foot" class="footer container">
657 <div class="logo container">
658 <h1>κοσμήματα</h1>
659 </div>
660 <div class="top">
661 <div class="site column">
662 <h3>Kosmimata jewelry</h3>
663 <p>Accessorise yourself with the best there is</p>
664 </div>
665 <div class="customer column">
666 <h1>Customer Care</h1>
667 <ul>
668 <li><a href="./faq.html#shipping">Shipping & Returns</a></li>
669 <li><a href="./order-status.html">Order Status</a></li>
670 <li><a href="./faq.html#payment">Payment Methods</a></li>
671 <li><a href="./ring-sizer.html">Ring Sizer</a></li>
672 </ul>
673 </div>
674 <div class="contact column">
675 <div class="address">
676 <h1>Visit</h1>
677 <p>1985 Bel Meadow Drive,</p>
678 <p>Los Angeles, California</p>
679 <p>90017</p>
680 </div>
681 <div class="email">
682 <a href="mailto:info@kosmimata.com">info@kosmimata.com</a>
683 <a href="tel:+1 213-829-0743">213-829-0743</a>
684 </div>
685 </div>
686 <div class="sign column">
687 <p>Sign up to have insider info on new arrivals, early access and more.</p>
688 <div class="input">
689 <i class="far fa-envelope"></i>
690 <input type="email" placeholder="Your Email">
691 <i class="fas fa-chevron-right"></i>
692 </div>
693 </div>
694 </div>
695 <div class="bottom">
696 <div class="socials">
697 <a href="./terms&conditions.html">Terms and Conditions</a>
698 <a href="./privacy-policy.html">Privacy Policy</a>
699 <a href="./sitemap.html">Site Map</a>
700 <p>&copy;Kosmimata Inc.</p>
701 <div class="icons">
702 <a href=""><i class="fab fa-instagram"></i></a><a href=""><i class="fab fa-pinterest"></i></a><a href=""><i class="fab fa-twitter"></i></a>
703 </div>
704 </div>
705 </div>
706</div>position: -webkit-sticky;
707position: sticky;
708top: 20px;
709
You will need to tweak the HTML so that the sidebar and main content are in the same container for this to work. There are also a few CSS changes that I made as well.
Try this:1a {
2 text-decoration: none;
3 transition: all 0.3s;
4 color: black;
5 font-family: 'Montserrat', sans-serif;
6 cursor: pointer;
7}
8
9ul,
10ol {
11 list-style: none;
12 font-family: 'Montserrat', sans-serif;
13}
14
15.menu.container {
16 padding: 1vw;
17 font-family: 'Montserrat', sans-serif;
18}
19
20.menu ul li {
21 display: inline-block;
22 padding: 1vw;
23}
24
25.menu ul li a {
26 padding: 1vw;
27 font-size: 1.3vw;
28}
29
30.menu ul li a:hover {
31 border-bottom: .2em solid black;
32}
33
34.title.container {
35 width: 100%;
36 position: fixed;
37 top: 0;
38 display: flex;
39 justify-content: space-between;
40 align-items: center;
41 background-color: #fff;
42 /* border-top: 1px solid #cfab53; */
43 border-bottom: 1px solid #cfab53;
44 z-index: 2;
45 /* margin-top: 2vw; */
46 /* box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
47 -webkit-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
48 -moz-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58); */
49}
50
51.title .logo {
52 padding: 1vw;
53}
54
55.title .logo h1 {
56 font-family: 'GFS Didot', serif;
57 color: #cfab53;
58 font-size: 2.5vw;
59 cursor: pointer;
60}
61
62.title .logo h3 {
63 font-family: 'Dancing Script', cursive;
64 /* color: #a1919e; */
65 font-size: 1.3vw;
66 font-weight: 400;
67}
68
69.sidebar.container {
70 position: fixed;
71 bottom: 0;
72 left: 0;
73 top: 6.7vw;
74 width: 20%;
75 z-index: 1;
76 text-transform: uppercase;
77 /* overflow-y: scroll; */
78 padding: 1vw;
79}
80
81.sidebar .inner .categories * {
82 padding: .5vw;
83}
84
85.sidebar .inner .categories h5 {
86 font-size: 15px;
87 font-weight: 400;
88}
89
90.sidebar .inner .categories p {
91 font-size: 13px;
92 text-indent: 1vw;
93}
94
95.sidebar .inner .categories h5 a:hover,
96.sidebar .inner .categories p a:hover {
97 color: #cfab53;
98}
99
100.main.container {
101 /* right: 0;
102 bottom: 0;
103 left: 20%;
104 top: 0vw;
105 position: absolute; */
106 width: 100%;
107 padding: 1vw;
108 z-index: 0;
109 display: flex;
110 flex-direction: column;
111 align-items: flex-end;
112}
113
114.main .category {
115 padding-top: 6.7vw;
116 width: 80%;
117}
118
119.main .category h2 {
120 padding: 1vw;
121}
122
123.main .category hr {
124 border: none;
125 border-top: .1vw solid #cfab53;
126 width: 50%;
127 margin-left: 1vw;
128 margin-bottom: 1vw;
129}
130
131.main .category .products {
132 display: flex;
133 flex-wrap: wrap;
134}
135
136.main .category .products .card {
137 width: 30%;
138 margin: 1vw;
139 padding: 1vw;
140 /* border: 1px solid #cfab53; */
141 position: relative;
142 min-height: 28vw;
143}
144
145.main .category .products .card .prodimg img {
146 width: 100%;
147 position: absolute;
148 top: 0;
149 left: 0;
150 background-color: #cfab53;
151 min-height: 20vw;
152}
153
154.main .category .products .card .prodimg img.primary {
155 z-index: 1;
156}
157
158.main .category .products .card .prodimg:hover img.primary {
159 display: none;
160}
161
162.main .category .products .card .desc {
163 display: flex;
164 justify-content: space-between;
165 width: 100%;
166 position: absolute;
167 left: 0;
168 bottom: 2vw;
169}
170
171.main .category .products .card .desc h3 a:hover {
172 color: #cfab53;
173}
174
175.main .category .products .card .type {
176 display: flex;
177 width: 100%;
178 position: absolute;
179 left: 0;
180 bottom: 0;
181 align-items: center;
182}
183
184.main .category .products .card .type .border {
185 border-radius: 10000px;
186 border: 1px solid #bdbdbd;
187 padding: 2px;
188 margin-right: 5px;
189}
190
191.main .category .products .card .type .border .color {
192 border-radius: 10000px;
193 width: 13px;
194 height: 13px;
195 background-color: #cfab53;
196}
197
198.footer.container {
199 /* position: absolute;
200 bottom: 0;
201 left: 0;
202 right: 0; */
203 width: 100%;
204 border-top: 1px solid #cfab53;
205 background-color: white;
206}
207
208.footer .top {
209 display: flex;
210 padding: 1vw;
211 justify-content: space-between;
212 align-items: flex-start;
213}
214
215.footer .top .column {
216 width: 25%;
217 padding: 1vw;
218}
219
220.footer .top .column h1 {
221 font-size: 23px;
222 letter-spacing: -2px;
223 padding: .5vw;
224}
225
226.footer .top .column p {
227 letter-spacing: -1px;
228 font-size: 15px;
229}
230
231.footer .top .column a {
232 letter-spacing: -1px;
233 font-size: 15px;
234}
235
236.footer .top .column a:hover {
237 color: #cfab53;
238}
239
240.footer .logo {
241 padding: 1vw 2vw 0vw;
242}
243
244.footer .logo h1 {
245 font-family: 'GFS Didot', serif;
246 color: #cfab53;
247 font-size: 35px;
248 letter-spacing: normal;
249 cursor: pointer;
250}
251
252.footer .top .site h3 {
253 font-family: 'Dancing Script', cursive;
254 font-size: 30px;
255 font-weight: 400;
256}
257
258.footer .top .site p {
259 font-size: 15px;
260 padding: 1vw 0vw;
261 font-weight: 600;
262 letter-spacing: normal;
263}
264
265.footer .top .customer ul li {
266 padding: .3vw .5vw;
267}
268
269.footer .top .customer ul li a {
270 letter-spacing: -1px;
271 font-size: 15px;
272}
273
274.footer .top .contact p,
275.footer .top .contact a {
276 padding: .3vw .5vw;
277}
278
279.footer .top .contact .email {
280 display: flex;
281 flex-direction: column;
282}
283
284.footer .top .sign p {
285 padding: .5vw 0;
286}
287
288.footer .top .sign .input {
289 display: flex;
290 flex-wrap: nowrap;
291 align-items: center;
292 border: 1px solid #cfab53;
293 margin: 1vw 0vw;
294}
295
296.footer .top .sign .input .fa-envelope {
297 color: #cfab53;
298 padding: 0vw 0vw 0vw .5vw;
299 width: 10%;
300}
301
302.footer .top .sign .input input {
303 border: none;
304 padding: 0vw .5vw;
305 margin: 0vw 0vw 0vw 0vw;
306 width: 80%;
307}
308
309.footer .top .sign .input i.fa-chevron-right {
310 background-color: #cfab53;
311 color: white;
312 padding: 5px;
313 width: 10%;
314 text-align: center;
315 cursor: pointer;
316}
317
318.footer .top .sign .input i.fa-chevron-right:hover {
319 background-color: #bb9c4d;
320}
321
322.footer .bottom {
323 display: flex;
324 justify-content: flex-end;
325 align-items: center;
326}
327
328.footer .socials {
329 display: flex;
330 justify-content: flex-end;
331 align-items: center;
332}
333
334.footer .socials * {
335 padding: .5vw;
336 font-size: 12px;
337 letter-spacing: -1px;
338}
339
340.footer .socials a:hover {
341 color: #cfab53;
342}
343
344.footer .socials .icons i {
345 font-size: 18px;
346 font-weight: 700;
347}
348
349.footer .socials .icons i.fa-instagram:hover {
350 color: #bc2a8d;
351}
352
353.footer .socials .icons i.fa-pinterest:hover {
354 color: #bd081c;
355}
356
357.footer .socials .icons i.fa-twitter:hover {
358 color: #1DA1F2;
359}<div class="title container" id="menu">
360 <div class="logo container">
361 <h1>κοσμήματα</h1>
362 <h3>kosmimata jewelry</h3>
363 </div>
364 <div class="menu container">
365 <ul>
366 <li><a href="../pages/index.html">Home</a></li>
367 <li><a id="shop">Shop</a></li>
368 <li><a href="../pages/blog.html">Blog</a></li>
369 <li><a id="search"><i class="fas fa-search"></i></a></li>
370 <li><a id="cart"><i class="fas fa-shopping-cart"></i></a></li>
371 </ul>
372 </div>
373</div>
374<div class="sidebar container">
375 <div class="inner">
376 <div class="categories">
377 <h5><a href="./product-display-bracelets-and-anklets.html">Bracelets + Anklets</a></h5>
378 <p><a href="#bracelets">Bracelets</a></p>
379 <p><a href="#chain">Chain Bracelets</a></p>
380 <p><a href="#cuff">Cuffs And Bangles</a></p>
381 <p><a href="#zodaic">Zodiac Bracelets</a></p>
382 <p><a href="#mens">Men's Bracelets</a></p>
383 <p><a href="#anklets">Anklets</a></p>
384 </div>
385 <div class="categories">
386 <h5><a href="./product-display-wedding.html">Wedding</a></h5>
387 </div>
388 <div class="categories">
389 <h5><a href="./product-display-mens.html">Men's</a></h5>
390 </div>
391 </div>
392</div>
393
394<div class="main container">
395 <div id="bracelets" class="category container">
396 <h2>Bracelets</h2>
397 <hr>
398 <div class="products">
399 <div class="card">
400 <div class="prodimg">
401 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
402 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
403 </div>
404 <div class="desc">
405 <h3><a>Circle Bracelet</a></h3>
406 <p>$120.00</p>
407 </div>
408 <div class="type">
409 <div class="border">
410 <div class="color"></div>
411 </div>
412 <p>14k Yellow Gold</p>
413 </div>
414 </div>
415 <div class="card">
416 <div class="prodimg">
417 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
418 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
419 </div>
420 <div class="desc">
421 <h3><a>Circle Bracelet</a></h3>
422 <p>$120.00</p>
423 </div>
424 <div class="type">
425 <div class="border">
426 <div class="color"></div>
427 </div>
428 <p>14k Yellow Gold</p>
429 </div>
430 </div>
431 <div class="card">
432 <div class="prodimg">
433 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
434 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
435 </div>
436 <div class="desc">
437 <h3><a>Circle Bracelet</a></h3>
438 <p>$120.00</p>
439 </div>
440 <div class="type">
441 <div class="border">
442 <div class="color"></div>
443 </div>
444 <p>14k Yellow Gold</p>
445 </div>
446 </div>
447 <div class="card">
448 <div class="prodimg">
449 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
450 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
451 </div>
452 <div class="desc">
453 <h3><a>Circle Bracelet</a></h3>
454 <p>$120.00</p>
455 </div>
456 <div class="type">
457 <div class="border">
458 <div class="color"></div>
459 </div>
460 <p>14k Yellow Gold</p>
461 </div>
462 </div>
463 <div class="card">
464 <div class="prodimg">
465 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
466 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
467 </div>
468 <div class="desc">
469 <h3><a>Circle Bracelet</a></h3>
470 <p>$120.00</p>
471 </div>
472 <div class="type">
473 <div class="border">
474 <div class="color"></div>
475 </div>
476 <p>14k Yellow Gold</p>
477 </div>
478 </div>
479 </div>
480 </div>
481 <div id="chain" class="category container">
482 <h2>Chain Bracelets</h2>
483 <hr>
484 <div class="products">
485 <div class="card">
486 <div class="prodimg">
487 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
488 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
489 </div>
490 <div class="desc">
491 <h3><a>Circle Bracelet</a></h3>
492 <p>$120.00</p>
493 </div>
494 <div class="type">
495 <div class="border">
496 <div class="color"></div>
497 </div>
498 <p>14k Yellow Gold</p>
499 </div>
500 </div>
501 <div class="card">
502 <div class="prodimg">
503 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
504 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
505 </div>
506 <div class="desc">
507 <h3><a>Circle Bracelet</a></h3>
508 <p>$120.00</p>
509 </div>
510 <div class="type">
511 <div class="border">
512 <div class="color"></div>
513 </div>
514 <p>14k Yellow Gold</p>
515 </div>
516 </div>
517 <div class="card">
518 <div class="prodimg">
519 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
520 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
521 </div>
522 <div class="desc">
523 <h3><a>Circle Bracelet</a></h3>
524 <p>$120.00</p>
525 </div>
526 <div class="type">
527 <div class="border">
528 <div class="color"></div>
529 </div>
530 <p>14k Yellow Gold</p>
531 </div>
532 </div>
533 <div class="card">
534 <div class="prodimg">
535 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
536 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
537 </div>
538 <div class="desc">
539 <h3><a>Circle Bracelet</a></h3>
540 <p>$120.00</p>
541 </div>
542 <div class="type">
543 <div class="border">
544 <div class="color"></div>
545 </div>
546 <p>14k Yellow Gold</p>
547 </div>
548 </div>
549 <div class="card">
550 <div class="prodimg">
551 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
552 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
553 </div>
554 <div class="desc">
555 <h3><a>Circle Bracelet</a></h3>
556 <p>$120.00</p>
557 </div>
558 <div class="type">
559 <div class="border">
560 <div class="color"></div>
561 </div>
562 <p>14k Yellow Gold</p>
563 </div>
564 </div>
565 </div>
566 </div>
567 <div id="cuff" class="category container">
568 <h2>Cuffs And Bangles</h2>
569 <hr>
570 <div class="products">
571 <div class="card">
572 <div class="prodimg">
573 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
574 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
575 </div>
576 <div class="desc">
577 <h3><a>Circle Bracelet</a></h3>
578 <p>$120.00</p>
579 </div>
580 <div class="type">
581 <div class="border">
582 <div class="color"></div>
583 </div>
584 <p>14k Yellow Gold</p>
585 </div>
586 </div>
587 <div class="card">
588 <div class="prodimg">
589 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
590 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
591 </div>
592 <div class="desc">
593 <h3><a>Circle Bracelet</a></h3>
594 <p>$120.00</p>
595 </div>
596 <div class="type">
597 <div class="border">
598 <div class="color"></div>
599 </div>
600 <p>14k Yellow Gold</p>
601 </div>
602 </div>
603 <div class="card">
604 <div class="prodimg">
605 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
606 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
607 </div>
608 <div class="desc">
609 <h3><a>Circle Bracelet</a></h3>
610 <p>$120.00</p>
611 </div>
612 <div class="type">
613 <div class="border">
614 <div class="color"></div>
615 </div>
616 <p>14k Yellow Gold</p>
617 </div>
618 </div>
619 <div class="card">
620 <div class="prodimg">
621 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
622 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
623 </div>
624 <div class="desc">
625 <h3><a>Circle Bracelet</a></h3>
626 <p>$120.00</p>
627 </div>
628 <div class="type">
629 <div class="border">
630 <div class="color"></div>
631 </div>
632 <p>14k Yellow Gold</p>
633 </div>
634 </div>
635 <div class="card">
636 <div class="prodimg">
637 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
638 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
639 </div>
640 <div class="desc">
641 <h3><a>Circle Bracelet</a></h3>
642 <p>$120.00</p>
643 </div>
644 <div class="type">
645 <div class="border">
646 <div class="color"></div>
647 </div>
648 <p>14k Yellow Gold</p>
649 </div>
650 </div>
651 </div>
652 </div>
653
654</div>
655
656<div id="foot" class="footer container">
657 <div class="logo container">
658 <h1>κοσμήματα</h1>
659 </div>
660 <div class="top">
661 <div class="site column">
662 <h3>Kosmimata jewelry</h3>
663 <p>Accessorise yourself with the best there is</p>
664 </div>
665 <div class="customer column">
666 <h1>Customer Care</h1>
667 <ul>
668 <li><a href="./faq.html#shipping">Shipping & Returns</a></li>
669 <li><a href="./order-status.html">Order Status</a></li>
670 <li><a href="./faq.html#payment">Payment Methods</a></li>
671 <li><a href="./ring-sizer.html">Ring Sizer</a></li>
672 </ul>
673 </div>
674 <div class="contact column">
675 <div class="address">
676 <h1>Visit</h1>
677 <p>1985 Bel Meadow Drive,</p>
678 <p>Los Angeles, California</p>
679 <p>90017</p>
680 </div>
681 <div class="email">
682 <a href="mailto:info@kosmimata.com">info@kosmimata.com</a>
683 <a href="tel:+1 213-829-0743">213-829-0743</a>
684 </div>
685 </div>
686 <div class="sign column">
687 <p>Sign up to have insider info on new arrivals, early access and more.</p>
688 <div class="input">
689 <i class="far fa-envelope"></i>
690 <input type="email" placeholder="Your Email">
691 <i class="fas fa-chevron-right"></i>
692 </div>
693 </div>
694 </div>
695 <div class="bottom">
696 <div class="socials">
697 <a href="./terms&conditions.html">Terms and Conditions</a>
698 <a href="./privacy-policy.html">Privacy Policy</a>
699 <a href="./sitemap.html">Site Map</a>
700 <p>&copy;Kosmimata Inc.</p>
701 <div class="icons">
702 <a href=""><i class="fab fa-instagram"></i></a><a href=""><i class="fab fa-pinterest"></i></a><a href=""><i class="fab fa-twitter"></i></a>
703 </div>
704 </div>
705 </div>
706</div>position: -webkit-sticky;
707position: sticky;
708top: 20px;
709.trueContainer {
710 display:flex;
711 align-items: flex-start;
712 padding-top:6.7vw
713}
714
715a {
716 text-decoration: none;
717 transition: all 0.3s;
718 color: black;
719 font-family: 'Montserrat', sans-serif;
720 cursor: pointer;
721}
722
723.sidebar.container {
724 position: sticky;
725 top:0;
726 left:0;
727 width: 20%;
728 z-index: 1;
729 text-transform: uppercase;
730 /* overflow-y: scroll; */
731 padding: 1vw;
732}
733
734.sidebar .inner .categories * {
735 padding: .5vw;
736}
737
738.sidebar .inner .categories h5 {
739 font-size: 15px;
740 font-weight: 400;
741}
742
743.sidebar .inner .categories p {
744 font-size: 13px;
745 text-indent: 1vw;
746}
747
748.sidebar .inner .categories h5 a:hover,
749.sidebar .inner .categories p a:hover {
750 color: #cfab53;
751}
752
753.main.container {
754 /* right: 0;
755 bottom: 0;
756 left: 20%;
757 top: 0vw;
758 position: absolute; */
759 width: 80%;
760 padding: 1vw;
761 z-index: 0;
762 display: flex;
763 flex-direction: column;
764 align-items: flex-end;
765}
766
767.main .category {
768 /* padding-top: 6.7vw; */
769 width: 100%;
770}
771
772.main .category h2 {
773 padding: 1vw;
774}
775
776.main .category hr {
777 border: none;
778 border-top: .1vw solid #cfab53;
779 width: 50%;
780 margin-left: 1vw;
781 margin-bottom: 1vw;
782}
783
784.main .category .products {
785 display: flex;
786 flex-wrap: wrap;
787}
788
789.main .category .products .card {
790 width: 30%;
791 margin: 1vw;
792 padding: 1vw;
793 /* border: 1px solid #cfab53; */
794 position: relative;
795 min-height: 28vw;
796}
797
798.main .category .products .card .prodimg img {
799 width: 100%;
800 position: absolute;
801 top: 0;
802 left: 0;
803 background-color: #cfab53;
804 min-height: 20vw;
805}
806
807.main .category .products .card .prodimg img.primary {
808 z-index: 1;
809}
810
811.main .category .products .card .prodimg:hover img.primary {
812 display: none;
813}
814
815.main .category .products .card .desc {
816 display: flex;
817 justify-content: space-between;
818 width: 100%;
819 position: absolute;
820 left: 0;
821 bottom: 2vw;
822}
823
824.main .category .products .card .desc h3 a:hover {
825 color: #cfab53;
826}
827
828.main .category .products .card .type {
829 display: flex;
830 width: 100%;
831 position: absolute;
832 left: 0;
833 bottom: 0;
834 align-items: center;
835}
836
837.main .category .products .card .type .border {
838 border-radius: 10000px;
839 border: 1px solid #bdbdbd;
840 padding: 2px;
841 margin-right: 5px;
842}
843
844.main .category .products .card .type .border .color {
845 border-radius: 10000px;
846 width: 13px;
847 height: 13px;
848 background-color: #cfab53;
849}
850
851.footer.container {
852 /* position: absolute;
853 bottom: 0;
854 left: 0;
855 right: 0; */
856 width: 100%;
857 border-top: 1px solid #cfab53;
858 background-color: white;
859}
860
861.footer .top {
862 display: flex;
863 padding: 1vw;
864 justify-content: space-between;
865 align-items: flex-start;
866}
867
868.footer .top .column {
869 width: 25%;
870 padding: 1vw;
871}
872
873.footer .top .column h1 {
874 font-size: 23px;
875 letter-spacing: -2px;
876 padding: .5vw;
877}
878
879.footer .top .column p {
880 letter-spacing: -1px;
881 font-size: 15px;
882}
883
884.footer .top .column a {
885 letter-spacing: -1px;
886 font-size: 15px;
887}
888
889.footer .top .column a:hover {
890 color: #cfab53;
891}
892
893.footer .logo {
894 padding: 1vw 2vw 0vw;
895}
896
897.footer .logo h1 {
898 font-family: 'GFS Didot', serif;
899 color: #cfab53;
900 font-size: 35px;
901 letter-spacing: normal;
902 cursor: pointer;
903}
904
905.footer .top .site h3 {
906 font-family: 'Dancing Script', cursive;
907 font-size: 30px;
908 font-weight: 400;
909}
910
911.footer .top .site p {
912 font-size: 15px;
913 padding: 1vw 0vw;
914 font-weight: 600;
915 letter-spacing: normal;
916}
917
918.footer .top .customer ul li {
919 padding: .3vw .5vw;
920}
921
922.footer .top .customer ul li a {
923 letter-spacing: -1px;
924 font-size: 15px;
925}
926
927.footer .top .contact p,
928.footer .top .contact a {
929 padding: .3vw .5vw;
930}
931
932.footer .top .contact .email {
933 display: flex;
934 flex-direction: column;
935}
936
937.footer .top .sign p {
938 padding: .5vw 0;
939}
940
941.footer .top .sign .input {
942 display: flex;
943 flex-wrap: nowrap;
944 align-items: center;
945 border: 1px solid #cfab53;
946 margin: 1vw 0vw;
947}
948
949.footer .top .sign .input .fa-envelope {
950 color: #cfab53;
951 padding: 0vw 0vw 0vw .5vw;
952 width: 10%;
953}
954
955.footer .top .sign .input input {
956 border: none;
957 padding: 0vw .5vw;
958 margin: 0vw 0vw 0vw 0vw;
959 width: 80%;
960}
961
962.footer .top .sign .input i.fa-chevron-right {
963 background-color: #cfab53;
964 color: white;
965 padding: 5px;
966 width: 10%;
967 text-align: center;
968 cursor: pointer;
969}
970
971.footer .top .sign .input i.fa-chevron-right:hover {
972 background-color: #bb9c4d;
973}
974
975.footer .bottom {
976 display: flex;
977 justify-content: flex-end;
978 align-items: center;
979}
980
981.footer .socials {
982 display: flex;
983 justify-content: flex-end;
984 align-items: center;
985}
986
987.footer .socials * {
988 padding: .5vw;
989 font-size: 12px;
990 letter-spacing: -1px;
991}
992
993.footer .socials a:hover {
994 color: #cfab53;
995}
996
997.footer .socials .icons i {
998 font-size: 18px;
999 font-weight: 700;
1000}
1001
1002.footer .socials .icons i.fa-instagram:hover {
1003 color: #bc2a8d;
1004}
1005
1006.footer .socials .icons i.fa-pinterest:hover {
1007 color: #bd081c;
1008}
1009
1010.footer .socials .icons i.fa-twitter:hover {
1011 color: #1DA1F2;
1012}
1a {
2 text-decoration: none;
3 transition: all 0.3s;
4 color: black;
5 font-family: 'Montserrat', sans-serif;
6 cursor: pointer;
7}
8
9ul,
10ol {
11 list-style: none;
12 font-family: 'Montserrat', sans-serif;
13}
14
15.menu.container {
16 padding: 1vw;
17 font-family: 'Montserrat', sans-serif;
18}
19
20.menu ul li {
21 display: inline-block;
22 padding: 1vw;
23}
24
25.menu ul li a {
26 padding: 1vw;
27 font-size: 1.3vw;
28}
29
30.menu ul li a:hover {
31 border-bottom: .2em solid black;
32}
33
34.title.container {
35 width: 100%;
36 position: fixed;
37 top: 0;
38 display: flex;
39 justify-content: space-between;
40 align-items: center;
41 background-color: #fff;
42 /* border-top: 1px solid #cfab53; */
43 border-bottom: 1px solid #cfab53;
44 z-index: 2;
45 /* margin-top: 2vw; */
46 /* box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
47 -webkit-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58);
48 -moz-box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.58); */
49}
50
51.title .logo {
52 padding: 1vw;
53}
54
55.title .logo h1 {
56 font-family: 'GFS Didot', serif;
57 color: #cfab53;
58 font-size: 2.5vw;
59 cursor: pointer;
60}
61
62.title .logo h3 {
63 font-family: 'Dancing Script', cursive;
64 /* color: #a1919e; */
65 font-size: 1.3vw;
66 font-weight: 400;
67}
68
69.sidebar.container {
70 position: fixed;
71 bottom: 0;
72 left: 0;
73 top: 6.7vw;
74 width: 20%;
75 z-index: 1;
76 text-transform: uppercase;
77 /* overflow-y: scroll; */
78 padding: 1vw;
79}
80
81.sidebar .inner .categories * {
82 padding: .5vw;
83}
84
85.sidebar .inner .categories h5 {
86 font-size: 15px;
87 font-weight: 400;
88}
89
90.sidebar .inner .categories p {
91 font-size: 13px;
92 text-indent: 1vw;
93}
94
95.sidebar .inner .categories h5 a:hover,
96.sidebar .inner .categories p a:hover {
97 color: #cfab53;
98}
99
100.main.container {
101 /* right: 0;
102 bottom: 0;
103 left: 20%;
104 top: 0vw;
105 position: absolute; */
106 width: 100%;
107 padding: 1vw;
108 z-index: 0;
109 display: flex;
110 flex-direction: column;
111 align-items: flex-end;
112}
113
114.main .category {
115 padding-top: 6.7vw;
116 width: 80%;
117}
118
119.main .category h2 {
120 padding: 1vw;
121}
122
123.main .category hr {
124 border: none;
125 border-top: .1vw solid #cfab53;
126 width: 50%;
127 margin-left: 1vw;
128 margin-bottom: 1vw;
129}
130
131.main .category .products {
132 display: flex;
133 flex-wrap: wrap;
134}
135
136.main .category .products .card {
137 width: 30%;
138 margin: 1vw;
139 padding: 1vw;
140 /* border: 1px solid #cfab53; */
141 position: relative;
142 min-height: 28vw;
143}
144
145.main .category .products .card .prodimg img {
146 width: 100%;
147 position: absolute;
148 top: 0;
149 left: 0;
150 background-color: #cfab53;
151 min-height: 20vw;
152}
153
154.main .category .products .card .prodimg img.primary {
155 z-index: 1;
156}
157
158.main .category .products .card .prodimg:hover img.primary {
159 display: none;
160}
161
162.main .category .products .card .desc {
163 display: flex;
164 justify-content: space-between;
165 width: 100%;
166 position: absolute;
167 left: 0;
168 bottom: 2vw;
169}
170
171.main .category .products .card .desc h3 a:hover {
172 color: #cfab53;
173}
174
175.main .category .products .card .type {
176 display: flex;
177 width: 100%;
178 position: absolute;
179 left: 0;
180 bottom: 0;
181 align-items: center;
182}
183
184.main .category .products .card .type .border {
185 border-radius: 10000px;
186 border: 1px solid #bdbdbd;
187 padding: 2px;
188 margin-right: 5px;
189}
190
191.main .category .products .card .type .border .color {
192 border-radius: 10000px;
193 width: 13px;
194 height: 13px;
195 background-color: #cfab53;
196}
197
198.footer.container {
199 /* position: absolute;
200 bottom: 0;
201 left: 0;
202 right: 0; */
203 width: 100%;
204 border-top: 1px solid #cfab53;
205 background-color: white;
206}
207
208.footer .top {
209 display: flex;
210 padding: 1vw;
211 justify-content: space-between;
212 align-items: flex-start;
213}
214
215.footer .top .column {
216 width: 25%;
217 padding: 1vw;
218}
219
220.footer .top .column h1 {
221 font-size: 23px;
222 letter-spacing: -2px;
223 padding: .5vw;
224}
225
226.footer .top .column p {
227 letter-spacing: -1px;
228 font-size: 15px;
229}
230
231.footer .top .column a {
232 letter-spacing: -1px;
233 font-size: 15px;
234}
235
236.footer .top .column a:hover {
237 color: #cfab53;
238}
239
240.footer .logo {
241 padding: 1vw 2vw 0vw;
242}
243
244.footer .logo h1 {
245 font-family: 'GFS Didot', serif;
246 color: #cfab53;
247 font-size: 35px;
248 letter-spacing: normal;
249 cursor: pointer;
250}
251
252.footer .top .site h3 {
253 font-family: 'Dancing Script', cursive;
254 font-size: 30px;
255 font-weight: 400;
256}
257
258.footer .top .site p {
259 font-size: 15px;
260 padding: 1vw 0vw;
261 font-weight: 600;
262 letter-spacing: normal;
263}
264
265.footer .top .customer ul li {
266 padding: .3vw .5vw;
267}
268
269.footer .top .customer ul li a {
270 letter-spacing: -1px;
271 font-size: 15px;
272}
273
274.footer .top .contact p,
275.footer .top .contact a {
276 padding: .3vw .5vw;
277}
278
279.footer .top .contact .email {
280 display: flex;
281 flex-direction: column;
282}
283
284.footer .top .sign p {
285 padding: .5vw 0;
286}
287
288.footer .top .sign .input {
289 display: flex;
290 flex-wrap: nowrap;
291 align-items: center;
292 border: 1px solid #cfab53;
293 margin: 1vw 0vw;
294}
295
296.footer .top .sign .input .fa-envelope {
297 color: #cfab53;
298 padding: 0vw 0vw 0vw .5vw;
299 width: 10%;
300}
301
302.footer .top .sign .input input {
303 border: none;
304 padding: 0vw .5vw;
305 margin: 0vw 0vw 0vw 0vw;
306 width: 80%;
307}
308
309.footer .top .sign .input i.fa-chevron-right {
310 background-color: #cfab53;
311 color: white;
312 padding: 5px;
313 width: 10%;
314 text-align: center;
315 cursor: pointer;
316}
317
318.footer .top .sign .input i.fa-chevron-right:hover {
319 background-color: #bb9c4d;
320}
321
322.footer .bottom {
323 display: flex;
324 justify-content: flex-end;
325 align-items: center;
326}
327
328.footer .socials {
329 display: flex;
330 justify-content: flex-end;
331 align-items: center;
332}
333
334.footer .socials * {
335 padding: .5vw;
336 font-size: 12px;
337 letter-spacing: -1px;
338}
339
340.footer .socials a:hover {
341 color: #cfab53;
342}
343
344.footer .socials .icons i {
345 font-size: 18px;
346 font-weight: 700;
347}
348
349.footer .socials .icons i.fa-instagram:hover {
350 color: #bc2a8d;
351}
352
353.footer .socials .icons i.fa-pinterest:hover {
354 color: #bd081c;
355}
356
357.footer .socials .icons i.fa-twitter:hover {
358 color: #1DA1F2;
359}<div class="title container" id="menu">
360 <div class="logo container">
361 <h1>κοσμήματα</h1>
362 <h3>kosmimata jewelry</h3>
363 </div>
364 <div class="menu container">
365 <ul>
366 <li><a href="../pages/index.html">Home</a></li>
367 <li><a id="shop">Shop</a></li>
368 <li><a href="../pages/blog.html">Blog</a></li>
369 <li><a id="search"><i class="fas fa-search"></i></a></li>
370 <li><a id="cart"><i class="fas fa-shopping-cart"></i></a></li>
371 </ul>
372 </div>
373</div>
374<div class="sidebar container">
375 <div class="inner">
376 <div class="categories">
377 <h5><a href="./product-display-bracelets-and-anklets.html">Bracelets + Anklets</a></h5>
378 <p><a href="#bracelets">Bracelets</a></p>
379 <p><a href="#chain">Chain Bracelets</a></p>
380 <p><a href="#cuff">Cuffs And Bangles</a></p>
381 <p><a href="#zodaic">Zodiac Bracelets</a></p>
382 <p><a href="#mens">Men's Bracelets</a></p>
383 <p><a href="#anklets">Anklets</a></p>
384 </div>
385 <div class="categories">
386 <h5><a href="./product-display-wedding.html">Wedding</a></h5>
387 </div>
388 <div class="categories">
389 <h5><a href="./product-display-mens.html">Men's</a></h5>
390 </div>
391 </div>
392</div>
393
394<div class="main container">
395 <div id="bracelets" class="category container">
396 <h2>Bracelets</h2>
397 <hr>
398 <div class="products">
399 <div class="card">
400 <div class="prodimg">
401 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
402 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
403 </div>
404 <div class="desc">
405 <h3><a>Circle Bracelet</a></h3>
406 <p>$120.00</p>
407 </div>
408 <div class="type">
409 <div class="border">
410 <div class="color"></div>
411 </div>
412 <p>14k Yellow Gold</p>
413 </div>
414 </div>
415 <div class="card">
416 <div class="prodimg">
417 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
418 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
419 </div>
420 <div class="desc">
421 <h3><a>Circle Bracelet</a></h3>
422 <p>$120.00</p>
423 </div>
424 <div class="type">
425 <div class="border">
426 <div class="color"></div>
427 </div>
428 <p>14k Yellow Gold</p>
429 </div>
430 </div>
431 <div class="card">
432 <div class="prodimg">
433 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
434 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
435 </div>
436 <div class="desc">
437 <h3><a>Circle Bracelet</a></h3>
438 <p>$120.00</p>
439 </div>
440 <div class="type">
441 <div class="border">
442 <div class="color"></div>
443 </div>
444 <p>14k Yellow Gold</p>
445 </div>
446 </div>
447 <div class="card">
448 <div class="prodimg">
449 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
450 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
451 </div>
452 <div class="desc">
453 <h3><a>Circle Bracelet</a></h3>
454 <p>$120.00</p>
455 </div>
456 <div class="type">
457 <div class="border">
458 <div class="color"></div>
459 </div>
460 <p>14k Yellow Gold</p>
461 </div>
462 </div>
463 <div class="card">
464 <div class="prodimg">
465 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
466 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
467 </div>
468 <div class="desc">
469 <h3><a>Circle Bracelet</a></h3>
470 <p>$120.00</p>
471 </div>
472 <div class="type">
473 <div class="border">
474 <div class="color"></div>
475 </div>
476 <p>14k Yellow Gold</p>
477 </div>
478 </div>
479 </div>
480 </div>
481 <div id="chain" class="category container">
482 <h2>Chain Bracelets</h2>
483 <hr>
484 <div class="products">
485 <div class="card">
486 <div class="prodimg">
487 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
488 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
489 </div>
490 <div class="desc">
491 <h3><a>Circle Bracelet</a></h3>
492 <p>$120.00</p>
493 </div>
494 <div class="type">
495 <div class="border">
496 <div class="color"></div>
497 </div>
498 <p>14k Yellow Gold</p>
499 </div>
500 </div>
501 <div class="card">
502 <div class="prodimg">
503 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
504 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
505 </div>
506 <div class="desc">
507 <h3><a>Circle Bracelet</a></h3>
508 <p>$120.00</p>
509 </div>
510 <div class="type">
511 <div class="border">
512 <div class="color"></div>
513 </div>
514 <p>14k Yellow Gold</p>
515 </div>
516 </div>
517 <div class="card">
518 <div class="prodimg">
519 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
520 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
521 </div>
522 <div class="desc">
523 <h3><a>Circle Bracelet</a></h3>
524 <p>$120.00</p>
525 </div>
526 <div class="type">
527 <div class="border">
528 <div class="color"></div>
529 </div>
530 <p>14k Yellow Gold</p>
531 </div>
532 </div>
533 <div class="card">
534 <div class="prodimg">
535 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
536 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
537 </div>
538 <div class="desc">
539 <h3><a>Circle Bracelet</a></h3>
540 <p>$120.00</p>
541 </div>
542 <div class="type">
543 <div class="border">
544 <div class="color"></div>
545 </div>
546 <p>14k Yellow Gold</p>
547 </div>
548 </div>
549 <div class="card">
550 <div class="prodimg">
551 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
552 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
553 </div>
554 <div class="desc">
555 <h3><a>Circle Bracelet</a></h3>
556 <p>$120.00</p>
557 </div>
558 <div class="type">
559 <div class="border">
560 <div class="color"></div>
561 </div>
562 <p>14k Yellow Gold</p>
563 </div>
564 </div>
565 </div>
566 </div>
567 <div id="cuff" class="category container">
568 <h2>Cuffs And Bangles</h2>
569 <hr>
570 <div class="products">
571 <div class="card">
572 <div class="prodimg">
573 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
574 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
575 </div>
576 <div class="desc">
577 <h3><a>Circle Bracelet</a></h3>
578 <p>$120.00</p>
579 </div>
580 <div class="type">
581 <div class="border">
582 <div class="color"></div>
583 </div>
584 <p>14k Yellow Gold</p>
585 </div>
586 </div>
587 <div class="card">
588 <div class="prodimg">
589 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
590 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
591 </div>
592 <div class="desc">
593 <h3><a>Circle Bracelet</a></h3>
594 <p>$120.00</p>
595 </div>
596 <div class="type">
597 <div class="border">
598 <div class="color"></div>
599 </div>
600 <p>14k Yellow Gold</p>
601 </div>
602 </div>
603 <div class="card">
604 <div class="prodimg">
605 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
606 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
607 </div>
608 <div class="desc">
609 <h3><a>Circle Bracelet</a></h3>
610 <p>$120.00</p>
611 </div>
612 <div class="type">
613 <div class="border">
614 <div class="color"></div>
615 </div>
616 <p>14k Yellow Gold</p>
617 </div>
618 </div>
619 <div class="card">
620 <div class="prodimg">
621 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
622 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
623 </div>
624 <div class="desc">
625 <h3><a>Circle Bracelet</a></h3>
626 <p>$120.00</p>
627 </div>
628 <div class="type">
629 <div class="border">
630 <div class="color"></div>
631 </div>
632 <p>14k Yellow Gold</p>
633 </div>
634 </div>
635 <div class="card">
636 <div class="prodimg">
637 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
638 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
639 </div>
640 <div class="desc">
641 <h3><a>Circle Bracelet</a></h3>
642 <p>$120.00</p>
643 </div>
644 <div class="type">
645 <div class="border">
646 <div class="color"></div>
647 </div>
648 <p>14k Yellow Gold</p>
649 </div>
650 </div>
651 </div>
652 </div>
653
654</div>
655
656<div id="foot" class="footer container">
657 <div class="logo container">
658 <h1>κοσμήματα</h1>
659 </div>
660 <div class="top">
661 <div class="site column">
662 <h3>Kosmimata jewelry</h3>
663 <p>Accessorise yourself with the best there is</p>
664 </div>
665 <div class="customer column">
666 <h1>Customer Care</h1>
667 <ul>
668 <li><a href="./faq.html#shipping">Shipping & Returns</a></li>
669 <li><a href="./order-status.html">Order Status</a></li>
670 <li><a href="./faq.html#payment">Payment Methods</a></li>
671 <li><a href="./ring-sizer.html">Ring Sizer</a></li>
672 </ul>
673 </div>
674 <div class="contact column">
675 <div class="address">
676 <h1>Visit</h1>
677 <p>1985 Bel Meadow Drive,</p>
678 <p>Los Angeles, California</p>
679 <p>90017</p>
680 </div>
681 <div class="email">
682 <a href="mailto:info@kosmimata.com">info@kosmimata.com</a>
683 <a href="tel:+1 213-829-0743">213-829-0743</a>
684 </div>
685 </div>
686 <div class="sign column">
687 <p>Sign up to have insider info on new arrivals, early access and more.</p>
688 <div class="input">
689 <i class="far fa-envelope"></i>
690 <input type="email" placeholder="Your Email">
691 <i class="fas fa-chevron-right"></i>
692 </div>
693 </div>
694 </div>
695 <div class="bottom">
696 <div class="socials">
697 <a href="./terms&conditions.html">Terms and Conditions</a>
698 <a href="./privacy-policy.html">Privacy Policy</a>
699 <a href="./sitemap.html">Site Map</a>
700 <p>&copy;Kosmimata Inc.</p>
701 <div class="icons">
702 <a href=""><i class="fab fa-instagram"></i></a><a href=""><i class="fab fa-pinterest"></i></a><a href=""><i class="fab fa-twitter"></i></a>
703 </div>
704 </div>
705 </div>
706</div>position: -webkit-sticky;
707position: sticky;
708top: 20px;
709.trueContainer {
710 display:flex;
711 align-items: flex-start;
712 padding-top:6.7vw
713}
714
715a {
716 text-decoration: none;
717 transition: all 0.3s;
718 color: black;
719 font-family: 'Montserrat', sans-serif;
720 cursor: pointer;
721}
722
723.sidebar.container {
724 position: sticky;
725 top:0;
726 left:0;
727 width: 20%;
728 z-index: 1;
729 text-transform: uppercase;
730 /* overflow-y: scroll; */
731 padding: 1vw;
732}
733
734.sidebar .inner .categories * {
735 padding: .5vw;
736}
737
738.sidebar .inner .categories h5 {
739 font-size: 15px;
740 font-weight: 400;
741}
742
743.sidebar .inner .categories p {
744 font-size: 13px;
745 text-indent: 1vw;
746}
747
748.sidebar .inner .categories h5 a:hover,
749.sidebar .inner .categories p a:hover {
750 color: #cfab53;
751}
752
753.main.container {
754 /* right: 0;
755 bottom: 0;
756 left: 20%;
757 top: 0vw;
758 position: absolute; */
759 width: 80%;
760 padding: 1vw;
761 z-index: 0;
762 display: flex;
763 flex-direction: column;
764 align-items: flex-end;
765}
766
767.main .category {
768 /* padding-top: 6.7vw; */
769 width: 100%;
770}
771
772.main .category h2 {
773 padding: 1vw;
774}
775
776.main .category hr {
777 border: none;
778 border-top: .1vw solid #cfab53;
779 width: 50%;
780 margin-left: 1vw;
781 margin-bottom: 1vw;
782}
783
784.main .category .products {
785 display: flex;
786 flex-wrap: wrap;
787}
788
789.main .category .products .card {
790 width: 30%;
791 margin: 1vw;
792 padding: 1vw;
793 /* border: 1px solid #cfab53; */
794 position: relative;
795 min-height: 28vw;
796}
797
798.main .category .products .card .prodimg img {
799 width: 100%;
800 position: absolute;
801 top: 0;
802 left: 0;
803 background-color: #cfab53;
804 min-height: 20vw;
805}
806
807.main .category .products .card .prodimg img.primary {
808 z-index: 1;
809}
810
811.main .category .products .card .prodimg:hover img.primary {
812 display: none;
813}
814
815.main .category .products .card .desc {
816 display: flex;
817 justify-content: space-between;
818 width: 100%;
819 position: absolute;
820 left: 0;
821 bottom: 2vw;
822}
823
824.main .category .products .card .desc h3 a:hover {
825 color: #cfab53;
826}
827
828.main .category .products .card .type {
829 display: flex;
830 width: 100%;
831 position: absolute;
832 left: 0;
833 bottom: 0;
834 align-items: center;
835}
836
837.main .category .products .card .type .border {
838 border-radius: 10000px;
839 border: 1px solid #bdbdbd;
840 padding: 2px;
841 margin-right: 5px;
842}
843
844.main .category .products .card .type .border .color {
845 border-radius: 10000px;
846 width: 13px;
847 height: 13px;
848 background-color: #cfab53;
849}
850
851.footer.container {
852 /* position: absolute;
853 bottom: 0;
854 left: 0;
855 right: 0; */
856 width: 100%;
857 border-top: 1px solid #cfab53;
858 background-color: white;
859}
860
861.footer .top {
862 display: flex;
863 padding: 1vw;
864 justify-content: space-between;
865 align-items: flex-start;
866}
867
868.footer .top .column {
869 width: 25%;
870 padding: 1vw;
871}
872
873.footer .top .column h1 {
874 font-size: 23px;
875 letter-spacing: -2px;
876 padding: .5vw;
877}
878
879.footer .top .column p {
880 letter-spacing: -1px;
881 font-size: 15px;
882}
883
884.footer .top .column a {
885 letter-spacing: -1px;
886 font-size: 15px;
887}
888
889.footer .top .column a:hover {
890 color: #cfab53;
891}
892
893.footer .logo {
894 padding: 1vw 2vw 0vw;
895}
896
897.footer .logo h1 {
898 font-family: 'GFS Didot', serif;
899 color: #cfab53;
900 font-size: 35px;
901 letter-spacing: normal;
902 cursor: pointer;
903}
904
905.footer .top .site h3 {
906 font-family: 'Dancing Script', cursive;
907 font-size: 30px;
908 font-weight: 400;
909}
910
911.footer .top .site p {
912 font-size: 15px;
913 padding: 1vw 0vw;
914 font-weight: 600;
915 letter-spacing: normal;
916}
917
918.footer .top .customer ul li {
919 padding: .3vw .5vw;
920}
921
922.footer .top .customer ul li a {
923 letter-spacing: -1px;
924 font-size: 15px;
925}
926
927.footer .top .contact p,
928.footer .top .contact a {
929 padding: .3vw .5vw;
930}
931
932.footer .top .contact .email {
933 display: flex;
934 flex-direction: column;
935}
936
937.footer .top .sign p {
938 padding: .5vw 0;
939}
940
941.footer .top .sign .input {
942 display: flex;
943 flex-wrap: nowrap;
944 align-items: center;
945 border: 1px solid #cfab53;
946 margin: 1vw 0vw;
947}
948
949.footer .top .sign .input .fa-envelope {
950 color: #cfab53;
951 padding: 0vw 0vw 0vw .5vw;
952 width: 10%;
953}
954
955.footer .top .sign .input input {
956 border: none;
957 padding: 0vw .5vw;
958 margin: 0vw 0vw 0vw 0vw;
959 width: 80%;
960}
961
962.footer .top .sign .input i.fa-chevron-right {
963 background-color: #cfab53;
964 color: white;
965 padding: 5px;
966 width: 10%;
967 text-align: center;
968 cursor: pointer;
969}
970
971.footer .top .sign .input i.fa-chevron-right:hover {
972 background-color: #bb9c4d;
973}
974
975.footer .bottom {
976 display: flex;
977 justify-content: flex-end;
978 align-items: center;
979}
980
981.footer .socials {
982 display: flex;
983 justify-content: flex-end;
984 align-items: center;
985}
986
987.footer .socials * {
988 padding: .5vw;
989 font-size: 12px;
990 letter-spacing: -1px;
991}
992
993.footer .socials a:hover {
994 color: #cfab53;
995}
996
997.footer .socials .icons i {
998 font-size: 18px;
999 font-weight: 700;
1000}
1001
1002.footer .socials .icons i.fa-instagram:hover {
1003 color: #bc2a8d;
1004}
1005
1006.footer .socials .icons i.fa-pinterest:hover {
1007 color: #bd081c;
1008}
1009
1010.footer .socials .icons i.fa-twitter:hover {
1011 color: #1DA1F2;
1012}<section class="trueContainer">
1013 <div class="sidebar container">
1014 <div class="inner">
1015 <div class="categories">
1016 <h5><a href="./product-display-bracelets-and-anklets.html">Bracelets + Anklets</a></h5>
1017 <p><a href="#bracelets">Bracelets</a></p>
1018 <p><a href="#chain">Chain Bracelets</a></p>
1019 <p><a href="#cuff">Cuffs And Bangles</a></p>
1020 <p><a href="#zodaic">Zodiac Bracelets</a></p>
1021 <p><a href="#mens">Men's Bracelets</a></p>
1022 <p><a href="#anklets">Anklets</a></p>
1023 </div>
1024 <div class="categories">
1025 <h5><a href="./product-display-wedding.html">Wedding</a></h5>
1026 </div>
1027 <div class="categories">
1028 <h5><a href="./product-display-mens.html">Men's</a></h5>
1029 </div>
1030 </div>
1031 </div>
1032
1033 <div class="main container">
1034 <div id="bracelets" class="category container">
1035 <h2>Bracelets</h2>
1036 <hr>
1037 <div class="products">
1038 <div class="card">
1039 <div class="prodimg">
1040 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
1041 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
1042 </div>
1043 <div class="desc">
1044 <h3><a>Circle Bracelet</a></h3>
1045 <p>$120.00</p>
1046 </div>
1047 <div class="type">
1048 <div class="border">
1049 <div class="color"></div>
1050 </div>
1051 <p>14k Yellow Gold</p>
1052 </div>
1053 </div>
1054 <div class="card">
1055 <div class="prodimg">
1056 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
1057 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
1058 </div>
1059 <div class="desc">
1060 <h3><a>Circle Bracelet</a></h3>
1061 <p>$120.00</p>
1062 </div>
1063 <div class="type">
1064 <div class="border">
1065 <div class="color"></div>
1066 </div>
1067 <p>14k Yellow Gold</p>
1068 </div>
1069 </div>
1070 <div class="card">
1071 <div class="prodimg">
1072 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
1073 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
1074 </div>
1075 <div class="desc">
1076 <h3><a>Circle Bracelet</a></h3>
1077 <p>$120.00</p>
1078 </div>
1079 <div class="type">
1080 <div class="border">
1081 <div class="color"></div>
1082 </div>
1083 <p>14k Yellow Gold</p>
1084 </div>
1085 </div>
1086 <div class="card">
1087 <div class="prodimg">
1088 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
1089 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
1090 </div>
1091 <div class="desc">
1092 <h3><a>Circle Bracelet</a></h3>
1093 <p>$120.00</p>
1094 </div>
1095 <div class="type">
1096 <div class="border">
1097 <div class="color"></div>
1098 </div>
1099 <p>14k Yellow Gold</p>
1100 </div>
1101 </div>
1102 <div class="card">
1103 <div class="prodimg">
1104 <img class="primary" src="../assets/img/products/bracelets/solo-diamond/SoloDiamond_bracelet_yg_hero_(1).jpg" alt="">
1105 <img src="../assets/img/products/bracelets/solo-diamond/solodiamondbracelet.jpg" alt="">
1106 </div>
1107 <div class="desc">
1108 <h3><a>Circle Bracelet</a></h3>
1109 <p>$120.00</p>
1110 </div>
1111 <div class="type">
1112 <div class="border">
1113 <div class="color"></div>
1114 </div>
1115 <p>14k Yellow Gold</p>
1116 </div>
1117 </div>
1118 </div>
1119 </div>
1120 </div>
1121
1122</section>
1123
1124<div id="foot" class="footer container">
1125 <div class="logo container">
1126 <h1>κοσμήματα</h1>
1127 </div>
1128 <div class="top">
1129 <div class="site column">
1130 <h3>Kosmimata jewelry</h3>
1131 <p>Accessorise yourself with the best there is</p>
1132 </div>
1133 <div class="customer column">
1134 <h1>Customer Care</h1>
1135 <ul>
1136 <li><a href="./faq.html#shipping">Shipping & Returns</a></li>
1137 <li><a href="./order-status.html">Order Status</a></li>
1138 <li><a href="./faq.html#payment">Payment Methods</a></li>
1139 <li><a href="./ring-sizer.html">Ring Sizer</a></li>
1140 </ul>
1141 </div>
1142 <div class="contact column">
1143 <div class="address">
1144 <h1>Visit</h1>
1145 <p>1985 Bel Meadow Drive,</p>
1146 <p>Los Angeles, California</p>
1147 <p>90017</p>
1148 </div>
1149 <div class="email">
1150 <a href="mailto:info@kosmimata.com">info@kosmimata.com</a>
1151 <a href="tel:+1 213-829-0743">213-829-0743</a>
1152 </div>
1153 </div>
1154 <div class="sign column">
1155 <p>Sign up to have insider info on new arrivals, early access and more.</p>
1156 <div class="input">
1157 <i class="far fa-envelope"></i>
1158 <input type="email" placeholder="Your Email">
1159 <i class="fas fa-chevron-right"></i>
1160 </div>
1161 </div>
1162 </div>
1163 <div class="bottom">
1164 <div class="socials">
1165 <a href="./terms&conditions.html">Terms and Conditions</a>
1166 <a href="./privacy-policy.html">Privacy Policy</a>
1167 <a href="./sitemap.html">Site Map</a>
1168 <p>&copy;Kosmimata Inc.</p>
1169 <div class="icons">
1170 <a href=""><i class="fab fa-instagram"></i></a><a href=""><i class="fab fa-pinterest"></i></a><a href=""><i class="fab fa-twitter"></i></a>
1171 </div>
1172 </div>
1173 </div>
1174</div>
QUESTION
Nginx Php-fpm 7.3 Can't read PHP files from a particular folder
Asked 2021-Dec-08 at 02:38We have a Magento 2 website. For some reason our Nginx/PHP-FPM is unable to read files from MAGEROOT/pub/
folder other than index.php
.
We are getting the following error in Nginx Log "Unable to open primary script: /home/goodprice/public_html/releases/current/pub/get.php (No such file or directory)"
and the browser shows No input file specified.
Here is the partial Nginx config file.
1# Run Magento (behind Varnish)
2server {
3 listen 8088;
4
5 server_name {{website name}}.com.au www.{{website name}}.com.au m2.{{website name}}.com.au;
6
7 set $MAGE_ROOT /home/goodprice/public_html/releases/current;
8
9 index index.php;
10 root $MAGE_ROOT/pub;
11 set $code default;
12
13 location /sitemap.xml {
14 root $MAGE_ROOT/pub/media;
15 autoindex off;
16 }
17
18 # Rewrites for edm
19 include /etc/nginx/global/rewrites.conf;
20
21 location / {
22 try_files $uri $uri/ /index.php?$args;
23 }
24
25 # Serve media under /pub/media/
26 location /pub/ {
27 location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
28 deny all;
29 }
30 alias $MAGE_ROOT/pub/;
31 add_header X-Frame-Options "SAMEORIGIN";
32 }
33
34 # Rewrite signed static files
35 rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
36
37 # Static assets
38 location ~ ^/static/(version\d*/)?(.*)$ {
39 tcp_nodelay on;
40
41 # Images, CSS, JS
42 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
43 expires max;
44 log_not_found off;
45 access_log off;
46 add_header ETag "";
47 add_header Access-Control-Allow-Origin "*";
48 add_header Cache-Control "public";
49 try_files $uri $uri/ @static;
50 }
51
52 # Fonts
53 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
54 expires max;
55 log_not_found off;
56 access_log off;
57 add_header ETag "";
58 add_header Access-Control-Allow-Origin "*";
59 add_header Cache-Control "public";
60 try_files $uri $uri/ @static;
61 }
62
63 # Catch all
64 try_files $uri $uri/ @static;
65 }
66
67 # Media assets
68 location /media/ {
69 tcp_nodelay on;
70 autoindex off;
71
72 # Images, CSS, JS
73 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
74 expires max;
75 log_not_found off;
76 access_log off;
77 add_header ETag "";
78 add_header Access-Control-Allow-Origin "*";
79 add_header Cache-Control "public";
80 try_files $uri $uri/ @media;
81 }
82
83 # Fonts
84 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
85 expires max;
86 log_not_found off;
87 access_log off;
88 add_header ETag "";
89 add_header Access-Control-Allow-Origin "*";
90 add_header Cache-Control "public";
91 try_files $uri $uri/ @media;
92 }
93
94 # Catch all
95 try_files $uri $uri/ @media;
96 }
97
98 # Password paths
99 location /media/order_attachments {
100 auth_basic "Restricted";
101 auth_basic_user_file /etc/nginx/htpasswd;
102 }
103 location /media/convert {
104 auth_basic "Restricted";
105 auth_basic_user_file /etc/nginx/htpasswd;
106 }
107 # Below prescriptions dir does not contain actual prescriptions
108 #location /media/prescriptions {
109 # auth_basic "Restricted";
110 # auth_basic_user_file /etc/nginx/htpasswd;
111 #}
112 location /media/webforms {
113 auth_basic "Restricted";
114 auth_basic_user_file /etc/nginx/htpasswd;
115 }
116 location /media/raveinfosys/exporter {
117 auth_basic "Restricted";
118 auth_basic_user_file /etc/nginx/htpasswd;
119 }
120
121 location @static { rewrite /static/(version\d*/)?(.*)$ /static.php?resource=$2 last; }
122 location @media { try_files $uri $uri/ /get.php$is_args$args; }
123
124 # PHP entry point for setup application
125 location ~* ^/setup($|/) {
126 root $MAGE_ROOT;
127 location ~ ^/setup/index.php {
128 fastcgi_pass fastcgi_backend;
129
130 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
131 fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
132 fastcgi_read_timeout 300s;
133 fastcgi_connect_timeout 300s;
134
135 fastcgi_index index.php;
136 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
137 include fastcgi_params;
138 }
139
140 location ~ ^/setup/(?!pub/). {
141 deny all;
142 }
143
144 location ~ ^/setup/pub/ {
145 add_header X-Frame-Options "SAMEORIGIN";
146 }
147 }
148
149 # PHP entry point for update application
150 location ~* ^/update($|/) {
151 root $MAGE_ROOT;
152
153 location ~ ^/update/index.php {
154 fastcgi_split_path_info ^(/update/index.php)(/.+)$;
155 fastcgi_pass fastcgi_backend;
156 fastcgi_index index.php;
157 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
158 fastcgi_param PATH_INFO $fastcgi_path_info;
159 include fastcgi_params;
160 }
161
162 # Deny everything but index.php
163 location ~ ^/update/(?!pub/). {
164 deny all;
165 }
166
167 location ~ ^/update/pub/ {
168 add_header X-Frame-Options "SAMEORIGIN";
169 }
170 }
171
172 # Main PHP
173 location ~ (index|get|static|report|404|503|health_check|deploy_clear_opcache)\.php$ {
174 try_files $uri =404;
175
176 fastcgi_pass fastcgi_backend;
177
178 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
179 fastcgi_read_timeout 300s;
180 fastcgi_connect_timeout 300s;
181
182 # fastcgi_param MAGE_MODE $MAGE_MODE;
183 fastcgi_param MAGE_RUN_CODE $code;
184 fastcgi_param MAGE_RUN_TYPE store;
185
186 # Increase fastcgi buffer size to stop nginx errors on large posts
187 fastcgi_buffers 32 256k;
188 fastcgi_buffer_size 512k;
189
190 fastcgi_index index.php;
191 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
192 include fastcgi_params;
193
194 fastcgi_hide_header 'X-Powered-By';
195 }
196
197 # Return 503 if the maintenance flag is found
198# if (-f $MAGE_ROOT/var/.maintenance.flag) {
199# return 503;
200# }
201#
202# # Custom 503 error page
203# error_page 503 @maintenance;
204#
205# location @maintenance {
206# root /home/goodprice/public_html/maintenance;
207# rewrite ^(.*)$ /503.html break;
208# }
209
210 # Use Magento 403 404 page
211 error_page 403 404 /errors/404.php;
212
213 # Banned locations (only reached if the earlier PHP entry point regexes don't match)
214 location ~* (\.php$|\.htaccess$|\.git) {
215 deny all;
216 }
217}
218
This causes a few problems. One is Magento 2 can't serve the place holder image as it need to execute get.php. It's not a permission issue as index.php is being executed. Can anybody help fix the problem in the above mentioned Nginx config? Any help will much appreciated.
ls -la from pub dir following
1# Run Magento (behind Varnish)
2server {
3 listen 8088;
4
5 server_name {{website name}}.com.au www.{{website name}}.com.au m2.{{website name}}.com.au;
6
7 set $MAGE_ROOT /home/goodprice/public_html/releases/current;
8
9 index index.php;
10 root $MAGE_ROOT/pub;
11 set $code default;
12
13 location /sitemap.xml {
14 root $MAGE_ROOT/pub/media;
15 autoindex off;
16 }
17
18 # Rewrites for edm
19 include /etc/nginx/global/rewrites.conf;
20
21 location / {
22 try_files $uri $uri/ /index.php?$args;
23 }
24
25 # Serve media under /pub/media/
26 location /pub/ {
27 location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
28 deny all;
29 }
30 alias $MAGE_ROOT/pub/;
31 add_header X-Frame-Options "SAMEORIGIN";
32 }
33
34 # Rewrite signed static files
35 rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
36
37 # Static assets
38 location ~ ^/static/(version\d*/)?(.*)$ {
39 tcp_nodelay on;
40
41 # Images, CSS, JS
42 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
43 expires max;
44 log_not_found off;
45 access_log off;
46 add_header ETag "";
47 add_header Access-Control-Allow-Origin "*";
48 add_header Cache-Control "public";
49 try_files $uri $uri/ @static;
50 }
51
52 # Fonts
53 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
54 expires max;
55 log_not_found off;
56 access_log off;
57 add_header ETag "";
58 add_header Access-Control-Allow-Origin "*";
59 add_header Cache-Control "public";
60 try_files $uri $uri/ @static;
61 }
62
63 # Catch all
64 try_files $uri $uri/ @static;
65 }
66
67 # Media assets
68 location /media/ {
69 tcp_nodelay on;
70 autoindex off;
71
72 # Images, CSS, JS
73 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
74 expires max;
75 log_not_found off;
76 access_log off;
77 add_header ETag "";
78 add_header Access-Control-Allow-Origin "*";
79 add_header Cache-Control "public";
80 try_files $uri $uri/ @media;
81 }
82
83 # Fonts
84 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
85 expires max;
86 log_not_found off;
87 access_log off;
88 add_header ETag "";
89 add_header Access-Control-Allow-Origin "*";
90 add_header Cache-Control "public";
91 try_files $uri $uri/ @media;
92 }
93
94 # Catch all
95 try_files $uri $uri/ @media;
96 }
97
98 # Password paths
99 location /media/order_attachments {
100 auth_basic "Restricted";
101 auth_basic_user_file /etc/nginx/htpasswd;
102 }
103 location /media/convert {
104 auth_basic "Restricted";
105 auth_basic_user_file /etc/nginx/htpasswd;
106 }
107 # Below prescriptions dir does not contain actual prescriptions
108 #location /media/prescriptions {
109 # auth_basic "Restricted";
110 # auth_basic_user_file /etc/nginx/htpasswd;
111 #}
112 location /media/webforms {
113 auth_basic "Restricted";
114 auth_basic_user_file /etc/nginx/htpasswd;
115 }
116 location /media/raveinfosys/exporter {
117 auth_basic "Restricted";
118 auth_basic_user_file /etc/nginx/htpasswd;
119 }
120
121 location @static { rewrite /static/(version\d*/)?(.*)$ /static.php?resource=$2 last; }
122 location @media { try_files $uri $uri/ /get.php$is_args$args; }
123
124 # PHP entry point for setup application
125 location ~* ^/setup($|/) {
126 root $MAGE_ROOT;
127 location ~ ^/setup/index.php {
128 fastcgi_pass fastcgi_backend;
129
130 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
131 fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
132 fastcgi_read_timeout 300s;
133 fastcgi_connect_timeout 300s;
134
135 fastcgi_index index.php;
136 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
137 include fastcgi_params;
138 }
139
140 location ~ ^/setup/(?!pub/). {
141 deny all;
142 }
143
144 location ~ ^/setup/pub/ {
145 add_header X-Frame-Options "SAMEORIGIN";
146 }
147 }
148
149 # PHP entry point for update application
150 location ~* ^/update($|/) {
151 root $MAGE_ROOT;
152
153 location ~ ^/update/index.php {
154 fastcgi_split_path_info ^(/update/index.php)(/.+)$;
155 fastcgi_pass fastcgi_backend;
156 fastcgi_index index.php;
157 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
158 fastcgi_param PATH_INFO $fastcgi_path_info;
159 include fastcgi_params;
160 }
161
162 # Deny everything but index.php
163 location ~ ^/update/(?!pub/). {
164 deny all;
165 }
166
167 location ~ ^/update/pub/ {
168 add_header X-Frame-Options "SAMEORIGIN";
169 }
170 }
171
172 # Main PHP
173 location ~ (index|get|static|report|404|503|health_check|deploy_clear_opcache)\.php$ {
174 try_files $uri =404;
175
176 fastcgi_pass fastcgi_backend;
177
178 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
179 fastcgi_read_timeout 300s;
180 fastcgi_connect_timeout 300s;
181
182 # fastcgi_param MAGE_MODE $MAGE_MODE;
183 fastcgi_param MAGE_RUN_CODE $code;
184 fastcgi_param MAGE_RUN_TYPE store;
185
186 # Increase fastcgi buffer size to stop nginx errors on large posts
187 fastcgi_buffers 32 256k;
188 fastcgi_buffer_size 512k;
189
190 fastcgi_index index.php;
191 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
192 include fastcgi_params;
193
194 fastcgi_hide_header 'X-Powered-By';
195 }
196
197 # Return 503 if the maintenance flag is found
198# if (-f $MAGE_ROOT/var/.maintenance.flag) {
199# return 503;
200# }
201#
202# # Custom 503 error page
203# error_page 503 @maintenance;
204#
205# location @maintenance {
206# root /home/goodprice/public_html/maintenance;
207# rewrite ^(.*)$ /503.html break;
208# }
209
210 # Use Magento 403 404 page
211 error_page 403 404 /errors/404.php;
212
213 # Banned locations (only reached if the earlier PHP entry point regexes don't match)
214 location ~* (\.php$|\.htaccess$|\.git) {
215 deny all;
216 }
217}
218drwxr-xr-x 6 goodprice goodprice 4096 Nov 24 16:16 .
219drwxr-xr-x 16 goodprice goodprice 4096 Nov 30 12:11 ..
220-rw-rw-r-- 1 goodprice goodprice 1038 Nov 11 01:12 cron.php
221-rwxrwxr-x 1 goodprice goodprice 102 Nov 10 23:04 deploy_clear_opcache.php
222drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 errors
223-rw-rw-r-- 1 goodprice goodprice 2775 Nov 24 16:16 get.php
224-rw-rw-r-- 1 goodprice goodprice 3329 Nov 11 01:12 health_check.php
225-rw-rw-r-- 1 goodprice goodprice 6206 Nov 11 01:12 .htaccess
226-rw-r--r-- 1 goodprice goodprice 1360 Nov 12 11:49 index.php
227-rw-rw-r-- 1 goodprice goodprice 169 Jan 10 2021 info.php
228drwxrwxr-x 67 goodprice goodprice 4096 Nov 29 00:01 media
229drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 opt
230drwxr-xr-x 4 goodprice goodprice 4096 Nov 30 13:12 static
231-rw-rw-r-- 1 goodprice goodprice 445 Nov 11 01:12 static.php
232-rw-rw-r-- 1 goodprice goodprice 101 Nov 11 01:12 .user.ini
233
Php Fpm conf.d file extract users and groups.
1# Run Magento (behind Varnish)
2server {
3 listen 8088;
4
5 server_name {{website name}}.com.au www.{{website name}}.com.au m2.{{website name}}.com.au;
6
7 set $MAGE_ROOT /home/goodprice/public_html/releases/current;
8
9 index index.php;
10 root $MAGE_ROOT/pub;
11 set $code default;
12
13 location /sitemap.xml {
14 root $MAGE_ROOT/pub/media;
15 autoindex off;
16 }
17
18 # Rewrites for edm
19 include /etc/nginx/global/rewrites.conf;
20
21 location / {
22 try_files $uri $uri/ /index.php?$args;
23 }
24
25 # Serve media under /pub/media/
26 location /pub/ {
27 location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
28 deny all;
29 }
30 alias $MAGE_ROOT/pub/;
31 add_header X-Frame-Options "SAMEORIGIN";
32 }
33
34 # Rewrite signed static files
35 rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
36
37 # Static assets
38 location ~ ^/static/(version\d*/)?(.*)$ {
39 tcp_nodelay on;
40
41 # Images, CSS, JS
42 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
43 expires max;
44 log_not_found off;
45 access_log off;
46 add_header ETag "";
47 add_header Access-Control-Allow-Origin "*";
48 add_header Cache-Control "public";
49 try_files $uri $uri/ @static;
50 }
51
52 # Fonts
53 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
54 expires max;
55 log_not_found off;
56 access_log off;
57 add_header ETag "";
58 add_header Access-Control-Allow-Origin "*";
59 add_header Cache-Control "public";
60 try_files $uri $uri/ @static;
61 }
62
63 # Catch all
64 try_files $uri $uri/ @static;
65 }
66
67 # Media assets
68 location /media/ {
69 tcp_nodelay on;
70 autoindex off;
71
72 # Images, CSS, JS
73 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
74 expires max;
75 log_not_found off;
76 access_log off;
77 add_header ETag "";
78 add_header Access-Control-Allow-Origin "*";
79 add_header Cache-Control "public";
80 try_files $uri $uri/ @media;
81 }
82
83 # Fonts
84 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
85 expires max;
86 log_not_found off;
87 access_log off;
88 add_header ETag "";
89 add_header Access-Control-Allow-Origin "*";
90 add_header Cache-Control "public";
91 try_files $uri $uri/ @media;
92 }
93
94 # Catch all
95 try_files $uri $uri/ @media;
96 }
97
98 # Password paths
99 location /media/order_attachments {
100 auth_basic "Restricted";
101 auth_basic_user_file /etc/nginx/htpasswd;
102 }
103 location /media/convert {
104 auth_basic "Restricted";
105 auth_basic_user_file /etc/nginx/htpasswd;
106 }
107 # Below prescriptions dir does not contain actual prescriptions
108 #location /media/prescriptions {
109 # auth_basic "Restricted";
110 # auth_basic_user_file /etc/nginx/htpasswd;
111 #}
112 location /media/webforms {
113 auth_basic "Restricted";
114 auth_basic_user_file /etc/nginx/htpasswd;
115 }
116 location /media/raveinfosys/exporter {
117 auth_basic "Restricted";
118 auth_basic_user_file /etc/nginx/htpasswd;
119 }
120
121 location @static { rewrite /static/(version\d*/)?(.*)$ /static.php?resource=$2 last; }
122 location @media { try_files $uri $uri/ /get.php$is_args$args; }
123
124 # PHP entry point for setup application
125 location ~* ^/setup($|/) {
126 root $MAGE_ROOT;
127 location ~ ^/setup/index.php {
128 fastcgi_pass fastcgi_backend;
129
130 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
131 fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
132 fastcgi_read_timeout 300s;
133 fastcgi_connect_timeout 300s;
134
135 fastcgi_index index.php;
136 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
137 include fastcgi_params;
138 }
139
140 location ~ ^/setup/(?!pub/). {
141 deny all;
142 }
143
144 location ~ ^/setup/pub/ {
145 add_header X-Frame-Options "SAMEORIGIN";
146 }
147 }
148
149 # PHP entry point for update application
150 location ~* ^/update($|/) {
151 root $MAGE_ROOT;
152
153 location ~ ^/update/index.php {
154 fastcgi_split_path_info ^(/update/index.php)(/.+)$;
155 fastcgi_pass fastcgi_backend;
156 fastcgi_index index.php;
157 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
158 fastcgi_param PATH_INFO $fastcgi_path_info;
159 include fastcgi_params;
160 }
161
162 # Deny everything but index.php
163 location ~ ^/update/(?!pub/). {
164 deny all;
165 }
166
167 location ~ ^/update/pub/ {
168 add_header X-Frame-Options "SAMEORIGIN";
169 }
170 }
171
172 # Main PHP
173 location ~ (index|get|static|report|404|503|health_check|deploy_clear_opcache)\.php$ {
174 try_files $uri =404;
175
176 fastcgi_pass fastcgi_backend;
177
178 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
179 fastcgi_read_timeout 300s;
180 fastcgi_connect_timeout 300s;
181
182 # fastcgi_param MAGE_MODE $MAGE_MODE;
183 fastcgi_param MAGE_RUN_CODE $code;
184 fastcgi_param MAGE_RUN_TYPE store;
185
186 # Increase fastcgi buffer size to stop nginx errors on large posts
187 fastcgi_buffers 32 256k;
188 fastcgi_buffer_size 512k;
189
190 fastcgi_index index.php;
191 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
192 include fastcgi_params;
193
194 fastcgi_hide_header 'X-Powered-By';
195 }
196
197 # Return 503 if the maintenance flag is found
198# if (-f $MAGE_ROOT/var/.maintenance.flag) {
199# return 503;
200# }
201#
202# # Custom 503 error page
203# error_page 503 @maintenance;
204#
205# location @maintenance {
206# root /home/goodprice/public_html/maintenance;
207# rewrite ^(.*)$ /503.html break;
208# }
209
210 # Use Magento 403 404 page
211 error_page 403 404 /errors/404.php;
212
213 # Banned locations (only reached if the earlier PHP entry point regexes don't match)
214 location ~* (\.php$|\.htaccess$|\.git) {
215 deny all;
216 }
217}
218drwxr-xr-x 6 goodprice goodprice 4096 Nov 24 16:16 .
219drwxr-xr-x 16 goodprice goodprice 4096 Nov 30 12:11 ..
220-rw-rw-r-- 1 goodprice goodprice 1038 Nov 11 01:12 cron.php
221-rwxrwxr-x 1 goodprice goodprice 102 Nov 10 23:04 deploy_clear_opcache.php
222drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 errors
223-rw-rw-r-- 1 goodprice goodprice 2775 Nov 24 16:16 get.php
224-rw-rw-r-- 1 goodprice goodprice 3329 Nov 11 01:12 health_check.php
225-rw-rw-r-- 1 goodprice goodprice 6206 Nov 11 01:12 .htaccess
226-rw-r--r-- 1 goodprice goodprice 1360 Nov 12 11:49 index.php
227-rw-rw-r-- 1 goodprice goodprice 169 Jan 10 2021 info.php
228drwxrwxr-x 67 goodprice goodprice 4096 Nov 29 00:01 media
229drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 opt
230drwxr-xr-x 4 goodprice goodprice 4096 Nov 30 13:12 static
231-rw-rw-r-- 1 goodprice goodprice 445 Nov 11 01:12 static.php
232-rw-rw-r-- 1 goodprice goodprice 101 Nov 11 01:12 .user.ini
233group = "goodprice"
234listen.group = "nobody"
235listen.mode = 0660
236listen.owner = "goodprice"
237user = "goodprice"
238
nginx.conf as following
1# Run Magento (behind Varnish)
2server {
3 listen 8088;
4
5 server_name {{website name}}.com.au www.{{website name}}.com.au m2.{{website name}}.com.au;
6
7 set $MAGE_ROOT /home/goodprice/public_html/releases/current;
8
9 index index.php;
10 root $MAGE_ROOT/pub;
11 set $code default;
12
13 location /sitemap.xml {
14 root $MAGE_ROOT/pub/media;
15 autoindex off;
16 }
17
18 # Rewrites for edm
19 include /etc/nginx/global/rewrites.conf;
20
21 location / {
22 try_files $uri $uri/ /index.php?$args;
23 }
24
25 # Serve media under /pub/media/
26 location /pub/ {
27 location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
28 deny all;
29 }
30 alias $MAGE_ROOT/pub/;
31 add_header X-Frame-Options "SAMEORIGIN";
32 }
33
34 # Rewrite signed static files
35 rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
36
37 # Static assets
38 location ~ ^/static/(version\d*/)?(.*)$ {
39 tcp_nodelay on;
40
41 # Images, CSS, JS
42 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
43 expires max;
44 log_not_found off;
45 access_log off;
46 add_header ETag "";
47 add_header Access-Control-Allow-Origin "*";
48 add_header Cache-Control "public";
49 try_files $uri $uri/ @static;
50 }
51
52 # Fonts
53 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
54 expires max;
55 log_not_found off;
56 access_log off;
57 add_header ETag "";
58 add_header Access-Control-Allow-Origin "*";
59 add_header Cache-Control "public";
60 try_files $uri $uri/ @static;
61 }
62
63 # Catch all
64 try_files $uri $uri/ @static;
65 }
66
67 # Media assets
68 location /media/ {
69 tcp_nodelay on;
70 autoindex off;
71
72 # Images, CSS, JS
73 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
74 expires max;
75 log_not_found off;
76 access_log off;
77 add_header ETag "";
78 add_header Access-Control-Allow-Origin "*";
79 add_header Cache-Control "public";
80 try_files $uri $uri/ @media;
81 }
82
83 # Fonts
84 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
85 expires max;
86 log_not_found off;
87 access_log off;
88 add_header ETag "";
89 add_header Access-Control-Allow-Origin "*";
90 add_header Cache-Control "public";
91 try_files $uri $uri/ @media;
92 }
93
94 # Catch all
95 try_files $uri $uri/ @media;
96 }
97
98 # Password paths
99 location /media/order_attachments {
100 auth_basic "Restricted";
101 auth_basic_user_file /etc/nginx/htpasswd;
102 }
103 location /media/convert {
104 auth_basic "Restricted";
105 auth_basic_user_file /etc/nginx/htpasswd;
106 }
107 # Below prescriptions dir does not contain actual prescriptions
108 #location /media/prescriptions {
109 # auth_basic "Restricted";
110 # auth_basic_user_file /etc/nginx/htpasswd;
111 #}
112 location /media/webforms {
113 auth_basic "Restricted";
114 auth_basic_user_file /etc/nginx/htpasswd;
115 }
116 location /media/raveinfosys/exporter {
117 auth_basic "Restricted";
118 auth_basic_user_file /etc/nginx/htpasswd;
119 }
120
121 location @static { rewrite /static/(version\d*/)?(.*)$ /static.php?resource=$2 last; }
122 location @media { try_files $uri $uri/ /get.php$is_args$args; }
123
124 # PHP entry point for setup application
125 location ~* ^/setup($|/) {
126 root $MAGE_ROOT;
127 location ~ ^/setup/index.php {
128 fastcgi_pass fastcgi_backend;
129
130 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
131 fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
132 fastcgi_read_timeout 300s;
133 fastcgi_connect_timeout 300s;
134
135 fastcgi_index index.php;
136 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
137 include fastcgi_params;
138 }
139
140 location ~ ^/setup/(?!pub/). {
141 deny all;
142 }
143
144 location ~ ^/setup/pub/ {
145 add_header X-Frame-Options "SAMEORIGIN";
146 }
147 }
148
149 # PHP entry point for update application
150 location ~* ^/update($|/) {
151 root $MAGE_ROOT;
152
153 location ~ ^/update/index.php {
154 fastcgi_split_path_info ^(/update/index.php)(/.+)$;
155 fastcgi_pass fastcgi_backend;
156 fastcgi_index index.php;
157 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
158 fastcgi_param PATH_INFO $fastcgi_path_info;
159 include fastcgi_params;
160 }
161
162 # Deny everything but index.php
163 location ~ ^/update/(?!pub/). {
164 deny all;
165 }
166
167 location ~ ^/update/pub/ {
168 add_header X-Frame-Options "SAMEORIGIN";
169 }
170 }
171
172 # Main PHP
173 location ~ (index|get|static|report|404|503|health_check|deploy_clear_opcache)\.php$ {
174 try_files $uri =404;
175
176 fastcgi_pass fastcgi_backend;
177
178 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
179 fastcgi_read_timeout 300s;
180 fastcgi_connect_timeout 300s;
181
182 # fastcgi_param MAGE_MODE $MAGE_MODE;
183 fastcgi_param MAGE_RUN_CODE $code;
184 fastcgi_param MAGE_RUN_TYPE store;
185
186 # Increase fastcgi buffer size to stop nginx errors on large posts
187 fastcgi_buffers 32 256k;
188 fastcgi_buffer_size 512k;
189
190 fastcgi_index index.php;
191 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
192 include fastcgi_params;
193
194 fastcgi_hide_header 'X-Powered-By';
195 }
196
197 # Return 503 if the maintenance flag is found
198# if (-f $MAGE_ROOT/var/.maintenance.flag) {
199# return 503;
200# }
201#
202# # Custom 503 error page
203# error_page 503 @maintenance;
204#
205# location @maintenance {
206# root /home/goodprice/public_html/maintenance;
207# rewrite ^(.*)$ /503.html break;
208# }
209
210 # Use Magento 403 404 page
211 error_page 403 404 /errors/404.php;
212
213 # Banned locations (only reached if the earlier PHP entry point regexes don't match)
214 location ~* (\.php$|\.htaccess$|\.git) {
215 deny all;
216 }
217}
218drwxr-xr-x 6 goodprice goodprice 4096 Nov 24 16:16 .
219drwxr-xr-x 16 goodprice goodprice 4096 Nov 30 12:11 ..
220-rw-rw-r-- 1 goodprice goodprice 1038 Nov 11 01:12 cron.php
221-rwxrwxr-x 1 goodprice goodprice 102 Nov 10 23:04 deploy_clear_opcache.php
222drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 errors
223-rw-rw-r-- 1 goodprice goodprice 2775 Nov 24 16:16 get.php
224-rw-rw-r-- 1 goodprice goodprice 3329 Nov 11 01:12 health_check.php
225-rw-rw-r-- 1 goodprice goodprice 6206 Nov 11 01:12 .htaccess
226-rw-r--r-- 1 goodprice goodprice 1360 Nov 12 11:49 index.php
227-rw-rw-r-- 1 goodprice goodprice 169 Jan 10 2021 info.php
228drwxrwxr-x 67 goodprice goodprice 4096 Nov 29 00:01 media
229drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 opt
230drwxr-xr-x 4 goodprice goodprice 4096 Nov 30 13:12 static
231-rw-rw-r-- 1 goodprice goodprice 445 Nov 11 01:12 static.php
232-rw-rw-r-- 1 goodprice goodprice 101 Nov 11 01:12 .user.ini
233group = "goodprice"
234listen.group = "nobody"
235listen.mode = 0660
236listen.owner = "goodprice"
237user = "goodprice"
238include /etc/nginx/conf.d/modules/*.conf;
239
240user nobody;
241
242worker_processes 1;
243worker_rlimit_nofile 16384;
244
245error_log /var/log/nginx/error.log warn;
246pid /var/run/nginx.pid;
247
248
249events {
250 worker_connections 1024;
251}
252
253
254http {
255 include /etc/nginx/mime.types;
256 default_type application/octet-stream;
257
258 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
259 '$status $body_bytes_sent "$http_referer" '
260 '"$http_user_agent" "$http_x_forwarded_for"';
261
262 access_log /var/log/nginx/access.log main;
263
264 sendfile on;
265 #tcp_nopush on;
266
267 keepalive_timeout 65;
268
269 #gzip on;
270
271 include /etc/nginx/conf.d/*.conf;
272 include /etc/nginx/conf.d-custom/*.conf;
273}
274
ANSWER
Answered 2021-Dec-05 at 07:13change the file permissions to
1# Run Magento (behind Varnish)
2server {
3 listen 8088;
4
5 server_name {{website name}}.com.au www.{{website name}}.com.au m2.{{website name}}.com.au;
6
7 set $MAGE_ROOT /home/goodprice/public_html/releases/current;
8
9 index index.php;
10 root $MAGE_ROOT/pub;
11 set $code default;
12
13 location /sitemap.xml {
14 root $MAGE_ROOT/pub/media;
15 autoindex off;
16 }
17
18 # Rewrites for edm
19 include /etc/nginx/global/rewrites.conf;
20
21 location / {
22 try_files $uri $uri/ /index.php?$args;
23 }
24
25 # Serve media under /pub/media/
26 location /pub/ {
27 location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
28 deny all;
29 }
30 alias $MAGE_ROOT/pub/;
31 add_header X-Frame-Options "SAMEORIGIN";
32 }
33
34 # Rewrite signed static files
35 rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
36
37 # Static assets
38 location ~ ^/static/(version\d*/)?(.*)$ {
39 tcp_nodelay on;
40
41 # Images, CSS, JS
42 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
43 expires max;
44 log_not_found off;
45 access_log off;
46 add_header ETag "";
47 add_header Access-Control-Allow-Origin "*";
48 add_header Cache-Control "public";
49 try_files $uri $uri/ @static;
50 }
51
52 # Fonts
53 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
54 expires max;
55 log_not_found off;
56 access_log off;
57 add_header ETag "";
58 add_header Access-Control-Allow-Origin "*";
59 add_header Cache-Control "public";
60 try_files $uri $uri/ @static;
61 }
62
63 # Catch all
64 try_files $uri $uri/ @static;
65 }
66
67 # Media assets
68 location /media/ {
69 tcp_nodelay on;
70 autoindex off;
71
72 # Images, CSS, JS
73 location ~* \.(jpg|jpeg|png|gif|svg|js|css|ico|txt)$ {
74 expires max;
75 log_not_found off;
76 access_log off;
77 add_header ETag "";
78 add_header Access-Control-Allow-Origin "*";
79 add_header Cache-Control "public";
80 try_files $uri $uri/ @media;
81 }
82
83 # Fonts
84 location ~* \.(swf|eot|ttf|otf|woff|woff2)$ {
85 expires max;
86 log_not_found off;
87 access_log off;
88 add_header ETag "";
89 add_header Access-Control-Allow-Origin "*";
90 add_header Cache-Control "public";
91 try_files $uri $uri/ @media;
92 }
93
94 # Catch all
95 try_files $uri $uri/ @media;
96 }
97
98 # Password paths
99 location /media/order_attachments {
100 auth_basic "Restricted";
101 auth_basic_user_file /etc/nginx/htpasswd;
102 }
103 location /media/convert {
104 auth_basic "Restricted";
105 auth_basic_user_file /etc/nginx/htpasswd;
106 }
107 # Below prescriptions dir does not contain actual prescriptions
108 #location /media/prescriptions {
109 # auth_basic "Restricted";
110 # auth_basic_user_file /etc/nginx/htpasswd;
111 #}
112 location /media/webforms {
113 auth_basic "Restricted";
114 auth_basic_user_file /etc/nginx/htpasswd;
115 }
116 location /media/raveinfosys/exporter {
117 auth_basic "Restricted";
118 auth_basic_user_file /etc/nginx/htpasswd;
119 }
120
121 location @static { rewrite /static/(version\d*/)?(.*)$ /static.php?resource=$2 last; }
122 location @media { try_files $uri $uri/ /get.php$is_args$args; }
123
124 # PHP entry point for setup application
125 location ~* ^/setup($|/) {
126 root $MAGE_ROOT;
127 location ~ ^/setup/index.php {
128 fastcgi_pass fastcgi_backend;
129
130 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
131 fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
132 fastcgi_read_timeout 300s;
133 fastcgi_connect_timeout 300s;
134
135 fastcgi_index index.php;
136 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
137 include fastcgi_params;
138 }
139
140 location ~ ^/setup/(?!pub/). {
141 deny all;
142 }
143
144 location ~ ^/setup/pub/ {
145 add_header X-Frame-Options "SAMEORIGIN";
146 }
147 }
148
149 # PHP entry point for update application
150 location ~* ^/update($|/) {
151 root $MAGE_ROOT;
152
153 location ~ ^/update/index.php {
154 fastcgi_split_path_info ^(/update/index.php)(/.+)$;
155 fastcgi_pass fastcgi_backend;
156 fastcgi_index index.php;
157 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
158 fastcgi_param PATH_INFO $fastcgi_path_info;
159 include fastcgi_params;
160 }
161
162 # Deny everything but index.php
163 location ~ ^/update/(?!pub/). {
164 deny all;
165 }
166
167 location ~ ^/update/pub/ {
168 add_header X-Frame-Options "SAMEORIGIN";
169 }
170 }
171
172 # Main PHP
173 location ~ (index|get|static|report|404|503|health_check|deploy_clear_opcache)\.php$ {
174 try_files $uri =404;
175
176 fastcgi_pass fastcgi_backend;
177
178 fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
179 fastcgi_read_timeout 300s;
180 fastcgi_connect_timeout 300s;
181
182 # fastcgi_param MAGE_MODE $MAGE_MODE;
183 fastcgi_param MAGE_RUN_CODE $code;
184 fastcgi_param MAGE_RUN_TYPE store;
185
186 # Increase fastcgi buffer size to stop nginx errors on large posts
187 fastcgi_buffers 32 256k;
188 fastcgi_buffer_size 512k;
189
190 fastcgi_index index.php;
191 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
192 include fastcgi_params;
193
194 fastcgi_hide_header 'X-Powered-By';
195 }
196
197 # Return 503 if the maintenance flag is found
198# if (-f $MAGE_ROOT/var/.maintenance.flag) {
199# return 503;
200# }
201#
202# # Custom 503 error page
203# error_page 503 @maintenance;
204#
205# location @maintenance {
206# root /home/goodprice/public_html/maintenance;
207# rewrite ^(.*)$ /503.html break;
208# }
209
210 # Use Magento 403 404 page
211 error_page 403 404 /errors/404.php;
212
213 # Banned locations (only reached if the earlier PHP entry point regexes don't match)
214 location ~* (\.php$|\.htaccess$|\.git) {
215 deny all;
216 }
217}
218drwxr-xr-x 6 goodprice goodprice 4096 Nov 24 16:16 .
219drwxr-xr-x 16 goodprice goodprice 4096 Nov 30 12:11 ..
220-rw-rw-r-- 1 goodprice goodprice 1038 Nov 11 01:12 cron.php
221-rwxrwxr-x 1 goodprice goodprice 102 Nov 10 23:04 deploy_clear_opcache.php
222drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 errors
223-rw-rw-r-- 1 goodprice goodprice 2775 Nov 24 16:16 get.php
224-rw-rw-r-- 1 goodprice goodprice 3329 Nov 11 01:12 health_check.php
225-rw-rw-r-- 1 goodprice goodprice 6206 Nov 11 01:12 .htaccess
226-rw-r--r-- 1 goodprice goodprice 1360 Nov 12 11:49 index.php
227-rw-rw-r-- 1 goodprice goodprice 169 Jan 10 2021 info.php
228drwxrwxr-x 67 goodprice goodprice 4096 Nov 29 00:01 media
229drwxrwxr-x 3 goodprice goodprice 4096 Nov 11 01:12 opt
230drwxr-xr-x 4 goodprice goodprice 4096 Nov 30 13:12 static
231-rw-rw-r-- 1 goodprice goodprice 445 Nov 11 01:12 static.php
232-rw-rw-r-- 1 goodprice goodprice 101 Nov 11 01:12 .user.ini
233group = "goodprice"
234listen.group = "nobody"
235listen.mode = 0660
236listen.owner = "goodprice"
237user = "goodprice"
238include /etc/nginx/conf.d/modules/*.conf;
239
240user nobody;
241
242worker_processes 1;
243worker_rlimit_nofile 16384;
244
245error_log /var/log/nginx/error.log warn;
246pid /var/run/nginx.pid;
247
248
249events {
250 worker_connections 1024;
251}
252
253
254http {
255 include /etc/nginx/mime.types;
256 default_type application/octet-stream;
257
258 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
259 '$status $body_bytes_sent "$http_referer" '
260 '"$http_user_agent" "$http_x_forwarded_for"';
261
262 access_log /var/log/nginx/access.log main;
263
264 sendfile on;
265 #tcp_nopush on;
266
267 keepalive_timeout 65;
268
269 #gzip on;
270
271 include /etc/nginx/conf.d/*.conf;
272 include /etc/nginx/conf.d-custom/*.conf;
273}
274-rw-r-xr-x 1 goodprice goodprice 2775 Nov 24 16:16 get.php
275
276chmod 755
277
BTW, if this is a parked domain then your issue will have a different twist to it because NginX does not behave as smoothly has Apache in multiple domains.
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Sitemap
Tutorials and Learning Resources are not available at this moment for Sitemap