Skip to content

Commit

Permalink
correct mistakes, add categories images, improve front and gunicorn c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
michael7nightingale committed Apr 29, 2024
1 parent 5239a76 commit d0bed95
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 33 deletions.
3 changes: 2 additions & 1 deletion backend/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
max_requests = 10000
timeout = 60
worker_class = 'uvicorn.workers.UvicornWorker'
workers = cpu_count() * 2 + 1
# workers = cpu_count() * 2 + 1
workers = 2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 21 additions & 23 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/src/assets/css/login.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
body{
background: url(http://www.timurtek.com/wp-content/uploads/2014/10/form-bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/css/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.o
*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; }
::backdrop { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; }
html { font-feature-settings: "cv03", "cv04", "cv11"; }
body { overflow: hidden; --tw-bg-opacity: 1; background-color: rgb(229 231 235 / var(--tw-bg-opacity)); font-family: "Inter var", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-feature-settings: "cv02", "cv03", "cv04", "cv11"; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; --tw-bg-opacity: 1; font-family: "Inter var", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-feature-settings: "cv02", "cv03", "cv04", "cv11"; -webkit-font-smoothing: antialiased; }
.container { width: 100%; }
@media (min-width: 640px) {
.container { max-width: 640px; }
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/errors/NotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
<router-link :to="{name: 'homepage'}" class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
На главную
</router-link>
<a href="#" class="text-sm font-semibold text-gray-900">Поддержка <span aria-hidden="true">&rarr;</span></a>
<a href="mailto:suslanchikmopl@gmail.com" class="text-sm font-semibold text-gray-900">Поддержка <span aria-hidden="true">&rarr;</span></a>
</div>
</div>
</div>
Expand Down
18 changes: 14 additions & 4 deletions frontend/src/views/sciences/CategoryDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,29 @@
</li>
</ol>
</nav>
<div class="grid grid-cols-1 gap-4 mt-3 sm:grid-cols-3 lg:mt-20">
<div class="grid grid-cols-1 gap-4 mt-3 sm:grid-cols-3 lg:mt-20" v-if="categoryData.formulas && categoryData.formulas.length">
<div class="lg:w-1/3 border-black" v-for="formula in categoryData.formulas" v-bind:key="formula.id">
<router-link :to="{name: 'formula', params: {slug: formula.slug}}" class="flex min-w-0 gap-x-4">
<!-- <img class="h-20 w-20 flex-none rounded-full bg-gray-50"-->
<!-- :src="buildStaticUrl(`sciences/${category.image_path}`)"-->
<!-- :alt="category.title">-->
<div class="flex-auto">
<p class="text-sm font-semibold leading-6 text-gray-900">{{ formula.title }}</p>
<p class="mt-1 truncate text-xs leading-5 text-gray-500">{{ formula.formula }}</p>
</div>
</router-link>
</div>
</div>
<div class="grid min-h-full place-items-center bg-white px-6 py-24 sm:py-32 lg:px-8" v-else>
<div class="text-center">
<p class="mt-6 text-base leading-7 text-gray-600">
В данной категории пока нет формул, но они скоро появятся
</p>
<div class="mt-10 flex items-center justify-center gap-x-6">
<router-link :to="{name: 'science', params: {slug: scienceData.slug}}" class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Назад к {{ scienceData.title }}
</router-link>
<a href="mailto:suslanchikmopl@gmail.com" class="text-sm font-semibold text-gray-900">Поддержка <span aria-hidden="true">&rarr;</span></a>
</div>
</div>
</div>
</div>
</template>

Expand Down
5 changes: 3 additions & 2 deletions frontend/src/views/sciences/ScienceDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ export default {
</li>
</ol>
</nav>
<div class="grid grid-cols-1 gap-4 mt-3 sm:grid-cols-3 lg:mt-20">
<div class="lg:w-1/3" v-for="category in scienceData.categories" v-bind:key="category.id">
<div class="grid grid-cols-1 gap-8 mt-3 sm:grid-cols-3 lg:mt-20">
<div v-for="category in scienceData.categories" v-bind:key="category.id">
<router-link v-if="category.is_special" :to="`/special-category/${category.slug}/`" class="flex min-w-0 gap-x-4">
<img class="h-20 w-20 flex-none rounded-full bg-gray-50"
:src="buildStaticUrl(`sciences/${category.image_path}`)"
:alt="category.title">
<div class="min-w-0 flex-auto">
<p class="text-sm font-semibold leading-6 text-gray-900">{{category.title}}</p>
<p class="mt-1 truncate text-xs leading-6 text-blue-800">Спецкатегория</p>
</div>
</router-link>
<router-link v-else :to="{name: 'category', params: {slug: category.slug}}" class="flex min-w-0 gap-x-4">
Expand Down

0 comments on commit d0bed95

Please sign in to comment.