HELP upload website + style text


#1

Hi, I?m new here and I have 2 unrelated questions:

  1. I am almost finished with my website and I want to upload it to my server. I use Transmit as for another 2 websites I did, just by dropping the whole folder on the window. The upload process goes smooth, but when I check my URL (www.soniakazovsky.online) my content is not there. Any idea? Is there anything I’m missing? I have purchased and applied the license. How wold you suggest to do?

  2. I need to define different text styles to different chunks of text on my website. I know I can do this in the .css file, by defining different classes, but how to tell to the text editor in the panel which text should respond to which class? Just writing some code there or…?

Thank you for your replies to such basic questions!
L


#2

Hi,

If you have uploaded a folder with your Kirby folders/files inside, your website is available at www.soniakazovsky.online/folder_name

If you have uploaded all the Kirby folders/files in your root hosting folder and have a blank page, it could be a PHP error.

You can add html and css class in the panel editor


#3

Add this to /site/config/config.php in order to show errors immediately.

c::set('debug', true);


#4

As regards no 2, also see this post: Add a style class to each text-element in textfield


#5

Thank you all for the advice. The c::set(‘debug’, true); is already there. And I think I’ll be able to manage the text style.

About the folder, I have uploaded the folder of this particular website, not the root folder (in the image below the selected folder is what I’ve droped in Transmit). I have tried to rename it according to the URL (as I usually do) but no luck. The www.soniakazovsky.online/folder_name (i assume I have to put the folder name, which I did) shows a 404error page.

and this is it in Transmit, all uploaded but still no result. Any idea?

Thank you!
L


#6

Looks like it works now, at least the start page but not the subpages. Have you uploaded the .htaccess file? Can’t see it on the server…


#7

Miracle! :smiley: Yes, I see the subpages don’t work. I’ve read on the documents that the links can just be (link: networks text: networks) and the like, so you don’t have problems if you move your website to another domain. Not sure about the .htaccess, could you explain briefly?


#8

The .htaccess file is a hidden file in the root of your project that is needed for rewriting to work and rewriting is necessary for subpages to work. Maybe it was not copied to the server?


#9

If your host company use Apache as web server:
Create a file named htaccess and copy past this inside:

# Kirby .htaccess

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite

# In some enviroments it's necessary to
# set the RewriteBase to:
#
# RewriteBase /

# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]

# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]

# block direct access to kirby and the panel sources
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]

# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on

Then upload this htaccess file in your htdocs root folder and rename this file .htaccess (with a “dot” before)

This file is a hidden file used by Apache to rewrite URL …


#10


#11

SWEET! it works, thank you everybody!!!

Somebody at Strato (my host) did a domain forward

“About you’re other question, i see you didn’t setup a domain forward yet, that’s why i did it for you. I saw that you created the folder named ‘’/www.soniakazovsky.online/’’. That’s where i pointed the domain to with a intern domain forward. In the link below you see how you can do this yourself. https://www.strato.nl/faq/article/382/Instellen-van-een-domeinforward.html#intern

and this solved the first problem.

I’ll give a try to the text styling later, and might come back with some other questions. Thank you very much to all!!
L


#12

Ok, not sure how to proceed with the text. I’ve checked the discussion linked by texnixe, but i’m still a bit confused. I’ve done this in the .css:

and tried this in the panel:

but of course no result in the front end. What’s wrong?


#13

Have you created a custom caption Kirbytag? If not, this won’t work.


#14

the Vimeo ktag does have ‘caption’ and ‘class’ parameter but you have to use it like this:

https://getkirby.com/docs/cheatsheet/kirbytags/vimeo


#15

Please note that if you add the caption within the Vimeo tag, it is added as a figcaption. You would have to style it via the figcaption element in this case.


#16

Another way to style different sections of text would be to use this plugin — https://github.com/jongacnik/kirby-wrappers


#17

okthan ks texnixe, i have had a look at the kyrbytag page, but can’t figure how to write the code. There’s not much said on that page about styling of the text, just something about a wikipedia link and other items. Where can I find some more advice on what this tag should look like?


#18

Maybe you can give some examples of what exactly you want to style? The caption example above probably does not make that much sense, it would be better to include that in the Vimeo tag.


#19

Sure. For example, in http://soniakazovsky.online/networks I would like to have the links in the text underlined, while the “home” buttons (which are also links) not underlined (same goes for the menu in http://soniakazovsky.online). Or in http://soniakazovsky.online/works/archive/a-syndrome I would like to have the short text under the first picture smaller and left aligned (this goes for other image captions throughout the site). Just in general, I can make more text classes on the .css file, but how do I specify which part of the code should apply to which part of the text?

And also: how do I create a layout for mobile? With less margin space, for example… I guess i just have to make a “mobile class” and specify that if the screen is smaller than 500px (for ex, is that a good size?) it should load the other part of the code… is that right?


#20

If you add a link via kirbytext, you can give it a class:

(link: http://wikipedia.com class: inline-link)

Then you can style it via your stylesheet.

Your home buttons would get another class, maybe nav-link or whatever (but I don’t know why you add them via your text field and not via a tag in your template).

As regard the image caption, you add it as a separate paragraph. I wouldn’t do that but add it as a caption to the image ( where it belongs semantically) within the image tag

(image: someimage.jpg caption: My caption class:someclass)

Then you can either style all image captions in the same way, or you add a class like in the example.

To get a better understand of Kirbytags and their options, you might want to have a look at the docs: https://getkirby.com/docs/content/text