Skip to content

Commit

Permalink
Sweeping documentation updates (#548)
Browse files Browse the repository at this point in the history
---

Co-authored-by: Zachary Svoboda <93960196+Zsvoboda87@users.noreply.github.com>
  • Loading branch information
vsalvino and Zsvoboda87 committed May 24, 2024
1 parent 4ba33d7 commit a195027
Show file tree
Hide file tree
Showing 305 changed files with 2,074 additions and 1,274 deletions.
330 changes: 80 additions & 250 deletions docs/advanced/advanced01.rst

Large diffs are not rendered by default.

360 changes: 181 additions & 179 deletions docs/advanced/advanced02.rst

Large diffs are not rendered by default.

Binary file added docs/advanced/img/A01/after.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/before.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/css_demo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/custom_css.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/custom_navbar.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/logo_centered.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A01/navbar_html.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/plp_as_child.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/plp_editor.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/plp_preview.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/pp_editor.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/pp_preview.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/img/A02/pp_preview2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/advanced/img/advanced_customcss1.png
Binary file not shown.
Binary file removed docs/advanced/img/advanced_footer_front.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/advanced/img/advanced_improved_website1.png
Binary file not shown.
Binary file removed docs/advanced/img/advanced_two_tiered_navbar.png
Binary file not shown.
Binary file removed docs/advanced/img/cupcake_landing_published.png
Binary file not shown.
Binary file removed docs/advanced/img/cupcake_page_published.png
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ Output will be in ``docs/_build/html/`` directory.
Updating Tutorial Documentation
-------------------------------

From time to time, the documentation for the tutorial will need to be updated. You can work directly in
the tutorial site by loading the fixture file for its database (read more at :ref:`load-data`).
.. From time to time, the documentation for the tutorial will need to be updated. You can work directly in
.. the tutorial site by loading the fixture file for its database (read more at :ref:`load-data`).
However, once you have worked in the tutorial site and gotten new screenshots for the **Getting Started** documentation,
Once you have worked in the tutorial site and gotten new screenshots for the **Getting Started** documentation,
you will also need to update the fixture file, which is located in ``tutorial > mysite > website > fixtures``.

**These are the steps for updating the fixture:**
Expand All @@ -317,7 +317,7 @@ you will also need to update the fixture file, which is located in ``tutorial >

3. Move the ``database.json`` file into the ``fixtures`` folder.

4. For testing ``loaddata``, please review the steps at :ref:`load-data`.
.. 4. For testing ``loaddata``, please review the steps at :ref:`load-data`.
Publishing a New Release
Expand Down
11 changes: 0 additions & 11 deletions docs/features/blocks/contentblocks/accordion.rst

This file was deleted.

32 changes: 0 additions & 32 deletions docs/features/blocks/contentblocks/carousel.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/features/blocks/contentblocks/image.rst

This file was deleted.

43 changes: 0 additions & 43 deletions docs/features/blocks/contentblocks/imagegallery.rst

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed docs/features/blocks/contentblocks/img/textblock.png
Diff not rendered.
13 changes: 0 additions & 13 deletions docs/features/blocks/index.rst

This file was deleted.

35 changes: 0 additions & 35 deletions docs/features/blocks/layoutblocks/cardgrid.rst

This file was deleted.

Diff not rendered.
Diff not rendered.
Binary file removed docs/features/blocks/layoutblocks/img/hero_block.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
46 changes: 46 additions & 0 deletions docs/features/contentblocks/accordion.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. _accordion-block:

Accordion Block
===============

Creates a collapsible section with a button to toggle.
Each Accordion has multiple sections or panels.

`View example live <https://crxpharma.codered.cloud/demo-blocks/accordion-block/>`_


Example:

.. figure:: images/accordion_closed.jpeg
:alt: demo accordion closed

Demo accordion closed

.. figure:: images/accordion_open.jpeg
:alt: demo accordion with panel open

Demo accordion with panel open

Field Reference
---------------

Fields and purposes:

* **Accordion** - Choose a preexisting accordion snippet, created under snippets.

Editor:

.. figure:: images/accordion_demo.jpeg
:alt: Editing screen for accordion

Editing screen for accordion

Each Accordion panel needs a name and content. After you make a second panel,
arrows will appear to allow you to change the order of the panels.

.. figure:: images/accordion_arrows.jpeg
:alt: arrows on the accordion panels

Arrows on the accordion panels. They appear after you make a second panel.

Additional Information in the `bootstrap docs <https://getbootstrap.com/docs/5.2/components/accordion/>`_
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ Button Block
The button block renders an HTML anchor styled as a button. This can be used to
link to pages, documents, or external links.

Example:

.. figure:: images/button_example.jpeg
:alt: default button styles

default button styles

Note this screen shot was taken using the default bootstrap colors. If you use a theme or change global colors with sass,
they will likely be different colors.

Field Reference
---------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.. _card-block:

Card Block
==========

Allows the user to fill out information to be displayed in a card. Crops the image to a 3:2 ratio.
Allows the user to fill out information to be displayed in a card. Crops the image to a 3:2 ratio.

.. note::
There is also a :ref:`card-grid` which groups cards into a grid and is a Layout Block;
There is also a :ref:`card-grid` which groups cards into a grid and is a Layout Block;
this Card Block only displays a single card.

Example: See below.

Field Reference
---------------

Expand All @@ -22,5 +26,14 @@ Fields and purposes:

* **Links > Button Link** - The button link to include at the bottom of the card, set to link to a page or external link

* **Advanced Settings > Template** - Multiple options for Card layouts. See Below for reference.

Here is the same card, using different templates in the advanced settings:

.. figure:: images/card_layout_options.jpeg
:alt: Grid of a card with different layout templates selected

A Grid of a card with different layout templates selected.

Explore `Bootstrap Cards <https://getbootstrap.com/docs/4.0/components/card/>`_ to get an understanding of the
appearance and function of cards.
appearance and function of cards.
79 changes: 79 additions & 0 deletions docs/features/contentblocks/carousel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.. _carousel-block:

Carousel Block
==============

Allows the user to create a carousel with image backgrounds and relevant blocks.
Carousels automatically change slides, but also have arrow controls for the user to advance or return to the previous slide.
Make a Carousel by going to **Snippets > Carousels** and clicking Add Carousel.

Example:
.. figure:: images/carousel_example.jpeg
:alt: default button styles

default button styles


Field Reference
---------------

Fields and purposes:

* **Carousel** - Choose a Carousel

If you don't have any carousels already made, you can build a carousel by clicking **Choose A Carousel** and
clicking on "Why not **create one now**?" in the popup box. This will take you to **Snippets > Carousels** where
you can create a carousel to add to the page. Here is a carousel editor with three slides; each slide has a caption:

.. figure:: images/carousel_editor.jpeg
:alt: Building a carousel in Snippets

The edit mode for building a carousel snippet

Save your work and now you can select that carousel in a page editor. This one is named Demo. Here is a preview of for one of our slides:

.. figure:: images/carousel_preview.jpeg
:alt: Our carousel published on the page

The carousel published on a page

You'll notice it's hard to see the caption because the bootstrap default text is white. Let's look at customizing our carousel two different ways.

First, you can override the CSS class. If you look at the `bootstrap docs <https://getbootstrap.com/docs/5.2/components/carousel/>`_ or the template.
You'll find the class for caption is ``carousel-caption``. For our example, let's add a background-color and border-radius.

.. code:: CSS
.carousel-caption{
background-color: rgba(60, 60, 60, 0.5);
border-radius: 10px;
}
Add this to your custom.css file (basic installation) or the custom.scss file (sass installation).
Save the file, compile the sass(sass install only), and hard refresh the browser. See :ref:`adding_custom_css` for more details.

.. figure:: images/carousel_preview_bg.jpeg
:alt: Our carousel published on the page

The carousel published on a page

The second option would be to alter the template.
Looking at the `bootstrap docs <https://getbootstrap.com/docs/5.2/components/carousel/>`_ you can find there is a dark variant.
See :ref:`customizing_templates` for a more detailed tutorial on overriding templates.

* To alter our template you need to copy the template from `github <https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/templates/coderedcms/blocks/carousel_block.html>`_
* Paste the file in the correct directory so it overrides the default template. Our file path: **mysite>website>templates>coderedcms>blocks>carousel_block.html**
* In carousel_block.html on line 4; add carousel-dark to the class attribute. The line should now look like this:

.. code:: html

<div id="carousel-{{self.carousel.id}}" class="carousel carousel-dark slide" data-bs-ride="carousel">

* Save the file and refresh the browser.

.. figure:: images/carousel_preview_dark.jpeg
:alt: Our carousel published on the page

The carousel published on a page

(In this example, I removed the custom css for .carousel-caption from the previous example)
Loading

0 comments on commit a195027

Please sign in to comment.