Skip to content

Commit

Permalink
Добавил возможность настройки ветки для деплоя
Browse files Browse the repository at this point in the history
  • Loading branch information
SergTyapkin committed Apr 5, 2024
1 parent aa97ace commit 7f2209f
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set-auto-renewing-certs:

update:
git fetch --all
git reset --hard origin/master
git reset --hard origin/$$(sed -n "s/^DEPLOY_BRANCH=//p" "docker-deploy/.env")
git log --oneline -1
cd docker-deploy && \
docker compose up -d nginx --build
Expand Down Expand Up @@ -99,7 +99,7 @@ set-docker-not-sudo:
setup-env-file:
cp --no-clobber ./docker-deploy/.env.example ./docker-deploy/.env
echo '' && \
echo 'Edit .env file. Write right DOMAIN_URL!' && \
echo 'Edit .env file. Write right DOMAIN_URL without https:// and url paths!' && \
echo '[press Enter...]' && \
read ENTER
nano ./docker-deploy/.env
Expand Down
3 changes: 2 additions & 1 deletion docker-deploy/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ NODE_RELEASE=18
NGINX_RELEASE=1.23.3-alpine
FRONTEND_COMPOSE_NAME=frontend-compose
API_PORT=3000
DOMAIN_URL=your.domain
DOMAIN_URL=your.domain.com
DEPLOY_BRANCH=master
33 changes: 33 additions & 0 deletions src/styles/animations.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@require 'constants.styl'

animation-roll-down(start-height=0, duration=2s, padding=0)
opacity 0
max-height start-height
padding-top 0
padding-bottom 0
animation animation-roll-down duration ease forwards
@keyframes animation-roll-down
0%
10%
opacity 1
99%
opacity 1
padding padding
max-height 3000px
100%
opacity 1
padding padding
max-height unset

hover-effect()
cursor pointer
transition all 0.2s ease
@media ({desktop})
&:hover
opacity 0.7
hover-effect-underline(color=white)
background linear-gradient(color, color) 50% 100% / 0 1px no-repeat
transition all .2s
@media ({desktop})
&:hover
background-size 100% 1px
32 changes: 32 additions & 0 deletions src/styles/components.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@require 'constants.styl'
@require 'fonts.styl'
@require 'buttons.styl'
@require 'utils.styl'

block(colorBorder=colorBorder)
display block
padding 35px
border colorBorder 2px solid
border-radius borderRadiusXL
header
font-large()
section
font-medium()
block-bg(colorBg=colorBg)
display block
background colorBg

input()
margin 0
padding 5px 10px
background colorBg
border colorBorder 1px solid
border-radius borderRadiusXS
color colorText2
cursor text
trans()
&:focus
border-color colorBg
color colorText1
&::placeholder
color colorText4
37 changes: 21 additions & 16 deletions src/styles/fontsLoader.styl
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
_font_default()
font-family SBSans
_font_default(font-family)
font-family font-family
font-style normal
font-stretch normal
font-display swap

@font-face
_font_default()
src local(SBSans-Bold),
url(../res/fonts/SBSans/SBSansText-Bold.ttf) format("truetype"),
url(../res/fonts/SBSans/sbsanstext-bold-webfont.woff) format("woff")
_font_default(ALS-Sector)
src local(ALS-Sector-Bold),
src local(ALS Sector Bold),
url(/res/fonts/ALS_Sector/ALS_Sector_Bold.ttf) format("truetype"),
url(/res/fonts/ALS_Sector/ALS_Sector_Bold.woff) format("woff")
font-weight 700
//@font-face
// _font_default(ALS-Sector)
// src local(ALS-Sector-SemiBold),
// src local(ALS Sector SemiBold),
// url(/res/fonts/ALS_Sector/ALS_Sector_SemiBold.ttf) format("truetype"),
// url(/res/fonts/ALS_Sector/ALS_Sector_SemiBold.woff) format("woff")
// font-weight 600
@font-face
_font_default()
src local(SBSans-SemiBold),
url(../res/fonts/SBSans/SBSansText-SemiBold.ttf) format("truetype"),
url(../res/fonts/SBSans/sbsanstext-semibold-webfont.woff) format("woff")
font-weight 600
@font-face
_font_default()
src local(SBSans-Regular),
url(../res/fonts/SBSans/SBSansText-Regular.ttf) format("truetype"),
url(../res/fonts/SBSans/sbsanstext-regular-webfont.woff) format("woff")
_font_default(ALS-Sector)
src local(ALS-Sector-Regular),
src local(ALS Sector Regular),
url(/res/fonts/ALS_Sector/ALS_Sector_Regular.ttf) format("truetype"),
url(/res/fonts/ALS_Sector/ALS_Sector_Regular.woff) format("woff")
font-weight 500

13 changes: 13 additions & 0 deletions src/styles/utils.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ centered-absolute-transform()
left 50%
transform translate(-50%, -50%)

trans(time=0.2s)
transition all time ease

button-no-styles()
background none
outline none
border none
margin 0
padding 0
list-no-styles()
margin 0
padding 0
list-style none

pc-hidden()
@media ({desktop})
Expand Down

0 comments on commit 7f2209f

Please sign in to comment.