Skip to content

Commit

Permalink
fix search and start store
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredewilde committed Jan 18, 2022
1 parent 4a321b1 commit 3e0cb45
Show file tree
Hide file tree
Showing 71 changed files with 329 additions and 131 deletions.
2 changes: 1 addition & 1 deletion assets/data/products.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Circle,"Red, Green, Blue, Orange",2,4,"blog/community/circle"
Square,"Red, Pink, Blue",4,5,"blog/building-squares"
Line,"Yellow, Blue",1,3,"blog/line"
Triangle,Green,3,5,"blog/tropical-triangles"
Rhombus,Green,3,5,"#store"
Rectangle,Red,2.99,4,"#store"
42 changes: 42 additions & 0 deletions assets/data/products.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"name": "Circle",
"colors": "Red, Green, Blue, Orange",
"price": 2,
"rating": 4,
"post": "blog/community/circle",
"desc": "A circle is a shape consisting of all points in a plane that are a given distance from a given point, the centre"
},
{
"name": "Square",
"colors": "Red, Pink, Blue",
"price": 4,
"rating": 5,
"post": "blog/building-squares",
"desc": "A square is a regular quadrilateral, which means that it has four equal sides and four equal angles"
},
{
"name": "Line",
"colors": "Yellow, Blue",
"price": 1,
"rating": 3,
"post": "blog/line",
"desc": "Straight objects (i.e., having no curvature) with negligible width and depth"
},
{
"name": "Rhombus",
"colors": "Green",
"price": 3,
"rating": 5,
"post": "#store",
"desc": "A parallelogram in which a diagonal bisects an interior angle"
},
{
"name": "Rectangle",
"colors": "Red",
"price": 2.99,
"rating": 4,
"post": "#store",
"desc": "A square is a regular quadrilateral, which means that it has four equal sides and four equal angles"
}
]
File renamed without changes
10 changes: 0 additions & 10 deletions assets/jsconfig.json

This file was deleted.

2 changes: 2 additions & 0 deletions config/_default/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
noJSConfigInAssets: true
writeStats: false
28 changes: 12 additions & 16 deletions config/_default/menu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,42 @@ main:
- identifier: about
name: About
url: /about
weight: 1
weight: 10
- identifier: blog
name: Blog
url: /blog
weight: 2
weight: 20
- identifier: community
name: Community
parent: blog
url: /blog/community
- identifier: news
name: News
url: /news
weight: 3
- identifier: survey
name: Surveys
url: /survey
weight: 4
weight: 30
- identifier: contact
name: Contact
url: /contact
weight: 5
weight: 40

footer:
- identifier: blog
name: Blog
url: /blog
weight: 1
- identifier: categories
name: Categories
url: /categories
weight: 2
weight: 20
- identifier: survey
name: Surveys
url: /survey
weight: 30
- identifier: terms
name: Terms of Use
url: /terms
weight: 3
weight: 40
- identifier: privacy
name: Privacy Policy
url: /privacy
weight: 4
weight: 50
- identifier: credits
name: Credits
url: /credits
weight: 5
weight: 60
5 changes: 3 additions & 2 deletions config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ color: "#008080"
title: Acme Corporation
copyright: Copyright © Acme Corporation™, 1990-2021. All Rights Reserved.
email: [email protected]
latex: true
custom: true
comments: true
relatedPages: true
related: true
latex: true
maxSearch: 5
form:
api: https://api.staticforms.xyz/submit
Expand Down
6 changes: 3 additions & 3 deletions content/blog/line/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Line
date: 2022-01-04T21:57:20+01:00
draft: true
draft: false
tags: [line, shape, product]
categories: [shape, line]
series: [design]
relatedPages: true
comments: true
related: true
comments: false
---

In geometry, the notion of line or straight line was introduced by ancient mathematicians to represent straight objects (i.e., having no curvature) with negligible width and depth.
Expand Down
2 changes: 1 addition & 1 deletion content/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ Content with a -- (dash) and a --- (long dash).

Sample inline code `a++` can be specified here.

![Alt Text](/image/hugo-logo.png "Optional Tooltip")
![Alt Text](/image/hugo.png "Optional Tooltip")
11 changes: 11 additions & 0 deletions content/store/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Store
menu:
main:
name: Store
identifier: store
weight: 35
post: Buy now
---

Get some of the best digital shapes precisely created and properly maintained.
Binary file added content/store/circle/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions content/store/circle/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Circle
product: Circle
tags: ['shape', '2d']
Summary: A circle is a shape consisting of all points in a plane that are a given distance from a given point, the centre
---

* A circle is the curve traced out by a point that moves in a plane so that its distance from a given point is constant.
* The distance between any point of the circle and the centre is called the radius.
* Specifically, a circle is a simple closed curve that divides the plane into two regions: an interior and an exterior.
* In everyday use, the term "circle" may be used interchangeably to refer to either the boundary of the figure, or to the whole figure including its interior; in strict technical usage, the circle is only the boundary and the whole figure is called a disc.
* A circle may also be defined as a special kind of ellipse in which the two foci are coincident and the eccentricity is 0, or the two-dimensional shape enclosing the most area per unit perimeter squared, using calculus of variations.

# Facts

Area:
{{<latex>}}A = \pi r^2{{</latex>}}

Circumference:
{{<latex>}}C = 2\pi r{{</latex>}}

Equation:
{{<latex>}}x^2 + y^2 = r^2{{</latex>}}
Binary file added content/store/line/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions content/store/line/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Line
product: Line
tags: ['shape', '1d']
Summary: Straight objects (i.e., having no curvature) with negligible width and depth
---

* In geometry, the notion of line or straight line was introduced by ancient mathematicians to represent straight objects (i.e., having no curvature) with negligible width and depth.
* Lines are an idealization of such objects, which are often described in terms of two points or referred to using a single letter.
* Until the 17th century, lines were defined as the first species of quantity, which has only one dimension, namely length, without any width nor depth, and is nothing else than the flow or run of the point which will leave from its imaginary moving some vestige in length, exempt of any width.
* The straight line is that which is equally extended between its points.

# Facts

Equation:
{{<latex>}}\displaystyle y=mx+b{{</latex>}}
Binary file added content/store/rectangle/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions content/store/rectangle/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Rectangle
product: Rectangle
tags: ['shape', '2d', 'quadrilateral']
Summary: A rectangle is a quadrilateral with four right angles
---

* A parallelogram with at least one right angle
* A parallelogram with diagonals of equal length
* A parallelogram ABCD where triangles ABD and DCA are congruent
* An equiangular quadrilateral
* A quadrilateral with four right angles
* A quadrilateral where the two diagonals are equal in length and bisect each other

# Facts

Perimeter:
{{<latex>}}P = 2\ell + 2w = 2(\ell + w) {{</latex>}}

Area:
{{<latex>}}A = \ell w{{</latex>}}
Binary file added content/store/rhombus/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions content/store/rhombus/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Rhombus
product: Rhombus
tags: ['shape', '2d', 'quadrilateral']
summary: A parallelogram in which a diagonal bisects an interior angle
---

* a parallelogram in which a diagonal bisects an interior angle
* a parallelogram in which at least two consecutive sides are equal in length
* a parallelogram in which the diagonals are perpendicular (an orthodiagonal parallelogram)
* a quadrilateral with four sides of equal length (by definition)
* a quadrilateral in which the diagonals are perpendicular and bisect each other
* a quadrilateral in which each diagonal bisects two opposite interior angles
* a quadrilateral ABCD possessing a point P in its plane such that the four triangles ABP, BCP, CDP, and DAP are all congruent
* a quadrilateral ABCD in which the incircles in triangles ABC, BCD, CDA and DAB have a common point

# Facts

Area:
{{<latex>}}\displaystyle K=a^{2}\cdot \sin \alpha =a^{2}\cdot \sin \beta {{</latex>}} (Based on sin of angle)

Equation:
{{<latex>}}\displaystyle \left|{\frac {x}{a}}\right|\!+\left|{\frac {y}{b}}\right|\!=1 {{</latex>}}
Binary file added content/store/square/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions content/store/square/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Square
product: Square
tags: ['shape', '2d', 'quadrilateral']
Summary: A square is a regular quadrilateral, which means that it has four equal sides and four equal angles
---

* In geometry, a square is a regular quadrilateral, which means that it has four equal sides and four equal angles (90-degree angles, or 100-gradian angles or right angles).
* It can also be defined as a rectangle in which two adjacent sides have equal length.
* A rhombus with a right vertex angle
* A rhombus with all angles equal
* A parallelogram with one right vertex angle and two adjacent equal sides
* A quadrilateral with four equal sides and four right angles
* A quadrilateral where the diagonals are equal, and are the perpendicular bisectors of each other (i.e., a rhombus with equal diagonals)

# Facts

Perimeter:
{{<latex>}}P = 4\ell {{</latex>}}

Area:
{{<latex>}}A = \ell ^{2}{{</latex>}}

Equation (where x & y are sides):
{{<latex>}}x^{2}+y^{2}=2{{</latex>}}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
11 changes: 6 additions & 5 deletions static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ footer>* {
font-size: 1.5rem;
}

body.page form button {
#form_send {
display: block;
margin-left: auto;
margin-right: auto;
outline: none;
/* width: 100%; */
/* margin-left: auto; */
/* margin-right: auto; */
/* outline: none; */
}

.success, .error {
Expand All @@ -106,4 +107,4 @@ body.page form button {

.katex * {
font-size: 1.5rem;
}
}
File renamed without changes
8 changes: 4 additions & 4 deletions themes/acme/assets/css/additional.tpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* You are free to use this code on your website but beware of caveats and
* do understand that support may be lacking where expected.
**/
{{ $color := site.Params.color | default "#4f46e5" }}
{{ $b := substr $color -2 2 | print "0x" | int}}
{{ $g := substr $color -4 2 | print "0x" | int}}
{{ $r := substr $color -6 2 | print "0x" | int}}
{{- $color := site.Params.color | default "#4f46e5" }}
{{- $r := substr $color -6 2 | print "0x" | int }}
{{- $g := substr $color -4 2 | print "0x" | int }}
{{- $b := substr $color -2 2 | print "0x" | int }}
:root {
--red: {{$r}};
--green: {{$g}};
Expand Down
12 changes: 6 additions & 6 deletions themes/acme/assets/css/index.tpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* You are free to use this code on your website but beware of caveats and
* do understand that support may be lacking where expected.
**/
{{ $color := site.Params.color | default "#4f46e5" }}
{{ $b := substr $color -2 2 | print "0x" | int}}
{{ $g := substr $color -4 2 | print "0x" | int}}
{{ $r := substr $color -6 2 | print "0x" | int}}
{{- $color := site.Params.color | default "#4f46e5" }}
{{- $r := substr $color -6 2 | print "0x" | int }}
{{- $g := substr $color -4 2 | print "0x" | int }}
{{- $b := substr $color -2 2 | print "0x" | int }}
:root {
--red: {{$r}};
--green: {{$g}};
Expand All @@ -25,7 +25,7 @@
font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
line-height: 1.5;
{{ $background := resources.GetMatch "image/background.tpl.svg" | resources.ExecuteAsTemplate "background.svg" "nothing" }}
background: url({{$background.RelPermalink}}) 0 0/cover;
background: url({{$background.Permalink}}) 0 0/cover;
min-height: 100vh;
width: 100vw;
scroll-snap-type: y proximity;
Expand Down Expand Up @@ -1623,7 +1623,7 @@
body.page form input:focus,
body.page form select:focus,
body.page form textarea:focus {
background-color: rgb(232, 240, 254); /* PDW #fff; */
background-color: #fff;
border-color: #6b7280;
box-shadow: 0 0 0 0 #fff,0 0 0 calc(0px) rgba(59,130,246,.5),0 0 transparent;
}
Expand Down
2 changes: 1 addition & 1 deletion themes/acme/assets/js/formHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
document.addEventListener('submit', async event => {
if (!(event.target instanceof HTMLFormElement)) { return; }
event.preventDefault();
const submit = document.getElementById('submit')
const submit = document.querySelector('form button[type=submit]');
const form = event.target;
const data = new FormData(form);
let response;
Expand Down
7 changes: 3 additions & 4 deletions themes/acme/assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import SearchSupport from './searchSupport'
const search = document.getElementById('search');
const input = document.getElementById('search_input');
const result = document.getElementById('search_result');
let index = null;

let index = null;

export default {
async init() {
// console.log(params);
try {
const response = await fetch(params.baseURL + '/index.json'); // baseURL needed by GitHub Pages
const response = await fetch(params.baseURL + '/index.json'); // baseURL for GitHub Pages
if (!response.ok) {
search.remove();
return;
Expand Down Expand Up @@ -57,4 +55,5 @@ export default {
result.innerHTML = '';
}
}

}
Loading

0 comments on commit 3e0cb45

Please sign in to comment.