Skip to content

Commit

Permalink
Added backend to the repo and some small fixes for safari on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskarl authored and Thomas Karl committed Jun 16, 2019
1 parent 2cdb6f5 commit 038b2f1
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 2 deletions.
75 changes: 75 additions & 0 deletions backend/wp-content/themes/tws-wordpress-theme/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

/**
* Enqueue scripts
*/
function twstudio_script_enqueue() {
wp_enqueue_style( 'customstyle', get_template_directory_uri() . '/style.css', array(), '1.0.0' );
}
add_action( 'wp_enqueue_scripts', 'twstudio_script_enqueue' );



/**
* Add theme support
*/
function twstudio_theme_setup() {
add_theme_support( 'menus' );
add_theme_support( 'post-thumbnails' );

//Register menus
register_nav_menu( 'main-menu', 'Main navigation' );
}
add_action( 'init', 'twstudio_theme_setup' );



/**
* Remove links from admin
*/
function remove_menus() {
// remove_menu_page( 'index.php' ); //Dashboard
remove_menu_page( 'edit.php' ); //Posts
// remove_menu_page( 'upload.php' ); //Media
remove_menu_page( 'edit.php?post_type=page' ); //Pages
remove_menu_page( 'edit-comments.php' ); //Comments
remove_menu_page( 'themes.php' ); //Appearance
// remove_menu_page( 'plugins.php' ); //Plugins
remove_menu_page( 'users.php' ); //Users
remove_menu_page( 'tools.php' ); //Tools
}
add_action( 'admin_menu', 'remove_menus' );



/**
* Message in admin-footer
*/
// Add you own text in admin footer
function twstudio_footer_admin() {
echo '<a href="https://www.thomasweb.studio/" target="_blank">thomasweb.studio 🐩</a>.';
}
add_filter( 'admin_footer_text', 'twstudio_footer_admin' );



/**
* Adds a option page in admin
*/
if ( function_exists( 'acf_add_options_page' ) ) {
acf_add_options_page();
}



/**
* Adds custom message to Admin
*/
function twstudio_admin_notice() {
?>
<div class="notice">
<p>Click <a href="https://webmail.domeneshop.no/" target="_blank">here</a> to check your webmail.</p>
</div>
<?php
}
add_action( 'admin_notices', 'twstudio_admin_notice' );
18 changes: 18 additions & 0 deletions backend/wp-content/themes/tws-wordpress-theme/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"/>

<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<div class="wrapper">
<p>You are at the wrong page</p>
</div>

<?php wp_footer(); ?>
</body>
</html>
9 changes: 9 additions & 0 deletions backend/wp-content/themes/tws-wordpress-theme/page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php get_header(); ?>

<div class="wrapper">

<?php the_content(); ?>

</div>

<?php get_footer(); ?>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions backend/wp-content/themes/tws-wordpress-theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@charset "UTF-8";
/*!
Theme Name: TWS
Theme URI:
Author: Thomas Karl Andersson
Author URI: http://thomasweb.studio/
Description: Simple and clean
Version: 1.0 Alpha
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twstudio
Tags: Simple, clean
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
*, body, html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%
}
3 changes: 1 addition & 2 deletions src/styles/_about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
z-index: 11;
@include center-flex;
position: relative;
height: 100vh;
background-color: $brand-color1;

.about-container {
max-width: 640px;
margin: 0 auto;
margin: 140px auto;
text-align: center;

p {
Expand Down
3 changes: 3 additions & 0 deletions src/styles/_fishes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
.fish {
position: absolute;
margin-left: -$space;
@media screen and (max-width: 768px) {
display: none;
}
}

.right {
Expand Down
2 changes: 2 additions & 0 deletions src/styles/_gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.gallery-container {
z-index: 21;
position: relative;
background-color: $brand-color1;

.gallery {
padding: $space;
Expand Down Expand Up @@ -95,6 +96,7 @@
text-transform: uppercase;
background: transparent;
color: $light;
padding-bottom: $space * 2;
cursor: pointer;
font-weight: 700;

Expand Down

0 comments on commit 038b2f1

Please sign in to comment.