Skip to content

Commit

Permalink
Viewport dynamic unites added
Browse files Browse the repository at this point in the history
  • Loading branch information
paperplanefactory committed May 29, 2023
1 parent ecaa838 commit 299104b
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 35 deletions.
8 changes: 4 additions & 4 deletions assets/css/_desktop-header-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
right: -211px;
//width: 210px;
width: 30vw;
height: calc(100vh - #{$header-height});
height: calc(100dvh - #{$header-height});
}

.overlay-in {
Expand Down Expand Up @@ -164,9 +164,9 @@
margin-left: -90px;
padding: 15px 0 !important;
text-transform: none;
-webkit-box-shadow: 0 10px 20px 0 rgba(0,0,0,0.15);
-moz-box-shadow: 0 10px 20px 0 rgba(0,0,0,0.15);
box-shadow: 0 10px 20px 0 rgba(0,0,0,0.15);
-webkit-box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15);
box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15);
opacity: 0;
pointer-events: none;
@include define-basic-transition(opacity, 0.15s);
Expand Down
26 changes: 15 additions & 11 deletions assets/css/_desktop-structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.only-mobile {
display: none;
}

// wrappers and more

.wrapper {
Expand Down Expand Up @@ -40,6 +41,7 @@
max-width: 650px;
margin: 0 auto;
}

// paddings- margins

.plain-page {
Expand All @@ -56,13 +58,13 @@
.photo-hold {
position: relative;
width: calc(100% - 60px);
height: calc(100vh - #{$header-height} - #{$title-fix});
height: calc(100dvh - #{$header-height} - #{$title-fix});
margin: 0 0 0 30px;
@include define-basic-transition(all, 0.3s);

img {
width: 100%;
height: calc(100vh - #{$header-height} - #{$title-fix});
height: calc(100dvh - #{$header-height} - #{$title-fix});
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand Down Expand Up @@ -115,12 +117,12 @@
.photo-hold {
position: relative;
width: 100%;
height: 100vh;
height: 100dvh;
margin: 0;

img {
width: 100%;
height: 100vh;
height: 100dvh;
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand Down Expand Up @@ -188,6 +190,7 @@
position: relative;
padding: 20px 0 15px;
}

// flex boxes

.flex-hold {
Expand Down Expand Up @@ -248,7 +251,7 @@

.loading-transition-effect {
top: calc(#{$header-height} + 1px);
height: calc(100vh - #{$header-height});
height: calc(100dvh - #{$header-height});
}

.wp-caption.alignleft,
Expand All @@ -272,10 +275,10 @@
.gallery-slider {
position: relative;
width: 100%;
//height: calc(100vh - #{$header-height} - 40px);
margin: 20px 0 0;

&.video-slide {

.slick-next,
.slick-prev {
top: 25.5vh;
Expand All @@ -290,7 +293,7 @@
z-index: 10;
top: 0;
width: 50%;
height: 100vh;
height: 100dvh;
border: none;
}

Expand All @@ -306,14 +309,15 @@

.slide-picture-contaniner {
width: 100%;
//height: calc(100vh - #{$header-height} - 120px);

.slide-picture {

embed,
iframe,
img,
object {
width: 100%;
height: calc(100vh - #{$header-height} - 40px);
height: calc(100dvh - #{$header-height} - 40px);
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand Down Expand Up @@ -398,7 +402,7 @@
.scroll-image {
position: relative;
width: 100%;
min-height: calc(100vh - #{$header-height} - #{$title-fix});
min-height: calc(100dvh - #{$header-height} - #{$title-fix});
margin: 7vh 0;
padding: 7vh 0;

Expand All @@ -408,7 +412,7 @@
object,
video {
width: 100%;
height: calc(100vh - #{$header-height} - #{$title-fix});
height: calc(100dvh - #{$header-height} - #{$title-fix});
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand Down
4 changes: 2 additions & 2 deletions assets/css/_mobile-header-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
top: calc(#{$header-mob-height} + 1px);
right: -100vw;
width: 100vw;
height: calc(100vh - #{$header-mob-height});
height: calc(100dvh - #{$header-mob-height});
}

.overlay-in {
Expand All @@ -38,7 +38,7 @@
position: relative;
display: block;
width: calc(100% + 18px);
height: calc(100vh - #{$header-mob-height});
height: calc(100dvh - #{$header-mob-height});
overflow-y: scroll;
overflow-x: visible;
}
Expand Down
31 changes: 21 additions & 10 deletions assets/css/_mobile-structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
margin: 0 auto;
padding: 0 10px;
}

// paddings- margins

.plain-page {
Expand All @@ -41,18 +42,18 @@
.photo-frame {
position: relative;
width: 100%;
height: calc(100vh - #{$header-height} - #{$title-fix-mob});
height: calc(100dvh - #{$header-height} - #{$title-fix-mob});
}

.photo-hold {
position: relative;
width: 100%;
height: calc(100vh - #{$header-height} - #{$title-fix-mob});
height: calc(100dvh - #{$header-height} - #{$title-fix-mob});
margin: 0;

img {
width: 100%;
height: calc(100vh - #{$header-height} - #{$title-fix-mob});
height: calc(100dvh - #{$header-height} - #{$title-fix-mob});
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand All @@ -75,7 +76,7 @@
display: block;
width: 100%;
height: 100%;
@include define-basic-transition(opacity,0.3s);
@include define-basic-transition(opacity, 0.3s);
opacity: 0;

&.swipe-info {
Expand All @@ -92,6 +93,7 @@
background-repeat: no-repeat;
background-size: contain;
}

background-color: rgba(25, 25, 25, 0.8);
opacity: 1;
}
Expand All @@ -101,6 +103,7 @@
position: relative;
padding: 20px 0 15px;
}

// flex boxes

.flex-hold {
Expand Down Expand Up @@ -142,6 +145,7 @@

&.masonry-three,
&.masonry-two {

.flex-hold-child,
.grid-sizer {
position: relative;
Expand All @@ -166,7 +170,7 @@

.loading-transition-effect {
top: calc(#{$header-mob-height} + 1px);
height: calc(100vh - #{$header-mob-height});
height: calc(100dvh - #{$header-mob-height});
}

.wp-caption.aligncenter,
Expand All @@ -182,7 +186,6 @@
.gallery-slider {
position: relative;
width: 100%;
//height: calc(100vh - #{$header-height} - 40px);
margin: 20px 0 0;

&.video-slide {
Expand All @@ -194,16 +197,17 @@
opacity: 1;
pointer-events: all;
visibility: visible;
@include define-basic-transition(all,0.3s);
@include define-basic-transition(all, 0.3s);
border-bottom: solid 1px;
}

.slide-picture-contaniner {
.slide-picture {

embed,
iframe,
object {
height: calc(100vh - #{$header-mob-height} - 80px);
height: calc(100dvh - #{$header-mob-height} - 80px);
}
}
}
Expand All @@ -222,7 +226,7 @@
line-height: 40px;
font-weight: $font-weight-2;
text-align: center;
@include define-basic-transition(all,0.3s);
@include define-basic-transition(all, 0.3s);
}

.slick-prev {
Expand All @@ -237,12 +241,13 @@
width: 100%;

.slide-picture {

embed,
iframe,
img,
object {
width: 100%;
height: calc(100vh - #{$header-mob-height} - 40px);
height: calc(100dvh - #{$header-mob-height} - 40px);
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 50% 50%;
Expand Down Expand Up @@ -329,6 +334,7 @@
margin-top: 7vh !important;
padding-top: 35px;
width: 100%;

//overflow: hidden;
h6 {
margin-bottom: 0;
Expand All @@ -354,6 +360,11 @@
}
}

.full {
text-align: center;
width: 100%;
}

.left {
text-align: right;
width: calc(50% - 17px);
Expand Down
3 changes: 2 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function error_activation_admin_notice()
include_once "includes/theme-pwa.php";
// taxonomies listing
include_once "includes/theme-taxonomies-listing.php";

// taxonomies listing
include_once "includes/theme-updater.php";



Expand Down
6 changes: 3 additions & 3 deletions includes/plugin-update-checker/examples/theme.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "10.0.2",
"details_url": "https://github.com/paperplanefactory/paperplane-photography-theme",
"download_url": "https://github.com/paperplanefactory/paperplane-photography-theme/archive/refs/tags/10.0.4.zip"
"version": "10.0.6",
"details_url": "https://github.com/paperplanefactory/paperplane-photography-theme",
"download_url": "https://github.com/paperplanefactory/paperplane-photography-theme/archive/refs/tags/10.0.6.zip"
}
27 changes: 27 additions & 0 deletions includes/theme-updater.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
function set_theme_github_data()
{
$screen = get_current_screen();
if ((strpos($screen->id, 'theme-general-settings') == true) || (strpos($screen->id, 'acf-options-archives') == true) || (strpos($screen->id, 'acf-options-color-typo-options') == true) || (strpos($screen->id, 'acf-options-image-gallery-options') == true)) {
$them_info = wp_get_theme();
$theme_version = esc_html($them_info->get('Version'));
$theme_url = esc_html($them_info->get('ThemeURI'));
$theme_text_domain = esc_html($them_info->get('TextDomain'));
//var_dump($them_info);
//die();
// generate manifest
$update_data = array(
'version' => $theme_version,
'details_url' => $theme_url,
'download_url' => $theme_url . '/archive/refs/tags/' . $theme_version . '.zip'
);
// encode manifest data
$update_data = stripslashes(json_encode($update_data));
// set path to manifest.json file
$file = '/plugin-update-checker/examples/theme.json';
// write/overwrite manifest.json on site root folder
file_put_contents(__DIR__ . $file, $update_data);
}
}

add_action('acf/save_post', 'set_theme_github_data', 20);
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Theme Name: Paperplane Photography Theme
* Theme URI: http://www.paperplanefactory.com
* Version: 10.0.4
* Theme URI: https://github.com/paperplanefactory/paperplane-photography-theme
* Version: 10.0.6
* Description: A light and flexible starter theme from Paperplane, handcrafted for photographers.
* Author: Paperplane Factory
* GitHub Theme URI: https://github.com/paperplanefactory/paperplane-photography-theme
Expand Down
2 changes: 1 addition & 1 deletion style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.min.css.map

Large diffs are not rendered by default.

0 comments on commit 299104b

Please sign in to comment.